<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">Hi Wolf,<DIV> The particular function you want is 'currentAtoms', like so:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV> from chimera.selection import currentAtoms</DIV><DIV> atoms = currentAtoms()</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>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: <A href="http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/Reference/generated/chimera/selection/__init__.html">http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/Reference/generated/chimera/selection/__init__.html</A></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Also, there is a programming example dealing with selections, though it doesn't explicitly answer your question: <A href="http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/Examples/Main_Selections.html">http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/Examples/Main_Selections.html</A></DIV><DIV><BR><DIV> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="5" style="font: 16.0px Helvetica"><SPAN class="Apple-converted-space"> </SPAN>Eric Pettersen</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="5" style="font: 16.0px Helvetica"><SPAN class="Apple-converted-space"> </SPAN>UCSF Computer Graphics Lab</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="5" style="font: 16.0px Helvetica"><SPAN class="Apple-converted-space"> </SPAN><A href="mailto:pett@cgl.ucsf.edu">pett@cgl.ucsf.edu</A></FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="5" style="font: 16.0px Helvetica"><SPAN class="Apple-converted-space"> </SPAN><A href="http://www.cgl.ucsf.edu">http://www.cgl.ucsf.edu</A></FONT></P> <BR class="Apple-interchange-newline"> </DIV><BR><DIV><DIV>On Oct 6, 2005, at 7:44 AM, Wolf Cochrane wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Hi,</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">I've written software and want to use Chimera as vector application for it. As a</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">input step I want the user to select a atom on a structure, using his/her mouse</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">in the Chimera GUI. I've had a look at the Chimera code and online documentation</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">but haven't been able to figure out how to get the selected elements (Existing</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">elements) on a structure.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">I will appreciate it if you can help me out.</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Regards</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Wolf Cochrane</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Bioinformatics and computational Biology Unit</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">University Pretoria</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_______________________________________________</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Chimera-dev mailing list</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="mailto:Chimera-dev@cgl.ucsf.edu">Chimera-dev@cgl.ucsf.edu</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="http://www.cgl.ucsf.edu/mailman/listinfo/chimera-dev">http://www.cgl.ucsf.edu/mailman/listinfo/chimera-dev</A></DIV> <BR class="Apple-interchange-newline"></BLOCKQUOTE></DIV><BR></DIV></BODY></HTML>