[Chimera-users] IDLE for listing selected residues.
pett at cgl.ucsf.edu
Tue Nov 13 10:49:43 PST 2007
The first thing is that you probably want to refine your atom
specifier to just select the oxygens, i.e. use:
select :HOH at 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():
UCSF Computer Graphics Lab
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
> 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
> 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
> currentSerialNum and currentSerialNumber do not see to be a correct
> selection type. If there is any way that can do this?
More information about the Chimera-users