[gmx-users] using position restraints

Oliver Beckstein oliver at biop.ox.ac.uk
Tue Oct 19 21:46:59 CEST 2004

Hi Ken,

> simulating. The restraint file, posre.itp is generated from pdb2gmx.
> Upon viewing this file I found that the force constants at all
> positions were set to x,y,z = 1000,1000,1000. I changed this such that
> a single atom had a restraint force constant of 1000,1000, 1000 and the
> rest were 0,0,0. I modified my .mdp file to include define = -DPOSRE
> and ran a short test simulation.

Sorry to ask a trivial question but have you also got lines in your
topology like

#ifdef POSRE
#include "./posre.itp"

The -DPOSRE in the mdp file only instructs the preprocessor to set the
flag POSRE, which in turn switches on the if branch in the top file. (The
topology is processed by cpp so anything that goes for cpp goes for top.)

The final test is analysing your tpr file, using gmxdump. 
  gmxdump -s md.tpr > md.txt
and search in md.txt for 


where N is the internal number of your restrained atom (might require some
detective work top find it). It tends to be in the last quarter of the
rather huge output. If it's not there then you don't have position


Oliver Beckstein * oliver at biop.ox.ac.uk

More information about the gromacs.org_gmx-users mailing list