[gmx-users] Strategy for chaining jobs using different mdp parameters (long)

Mark Abraham Mark.Abraham at anu.edu.au
Mon May 21 21:39:16 CEST 2007


Stéphane Téletchéa wrote:
> Dear colleagues,
> 
> I've done many chained simulations up to now but i'm encoutering 
> problems and i'm skeptical about some choices i made before. In order to 
> clear this up, i'd like you to share your experience, so that'll answer 
> my needs and be a good template for the upcoming wiki.
> 
> I want (and need) to chain jobs with different conditions for 3 reasons:
> 1 - cluster needs (need to split jobs), tpbconv could be sufficient, but 
> i'm changing parameters
> 2 - ensemble changing (switching from NVT to NPT for instance)
> 3 - dynamics fine-control (posre on specific atoms/groups)
> 
> Please see below and the attached files for run parameters.
> 
> a) NVT then NPT.
> 
> I've tried using NVT (pr1) for starting my simulation and then NPT 
> (pr2). The major differences between pr1 (NVT) and pr2 (NVT) are:
> 
> pr1:
> < Pcoupl                 = no
> < gen_vel                = yes
> ---
> pr2:
>  > Pcoupl                 = berendsen
>  > gen_vel                = no

Of course, there's more to it than this, because the non-no choices 
activate other options, particularly for pressure coupling.

> The runs are chained like this:
> (ini directory contains the top and gro file from previously minimised 
> structure, mdp directory contains the reference mdp)
> pr1 step:
> grompp \
>     -f ../mdp/pr1.mdp \
>     -p ../ini/molecule_ini.top \
>     -pp molecule_pr1.top \
>     -c ../ini/molecule_ini.gro \
>     -o molecule_pr1.tpr \
>     -po molecule_pr1.mdp
> 
> mdrun \
>    -s molecule_pr1.tpr \
>    -o molecule_pr1.trr \
>    -c molecule_pr1.gro \
>    -g molecule_pr1.log \
>    -e molecule_pr1.edr \
>    -nice 0

Do be aware that "mdrun -deffnm molecule_pr1 -nice 0" is available to do 
this in a much less verbose manner :-)

