<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="">To set the step of a Volume model v in Chimera in Python code<div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>v.new_region(ijk_step = (1,1,1))</div><div class=""><br class=""></div><div class=""> Tom</div><div class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Mar 6, 2019, at 8:42 PM, Lars Hangartner <<a href="mailto:lhangart@scripps.edu" class="">lhangart@scripps.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
Hi Eric,
<div class=""><br class="">
</div>
<div class="">Thanks for the swift response, worked like a charm. May I also ask how to set the ’step’ property value from the volume viewer GUI pop-up from a script?</div>
<div class=""><br class="">
</div>
<div class="">Thanks,</div>
<div class=""><br class="">
</div>
<div class="">Lars<br class="">
<div class=""><br class="">
<blockquote type="cite" class="">
<div class="">On Mar 6, 2019, at 3:40 PM, Eric Pettersen <<a href="mailto:pett@cgl.ucsf.edu" class="">pett@cgl.ucsf.edu</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div 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="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; 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 class=""><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="">
<a href="http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev" class="">http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev</a><br class="">
<br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</div>_______________________________________________<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=""></div></blockquote></div><br class=""></div></body></html>