Hi Bernhard,

"delete" strictly operates on object names, not on atom selections. This 
difference is unfortunately a common point of confusion.

Here's a delete command which operates on a selection and therefore supports 
the "not" operator:

python
@cmd.extend
def delete_by_sele(selection):
    cmd.delete(' '.join(cmd.get_object_list('(' + selection + ')')))
python end

If you paste this in the PyMOL command line or put it in your pymolrc script, 
you can do:

PyMOL> delete_by_sele not obj_final

Hope that helps.

Cheers,
  Thomas

On 08 May 2015, at 14:42, Bernhard Lechtenberg 
<blechtenb...@sanfordburnham.org> wrote:

> Hi all,
> 
> after an extensive pymol session, I ended up with a lot of intermediate 
> objects that I now want to delete so I will only keep my final object. Is 
> there an easy
> way to remove all but one object? I tried the delete command, but something 
> like
> 
> delete (not obj_final) 
> 
> did not work as expected and only deleted obj_final.
> 
> Any help is appreciated.
> 
> Thanks,
> Bernhard
> 
> Bernhard C. Lechtenberg, PhD
> Postdoctoral Fellow
> Riedl Lab
> Sanford-Burnham Medical Research Institute
> 10901 North Torrey Pines Road 
> La Jolla, CA 92037, USA
> Phone: 858.646.3100 x 4216
> Email: blechtenb...@sanfordburnham.org

-- 
Thomas Holder
PyMOL Principal Developer
Schrödinger, Inc.


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Reply via email to