
Dear Chimera Dev. Team, I have a little question for you. How can I select a bond using the Command Line (or the IDLE)? Thanks in advance. Elisabeth Ortega-Carrasco Universitat Autònoma de Barcelona

Hi Elisabeth, A partial answer to your question: Using the "select" command with an atom-specification string selects not only the specified atoms, but also bonds for which both end atoms are selected. Some examples, select #0 select :his select :45.A select ligand ...respectively selecting all of model 0, all residues named HIS, residue 45 in chain A, any residues classified as ligand. However, this method does not select the bonds only (without atoms). Elaine ---------- Elaine C. Meng, Ph.D. UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab Department of Pharmaceutical Chemistry University of California, San Francisco On Mar 10, 2011, at 8:53 AM, Elisabeth Ortega wrote:
Dear Chimera Dev. Team, I have a little question for you. How can I select a bond using the Command Line (or the IDLE)? Thanks in advance.

On Mar 10, 2011, at 8:53 AM, Elisabeth Ortega wrote:
Dear Chimera Dev. Team,
I have a little question for you. How can I select a bond using the Command Line (or the IDLE)?
As Elaine mentioned, in the Command Line selecting atoms will also select the bonds between them. To select just one bond, you have to use Python/IDLE. This fragment of Python code would be used to get the bond between atoms a1 and a2: b = a1.bondsMap[a2] to cause it to become selected in the graphics window: from chimera.selection import setCurrent setCurrent(b) [setCurrent make the selection the same as what you specify (i.e. the previous selection is replaced). You would instead use addCurrent if you want to add to the current selection] Now, how you would get a1 and a2 is kind of up to you. If they were the only two atoms in the current selection, then this would do it: from chimera.selection import currentAtoms a1, a2 = currentAtoms() I'd need to know more about your usage scenario in order to give any better advice. But maybe the above is good enough? --Eric Eric Pettersen UCSF Computer Graphics Lab http://www.cgl.ucsf.edu
participants (3)
-
Elaine Meng
-
Elisabeth Ortega
-
Eric Pettersen