RE: [PyMOL] detecting the existence of a selection

2003-12-02 Thread Igor Pechersky
>if no atoms were picked, I would see the alarming error messages: >Selector-Error: Unknown keyword or selection. >Selector-Error: Malformed selection. >( ( lb<-- >Is it possible to suppress them and still get the result? Some kind of preliminary existence check might help. Something similar to f

RE: [PyMOL] detecting the existence of a selection

2003-12-01 Thread Warren L. DeLano
Tina, Use the Python "in" operator selection-name in cmd.get_names("selections") PyMOL>print "foo" in cmd.get_names("selections") False PyMOL>select foo, all Selector: selection "foo" defined with 1631 atoms. PyMOL>print "foo" in cmd.get_names("selections") True Cheers, Warren -- mailto:war..