[gmx-users] extending simulations

Jernej Zidar jernej.zidar at gmail.com
Tue Jan 30 02:34:56 CET 2018


Dear Yi,

The easiest way do this would by simply extending the first simulation for
a given number of steps:

- - - script - - -
# run the first simulation
gmx mdrun -v -deffnm md

# continuous running
for i in `seq 2 6`; do
    let j=i-1
    gmx mdrun -s md.tpr -deffnm md$i -nsteps 20000 -cpi &> run"$i".out
done
- - - script - - -

This is probably the simplest way and will just append new data to existing
files.

Second option would be something like this:

- - - script - - -
# run the first simulation
gmx mdrun -v -deffnm md1

# continuous running
for i in `seq 2 6`; do
    let j=i-1
    gmx convert-tpr -s md"$j".tpr -o md"$i".tpr -extend 20000.0
    cp -a md"$j".log md"$i".log
    cp -a md"$j".edr md"$i".edr
    cp -a md"$j".trr md"$i".trr
    cp -a md"$j".cpt md"$i".cpt
    gmx mdrun -v -deffnm md"$i" -cpi
done
- - - script - - -

The above option is not the most efficient one because you end up using way
more disk space than necessary. It is also not as elegant as the first one.

One small note: The switch "-deffnm" sets all the input and output files to
the same basename (in your case md"$i"; note the lack of the ".tpr"). After
setting to "-deffnm md$i", Gromacs will expect the checkpoint file
(requested in your case by "-cpi md$j.cpt") to be called md"$i".cpt.

Cheers,
Jernej


> Message: 2
> Date: Mon, 29 Jan 2018 12:01:38 -0500
> From: Myunggi Yi <myunggi at pukyong.ac.kr>
> To: Discussion list for GROMACS users <gmx-users at gromacs.org>
> Subject: Re: [gmx-users] extending simulations
> Message-ID:
>         <CAHXfRVPJ0cPJq+bB3qQ67CEcGLJ4Nhs73LchyBANG2rC
> FY0uqA at mail.gmail.com>
> Content-Type: text/plain; charset="UTF-8"
>
> Hi,
>
> The following is a part of my bash script to automate extended running.
> (not appending or not crashed simulations)
>
> ----------------script---------------
> # em
> ...
>
> # heating
> ...
>
> # npt equilibration
> gmx grompp -f npt.mdp -c nvt.gro -r ../mono.gro -t nvt.cpt -p ../mono.top
> -n ../index.ndx -o npt.tpr
> gmx mdrun -deffnm npt
>
> # md
> gmx grompp -f md.mdp -c npt.gro -t npt.cpt -p ../mono.top -n ../index.ndx
> -o md1.tpr
> gmx mdrun -deffnm md1
>
> # continuous running
> for i in `seq 2 6`; do
>     let j=i-1
>     gmx convert-tpr -s md$j.tpr -o md$i.tpr -extend 20000.0
>     gmx mdrun -s md$i.tpr -cpi md$j.cpt -deffnm md$i
> done
> -------------script---------------
>
>


More information about the gromacs.org_gmx-users mailing list