On 5/18/12 10:28 PM, Peter C. Lai wrote:
Synopsis: position restraints are coupled to the moleculetype. So you need to
define position restraints individually for each molecule type contiguous
with their topologies.
There's a couple of ways to do it, using some simple #include and #define:
You can restrain within each molecule's own .itp file at the end, for example:
popc.itp:
[ moleculetype ]
; Name nrexcl
POPC 3
[ atoms ]
; nr type resnr residue atom cgnr charge mass typeB...
; residue 1 POPC rtp POPC q 0.0
1 NTL 1 POPC N 1 -0.6 14.007 ....
...
20 PL 1 POPC P 20 1.5 30.974 ....
...
[ dihedrals ]
...
; end of original file
#ifdef POSRE_LIPID
[ position_restraints ]
; atom type fx fy fz
20 1 1000 1000 1000
;restrain atom 20 in the molecule_type which is P
#endif
Add something similar at the bottom of pope.itp.
Then in your system-wide topol.top would look something like:
#include "charmm36.ff/forcefield.itp" ;charmm36 lipids
#include "popc.itp"
#include "pope.itp"
#include "charmm36.ff/tips3p.itp" ;charmm waters
[ system ]
POPC+POPE bilayer
[ molecules ]
POPC 100
POPE 100
SOL 10000
; or however many of each you have in your conf.gro file
In your grompp.mdp, you'd have:
#define -DPOSRE_LIPID ; to turn on position restraints in lipid .itps
------------------------------
Another way to do it is to put the #ifdef POSRE_LIPID [ position_restraints ]
sections in the system-wide topol.top, but you'd need two of them, one per
lipid [ moleculetype ]:
#include "charmm36.ff/forcefield.itp" ;charmm36 lipids
#include "popc.itp"
#ifdef POSRE_LIPID
[ position_restraints ] ;for POPC
20 1 1000 1000 1000
#endif
#include "pope.itp"
#ifdef POSRE_LIPID
[ position_restraints ] ;for POPE
...
#endif
...
The grompp.mdp file would continue to use #define -DPOSRE_LIPID to enable
those restraints.
It is up to you how you want to modularize the restraints. You can even
use multiple #defines to restrain separately (although the resulting system
wouldn't necessarily be physically correct):
As above topologies but:
#ifdef -DPOSRE_POPC
;position restraints for POPC
#endif
I think what you mean here is:
#ifdef POSRE_POPC
#ifdef -DPOSRE_POPE
;position restraints for POPE
#endif
and #ifdef POSRE_POPE.
Otherwise, the define statement becomes very cumbersome (and perhaps faulty),
with:
define = -D-DPOSRE_POPC -D-DPOSRE_POPE
and in grompp.mdp:
#define -DPOSRE_POPC -DPOSRE_POPE
;to restrain both
Note that for the .mdp, one does not use #define, but rather:
define = -POSRE_POPC -DPOSRE_POPE
-Justin
--
========================================
Justin A. Lemkul, Ph.D.
Research Scientist
Department of Biochemistry
Virginia Tech
Blacksburg, VA
jalemkul[at]vt.edu | (540) 231-9080
http://www.bevanlab.biochem.vt.edu/Pages/Personal/justin
========================================
--
gmx-users mailing list [email protected]
http://lists.gromacs.org/mailman/listinfo/gmx-users
Please search the archive at
http://www.gromacs.org/Support/Mailing_Lists/Search before posting!
Please don't post (un)subscribe requests to the list. Use the
www interface or send it to [email protected].
Can't post? Read http://www.gromacs.org/Support/Mailing_Lists