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