[gmx-users] Selecting atom indices of residues whose centers of mass match a position range
Justin A. Lemkul
jalemkul at vt.edu
Tue Jun 5 23:13:52 CEST 2012
On 6/5/12 2:55 PM, Andrew DeYoung wrote:
> I would like to use g_select_d to generate an index file containing the
> atoms of BF4 residues whose centers of mass are in the range z<12.24 nm. I
> have tried the following:
> g_select -f traj.xtc -s topol.tpr -select 'resname BF4 and res_com and
> z<12.24' -on output.ndx
> But the selection syntax is incorrect. Can you please help me?
Is there a specific error you're getting? I think the source of the problem
(guessing that it's just a generic syntax error) is the incorrect use of the
res_com keyword. Referring to the examples in the g_select help, it should be
used something like:
'res_com of resname BF4 and z<12.24'
Note that when using res_com selection, you cannot output an index group; in
that case you need to select based on atoms only, which are written to the index
file. If you're looking to write out the atoms of any residue with an atom
below a certain z-value, the selection is simply:
'resname BF4 and z<12.24'
Selecting based on a COM below a certain z coordinate value will be more
complex, and I'm afraid I don't know the syntax to pull that off.
Justin A. Lemkul, Ph.D.
Department of Biochemistry
jalemkul[at]vt.edu | (540) 231-9080
More information about the gromacs.org_gmx-users