<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Feb 22, 2008, at 7:28 AM, Jean-Didier Maréchal wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Hi again,</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">When using the python shell, I am often struggling to find the</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">attribute for the atoms I work on.<span class="Apple-converted-space"> </span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">for at my list with the selected atoms, I caught that at[i].name gives</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">the atom name of the entry at[i], at[i].residue provides with the name</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">residue.chain, etc.<span class="Apple-converted-space"> </span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Where can I find in the programmer's guide the full list of available</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">attributes? What would be the way to ask for the serialNumber from the</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">IDLE?</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Thanks lot</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">JD</div></blockquote><br></div><div>Hi JD,</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>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.<br class="webkit-block-placeholder"></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>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.<br class="webkit-block-placeholder"></div><div><br class="webkit-block-placeholder"></div><div>--Eric</div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="5" style="font: normal normal normal 16px/normal Helvetica; "><br class="Apple-interchange-newline"> Eric Pettersen</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="5" style="font: normal normal normal 16px/normal Helvetica; "> UCSF Computer Graphics Lab</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="5" style="font: normal normal normal 16px/normal Helvetica; "> <a href="http://www.cgl.ucsf.edu">http://www.cgl.ucsf.edu</a></font></div></div><br><div></div></body></html>