[gmx-users] select waters in CNT

Teemu Murtola teemu.murtola at cbr.su.se
Wed Oct 13 15:08:44 CEST 2010


Hi again,

On Wed, Oct 13, 2010 at 11:36, Teemu Murtola <teemu.murtola at cbr.su.se> wrote:
> Hi,
>
> ngjin <zhongjin1000 at yahoo.com.cn> wrote:
>>   I want to select waters in CNT using g_select.
>>   g_select -f md.xtc -s md.tpr -sf selection.dat  -os -oc -oi -om  -selrpos whole_mol_com -seltype whole_mol_com
>>   selection.dat contains:resname SOL and ((x-1)^2+(y-1)^2<= 1) and (z >=-0.7037 and z <= 0.6833 ). and an error occure,
>
> Thanks for the report, I must have overlooked this when testing.  The
> reason for the failure is technical (if you are interested, see
> explanation in the end), and not trivial to fix properly without
> disabling some functionality or adding more complexity.  I will have
> to think what's the best solution.

I did give this a bit more thought, and now it should work much more
intuitively (fixes are available on the release-4-5-patches branch in
git, and will be available in 4.5.2).

I was forced to change a few details that break backwards
compatibility of the syntax in some rare cases; I'll write them here
for reference to reduce the amount of people getting confused if
selections that used to work in 4.5.1 no longer work in 4.5.2.

1) Fixed positions must now be specified as "[1.2, -1, 3.4]" instead
of using normal parentheses.  On the other hand, negative integer
numbers now work.

2) Selections like "charge -1 to -0.7 0.7 to 1" no longer work if the
first number is negative.  A workaround is to either reorder the
numbers, or to add braces: "charge {-1 to -0.7 0.7 to 1}".

Teemu



More information about the gromacs.org_gmx-users mailing list