Discussion:
[gmx-users] How to automate genion completely?
John Ladasky
2012-03-25 01:43:45 UTC
Permalink
I am starting to write my own turnkey scripts to automate GROMACS (v
4.5.4) work flow. Many of the GROMACS commands, such as pdb2gmx and
genion, have interactive options by default, meaning that you manually
enter information when the program runs.

In the tutorials, we are taught to invoke pdb2gmx from the command line
using certain arguments which name input and output files. But then, we
choose our force field from a numbered menu inside pdb2gmx. However, if
you know the name of the force field (these names SHOULD be listed
somewhere!), you can use the "-ff" argument when you call pdb2gmx from
the shell. For example, "-ff gromos45a3". Then you do not have to
manually enter anything.

I am looking for a corresponding option for genion. Genion offers a
numbered menu to ask you which group of atoms you wish to use for ion
replacements. The groups that most of us would want to use are the
"Water" or "SOL" groups. With the files that I'm working with right
now, these pop up as groups #12 and #13, respectively. But they needn't
always be numbered this way, if the user has altered the standard .ndx file.

Is there an argument that one can supply to genion from the command
prompt which will select the replacement group automatically, as "-ff"
selects a force field for pdb2gmx? I have the v. 4.5.4 manual. I do
not see the argument (pp. 273-4). I hope that it exists, and that it is
just undocumented.

Thanks, as always.
Justin A. Lemkul
2012-03-25 01:54:33 UTC
Permalink
Post by John Ladasky
I am starting to write my own turnkey scripts to automate GROMACS (v
4.5.4) work flow. Many of the GROMACS commands, such as pdb2gmx and
genion, have interactive options by default, meaning that you manually
enter information when the program runs.
In the tutorials, we are taught to invoke pdb2gmx from the command line
using certain arguments which name input and output files. But then, we
choose our force field from a numbered menu inside pdb2gmx. However, if
you know the name of the force field (these names SHOULD be listed
somewhere!), you can use the "-ff" argument when you call pdb2gmx from
the shell. For example, "-ff gromos45a3". Then you do not have to
manually enter anything.
I am looking for a corresponding option for genion. Genion offers a
numbered menu to ask you which group of atoms you wish to use for ion
replacements. The groups that most of us would want to use are the
"Water" or "SOL" groups. With the files that I'm working with right
now, these pop up as groups #12 and #13, respectively. But they needn't
always be numbered this way, if the user has altered the standard .ndx file.
Is there an argument that one can supply to genion from the command
prompt which will select the replacement group automatically, as "-ff"
selects a force field for pdb2gmx? I have the v. 4.5.4 manual. I do
not see the argument (pp. 273-4). I hope that it exists, and that it is
just undocumented.
Groups can be chosen by name, and passed via 'echo' like other commands. See
http://www.gromacs.org/Documentation/How-tos/Using_Commands_in_Scripts. Thus
you can use something like

echo SOL | genion -s topol.tpr

-Justin
--
========================================

Justin A. Lemkul
Ph.D. Candidate
ICTAS Doctoral Scholar
MILES-IGERT Trainee
Department of Biochemistry
Virginia Tech
Blacksburg, VA
jalemkul[at]vt.edu | (540) 231-9080
http://www.bevanlab.biochem.vt.edu/Pages/Personal/justin

========================================
Mark Abraham
2012-03-25 11:15:52 UTC
Permalink
Post by John Ladasky
I am starting to write my own turnkey scripts to automate GROMACS (v
4.5.4) work flow. Many of the GROMACS commands, such as pdb2gmx and
genion, have interactive options by default, meaning that you manually
enter information when the program runs.
In the tutorials, we are taught to invoke pdb2gmx from the command
line using certain arguments which name input and output files. But
then, we choose our force field from a numbered menu inside pdb2gmx.
However, if you know the name of the force field (these names SHOULD
be listed somewhere!),
Sure, you can find them the same place pdb2gmx does - as ${name}.ff
directories in working directory or under $GMXLIB.
Post by John Ladasky
you can use the "-ff" argument when you call pdb2gmx from the shell.
For example, "-ff gromos45a3". Then you do not have to manually enter
anything.
I am looking for a corresponding option for genion. Genion offers a
numbered menu to ask you which group of atoms you wish to use for ion
replacements. The groups that most of us would want to use are the
"Water" or "SOL" groups. With the files that I'm working with right
now, these pop up as groups #12 and #13, respectively. But they
needn't always be numbered this way, if the user has altered the
standard .ndx file.
Is there an argument that one can supply to genion from the command
prompt which will select the replacement group automatically, as "-ff"
selects a force field for pdb2gmx? I have the v. 4.5.4 manual. I do
not see the argument (pp. 273-4). I hope that it exists, and that it
is just undocumented.
That does seem to be a gap in the manual. I've expanded the discussion
in section 8.1 of the manual to include:

+Each tool that can use groups will offer the available alternatives
+for the user to choose. That choice can be made with the number of the
+group, or its name. In fact, the first few letters of the group
+name will suffice if that will distinguish the group from all others.
+There are ways to use Unix shell features to choose group names
+on the command line, rather than interactively. Consult the GROMACS
+webpage for suggestions.
+

Mark

Loading...