From: John Stone (johns_at_ks.uiuc.edu)
Date: Tue May 10 2005 - 09:58:51 CDT

Nicolas,
  It appears that you're attempting to combine the "delatom" command
that applies only to 'psfgen' structures, with the VMD commands for
writing out structures. This won't work. In order to write out a PDB
file that contains everything except your selected group of atoms, from
VMD (not psfgen) you'd use a selection like this instead:
  set sel [atomselect top "not (resname POPC and within 2 of protein)"]
  $sel writepdb myfile.pdb

  John Stone
  vmd_at_ks.uiuc.edu

On Tue, May 10, 2005 at 02:30:50PM +0200, Nicolas Sapay wrote:
> Hello everybody,
> I want to delete some residues from a structure. (I mean that I want to
> remove their coordinates, not only their representations). I have
> selected a set of atoms :
> set bad [atomselect top "resname POPC and within 2 of protein"]
>
> I have tried to delete them
> foreach segid [bad get segid] resid [bad get resid] {
> delatom $segid $resid
> }
>
> And then, I have write my new PDB file
> animate write pdb myfile.pdb
>
> However, deleted residues are still present in myfile.pdb! Then, I have
> tried this :
> delres $bad
>
> But I get an error message:
> can't read "segid": no such variable
>
> Can someone help me to delete these residues?
>
> Thanks
>
> Nicolas
>
> --
> _ Nicolas Sapay ________________________ PhD student _
>
> IBCP - Institut de Biologie et Chimie des Protéines
> >> 7, Passage du Vercors
> 69367 Lyon cedex 07, France
>
> >> Tel : (33) (0)4 72 72 26 46
> >> Fax : (33) (0)4 72 72 26 04
>
> ____________________________________ n.sapay_at_ibcp.fr _
>

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