[gmx-users] RE: g_rdf
Mark Abraham
Mark.Abraham at anu.edu.au
Wed Dec 7 06:49:47 CET 2005
Junfang.Zhang at csiro.au wrote:
> Hi Erik,
>
> Thank you very much for your reply.
>
> When I use
>
> g_rdf -f traj.xtc -n index.ndx
>
> to analyze the radial distribution around a specific set of particles, I
> have to choose the groups manually
I don't know anything about g_rdf, but perhaps you should be using an
index file to describe the specific set of particles. You can edit these
by hand in a text editor.
> and sometimes there is an error
> message like "time limits exceeded". Can you please let me know how to
> put the choices in a script file which I can submit by using command
> "qsub filename"?
To solve this problem in general, the tool you want is called "expect".
It allows you to run a command like "expect expect_script.tcl" (which
you can put in a shell script to keep qsub happy) which itself runs
"g_rdf -f traj.xtc -n index.ndx". Now the expect program gives
pre-determined responses to the sub-program's prompts. In simple cases,
you can use the related program autoexpect to watch you interact with
the program and come up with an expect_script.tcl that should reproduce
the way you interacted when you were teaching it. I use expect scripts
to automate my interactions with pdb2gmx, for example.
Expect is probably installed on recent *NIX distributions (or at least
those on which the scripting language Tcl is installed), but visit
http://expect.nist.gov for source code, examples, help, etc.
Mark
More information about the gromacs.org_gmx-users
mailing list