From: Arneh Babakhani (ababakha_at_mccammon.ucsd.edu)
Date: Tue Jul 17 2007 - 20:41:29 CDT

No, I think you had it right the first time, it doesn't parse out if you
do "prot and name NE1". But your original suggestion works, check it out:

>Main< 181 % set Peptide [atomselect top "protein"]
atomselect18070
>Main< 182 % $Peptide get name
N H CA CB CG CD1 HD1 CD2 NE1 HE1 CE2 CE3 HE3 CZ2 HZ2 CZ3 HZ3 CH2 HH2 C O
N H CA CB CG CD1 CD2 C O N H CA CB CG CD1 CD2 C O N H CA CB CG CD1 CD2 C
O N H CA CB CG CD1 CD2 C O N H CA CB CG CD1 CD2 C O
>Main< 183 % set IndoleNitrogen [atomselect top "[$Peptide text] and
name NE1"]
atomselect18071
>Main< 184 % $IndoleNitrogen get name
NE1

Peter Freddolino wrote:
> Erm, please forgive me, the second line of the second example should read
> set IndoleNitrogen [atomselect top "prot and name NE1"]
>
> Peter Freddolino wrote:
>
>> Hi Arneh,
>> there are three ways to do this:
>>
>> -make a compound selection:
>> set IndoleNitrogen [atomselect top "protein and name NE1"]
>>
>> -Define an atomselect macro:
>> atomselect macro prot {protein}
>> set IndoleNitrogen [atomselect top "protein and name NE1"]
>>
>> -Access the text of a previous selection in a new selection:
>> set prot [atomselect top protein]
>> set IndoleNitrogen [atomselect top "[$prot text] and name NE1"]
>>
>> All should be equivalent. The last may be closest to what you were
>> looking for.
>>
>> Best,
>> Peter
>>
>> Arneh Babakhani wrote:
>>
>>
>>> Once I've made a selection, how do I use the name of that selection in
>>> making another selection??? Here's what I mean:
>>>
>>>
>>>
>>>> Main< 137 % set Peptide [atomselect top "all protein"]
>>>>
>>>>
>>> atomselect17053
>>>
>>>
>>>> Main< 139 % set IndoleNitrogen [atomselect top "$Peptide and name
>>>>
>>>>
>>> NE1"]
>>> atomselect: cannot parse selection text: atomselect17053 and name NE1
>>>
>>>
>>>> Main< 140 % set IndoleNitrogen [atomselect top "@Peptide and name
>>>>
>>>>
>>> NE1"]
>>> atomselect: cannot parse selection text: @Peptide and name NE1
>>>
>>>
>>>
>>> How do I get it to parse the 'Peptide' selection??? Do I need
>>> brackets somewhere?
>>> Thanks,
>>>
>>> Arneh
>>>
>>>
>>
>>
>
>