From: siddesh southekal (
Date: Sat Dec 18 2010 - 08:14:25 CST

Thanks for the reply.
yes,Josh is right , moreover this selection can be used to select unwanted
ions apart from water molecules.However,
set sel [atomselect top "{y > -20 and y < 20}] just selects atoms on one
side of membrane
Is there a way to get the length of the y axis ,
(or the maximum length of y-axis ? ) so that i can make the selection for a
particular range ?

On Fri, Dec 17, 2010 at 5:31 PM, Joshua Adelman <> wrote:

> You don't want to use the 'within' keyword, since that will carve out a
> strangely shaped box (it's drawing a sphere around each protein atom and
> only selecting atoms within the sphere). You want something more like:
> set sel [atomselect top "{y > -20 and y < 20}]
> That will give you a slice of the system that removes extra water above and
> below your membrane slab.
> The other thing you'll have to watch out for is that atomselect will
> truncate water molecules that straddle the interface of the slab, resulting
> in a set of atoms that include incomplete water molecules. So you then need
> to then go back through and get the complete set of atoms using something
> like:
> set B [lsort -unique [$sel get resid]]
> and then using that list to get the set of atoms that you want.
> Best of luck.
> Josh
> On Dec 17, 2010, at 9:29 AM, Ajasja Ljubetič wrote:
> I think you have to say
> set selwater [atomselect top "name OH2 and within 10 of protein "]
> (*delete the not*)
> It's always best to view selections graphically.
> You can put the selection string under representations -> selected atoms
> and see what you have selected. I usually set the drawing method to CPK.
> Regards,
> Ajasja
> On Fri, Dec 17, 2010 at 14:18, siddesh southekal <>wrote:
>> Dear all,
>> I have a pdb file (after 20 ns MD run ) with a membrane protein (GPCR)
>> embeded in the lipid bilayer with buffer around .There is excess of water
>> molecules in this file . I want to remove this excess buffer such that i
>> have water molecules only 10 A above and below the protein .(say around 15 A
>> around the lipid ) .The membrane normal is in y direction.
>> I would be using the truncated file for MD simulation using AMBER.
>> I tried -
>> set selwater [atomselect top "name OH2 and not within 10 of protein "]
>> But whn i try to save the selection the pdb file is blank.How do i exactly
>> do this?
>> I would appreciate any suggestions
>> Thanks ,
>> Siddesh
>> Universitaet Bonn