[chimera-dev] residue.atoms, atom.bonds, coords, static class methods

This is a heads up that the next release of Chimera (ETA some time this summer) will have had a major reworking of the internals, which will have some visible effects in the Python layer. There will be four important Python-layer changes: 1) The Residue class method atoms() will return a list of Atoms. Currently atoms() returns a dictionary keyed with atom names that yields a list of Atoms with the corresponding name. This makes it awkward to simply iterate through the atoms of a residue, although the somewhat-obscure method oslChildren() of Residue does currently return a list of Atoms (and will continue to do so). A list of the atom names will be available as atomNames(). The name->atom-list dictionary will remain available, but will be named atomsMap(). 2) The Atom class method bonds() will return a list of Bonds. Currently bonds() is a dictionary whose keys are the Atoms bound to this atom, and whose values are the Bonds connecting them. Instead, the bonds() method will return a list of the Bonds, and the neighbors() method will return a list of the bonded Atoms (in the same order). The old bonds() functionality will remain available as the bondsMap() method. 3) Coord goes away The coord() and xformCoord() methods will return Points instead of Coords. Relevant methods of Coord (e.g. dist(), sqDist()) will be added to Point. 4) Class method renaming Class methods names were indicated by a leading class name and underscore (e.g. Xform_identity()). Now they are indicated with the class name followed by a dot (e.g. Xform.identity()). Eric Pettersen UCSF Computer Graphics Lab pett@cgl.ucsf.edu http://www.cgl.ucsf.edu
participants (1)
-
Eric Pettersen