• ## Outreach

From: Josh Vermaas (vermaas2_at_illinois.edu)
Date: Wed Sep 24 2014 - 15:50:37 CDT

Hi Parker,

Shouldn't the interior logical operations be or statements? What you
want are those that are ONLY within your box. So if it satisfies any of
your conditions that it falls outside of a certain x, y, or z dimension,
it should be excluded if its part of the same residue (not just if it is
outside in all directions).

not (same residue as ((x < -64.88 or x > 45.12) or (y < -33.1 or y > 37.38) or (z < -47.43 or z > 82.47)))

Good luck!
-Josh

On 09/24/2014 02:45 PM, Parker de Waal wrote:
> Hi John,
>
> I'm so close, however it doesn't seem like VMD likes my input. In order to select residues that don't meet the criteria of my box I'm using the following:
>
> not(same residue as ((x < -64.88 or x > 45.12) and (y < -33.1 or y > 37.38) and (z < -47.43 or z > 82.47)))
>
> This should select residues that are not outside of my box dimensions, however when saving the pdb it always returns same same input model.
>
> Any additional help would be greatly appreciated.
>
> Best,
> Parker
> ________________________________________
> From: John Stone [johns_at_ks.uiuc.edu]
> Sent: Wednesday, September 24, 2014 2:56 PM
> To: Parker de Waal
> Cc: vmd-l_at_ks.uiuc.edu
> Subject: Re: vmd-l: Atom Selection Rectangle
>
> Hi,
> You can use the "measure minmax" command to compute the box instead of
> using your awk/sed scripts. To exclude residues where at least one atom
> falls outside the box, you could use a combination of boolean operators
> to achieve this, such as:
> "not (same residue as (...))"
> where the ... would select atoms _outside_ the box...
> This selection scheme excludes residues rather than keeping them, so you
> have to invert the box selection operators.
>
> Cheers,
> John Stone
> vmd_at_ks.uiuc.edu
>
> On Wed, Sep 24, 2014 at 06:49:27PM +0000, Parker de Waal wrote:
>> 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?
>>
>> Best,
>> Parker
>>
>> ________________________________________
>> From: John Stone [johns_at_ks.uiuc.edu]
>> Sent: Tuesday, September 23, 2014 11:02 PM
>> To: Parker de Waal
>> Cc: vmd-l_at_ks.uiuc.edu
>> Subject: Re: vmd-l: Atom Selection Rectangle
>>
>> Hi,
>> Please read these pages of the documentation as a starting point:
>> http://scanmail.trustwave.com/?c=129&d=2pOj1L0l2c-WKl11_Rd87fxRzu4o7g3JFYmIbgd0hQ&u=http%3a%2f%2fwww%2eks%2euiuc%2eedu%2fResearch%2fvmd%2fvmd-1%2e9%2e1%2fug%2fnode88%2ehtml
>> http://scanmail.trustwave.com/?c=129&d=2pOj1L0l2c-WKl11_Rd87fxRzu4o7g3JFdvcMVcggQ&u=http%3a%2f%2fwww%2eks%2euiuc%2eedu%2fResearch%2fvmd%2fvmd-1%2e9%2e1%2fug%2fnode96%2ehtml
>>
>> 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
>>
>> Cheers,
>> 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" <johns_at_ks.uiuc.edu> 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
>>>> vmd_at_ks.uiuc.edu
>>>>
>>>> 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
>>>> http://scanmail.trustwave.com/?c=129&d=s6Wi1Hp7VloVfkj1Q83fK7h4d9Pv3sBKQb9
>>>> kZ5A_2g&u=http%3a%2f%2fwww%2eks%2euiuc%2eedu%2f%7ejohns%2f
>>>> Phone: 217-244-3349
>>>> http://scanmail.trustwave.com/?c=129&d=s6Wi1Hp7VloVfkj1Q83fK7h4d9Pv3sBKQb9
>>>> 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
>> http://scanmail.trustwave.com/?c=129&d=2pOj1L0l2c-WKl11_Rd87fxRzu4o7g3JFduMOlYg1g&u=http%3a%2f%2fwww%2eks%2euiuc%2eedu%2f%7ejohns%2f Phone: 217-244-3349
>> http://scanmail.trustwave.com/?c=129&d=2pOj1L0l2c-WKl11_Rd87fxRzu4o7g3JFduLPVV0iA&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
> http://scanmail.trustwave.com/?c=129&d=2pOj1L0l2c-WKl11_Rd87fxRzu4o7g3JFduMOlYg1g&u=http%3a%2f%2fwww%2eks%2euiuc%2eedu%2f%7ejohns%2f Phone: 217-244-3349
> http://scanmail.trustwave.com/?c=129&d=2pOj1L0l2c-WKl11_Rd87fxRzu4o7g3JFduLPVV0iA&u=http%3a%2f%2fwww%2eks%2euiuc%2eedu%2fResearch%2fvmd%2f
>