Dihedral restraints

GROMACS version: 2019.3
GROMACS modification: No

Hi I’ve got a system in which I’m trying to restrain two dihedrals.

I’ve tried by amending ffbonded.itp of my FF, as follows

[ dihedraltypes ]
; ai aj ak al func phi kphi
a b c d 10 -160 10
e f c d 10 83 10

I also amended the .rtp file, as well as the topology .itp file accordingly.

When I try to run grompp I get the mysterious errors (the line numbers correspond to the two specified dihedrals in ffbonded.itp)

ERROR 1 [file ffbonded.itp, line 61]:
Incorrect number of atomtypes for dihedral (4 instead of 2 or 4)

ERROR 2 [file ffbonded.itp, line 62]:
Incorrect number of atomtypes for dihedral (4 instead of 2 or 4)

I then tried another approach, which was to remove all this from ffbonded.itp, and instead use the following in the topology .itp file itself

[ dihedral_restraints ]
; ai aj ak al funct phi dphi kfac
2 1 7 8 1 -160 0 1
16 15 7 8 1 83 0 1

Having had a very good look online I amended the .mdp file too, starting it off with
define = -DDIHRES
and adding
dihre = yes

as they are the only relatively recent posts I could find, even though in the GROMACS 2019 documentation on mdp files, these aren’t mentioned in there at all (they’ve been deprecated?)

Running the equilibration however it’s clear that the dihedral restraints have not worked at all as they are varying widely (between + and - 180).

Any suggestions what I can do to solve this please? I’ve spent days trying to look for anything regarding this, and I’m still no closer to restraining these two dihedrals. Am I missing something? I’ve had a look at the GROMACS documentation multiple times, so if you can not just refer me to that again it would be appreciated, as I can’t find much information on how to implement this.

Thanks,

Robert

Hi Robert,
You can set “10” for restricted dihedral in place of 1 (see for syntax here File formats — GROMACS 2021 documentation and urea example).

Best regards
Alessandra

Hi Alessandra,

Thanks for your reply, however as I mentioned in my original post, I’ve already done this, as follows, but I also get a very strange error when I do this.

I’ve tried by amending ffbonded.itp of my FF, as follows

[ dihedraltypes ]
; ai aj ak al func phi kphi
a b c d 10 -160 10
e f c d 10 83 10

I also amended the .rtp file, as well as the topology .itp file accordingly.

When I try to run grompp I get the mysterious errors (the line numbers correspond to the two specified dihedrals in ffbonded.itp)

ERROR 1 [file ffbonded.itp, line 61]:
Incorrect number of atomtypes for dihedral (4 instead of 2 or 4)

ERROR 2 [file ffbonded.itp, line 62]:
Incorrect number of atomtypes for dihedral (4 instead of 2 or 4)

Hi,
I meant to have them in the topology file as in the urea example here File formats — GROMACS 2021 documentation
I know you try to have in the topology file but you had a different sintax of what show in the urea example
\Alessandra