From: Claw Isthelaw (clawisthelaw_at_hotmail.com)
Date: Mon Jun 02 2008 - 11:01:49 CDT

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 iím Initiative from Microsoft.
http://im.live.com/Messenger/IM/Join/Default.aspx?source=EML_WL_ GreaterGood