Oliver,

Great to see people picking up on this power of quaternions. It's easier
than you think.

1) Selections are ordered by atom index, always. Not necessary here.

2) Since you are using triangles, which uniquely define planes, you should
not have to use the compare command. That's really based on the idea that
you have lots of atoms and need to find the best fit. Instead, you can just
use quaternions directly:

Var q1 = quaternion(center1, x1, xy1)
Var q2 = quaternion(center2, x2, xy2)

where center, x, and xy are the three points -- in order -- that define your
plane.

Then

rotate selected @{q2/q1}

should move the selected atoms from orientation q1 to orientation q2.
"q2/q1" effectlvely means "Remove q1 and apply q2."

Bob


-- 
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
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to