From: Claw Isthelaw (clawisthelaw_at_hotmail.com)
Date: Mon Jun 02 2008 - 13:10:12 CDT

It worked. I ended up doing the following small mod on your suggestions:

  [atomselect top "protein or (water and resid $watlist1)"] writepdb new.pdb

Thanks alot,
Jeff Tibbitt

----------------------------------------
> From: joaquim.rodrigues_at_estg.ipleiria.pt
> To: clawisthelaw_at_hotmail.com; vmd-l_at_ks.uiuc.edu
> Subject: Re: vmd-l: Create atom selection from list of integers
> Date: Mon, 2 Jun 2008 18:10:28 +0100
>
> Hi,
>
> Try this:
>
> set watlist1 {1153 1134 1128 1194 1123}
> set sel [atomselect top "protein or resid $watlist1"]
> animate write pdb new.pdb sel $sel
>
> Hope this helps,
> Rui Rodrigues
>
>
> On Mon, 2 Jun 2008 16:01:49 +0000, Claw Isthelaw wrote
>> Dear VMD Community,
>>
>> Given a list of integers (residue numbers) like:
>> {1153 1134 1128 1194 1123}, how can I create an atomselection containing all
>> of those residues. I'm trying to write out a PDB file containing the entire
>> protein and a list of water residues. I've tried the following:
>>
>> ----------------------------------------------------------
>> set watlist1 {1153 1134 1128 1194 1123}
>>
>> foreach resid $watlist1 {
>> lappend watlist2 "resid $resid"
>> }
>>
>> set watlist3 [join $watlist2 " or "]
>>
>> animate write pdb new.pdb sel [atomselect top "protein or [puts $watlist3]"]
>> ---------------------------------------------------------
>>
>> I have tried some other things too. Is there an easier way to be doing this?
>> Thanks,
>> Jeff Tibbitt
>>
>> _________________________________________________________________
>> E-mail for the greater good. Join the [WINDOWS-1252?]i’m Initiative from Microsoft.
>> http://im.live.com/Messenger/IM/Join/Default.aspx?source=EML_WL_ GreaterGood
>
>
> --
> Webmail ESTG de Leiria (http://webmail.estg.ipleiria.pt)
>

_________________________________________________________________
Change the world with e-mail. Join the i’m Initiative from Microsoft.
http://im.live.com/Messenger/IM/Join/Default.aspx?source=EML_WL_ChangeWorld