[gmx-users] g_select syntax

Bin Liu fdusuperstring at gmail.com
Fri Aug 29 03:19:10 CEST 2014


Hi Everyone,

I am recently puzzled by the syntax and behaviour of g_select. I want to
obtain the residue index list of LIPID whose center of mass is within 1.0
nm of the surface of protein. In my case, each LIPID molecule consists of
only one residue. I wrote the selection.dat as follows, and set -selrpos to
atom and -seltype to res_com. Here I think "Protein" is the reference
group, so -selrpos should be atom because I care about the distance to its
surface. "LIPID" is the analysis group and I care about their individual
center of mass. So -seltype should be res_com.

selection.dat:
resname LIPID and within 1.0 of group "Protein";

g_select -sf selection.dat -f traj.trr -s traj.tpr -n system.ndx  -oi
index.dat -seltype res_com -selrpos atom



However I tried another selection. This time instead of retrieving the
residue index, I tried to retrieve the index of a key atom of the LIPID
molecule.
selection.dat:
rdist = res_com within 1.0 of group "Protein";
group_C15 = (resname LIPID) and (rdist) and (name C15);
group_C15;

g_select -sf selection.dat -f traj.trr -s traj.tpr -n system.ndx  -oi
index.dat -seltype atom -selrpos atom

I thought these two selections should give the same number of indices per
frame, as the second selection merely retrieve the atom indices of the
corresponding key atoms in the LIPID molecules selected by the first
selection. However the first selection gives significantly more indices
than the second selection does. I guess my understanding of g_select syntax
might be flawed. Please point out my misunderstanding. Thank you very much.

Best Regards,

Bin


More information about the gromacs.org_gmx-users mailing list