<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Lars,<div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>The model attributes for the ID are ‘id’/‘subid’ for the parts before and after any ‘.’ respectively, and the ‘name’ attribute has the model name. You would loop through all volume models with something like:</div><div class=""><br class=""></div><div class="">from chimera import openModels</div><div class="">from VolumeViewer import Volume</div><div class="">for vol in openModels.list(modelTypes=[Volume]):</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>print “%d.%d %s” % (<a href="http://vol.id" class="">vol.id</a>, vol.subid, vol.name)</div><div class=""><br class=""></div><div class="">We realize the programmer documentation isn’t great. What little we have you can find here: <a href="https://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/index.html" class="">https://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/index.html</a> . One of our objectives for ChimeraX is much better programmer documentation.</div><div class=""><br class=""></div><div class="">—Eric</div><div class=""><br class=""><div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>Eric Pettersen</div><div class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>UCSF Computer Graphics Lab</div></div><br class="Apple-interchange-newline">
</div>
<div><br class=""><blockquote type="cite" class=""><div class="">On Mar 6, 2019, at 10:40 AM, Lars Hangartner <<a href="mailto:lhangart@scripps.edu" class="">lhangart@scripps.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Hi guys,<br class=""><br class="">I am desperately looking to get the model_id / model name from all open volume objects. I have tried openModel.list()[0].model_id in many iterations but no success… I would like to iterate through models and identify the resampled ones.<br class=""><br class="">Can anybody help?<br class=""><br class="">Thanks,<br class=""><br class="">Lars<br class=""><br class=""><br class="">P.S: API documentation would really be helpful. <br class=""><br class=""><br class=""><br class="">_______________________________________________<br class="">Chimera-dev mailing list<br class=""><a href="mailto:Chimera-dev@cgl.ucsf.edu" class="">Chimera-dev@cgl.ucsf.edu</a><br class="">http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev<br class=""><br class=""></div></div></blockquote></div><br class=""></div></body></html>