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.