From: Parker de Waal (
Date: Wed Sep 24 2014 - 13:49:27 CDT

Hi John,

Thank you again for your help. I was able to successfully create the box using the following steps:

1. Get dimensions of protein
set sel [atomselect top "protein"]
set file [open "myoutput.dat" w]
puts $file [ $sel get {x y z} ]
close $file

2. Clean file and calculate min/max {x y z} using awk
sed 's: {:\n{:g' myoutput.dat | sed 's/{//' | sed 's/}//' > splitResults

3. Select box area using your script provided below and write to pdb.

However I still have one question: In the final box some lipids are copied over because 1 atom was present within the selection box. Is there a way to only select atoms if the whole residue is present within the box? Or ideally even 50-75% of the atom within the box?


From: John Stone []
Sent: Tuesday, September 23, 2014 11:02 PM
To: Parker de Waal
Subject: Re: vmd-l: Atom Selection Rectangle

  Please read these pages of the documentation as a starting point:

You want to use a combination of coordinate based selections and
"same residue as", e.g.:

set seltext "same residue as (x > 0 and x < 30 and y > 0 and y < 30 and z > 0)"
set sel [atomselect top $seltext]
$sel writepdb box.pdb

  John Stone

On Wed, Sep 24, 2014 at 02:49:32AM +0000, Parker de Waal wrote:
> Hi John,
> Thanks for the tip. Unfortunately after looking for about 30 minutes or so
> minutes Išve been unable to find any previous mailings or any guides
> online regarding similar tasks.
> If you could point me in a more specific direction I would greatly
> appreciate it.
> Best,
> Parker
> On 9/23/14, 10:00 PM, "John Stone" <> wrote:
> >You can use VMD atom selections based on the atom coordinates along
> >with "same residue as" to achieve what you're looking for. There are
> >many examples in the user's guide and past mailing list discussions that
> >will likely prove useful.
> >
> >Cheers,
> > John Stone
> >
> >
> >On Wed, Sep 24, 2014 at 01:27:08AM +0000, Parker de Waal wrote:
> >> Hello everyone,
> >>
> >> I?ve recently been working with membrane protein simulations, generated
> >>by the CHARMM-GUI membrane builder and simulated in AMBER, and am trying
> >>to figure out a way to trim down on excess system padding (resulting
> >>from the unoptimized GUI).
> >>
> >> What I would like to do is be able to take the generated
> >>protein/membrane PDB, select a rectangular region with origin x,y,z and
> >>dimensions a,b,c, and then delete everything else that doesn?t fall
> >>within that selection. This way I can reduce my atom count and help get
> >>more ns/day for the simulation.
> >>
> >> Does anyone know if this is possible in VMD, or perhaps another tool?
> >>
> >> Best,
> >> Parker
> >
> >--
> >NIH Center for Macromolecular Modeling and Bioinformatics
> >Beckman Institute for Advanced Science and Technology
> >University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
> >
> >kZ5A_2g&u=http%3a%2f%2fwww%2eks%2euiuc%2eedu%2f%7ejohns%2f
> >Phone: 217-244-3349
> >
> >jYJNrhA&u=http%3a%2f%2fwww%2eks%2euiuc%2eedu%2fResearch%2fvmd%2f

NIH Center for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801           Phone: 217-244-3349