[Chimera-users] list of atoms attributes
Eric Pettersen
pett at cgl.ucsf.edu
Fri Feb 22 13:07:42 PST 2008
On Feb 22, 2008, at 7:28 AM, Jean-Didier Maréchal wrote:
> Hi again,
>
> When using the python shell, I am often struggling to find the
> attribute for the atoms I work on.
> for at my list with the selected atoms, I caught that at[i].name gives
> the atom name of the entry at[i], at[i].residue provides with the name
> residue.chain, etc.
>
> Where can I find in the programmer's guide the full list of available
> attributes? What would be the way to ask for the serialNumber from the
> IDLE?
>
> Thanks lot
> JD
Hi JD,
dir(a) will list the attributes of 'a'. help(a) will produce
documentation for the attributes of 'a' that come from the C++ layer
(but not ones that were added in the Python layer). 'a' could be a
class rather than an instance. For example, help(chimera.Atom) lists
the methods/attributes of Atom and provides some info about them.
We do what we can to keep the programmer's guide up to date, but for
attributes (since they get added/changed pretty frequently) it is
better to query with help()/dir() than to fall back on the relatively
static programmer's guide documentation.
--Eric
Eric Pettersen
UCSF Computer Graphics Lab
http://www.cgl.ucsf.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20080222/dbae6528/attachment.html>
More information about the Chimera-users
mailing list