From: John Stone (johns_at_ks.uiuc.edu)
Date: Mon Jun 15 2009 - 10:38:18 CDT

Hi,
  If you want to write a file that does not contain the residues,
you can do this:
  # select everything except the lipids you want removed
  set lipidsremoved [atomselect 0 "not resid $delete_list"]

  # write the selected atoms to a file
  $lipidsremoved writepdb lipidsremoved.pdb

  # delete the selection when finished
  $lipidsremoved delete

Cheers,
  John Stone
  vmd_at_ks.uiuc.edu

On Mon, Jun 15, 2009 at 05:31:26PM +0200, maria goranovic wrote:
> I am writing a tcl script to delete some lipid molecules In the script, I
> end up with a TCL list containing residue numbers of undesirable lipid
> molecules. I want to write a pdb file WITHOUT these lipids. How can I use
> this residue list in the atomselect command to remove these ? I tried this,
>
> set all [atomselect 0 "not resid $delete_list"]
>
> set all [atomselect 0 "not resid [$delete_list text]"]
>
> Thank you all in advance for the support
>
> -Maria
> --
> Maria G.
> Technical University of Denmark
> Copenhagen

-- 
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