From: Jim Pfaendtner (jpfaendt_at_hec.utah.edu)
Date: Thu Jul 26 2007 - 15:18:48 CDT

Hello,

I am trying to write a simple badwater script using tcl:

set badwat [atomselect top "resname TIP3 and within 2.4 of (not
resname TIP3)"]
foreach segid [$badwat get segid] resid [$badwat get resid] {
delatom $segid $resid }

The selection part seems to be working correctly but the delatom loop
is not, for each atom in the selection I get an error:

"no segment XXXX" [XXXX is whatever I named the segment of water
molecules when generating the psf/pdb file. Right now I took a small
polypeptide and an empty box of water and read them in on top of each
other just to make sure there are lots of overlaps. The water segid
is H2O right now.]

I am running this script in the TKConsole after loading the psf/pdb
file over the peptide overlapping with the water box into VMD.

I would prefer to run this from text mode when generating my psf/pdb,
but I get errors with my atomselect command (no molID named top).

Any help would be appreciated.

Thanks,
Jim