[gmx-users] g_select syntax unavailable in GROMACS 5.0 and 5.0.1

Teemu Murtola teemu.murtola at gmail.com
Fri Jan 2 18:08:05 CET 2015


Hi,

On Fri, Jan 2, 2015 at 4:12 AM, Kester Wong <Kester2014 at ibs.re.kr> wrote:

> The command "gmx_mpi help selections" did show the available subtopics,
> however I find this paragraph confusing:
>
>
> To get started with selections, run, e.g., gmx_mpi select without
> specifying
>
> selections on the command-line and use the interactive prompt to try out
>
> different selections. This tool provides output options that allow one to
> see
>
> what is actually selected by the given selections, and the interactive
> prompt
>
> reports syntax errors immediately, allowing one to try again. The subtopics
>
> listed below give more details on different aspects of selections.
>

I've rewritten it in <
https://gerrit.gromacs.org/#/c/4340/1/src/gromacs/selection/selhelp.cpp>,
hopefully it is now clearer.

Although the paragraph above mentioened "gmx_mpi select without specifying
> selections", I had to use "gmx_mpi help selections positions" to be able to
> see the thread "SPECIFYING POSITIONS IN SELECTIONS".
>

You would likely benefit from reading the short section on selections from
the Gromacs manual. By running
  gmx select -s <some structure file>
you get an interactive prompt, where you can also type 'help' or 'help
positions' to get access to the help, as well as try out the selections.
The paragraph you reference was written with the assumption that if you are
reading it, you already know how to access the help, so it focuses on
providing some guidance on how to try things out in practice.

> For your second question, is there something wrong with just extending your
> existing selection with an additional clause, for example like this:
> "resname SOL and res_com z >= 10 and res_com z < 15"?
>
> Yep, this worked for my systems. I suppose this binning method has
> already taken into account the center of mass of the water droplet?


It depends on what you mean by "taken into account the center of mass of
the water droplet". The selections are not magic; they select exactly what
you tell them, and this one selects water molecules that are have their
absolute z coordinates in range 10-15 (nm). If your droplet moves around
during your simulation in the z direction, then this is not a fixed slice
from the droplet. You can either center your trajectory on the droplet
center-of-mass before other processing, or use the upcoming 5.1 for the
analysis (where you can write selections like "res_com z - 10 < z of com of
resname SOL").


> How do I go from here, to producing the water density profile as a
> function of z-direction?


That's for you to solve. ;) I would likely write a separate (C++) tool for
this analysis instead of trying to piece it together from multiple small
tools and shell scripting, but different people have different preferences.

Best regards,
Teemu


More information about the gromacs.org_gmx-users mailing list