Hi Eric, <br>thanks a lot for this that's just perfect! <br><br>I'm afraid that I have another question. Could you tell me what is the easiest way to rotate only one model or a
given selection of a model around an axis passing through its center of
rotation?<br><br>What I am trying to do is to rotate only one model (or a subset of one model :a water molecule, a ligand etc..) around one of these calculated axis. Basically, I am trying to pilot in my script a similar thing that the "movement--> movement mouse mode" does with the "move selection mode". I thought I had clear in mind how of deal with Xform, but I can't get work and get mixed up. I looked at the MoveSelection scripts for inspiring me but I get stuck. <br>
<br>Thanks for any help<br><br>JD<br> <br><br><div class="gmail_quote">
2008/11/10 Eric Pettersen <span dir="ltr"><<a href="mailto:pett@cgl.ucsf.edu" target="_blank">pett@cgl.ucsf.edu</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi JD,<br>
The StructMeasure.bestLine routine almost does what you want, but although it returns the eigenvectors, it doesn't return the eigenvalues (!) which makes it kind of useless. I'll be fixing that in tonight's build. At any rate, you can just conscript the underlying code: if your list of atoms is in the variable "atoms", then this will get you the eigenvectors/values:<br>
<br>
coords = chimera.numpyArrayFromAtoms(atoms)<br>
centroid = coords.mean(0)<br>
centered = coords - centroid<br>
from numpy.linalg import svd<br>
ignore, vals, vecs = svd(centered)<br><font color="#888888">
<br>
--Eric</font><div><div></div><div><br>
<br>
On Nov 8, 2008, at 7:00 AM, Dr. Jean-Didier Maréchal wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Dear all,<br>
<br>
Sorry to bother you again with a similar kind of question, but I'd like my<br>
script to stock in an array the three resulting vectors of the new<br>
implemented calculation of the axes for a given set of selected atoms. The<br>
truth is that I find the right python call for the axis function. I imported<br>
StructMeasure and tried different ways around but I can't find my way<br>
through. I don't know if I don't give the wrong arguments or have the wrong<br>
syntaxes.<br>
<br>
Thanks a lot for any help,<br>
<br>
JD<br>
<br>
<br>
-----Mensaje original-----<br>
De: <a href="mailto:chimera-dev-bounces@cgl.ucsf.edu" target="_blank">chimera-dev-bounces@cgl.ucsf.edu</a><br>
[mailto:<a href="mailto:chimera-dev-bounces@cgl.ucsf.edu" target="_blank">chimera-dev-bounces@cgl.ucsf.edu</a>] En nombre de<br>
<a href="mailto:chimera-dev-request@cgl.ucsf.edu" target="_blank">chimera-dev-request@cgl.ucsf.edu</a><br>
Enviado el: jueves, 06 de noviembre de 2008 21:00<br>
Para: <a href="mailto:chimera-dev@cgl.ucsf.edu" target="_blank">chimera-dev@cgl.ucsf.edu</a><br>
Asunto: Chimera-dev Digest, Vol 58, Issue 2<br>
<br>
Send Chimera-dev mailing list submissions to<br>
<a href="mailto:chimera-dev@cgl.ucsf.edu" target="_blank">chimera-dev@cgl.ucsf.edu</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
<a href="http://www.cgl.ucsf.edu/mailman/listinfo/chimera-dev" target="_blank">http://www.cgl.ucsf.edu/mailman/listinfo/chimera-dev</a><br>
or, via email, send a message with subject or body 'help' to<br>
<a href="mailto:chimera-dev-request@cgl.ucsf.edu" target="_blank">chimera-dev-request@cgl.ucsf.edu</a><br>
<br>
You can reach the person managing the list at<br>
<a href="mailto:chimera-dev-owner@cgl.ucsf.edu" target="_blank">chimera-dev-owner@cgl.ucsf.edu</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of Chimera-dev digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
1. atom spec. in BNF (David A. C. Beck)<br>
2. Re: atom spec. in BNF (Eric Pettersen)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Wed, 5 Nov 2008 14:03:02 -0800 (PST)<br>
From: "David A. C. Beck" <<a href="mailto:dacb@u.washington.edu" target="_blank">dacb@u.washington.edu</a>><br>
Subject: [chimera-dev] atom spec. in BNF<br>
To: <a href="mailto:chimera-dev@cgl.ucsf.edu" target="_blank">chimera-dev@cgl.ucsf.edu</a><br>
Message-ID:<br>
<<a href="mailto:Pine.LNX.4.64.0811051401230.9881@homer23.u.washington.edu" target="_blank">Pine.LNX.4.64.0811051401230.9881@homer23.u.washington.edu</a>><br>
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed<br>
<br>
Does anyone have BNF notation for the atom specification 'language' used<br>
by Chimera? Thanks,<br>
- David<br>
<br>
--<br>
David A. C. Beck, Ph.D.<br>
<a href="mailto:dacb@u.washington.edu" target="_blank">dacb@u.washington.edu</a><br>
Valerie Daggett Laboratory<br>
University of Washington, Seattle<br>
<br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Wed, 5 Nov 2008 14:26:16 -0800<br>
From: Eric Pettersen <<a href="mailto:pett@cgl.ucsf.edu" target="_blank">pett@cgl.ucsf.edu</a>><br>
Subject: Re: [chimera-dev] atom spec. in BNF<br>
To: "David A. C. Beck" <<a href="mailto:dacb@u.washington.edu" target="_blank">dacb@u.washington.edu</a>><br>
Cc: <a href="mailto:chimera-dev@cgl.ucsf.edu" target="_blank">chimera-dev@cgl.ucsf.edu</a><br>
Message-ID: <<a href="mailto:88F81EBE-CCD4-495F-9316-FEA5D095965D@cgl.ucsf.edu" target="_blank">88F81EBE-CCD4-495F-9316-FEA5D095965D@cgl.ucsf.edu</a>><br>
Content-Type: text/plain; charset="us-ascii"<br>
<br>
On Nov 5, 2008, at 2:03 PM, David A. C. Beck wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Does anyone have BNF notation for the atom specification 'language'<br>
used<br>
by Chimera?<br>
</blockquote>
<br>
I don't think so. What's the use case here? If you're in the context<br>
of Chimera, you should be able to use Chimera's own atom-spec parsing<br>
facilities, e.g. chimera.specifier.evalSpec(). Outside of Chimera,<br>
I'm aware of a pretty extensive but not totally complete parser in<br>
perl: Chemistry::MidasPattern - Select atoms in macromolecules -<br>
<a href="http://search.cpan.org" target="_blank">search.cpan.org</a><br>
<br>
--Eric<br>
<br>
Eric Pettersen<br>
UCSF Computer Graphics Lab<br>
<a href="http://www.cgl.ucsf.edu" target="_blank">http://www.cgl.ucsf.edu</a><br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL:<br>
<a href="http://www.cgl.ucsf.edu/pipermail/chimera-dev/attachments/20081105/4e237100/" target="_blank">http://www.cgl.ucsf.edu/pipermail/chimera-dev/attachments/20081105/4e237100/</a><br>
attachment-0001.html<br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
Chimera-dev mailing list<br>
<a href="mailto:Chimera-dev@cgl.ucsf.edu" target="_blank">Chimera-dev@cgl.ucsf.edu</a><br>
<a href="http://www.cgl.ucsf.edu/mailman/listinfo/chimera-dev" target="_blank">http://www.cgl.ucsf.edu/mailman/listinfo/chimera-dev</a><br>
<br>
<br>
End of Chimera-dev Digest, Vol 58, Issue 2<br>
******************************************<br>
<br>
_______________________________________________<br>
Chimera-dev mailing list<br>
<a href="mailto:Chimera-dev@cgl.ucsf.edu" target="_blank">Chimera-dev@cgl.ucsf.edu</a><br>
<a href="http://www.cgl.ucsf.edu/mailman/listinfo/chimera-dev" target="_blank">http://www.cgl.ucsf.edu/mailman/listinfo/chimera-dev</a><br>
</blockquote>
<br>
</div></div></blockquote></div><br>