[gmx-users] using position restraints

Oliver Beckstein oliver at biop.ox.ac.uk
Tue Oct 19 23:03:45 CEST 2004


Hi Ken,

haven't got a magic answer. You could run 'grompp -debug ...' and
check that the output contains something like 

converting bonded parameters...
...
#       LJ14:   7539
#     POSRES:   1898   <---------
#     CONSTR:   3840
... 

and then look at grompp.log if your posre.itp gets picked up. Perhaps it
is some problem with the path. I assume you have posre.itp in the same
directory as the top file?

> Thanks for the quick response. Not at all trivial to me. My .top file
> does indeed have the following lines:
> 
> #ifdef POSRES
> #include "posre.itp"
> #endif

looks good to me (if the flag is -DPOSRES)

> 
> I'm running on a Mac, so I'm not sure if the missing "./" prior to
> "posre.itp" is significant.

Neither do I, I'm running on Linux.

> 
> However, I do not have a line in the gmxdump of my .tpr file of the form
> 
> functype[N]=POSRES
> 
> Changed the line in my .top file to
> 
> #include "./posre.itp"

Odd, I'd thought that would do it. Does Mac cpp encode paths
differently? Or are you using m4 or something else instead as
preprocessor (I am absolutely clueless when it come to Macs)?

> and re-ran grompp. Still no line of type
> 
> functype[N]=POSRES
> 
> So I clearly don't have any positional restraints. Any other ideas?

Not really. As an example, my top [1] (see below) contains itp files for
separate chains, and each itp [2] itself contains a statement for
restraining the backbone atoms only [3] (which is activated with
-DPOSRES_BACKBONE in the mdp, see below to see what I mean).

Not sure if this helps you in any way, but I can't think of why your
setup is not working. 

oli

============================================================
[1] top
============================================================

; Include forcefield parameters
#include "ffG43a1.itp"
#include "methaneslab.itp"

; Include chain topologies
#include "protX_P1_A.itp"
#include "protX_P1_B.itp"
#include "protX_P1_C.itp"
#include "protX_P1_D.itp"
#include "protX_P1_E.itp"

; Include water topology
#include "spc.itp"

#ifdef POSRES_WATER
; Position restraint for each water oxygen
[ position_restraints ]
;  i funct       fcx        fcy        fcz
   1    1       1000       1000       1000
#endif

#ifdef WITH_IONS
#include "ions.itp"
#endif

[ system ]
; Name
Protein

[ molecules ]
; Compound        #mols
Protein_A           1
Protein_B           1
Protein_C           1
Protein_D           1
Protein_E           1
LAY   484
SOL   2837
------------------------------------------------------------

============================================================
[2] excerpt from protX_P1_A.itp
============================================================
[ moleculetype ]
; Name            nrexcl
Protein_A           3
....
[ atoms ]
...
[ bonds ]
...

; Include Position restraint file
#ifdef POSRES
#include "posre_A.itp"
#endif

; restraining backbone atoms only: (N|CA|C)
#ifdef POSRES_BACKBONE 
#include "posres_backbone_protX_P1_A.itp"
#endif 
------------------------------------------------------------

============================================================
[3] posres_backbone_protX_P1_A.itp
============================================================
; restraining backbone atoms only: (N|CA|C)
; generated from protX_P1_A.itp by genprchain.pl
[ position_restraints ]
     3     1    1000    1000    1000
     6     1    1000    1000    1000
    12     1    1000    1000    1000
    14     1    1000    1000    1000
    16     1    1000    1000    1000
...
    277     1    1000    1000    1000
    281     1    1000    1000    1000
------------------------------------------------------------




> 
> Ken
> 
> On Oct 19, 2004, at 3:46 PM, Oliver Beckstein wrote:
> 
> > 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"
> > #endif
> >
> > 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
> >
> >  functype[N]=POSRES
> >
> > 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
> > restraints.
> >
> > hth
> > oli
> >
> > --
> > Oliver Beckstein * oliver at biop.ox.ac.uk
> >  http://sansom.biop.ox.ac.uk/oliver/
> >
> > _______________________________________________
> > gmx-users mailing list
> > gmx-users at gromacs.org
> > http://www.gromacs.org/mailman/listinfo/gmx-users
> > Please don't post (un)subscribe requests to the list. Use the
> > www interface or send it to gmx-users-request at gromacs.org.
> 
> _______________________________________________
> gmx-users mailing list
> gmx-users at gromacs.org
> http://www.gromacs.org/mailman/listinfo/gmx-users
> Please don't post (un)subscribe requests to the list. Use the
> www interface or send it to gmx-users-request at gromacs.org.
> 
> 

-- 
Oliver Beckstein * oliver at biop.ox.ac.uk
 http://sansom.biop.ox.ac.uk/oliver/




More information about the gromacs.org_gmx-users mailing list