From: John Stone (johns_at_ks.uiuc.edu)
Date: Tue Jun 24 2003 - 10:18:33 CDT

Gemma,
  You can't use an atom selection inside of another one...
You can make an atom selection _macro_ however, that you can use
elsewhere. Just change your 3rd atom selection to be:
  "lipid and (within 1 of protein)"

That should work ok (didn't test, but I think its good).

You can make a new atom selection macro like this:
  atomselect macro foo "my favorite selection"

Once defined, you can use 'foo' inside other selections:
  set sel [atomselect top "foo"]

Thanks,
  John Stone
  vmd_at_ks.uiuc.edu

On Tue, Jun 24, 2003 at 04:07:26PM +0100, Gemma Kinsella wrote:
>
> Hi all,
>
> I'm sorry to bother you with this but I'm having a little syntax trouble.
> I have a loaded pdb in VMD 1.8.1, consisting of a protein in a
> bilayer. I wanted to pick out some of the lipids that need to be deleted out, but my
> atomselect command doesn't seem to be right! Any ideas??
>
> Thanks,
>
> Gemma
>
>
>
> >Main< (NT) 70 % set crystal [atomselect top "protein"]
> atomselect58
> >Main< (NT) 71 % set lip [atomselect top "lipid"]
> atomselect59
> >Main< (NT) 72 % set lip_del [atomselect top "$lip within 1 of $crystal"]
> atomselect: cannot parse selection text: atomselect59 within 1 of
> atomselect58
>

-- 
NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
Email: johns_at_ks.uiuc.edu                 Phone: 217-244-3349              
  WWW: http://www.ks.uiuc.edu/~johns/      Fax: 217-244-6078