[gmx-users] Including water in for restraining

chris.neale at utoronto.ca chris.neale at utoronto.ca
Sat Nov 11 07:17:43 CET 2006


> While I am using harmonic restraint for water and Zn, I am unable to do
> so since the chain A "itp" file does not contain water, It shows error
> as follow -------------------------------------------------------
> Program grompp, VERSION 3.3.1
> Source code file: toppush.c, line: 1108
> Fatal error:
> [ file "Protein_ion_A.itp", line 5847 ]:
>             Atom index (2905) in bonds out of bounds (1-2900)
> -------------------------------------------------------
> How to restraint molecule which is present in out of this itp file ?

Look at the end of your topol.top file. Does it contain any mention of  
water, ions, or zinc? If not, then it should contain lines like this  
(although the exact nature will depend on the water model):

; Include water topology
#include "tip3p.itp"
#ifdef POSRES_WATER
; Position restraint for each water oxygen
[ position_restraints ]
;  i funct       fcx        fcy        fcz
    1    1       1000       1000       1000
#endif

Then in your .mdp file include the line
define = -DPOSRES_WATER
to position restrain the water.

For Zn it will look like this
; Include generic topology for ions
#include "ions.itp"

This won't work for position restraints. Therefore first look at  
ions.itp. Notice that there are multiple entries for each ion that  
correspond to the forcefield that you are using. For this example,  
let's say that you are using opls-aa:

You would then remove 2 the lines:
; Include generic topology for ions
#include "ions.itp"

and add the following lines in their place:
; Taken from OPLS-AA from gromacs-3.3.1
[ moleculetype ]
; molname       nrexcl
ZN2+            1
[ atoms ]
; id    at type res nr  residu name     at name  cg nr  charge   mass
1       ZN2+    1       ZN2+            ZN       1      2        65.37000
#ifdef POSRES_ZN
; Position restraint for ZN2+
[ position_restraints ]
;  i funct       fcx        fcy        fcz
    1    1       1000       1000       1000
#endif

Then in your .mdp file include the line
define = -DPOSRES_ZN
to position restrain the zinc.

To constrain both, do
define = -DPOSRES_WATER -DPOSRES_ZN

Further, whatever file you are using that contains the position  
restraints for your protein... remove any lines that reference water  
or zinc.

If you need further help, please specify exactly what you have done so  
far, where you got your files, and what the files look like.

Chris.






More information about the gromacs.org_gmx-users mailing list