# Dihedral restraint error

**URL:** https://gromacs.bioexcel.eu/t/dihedral-restraint-error/1750
**Category:** User discussions
**Tags:** restraints
**Created:** [March 15, 2021, 11:20am UTC](https://gromacs.bioexcel.eu/t/dihedral-restraint-error/1750 "2021-03-15T11:20:20Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![rakesh](https://avatars.discourse-cdn.com/v4/letter/r/258eb7/32.png) [@rakesh](https://gromacs.bioexcel.eu/u/rakesh)
#### Post date: [March 15, 2021, 11:20am UTC](https://gromacs.bioexcel.eu/t/dihedral-restraint-error/1750/1 "2021-03-15T11:20:20Z")

</div>

GROMACS version:  
GROMACS modification: Yes/No  
Here post your question

After i create the [Dihedral restraint] and add it to my top file , i got the following error.  
This is my Dihedral restraint file  
[dihedral\_restraints]  
; ai aj ak al type label phi dphi kfac power  
;DVal-2  
; phi C’(n-1) - N - CA - C’  
21 23 25 37 1 1 81 0 1 2  
; psi N - CA - C’ - N(n+1)  
23 25 37 39 1 1 -152 0 1 2  
;Val-3  
; phi C’(n-1) - N - CA - C’  
37 39 41 53 1 1 -144 0 1 2  
; psi N - CA - C’ - N(n+1)  
39 41 53 55 1 1 123 0 1 2  
;DVal-4  
; phi C’(n-1) - N - CA - C’  
53 55 57 69 1 1 105 0 1 2  
; psi N - CA - C’ - N(n+1)  
55 57 69 71 1 1 -156 0 1 2  
;Val-5  
; phi C’(n-1) - N - CA - C’  
69 71 73 85 1 1 -145 0 1 2  
; psi N - CA - C’ - N(n+1)  
71 73 85 87 1 1 101 0 1 2  
;DVAL-6  
; phi C’(n-1) - N - CA - C’  
85 87 89 101 1 1 121 0 1 2  
; psi N - CA - C’ - N(n+1)  
87 89 101 103 1 1 -155 0 1 2  
;VAL-7  
; phi C’(n-1) - N - CA - C’  
101 103 105 117 1 1 -149 0 1 2  
; psi N - CA - C’ - N(n+1)  
103 105 117 119 1 1 100 0 1 2

GROMACS: gmx grompp, VERSION 5.1.5  
Executable: /usr/local/gromacs/bin/gmx  
Data prefix: /usr/local/gromacs  
Command line:  
gmx grompp -f step6.0\_minimization.mdp -o step6.0\_minimization.tpr -c step5\_input.gro -r step5\_input.gro -p topol.top -n index.ndx

Back Off! I just backed up mdout.mdp to ./#mdout.mdp.6#  
Setting the LD random seed to 4121815648  
Generated 465 of the 465 non-bonded parameter combinations  
Generating 1-4 interactions: fudge = 1  
Generated 0 of the 465 1-4 parameter combinations

* * *

Program gmx grompp, VERSION 5.1.5  
Source code file: /home/rsr/Downloads/gromacs-5.1.5/src/gromacs/gmxpreprocess/toppush.c, line: 1949

## Fatal error: Incorrect number of parameters - found 5, expected 3 or 6 for Dih. Rest… For more information and tips for troubleshooting, please check the GROMACS website at [Errors - Gromacs](http://www.gromacs.org/Documentation/Errors)

---

<div class="post-metadata">

### Author: ![alevilla](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/alevilla/32/439_2.png) [@alevilla](https://gromacs.bioexcel.eu/u/alevilla)
#### Post date: [March 16, 2021, 10:45am UTC](https://gromacs.bioexcel.eu/t/dihedral-restraint-error/1750/2 "2021-03-16T10:45:12Z")

</div>

Hi,  
The program is expecting 6 parameters but it finds only 5. Have you try to reformat your directive [dihedral\_restraints] or check the line that causes the error.  
Best regards  
Alessandra

---

<div class="post-metadata">

### Author: ![rakesh](https://avatars.discourse-cdn.com/v4/letter/r/258eb7/32.png) [@rakesh](https://gromacs.bioexcel.eu/u/rakesh)
#### Post date: [March 16, 2021, 11:06am UTC](https://gromacs.bioexcel.eu/t/dihedral-restraint-error/1750/3 "2021-03-16T11:06:49Z")

</div>

After I exclude the label and power I didn’t face any error ,is it fine to exclude label and power ?

---

<div class="post-metadata">

### Author: ![alevilla](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/alevilla/32/439_2.png) [@alevilla](https://gromacs.bioexcel.eu/u/alevilla)
#### Post date: [March 16, 2021, 1:07pm UTC](https://gromacs.bioexcel.eu/t/dihedral-restraint-error/1750/4 "2021-03-16T13:07:26Z")

</div>

Hi,  
I see that you are using GROMACS 5.1. There may be difference with the current version, I do not recall. You can check if the restrains you apply are what you want by looking [GROMACS 5.1 manual](https://manual.gromacs.org/documentation/5.1/manual-5.1.pdf)- Chapter 4 and table 5.5

\Alesssandra

---

<div class="post-metadata">

### Author: ![rakesh](https://avatars.discourse-cdn.com/v4/letter/r/258eb7/32.png) [@rakesh](https://gromacs.bioexcel.eu/u/rakesh)
#### Post date: [March 18, 2021, 10:09am UTC](https://gromacs.bioexcel.eu/t/dihedral-restraint-error/1750/5 "2021-03-18T10:09:15Z")

</div>

I am a tyro in distance restraining hence i am facing difficulties in making the file for it as i dont know how to reckon the value of ro,r1etc parameter.

What i have is just distance between two atom but i dont know how to get the value of r0, r1 etc for distance restraint.

//Rakesh
