[gmx-users] Script for looping n simulations

Justin Lemkul jalemkul at vt.edu
Sat Feb 22 19:47:58 CET 2020



On 2/22/20 9:41 AM, Neena Susan Eappen wrote:
> Thank you Justin, just sharing the sample script here:
> --------------------
> #!/bin/bash
> for i in {1..n}
> do j=$((i+1))
> gmx grompp -f nvt.mdp -c em${i}.gro -r em${i}.gro -p topol.top -o nvt${j}.tpr
> gmx mdrun -deffnm nvt${j}
> gmx grompp -f md.mdp -c nvt${j}.gro -t nvt${j}.cpt -p topol.top -o md${j}.tpr
> gmx mdrun -deffnm md${j}
> done
> ----------------------
> Question: Now that I have n .edr files, is there a script I can write to extract say potential energy from these n files?

Apply the exact same logic. Loop over calls to gmx energy. See 
http://www.gromacs.org/Documentation/How-tos/Using_Commands_in_Scripts

-Justin

> Thank you for your time and knowledge,
> Neena
>
>
> ________________________________
> From: Neena Susan Eappen
> Sent: Saturday, February 15, 2020 4:44 PM
> To: gromacs.org_gmx-users at maillist.sys.kth.se <gromacs.org_gmx-users at maillist.sys.kth.se>
> Subject: [gmx-users] Script for looping n simulations
>
> Hello gromacs users,
>
> I was wondering how to write a script to repeat a simulation (equilibration and production) n times, with each cycle starting with structure from the end of previous cycle.
>
> Many thanks,
> Neena

-- 
==================================================

Justin A. Lemkul, Ph.D.
Assistant Professor
Office: 301 Fralin Hall
Lab: 303 Engel Hall

Virginia Tech Department of Biochemistry
340 West Campus Dr.
Blacksburg, VA 24061

jalemkul at vt.edu | (540) 231-3129
http://www.thelemkullab.com

==================================================



More information about the gromacs.org_gmx-users mailing list