[gmx-users] syntax for switching between multiple position restraint .itp in the .top file

Mark Abraham Mark.Abraham at anu.edu.au
Mon Apr 28 10:11:22 CEST 2008


Low Soo Mei wrote:
> Hi gmx-users,
> 
> If I use different position restraints during each stage of 
> minimization, should I separately write all my restraints in the same 
> .top file in this manner,
> 
> #ifdef LIPID_ALL_POSRE
> #include "lipid_all_posre.itp"
> 
> #ifdef WATER_POSRE
> #include "water_posre.itp"
> 
> #ifdef LIPID_HEADGRP_POSRE
> #include "lipid_headgrp_posre.itp"
> 
> or would it be possible for me to group all my restraints together in 
> the same .top file as a switch, (I'm also not sure if the syntax below 
> is correct in Gromacs),
> 
> #ifdef LIPID_ALL_POSRE
> #include "lipid_all_posre.itp"
> #elseif WATER_POSRE
> #include "water_posre.itp"
> #else
> #include "lipid_headgroup_posre.itp"

Apart from needing #endif directives, the logic behind these two forms 
is probably different. The first form allows you to set none, one or 
several of the conditions to occur, whereas the second form allows only 
the first condition identified as true to occur. Which you want is for 
you to judge.

Mark



More information about the gromacs.org_gmx-users mailing list