[gmx-developers] grompp .mdp processing
Tsjerk Wassenaar
tsjerkw at gmail.com
Mon Feb 23 21:33:12 CET 2009
Hey Chris, e.a.
Just on an efficiency note:
> {
> NEWVAL=1993
> cat orig.mdp | grep -v '^gen_seed '
> echo "gen_seed = ${NEWVAL}"
> } > new.mdp
sed "/^gen_seed/s/=.*/= $NEWVAL/" orig.mdp > new.mdp
> $sed "s/TINIT/${tinit}/" template.mdp | sed "s/TSTEP/${tstep}/" | sed
> "s/NSTEPS/${nsteps}/" | sed "s/SAVE_FREQUENCY/${save_frequency}/" >
> actual.mdp
sed -e "/^tinit/s/=.*/= $TINIT/" -e "/^nsteps/s/=.*/= $NSTEPS/" ...
template.mdp > new.mdp
No need for a template with named variables... (and no need for piping
sed output to sed input).
--
Then adding my two cents, to my opinion, the 'option = value' approach
now offered in the .mdp file is one of the most useful parameter
control methods. It's trivial to edit with sed (and perl for that
matter) and easy enough to manage with python as it is. Some kind of
hierarchy might be useful, especially as the number of options keeps
increasing, but maybe that's better tackled using hierarchical naming
as Chris suggests.
Cheers,
Tsjerk
--
Tsjerk A. Wassenaar, Ph.D.
Junior UD (post-doc)
Biomolecular NMR, Bijvoet Center
Utrecht University
Padualaan 8
3584 CH Utrecht
The Netherlands
P: +31-30-2539931
F: +31-30-2537623
More information about the gromacs.org_gmx-developers
mailing list