[gmx-users] how to add angle_restraints and dihedral_restraints for atoms belonging to two different molecules

jnsong jnsong at itcs.ecnu.edu.cn
Sat May 18 10:20:52 CEST 2013


Dear all,

Recently, I want to add angle_restraints and dihedral_restraints for 
atoms in two separate molecules, that is, inter-molecular restraints, 
not intra-molecular restraints.

I add the following into my .top file:
[ angle_restraints ]
; i   j    k    l    type   theta0     fc     multiplicity
  20  22   47   50    1      0.0       1500         1

[ dihedral_restraints ]
;   i    j     k    l    type label phi dphi kfac power
    25   28    51   52     1      1 180     0     1      2

But it give errors:
"Fatal error:
[ file ang_res.itp, line 5 ]:
Atom index (47) in angle_restraints out of bounds (1-24).
This probably means that you have inserted topology section 
"angle_restraints"
in a part belonging to a different molecule than you intended to."

Atom 20/22 belongs to one molecule, and Atom 47/50 belongs to another 
molecule. The same situation is for atom 25/28 and atom 51/52.

I guess this error comes from the fact that I have two separate 
molecules in my simulation system, thus topol_Protein.itp and 
topol_Protein2.itp are produced when using pdb2gmx. Atom 47 in .gro file 
has atom number 17 in topol_Protein2.itp. Thus it gives the error that 
Atom index (47) in angle_restraints out of bounds!

Additionally, [ angle_restraints] and [dihedral_restraints] seems for 
the intra-molecular interaction definitions.

Would you please tell me how to add angle and dihedral restraints for 
the atoms that belong to two different molecules?

Thank you very much!

Best wishes!

Jianing Song




More information about the gromacs.org_gmx-users mailing list