[gmx-users] How to g_select water and ions?

Justin Lemkul jalemkul at vt.edu
Sat Jan 24 14:08:43 CET 2015



On 1/24/15 6:26 AM, Kester Wong wrote:
> Dear all,
>
>
> I would like to select water and ions using the g_select command as follows:
>
>
> g_select_mpi -f traj_comp.xtc -s topol.tpr -n system.ndx -b 9000 -e 10000
> -select 'resname SOL and resname H3O and resname CLA and res_com z >= 0.8 and
> res_com z < 0.85' -on Layer-001.ndx
>
>
> In  my ions.itp file, I have my hydronium and chloride as H3O and CLA, however,
> I am not able to obtain the select-index file.
>
> However, selecting water without ions worked, but this is not what I wanted.
>
>
> Could anyone point out what did I do incorrectly?
>

You need "or" instead of "and" between your resname selections.  A residue can't 
simultaneously be SOL, H3O, and CLA.

-Justin

-- 
==================================================

Justin A. Lemkul, Ph.D.
Ruth L. Kirschstein NRSA Postdoctoral Fellow

Department of Pharmaceutical Sciences
School of Pharmacy
Health Sciences Facility II, Room 629
University of Maryland, Baltimore
20 Penn St.
Baltimore, MD 21201

jalemkul at outerbanks.umaryland.edu | (410) 706-7441
http://mackerell.umaryland.edu/~jalemkul

==================================================


More information about the gromacs.org_gmx-users mailing list