I think it's just angles and cross products: var axisC = {0 0 1/1 } var axisZ = {0 0 1} rotAxis = cross(axisZ,axisC) rotAngle = angle(axisZ, {0 0 0},rotAxis, axisC) draw {0 0 0} @{rotAxis * 10} print " " + rotAngle + " " + rotAxis reset rotate molecular {0 0 0} @rotAxis @rotAngle
The cross product gets you an axis perpendicular to the other two. That trick with the rotAngle done as a dihedral gets you a directed angle rather than just a positive value for which you don't know which way to turn. Then you can work out how you want to rotate the others. I'll leave that as a puzzle for you. Bob On Wed, Jul 1, 2009 at 10:40 AM, Brian McMahon <b...@iucr.org> wrote: > Is there a neat way (perhaps using quaternions) to view a triclinic > unit cell down its crystallographic axes? i.e. a moveto command so > that the cell ends up with its c axis normal to the screen and its > ac face (in projection) lying horizontally? > > Thanks > Brian > > > ------------------------------------------------------------------------------ > _______________________________________________ > 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
------------------------------------------------------------------------------
_______________________________________________ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users