[gmx-users] Problems with restrains

K.A.Feenstra k.a.feenstra at chem.rug.nl
Thu Dec 6 12:38:27 CET 2001

Alan Wilter Sousa da Silva wrote:
> Hi everybody.
> I am trying to perform a restrained molecular dynamics simulation and I have
> a problem when I try to restrain *simultaneously* the position of three
> water molecules and three protein atoms.
> I have included the itp files for the protein chains whith their respective
> restrained position files.
> In the mdp file I have defined "define = -DPOSRES_WATER" and I have also
> included in the topolgy file the "#ifdef POSRES_WATER" option, restraining
> the oxygen position of three water molecules.
> When running the grompp program I have obtained the following message.
> Fatal error: [ file "1bkv.top", line 32 ]:
>              Atom index (13929) in position_restraints out of bounds (1-1)
> What can I do to restrain simultaneoulsy the position of some water
> molecules and some protein atoms?

Topologies in GROMACS are molecule based. So any interactions, and that
includes position restraints, are defined on the level of the molecule.
The atom number should also be the number 'inside' the molecule, i.e.
1 2 3 for the O H H atoms in water. In the topology, first molecules are 
defined and later on you define a 'system' that consists of a number of 
previously defined molecules.

This all means that if you specify position restraints for water, that
it then works for all water molecules. If you only want to restrain a
number of waters, you should define a separate water molecule type, 
with a different name, i.e. SOLPR, and include the position restraints
definition there. This means, you will have to copy over the whole SPC
definition in spc.itp, and then add a position restrains section. Then, 
when defining your 'system', you should take care to make these correspond 
to the water molecules in your conformation, so somtehing like this 
might be necessary:

; system name
Testing three water posres

[ molecules ]
protein		1
SOL		10
SOL		15
SOL		3
SOL		563

This would add position restraints to the 11th, 27th and 31th water
molecules, in the order they appear in your coordinate file. Of course,
the total number of SOL and SOLPR molecules should match the total
number of water that you have. 


 _____________ _____________________________________________________
|             | Anton Feenstra       Dept. of Biophysical Chemistry |
|  _   _  ___,| K.A.Feenstra at chem.rug.nl    University of Groningen |
| / \ / \'| | | Tel +31 50 363 4327                    Nijenborgh 4 |
|(   |   )| | | Fax +31 50 363 4800               9747 AG Groningen |
| \_/ \_/ | | | http://md.chem.rug.nl/~anton        The Netherlands |
|             | "It Costs Too Much If It Costs a Lot" (Magnapop)    |

More information about the gromacs.org_gmx-users mailing list