Daniel, AH, I see...

Absolutely! Quaternion rotation got broken in 11.9.36. Yes, when quaternions
are used in rotations they are not supposed to be around the center of the
selected atoms unless there is also a translation as well or an atom set is
given as well. This is a bug.

By the way, you can now do that with the rotation matrix "r" directly
(MOLECULAR is assumed for matrix rotations):

rotate selected @r

In addition, if you know where you want the model in the end, you can just
do this:

rotate @r translate @t  #(rotate with TRANSLATE implies both SELECTED and
MOLECULAR)

where r is a matrix and t is a vector. This does a direct rotation (about
the center) and translation to take the selected atoms to a new location.
Very useful for superposition!


This is at http://chemapps.stolaf.edu/jmol/docs/examples-12/Jmol-12.zip and
will be incorporated into Jmol 12.0.7 and Jmol 12.1.5.



Bob

ps -- and you can use those end-of-line backslashes if you want in Jmol as
well.

On Mon, Aug 16, 2010 at 9:36 AM, Daniel Lundin
<daniel.lun...@molbio.su.se>wrote:

> Hi,
>
> A couple of weeks ago I noticed that my scripts that rotates a structure
> and translates it to align with another didn't work anymore in
> 12.0.RC[34], but I never saw any replies (I suppose you were all busy
> with other issues in the release candidates). Now when I try out 12.0.6
> they still don't work like in (e.g.) 11.9.23. The structure isn't
> translated and whether it's rotated I can't tell. Are the command(s)
> changed in any way? I can't tell from the documentation that they are.
>
> This is a snippet from my script that loads the pdb files and does the
> rotation and translation:
>
> appendNew = true
> load 2oc5.pdb
> load append 1w68.pdb
> select :A/2
> # 2oc5A - 1w68A (note that the line is continued; I've inserted the
> # backslashes in the mail
> r = [[ -0.59598154055, -0.32209352896, -0.73556900555 ], [ \
> 0.21345024134, -0.94661804765, 0.24156420749 ], [ -0.774109164, \
> -0.013039573237, 0.63291782384 ]]
> rq = quaternion(r)
> t = { 174.54968533, 75.782173371, 65.591095934 }
> rotateSelected MOLECULAR @rq
> translateSelected @t
>
>
> /Daniel
>
> --
> Daniel Lundin
>
> Department of Molecular Biology & Functional Genomics
> Arrhenius Laboratories for Natural Sciences
> Stockholm University, SE-106 91 Stockholm, Sweden
>
> tel. +46 (0)8 16 41 95, mobile: +46 (0)708 123 922, fax. +46 (0)8 16 64 88
>
> Email: daniel.lun...@molbio.su.se
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by
>
> Make an app they can't live without
> Enter the BlackBerry Developer Challenge
> http://p.sf.net/sfu/RIM-dev2dev
> _______________________________________________
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>



-- 
Robert M. Hanson
Professor of Chemistry
St. Olaf College
1520 St. Olaf Ave.
Northfield, MN 55057
http://www.stolaf.edu/people/hansonr
phone: 507-786-3107


If nature does not answer first what we want,
it is better to take what answer we get.

-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to