On Nov 6, 2007, at 7:38 AM, Greg Pintilie wrote:
yes, try:
chimera.selection.currentAtoms()
this will return a list of the currently selected atoms in the Chimera viewer.
For your purposes, it sounds like you want vectors between every two atoms that you subsequently select. Watch out however, that the list returned by the above command need not be in the order that you made the selection. I noticed that in general the selection routines return atoms in arbitrary order, independent of the selection order or their position in the structure. Not sure if there is any way to enforce any kind of order?
chimera.selection.currentAtoms(ordered=True) This returns the atoms in the order they were selected. It's not the default since it involves a possibly-expensive sorting operation and because many uses of the current selection don't care about the ordering. --Eric Eric Pettersen UCSF Computer Graphics Lab http://www.cgl.ucsf.edu