
Hi Wolf, The particular function you want is 'currentAtoms', like so: from chimera.selection import currentAtoms atoms = currentAtoms() currentAtoms() returns a list (which will be empty if nothing is selected). There are various other functions for dealing with the current selection, which are shown here: http://www.cgl.ucsf.edu/ chimera/docs/ProgrammersGuide/Reference/generated/chimera/selection/ __init__.html Also, there is a programming example dealing with selections, though it doesn't explicitly answer your question: http://www.cgl.ucsf.edu/ chimera/docs/ProgrammersGuide/Examples/Main_Selections.html Eric Pettersen UCSF Computer Graphics Lab pett@cgl.ucsf.edu http://www.cgl.ucsf.edu On Oct 6, 2005, at 7:44 AM, Wolf Cochrane wrote:
Hi,
I've written software and want to use Chimera as vector application for it. As a input step I want the user to select a atom on a structure, using his/her mouse in the Chimera GUI. I've had a look at the Chimera code and online documentation but haven't been able to figure out how to get the selected elements (Existing elements) on a structure.
I will appreciate it if you can help me out.
Regards Wolf Cochrane
Bioinformatics and computational Biology Unit University Pretoria _______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu http://www.cgl.ucsf.edu/mailman/listinfo/chimera-dev