Fwd: Visualizing inertia axes as arrows
Hi Miguel, Thanks for the corrections! I just fired that one off without testing it. I thought there might be an error or two. I'm glad you find it useful after fixing it. --Eric Begin forwarded message:
From: Miguel Ortiz Lombardía <miguel.ortiz-lombardia@afmb.univ-mrs.fr> Date: July 31, 2010 1:39:33 AM PDT To: Eric Pettersen <pett@cgl.ucsf.edu> Subject: Re: [Chimera-users] Visualizing inertia axes as arrows
Hi Eric,
Thanks for this useful script!
I think I found two errors though:
from chimera.selection import currentAtoms, numpyArrayFromAtoms
should be:
from chimera.selection import currentAtoms from chimera import numpyArrayFromAtoms
and:
for val, vec in zip(vals, vecs): bildString += ".arrow %g %g %g %g %g %g .1 .2 .9\n" % ( centroid[0], centroid[1], centroid[2], centroid[0] + val[0] * vec[0], centroid[1] + val[1] * vec[1], centroid[2] + val[2] * vec[2])
has to be:
for val, vec in zip(vals, vecs): bildString += ".arrow %g %g %g %g %g %g .5 1. .9\n" % (centroid[0], centroid[1], centroid[2], centroid[0] + val * scale * vec[0], centroid[1] + val * scale * vec[1], centroid[2] + val * scale * vec[2])
(you can ignore the scale thing, that's simply a 50/max(vals) correction so the longest axis is 50 A)
Best,
-- Miguel
Architecture et Fonction des Macromolécules Biologiques (UMR6098) CNRS, Universités d'Aix-Marseille I & II Case 932, 163 Avenue de Luminy, 13288 Marseille cedex 9, France Tel: +33(0) 491 82 55 93 Fax: +33(0) 491 26 67 20 e-mail: miguel.ortiz-lombardia@afmb.univ-mrs.fr
-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
participants (1)
-
Eric Pettersen