> pr2 step:
> grompp \
>     -f ../mdp/pr2.mdp \
>     -p ../ini/molecule_ini.top \
>     -pp molecule_pr2.top \
>     -c ../ini/molecule_ini.gro \
>     -o molecule_pr2.tpr \
>     -t ../pr1/molecule_pr1.trr \
>     -po molecule_pr2.mdp
> 
> (note there is no -e ../pr1/molecule_pr1.edr since we're switching from 
> NVT to NPT, as pointed out by Mark Abraham on the list 
> http://www.gromacs.org/pipermail/gmx-users/2007-May/027193.html)
> 
> mdrun \
>    -s molecule_pr2.tpr \
>    -o molecule_pr2.trr \
>    -c molecule_pr2.gro \
>    -g molecule_pr2.log \
>    -e molecule_pr2.edr \
>    -nice 0
> 
> As you may have noticed, i'm doing positionnal restraints (pr) runs at 
> theses steps.
> Do i need to specify "unconstrained_start    = yes"?
> I've not used it for the moment...

There's not a strong need to use it while switching ensembles (in that 
you're going to have to re-equilibrate anyway) but I think you should 
use it to reduce the occurrence of problems.

> Is there any specific precaution to take while doing this?
> 
> In particular, i'm seing for the NPT (pr2) start:
> #####
> Step 1  Warning: pressure scaling more than 1%, mu: -1.59647e+20 
> -1.59647e+20 -1.59647e+20
> Correcting invalid box:
> old box (3x3):
>    old box[    0]={-9.82630e+20,  0.00000e+00, -0.00000e+00}
>    old box[    1]={ 0.00000e+00, -8.90833e+20, -0.00000e+00}
>    old box[    2]={ 0.00000e+00,  0.00000e+00, -1.12456e+21}
> new box (3x3):
>    new box[    0]={-9.82630e+20,  0.00000e+00, -0.00000e+00}
>    new box[    1]={ 0.00000e+00, -8.90833e+20, -0.00000e+00}
>    new box[    2]={ 0.00000e+00,  8.90833e+20, -1.12456e+21}
> #####
> 
> Of course the system exploses (but this is another story, in the ml, 
> David van der Spoel stated this could be due to a system setup problem, 
> i'll open a new thread on this specific problem).
> 
> I'm not completely sure if the problem arises from my specific system or 
> if i'm missing something while switching from NVT to NPT (see below for 
> reference files).
> 
> b) Reference files while continuing the run (not using tbpconv)
> 
> Even if i use the same NPT conditions, i still see some parameters 
> problem, for instance:
> 
> #####
> Warning: atom names in ../pr1/test_min_deflated25_sol_ions.top and 
> ../pr1/OR1G1_min_formd.gro don't match (OW - HW2)
> Warning: atom names in ../pr1/test_min_deflated25_sol_ions.top and 
> ../pr1/OR1G1_min_formd.gro don't match (HW1 - OW)
> Warning: atom names in ../pr1/test_min_deflated25_sol_ions.top and 
> ../pr1/OR1G1_min_formd.gro don't match (HW2 - HW1)
> Warning: atom names in ../pr1/test_min_deflated25_sol_ions.top and 
> ../pr1/OR1G1_min_formd.gro don't match (OW - HW2)
> #####
> 
> I've understood this comes from the usage of -shuffle *and* -sort option 
> (and actually, to get the proper ordering, there is only g_desort, as 
> mentionned in 
> http://www.gromacs.org/pipermail/gmx-users/2007-January/025584.html), 
> but i'm suspicious about the "-renum" and "-renumbs" options in grompp 
> (on by default), if it alters the resulting -processed- topology, or not.
> 
> To be clear, i'm not completely sure if i need to do:
> 
> starting conformation = ../ini/molecule.top and ../ini/molecule.gro
> 
> directories :
> mkdir {ini,pr1,pr2}
> 
> pr1 step:
> grompp \
>     -f ../mdp/pr1.mdp \
>     -p ../ini/molecule_ini.top \
>     -pp molecule_pr1.top \
>     -c ../ini/molecule_ini.gro \
>     -o molecule_pr1.tpr \
>     -po molecule_pr1.mdp
> 
> mdrun \
>    -s molecule_pr1.tpr \
>    -o molecule_pr1.trr \
>    -c molecule_pr1.gro \
>    -g molecule_pr1.log \
>    -e molecule_pr1.edr \
>    -nice 0
> 
> pr2 step:
> grompp \
>     -f ../mdp/pr2.mdp \
>     -p ../ini/molecule_ini.top \
>     -pp molecule_pr2.top \
>     -c ../ini/molecule_ini.gro \
>     -o molecule_pr2.tpr \
>     -t ../pr1/molecule_pr1.trr \
>     -po molecule_pr2.mdp
> 
> mdrun \
>    -s molecule_pr2.tpr \
>    -o molecule_pr2.trr \
>    -c molecule_pr2.gro \
>    -g molecule_pr2.log \
>    -e molecule_pr2.edr \
>    -nice 0
> 
> Please note here, i'm always referring to ../ini/molecule_ini.{top,gro} 
> for grompp.
> 
> In order to chain the jobs, do i need to reference from the processed 
> top and last gro from the previous step. In other words, do i need to use :
> 
> pr2 step:
> grompp \
>     -p ../pr1/molecule_pr1.top \
>     -c ../pr1/molecule_pr1.gro \
> 
> instead of (as above):
> pr2 step:
> grompp \
>     -p ../ini/molecule_ini.top \
>     -c ../ini/molecule_ini.gro \

I do use the new structure file in all of my chained jobs. The 
coordinates in the structure file won't be being used because a .trr is 
supplied. For an ensemble switch, the box size is not stored in the .trr 
IIRC, and the only source of this information in the absence of an .edr 
file is the structure file (hence the use of genbox). In your particular 
example, the pre-NVT box will be the same size as the post-NVT box , so 
you shouldn't have a problem here - but check it.

The output from -pp should be functionally identical to its input, by 
construction, so you can use any .top here. I omit the use of -pp and 
just reuse the same .top all the time. This stops you hacking something 
once by hand and forgetting to change other occurrences.

> I presume i need to use the previous step top and gro parameters, but 
> using g_desort (not done yet).
> Again in this case, is g_desort sufficient ?
> Are -renum and -rmbdunbs only used for the run (but not permanently 
> affecting the top and gro files)?

Don't know.

Mark



More information about the gromacs.org_gmx-users mailing list