FW: [PyMOL] detecting the existence of a selection

2003-12-02 Thread Warren L. DeLano
et' Subject: RE: [PyMOL] detecting the existence of a selection 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

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
ailto:pymol-users- > ad...@lists.sourceforge.net] On Behalf Of Tina Li > Sent: Monday, December 01, 2003 11:50 AM > To: pymol-users@lists.sourceforge.net > Subject: [PyMOL] detecting the existence of a selection > > Hello, > > I wonder if there is a quick and simple way of

[PyMOL] detecting the existence of a selection

2003-12-01 Thread Tina Li
Hello, I wonder if there is a quick and simple way of detecting whether a selection exists without triggering any errors. e.g. to check if there are currently any atoms picked (and collect the residue IDs if there is any), I do: cmd.iterate("(lb)","stored.list.append((resi))") if no atoms were p