
Hi JD, The first thing is that you probably want to refine your atom specifier to just select the oxygens, i.e. use: select :HOH@o & :301.a zr < 5.0 (an extra "@o" in there). Then use Actions...Write List to write it to a file. If you really need the list in Python or need to see the serial numbers, then this code in IDLE would do it: for a in chimera.selection.currentAtoms(): print a.serialNumber --Eric Eric Pettersen UCSF Computer Graphics Lab http://www.cgl.ucsf.edu On Nov 12, 2007, at 11:19 AM, Jean-Didier Maréchal wrote:
I'd like to use chimera to generate the list of the oxygen atoms of the water molecules located at less than 5.0 A of a ligand.
Selecting the water molecules have been the easiest part... select :HOH & :301.a zr < 5.0
with :301.a my ligand.
Then in the IDLE, I tried a series of alternative to generate the list. I use the different tips that were posted in the digest recently and arrived to this:
for i in range(1,len(chimera.selection.currentResidues()): print chimera.selection.currentResidues()[i]
Right, this gives me the list of residues, unfortunately, that would be a LOOOT better for me is to have the Serial number of the oxygen atoms...
currentSerialNum and currentSerialNumber do not see to be a correct selection type. If there is any way that can do this?