On Tue, May 1, 2012 at 9:55 PM, Justin A. Lemkul <jalem...@vt.edu> wrote:
> On 5/1/12 2:40 PM, Lara Bunte wrote:
>> g_select -s molecule.pdb -select '"Close to ISO" resname SOL and within
>> 1.2 of resname ISO'
>>
>> and
>>
>> trjconv -n index.ndx -f molecule.pdb -s molecule.pdb -o output.pdb
>>
>> I got only water in my output.pdb
>
> As you should expect.  Your command creates a group called "Close to ISO"
> that consists of any residue named SOL that has any atom within 1.2 nm of a
> residue named ISO.
>
>> What is the problem?
>>
>
> There is no problem, you just need to do a bit more work.
>
> You now have an index file with the water molecules that satisfy your
> criteria.  You then need to utilize that index file to create a new, merged
> group consisting of ISO and the water molecules.  You can use make_ndx:

You don't need to invoke make_ndx if you don't want to. You can simply
adjust the selection you give to g_select to also include your
molecule of interest. Depending on your preferences, you may find
"within 1.2 of resname ISO", "resname SOL ISO and within 1.2 of
resname ISO" or "resname ISO or (resname SOL and within 1.2 of resname
ISO)" useful.

- Teemu
--
gmx-users mailing list    gmx-users@gromacs.org
http://lists.gromacs.org/mailman/listinfo/gmx-users
Please search the archive at 
http://www.gromacs.org/Support/Mailing_Lists/Search before posting!
Please don't post (un)subscribe requests to the list. Use the
www interface or send it to gmx-users-requ...@gromacs.org.
Can't post? Read http://www.gromacs.org/Support/Mailing_Lists

Reply via email to