# get vector to align with Z:
Var vectorXY = {atomno=3}.xyz - {atomno=1}.xyz # perhaps
# get cross product for axis of rotation:
Var axisRotation = cross(vectorXY, {0 0 1})
# get angle of rotation as a dihedral:
Var theta = angle(vectorXY, {0 0 0}, axisRotation, {0 0 1})
select *
rotateSelected molecular @axisRotation @theta
Now, this actually changes the coordinate positions. Hard to know what you
mean by "the axis that is displayed in Jmol" --- That could be the molecular
axis, the current Z axis for the window, or other things.
Do you just want to "look down a bond"? If so, rather than doing that, can
you perhaps "look down a bond with a certain atom to the right"? That I can
show you how to do with quaternions.
Bob
On Fri, Oct 15, 2010 at 12:50 PM, Marco Zimmer-De Iuliis <
[email protected]> wrote:
> Hello all,
>
> I am trying to make an octahedral molecule align with the axis that is
> displayed in JMol.
>
> The central metal atom is at the origin, but I would like to have the metal
> ligand bonds aligned with the axis.
>
> I don't know how to re-set the axis to move it or how to find the
> coordinates of the atoms.
>
> Any help would be greatly appreciated.
>
> Cheers all and have a nice weekend.
>
> Marco
>
>
> ------------------------------------------------------------------------------
> Download new Adobe(R) Flash(R) Builder(TM) 4
> The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly
> Flex(R) Builder(TM)) enable the development of rich applications that run
> across multiple browsers and platforms. Download your free trials today!
> http://p.sf.net/sfu/adobe-dev2dev
> _______________________________________________
> Jmol-users mailing list
> [email protected]
> 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
------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users