[gmx-users] gmx gangle in the development version of gromacs

Teemu Murtola teemu.murtola at gmail.com
Wed Mar 5 06:04:54 CET 2014


Hello,

On Wed, Mar 5, 2014 at 1:30 AM, Eric Smoll <ericsmoll at gmail.com> wrote:

> Assuming I define a given slice to be between 0 and 1 on the z axis, I
>
believe the command that will produce what I want is:
>
> gmx gangle -f file.trr -s file.tpr -n  file.ndx -g1 plane -group1 'z 0 to 1
> and group a_plane' -g2 z -oh file.xvg -binw 1.0
>
> A few questions/comments:
>
> 1.) I am unsure how I should set the '-selrpos' option. The gangle program
> requires all three atoms to compute the angle so I suspect that the prefix
> 'whole_' is necessary. What is the difference between the "res_" and "mol_"
> infix?  I was hoping the index file would restrict the computation of the
> reference position so that 'whole_res_cog' would work but it seems to
> compute the cog for the whole residue, not that atoms that define the
> plane.  For clarity, if the cog of the three atoms that define the plane
> lie within the slice, I want all three atoms that define the plane to be
> selected.
>

As you have noted, whole_res_cog computes the center-of-geometry of the
whole residue that contains an individual atom. So if each of your rings is
within a single residue, this makes then selected as a unit, based on the
center of the whole residue. If you only want to select based on the center
of the ring, you can use part_res_cog. The difference is explained in 'gmx
help selections positions' (accessible also when writing "help" in the
interactive selection prompt).

The difference between res_ and mol_ is that res_ groups the atoms by
residue index for calculating the center, while mol_ groups by molecule.
There is a difference if your molecules consist of multiple residues. For
small molecules like benzene, you probably have a single residue number for
each molecule, and the options are equivalent.

2.) Is it possible to use a custom set of atoms for computation of the cog
> that differs from the atoms I want selected if this cog is within the
> slice?  For example, consider benzene. The program gangle requires three
> benzene atoms to define a plane but the cog of these atoms is not the cog
> of the ring.  I suspect this is not possible with the gromacs tools.
>

It is possible to use either the center of the three atoms, or the center
of the residue/molecule, as explained above. Other alternatives are not
currently supported, except through splitting your molecule into multiple
residues (it should be possible by simply editing the residue numbers in a
gro file passed to the -s option to make this happen).


> 3.) It seems the flag '-oall' outputs the angles for all the normal vectors
> defined by the atoms in my index file.  Is this want most users will want
> from this tool?  If I have selection like 'z 0 to 1 and group a_plane', it
> makes more sense for '-oall' to print all the selected angles, correct?
>

Maybe, but the current implementation is a compromise that also makes it
easier to use that information for post-processing. If you want to follow
the evolution of an individual angle, it will be very difficult if the
number of angles on the output rows varies, and the angle at a given column
is not always computed from the same atoms.

You can use 'gmx select -om' with the same selection (possibly prefixed
with 'res_cog of' to produce a single number per residue) to produce a
bitmask that you can see which angles are actually getting selected, and
correlate this with the -oall output.

Hope this helps,
Teemu


More information about the gromacs.org_gmx-users mailing list