From: Joaquim Rui Rodrigues (joaquim.rodrigues_at_estg.ipleiria.pt)
Date: Mon Jun 02 2008 - 12:10:28 CDT

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)