<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Ankit,<div class=""><br class=""></div><div class=""> Chimera does not have a display style to show the inertia of a molecule as 3 axes. But here is a quick way to hack that in. You can change a little bit of Python code in your Chimera 1.10 distribution so that it shows three narrow ellipsoids that represent the axes. Use a text editor to edit</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>chimera/share/measure/inertia.py</div><div class=""><br class=""></div><div class="">or on Mac Chimera.app/Contents/Resources/share/measure/inertia.py and replace the ellipsoid surface function</div><div class=""><br class=""></div><div class=""><div class="">def ellipsoid_surface(axes, lengths, center, color, surface):</div><div class=""><br class=""></div><div class=""> xf = surface.openState.xform.inverse()</div><div class=""> sa, sc = transform_ellipsoid(axes, center, xf)</div><div class=""> varray, tarray = ellipsoid_geometry(sc, sa, lengths)</div><div class=""> p = surface.addPiece(varray, tarray, color)</div><div class=""> p.save_in_session = True</div><div class=""> return p</div></div><div class=""><br class=""></div><div class="">with</div><div class=""><br class=""></div><div class=""><div class="">def ellipsoid_surface(axes, lengths, center, color, surface):</div><div class=""><br class=""></div><div class=""> xf = surface.openState.xform.inverse()</div><div class=""> sa, sc = transform_ellipsoid(axes, center, xf)</div><div class=""> for sx,sy,sz in [(1,.05,.05), (.05,1,.05), (.05,.05,1)]:</div><div class=""> lx,ly,lz = lengths</div><div class=""> varray, tarray = ellipsoid_geometry(sc, sa, (lx*sx,ly*sy,lz*sz))</div><div class=""> p = surface.addPiece(varray, tarray, color)</div><div class=""> p.save_in_session = True</div><div class=""> return p</div></div><div class=""><br class=""></div><div class="">then save the file, restart Chimera and now “measure inertia #0 color yellow” will show the 3 axes. Make sure to keep the indentation of the code since that is important in the Python computer language. This change is scaling down 2 of the 3 ellipsoid axes by a factor of 0.05. You can change the 0.05 value to say 0.01 if you want thinner axis ellipsoids.</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>Tom</div><div class=""><br class=""></div><div class=""><img height="417" width="458" apple-width="yes" apple-height="yes" apple-inline="yes" id="593C95E5-EB4F-4458-B14E-948C2D08C858" src="cid:1FFBFB13-0861-4529-9E60-B2034BD87069@cgl.ucsf.edu" class=""></div><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Feb 5, 2015, at 3:41 AM, Ankit Agrawal wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_default" style="font-family:comic sans ms,sans-serif">Hi<br class=""></div><div class="gmail_default" style="font-family:comic sans ms,sans-serif">I am analysing a protein molecule (MD simulations). I wrote a python script to calculate inertia for the protein and ran it over 40000 frames. I got a data in log file but it is creating a ellipsoid around the molecule.<br class=""><br class=""></div><div class="gmail_default" style="font-family:comic sans ms,sans-serif">I want 3 axes of the ellipsoid to be shown in that protein molecule not the ellipsoid as it covers the whole protein molecule. So that I can easily visualize the movement of all 3 axes of ellipsoid over the 40000 frames (means how the axes are changing during trajectory run).<br class=""><br class=""></div><div class="gmail_default" style="font-family:comic sans ms,sans-serif">Thanks<br class=""></div><div class="gmail_default" style="font-family:comic sans ms,sans-serif">Ankit<br class=""></div><div class="gmail_default" style="font-family:comic sans ms,sans-serif">Department of Chemical Science<br class=""></div><div class="gmail_default" style="font-family:comic sans ms,sans-serif">IISER-Mohali, India<br class=""></div></div>
_______________________________________________<br class="">Chimera-users mailing list<br class=""><a href="mailto:Chimera-users@cgl.ucsf.edu" class="">Chimera-users@cgl.ucsf.edu</a><br class="">http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users<br class=""></div></blockquote></div><br class=""></div></body></html>