From: Axel Kohlmeyer (akohlmey_at_cmm.chem.upenn.edu)
Date: Tue Jan 22 2008 - 05:49:32 CST

On 1/22/08, Lucie Huynh <luciehuynh_at_gmail.com> wrote:
> Hi everybody,

hi lucie,

please note that selections always return lists (even if only with
one element) and that delatom takes an element of the list.
if you look into the psfgen documentation you'll set that delatom
is wrapped into an foreach loop. an alternative would be to
use lindex to pick the first entry of the list. the issues with atomselect
always returning lists has been discussed many times here.
please have a look at the various recommendations to overcome it.

cheers,
    axel.

>
> I'm trying to delete an atomselection with the command delatom but I have
> the following error message: "no segment L11".
> I read some post in the mailing list about this kind of message but another
> solution was given, avoiding the use of delatom command.
>
> Here is what I typed in the TKConsole (vmd 1.8.6 on windows):
> (VMD) 49 % set ref [atomselect 0 "segid L11 and resid 30"]
> atomselect0
> >Main< (VMD) 50 % set segid [lsort -unique [$ref get segid]]
> L11
> >Main< (VMD) 51 % set resid [lsort -unique [$ref get resid]]
> 30
> >Main< (VMD) 52 % delatom $segid $resid
> no segment L11
>
> What's wrong with that? when doing "get segid", vmd reply L11, so I don't
> understand why there's an error message "no segment L11"...
> Thanks in advance for any help and explanation ?
>
>
> Lucie
>

-- 
=======================================================================
Axel Kohlmeyer   akohlmey_at_cmm.chem.upenn.edu   http://www.cmm.upenn.edu
  Center for Molecular Modeling   --   University of Pennsylvania
Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
tel: 1-215-898-1582,  fax: 1-215-573-6233,  office-tel: 1-215-898-5425
=======================================================================
If you make something idiot-proof, the universe creates a better idiot.