<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Mirko,<div class=""><br class=""></div><div class=""> I don't totally understand the details of what you need, but here's some info. If you rotate a selected model using the "Rotate model" mouse mode then its position matrix changes. First Python to get the list of selected models is</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>session.selection.models()</div><div class=""><br class=""></div><div class="">If it is a volume (ie map) model that got rotated then I could find the selected volumes like this</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>from chimerax.map import Volume</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>volumes = [v for v in session.selection.models() if isinstance(v, Volume)]</div><div class=""><br class=""></div><div class="">And if I wanted to print their 3x4 position matrices (first 3 columns are the rotation, 4th column is a translation done after rotation)</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>for v in volumes:</div><div class=""> <span class="Apple-tab-span" style="white-space:pre"> </span> print (v.position.matrix)</div><div class=""><br class=""></div><div class="">Now I don't know what you mean by "update the rotation angles". Are you trying to record Euler angles? If so you could get the Euler angles in z-x-z convention like this</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>from chimerax.geometry.matrix import euler_angles</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>for v in volumes:</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span> alpha, beta, gamma = euler_angles(v.position.matrix) # Angles in degrees</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span> print ('Volume %s Euler angles %.2f %.2f %.2f degrees (z-x-z convention)' % (v.name_with_id(), alpha, beta, gamma)</div><div class=""><br class=""></div><div class="">In Chimera the openModels object holds the list of models. In ChimeraX this is session.models. For example to show the names of all models:</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>for m in session.models.list():</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span> print ('#' + m.id_string + ' ' + m.name)</div><div class=""><br class=""></div><div class="">The programmer documentation</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span><a href="https://www.cgl.ucsf.edu/chimerax/docs/devel/index.html" class="">https://www.cgl.ucsf.edu/chimerax/docs/devel/index.html</a></div><div class=""><br class=""></div><div class="">has info about the various ChimeraX functions, for instance for models</div><div class=""><br class=""></div><div class=""><a href="https://www.cgl.ucsf.edu/chimerax/docs/devel/core/models.html" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>https://www.cgl.ucsf.edu/chimerax/docs/devel/core/models.html</a><br class=""><div><br class=""></div><div>There is some example Python code at the ChimeraX recipes web site that can be useful.</div><div><br class=""></div><div><span class="Apple-tab-span" style="white-space:pre"> </span><a href="https://rbvi.github.io/chimerax-recipes" class="">https://rbvi.github.io/chimerax-recipes</a>/</div><div><br class=""></div><div>Back in March 2021 I was talking with Matthias Vorlander to place a subtomogram average at positions in a tomogram given by a Relion STAR file.</div><div><br class=""></div><div><span class="Apple-tab-span" style="white-space:pre"> </span><a href="https://www.rbvi.ucsf.edu/pipermail/chimerax-users/2021-March/002093.html" class="">https://www.rbvi.ucsf.edu/pipermail/chimerax-users/2021-March/002093.html</a></div><div><br class=""></div><div>I've attached the code we came up with. Maybe that will be useful to you.</div><div><br class=""></div><div> I am happy to answer more programming questions. Keep sending them to this list unless you want to send private data in which case you can send directly to me.</div><div><br class=""></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>Tom</div><div><br class=""></div><div></div></div></body></html>