VMD User's Guide
VMD User's Guide
VMD User's Guide
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
• transabout vamount[deg|rad|pi] – Generates the transformation matrix needed to rotateby the given amount counter-clockwise around axis which goes through the origin and alongthe given vector. As with transvec, the units of the amount of rotation can be degrees,radians, or multiples of pi.Examples:# this is a rotation about x by 180 degreesvmd > transabout {1 0 0} 180{1.0 0.0 0.0 0.0} {0.0 -1.0 -2.65359e-06 0.0} {0.0 2.65359e-06-1.0 0.0} {0.0 0.0 0.0 1.0}# a rotation about z by 90 degrees# (compare this to "transaxis z 90"vmd > transabout {0 0 1} 1.5709 rad{0.999624 -0.027414 0.0 0.0} {0.027414 0.999624 0.0 0.0}{0.0 0.0 1.0 0.0} {0.0 0.0 0.0 1.0}vmd > transabout {1 1 1} 1 pi{-0.333335 0.666665 0.666669 0.0} {0.666668 -0.333334 0.6666660.0} {0.666666 0.66667 -0.333332 0.0} {0.0 0.0 0.0 1.0}• trans [center {x yz}] [origin {x yz}] [offset{x yz}] [axisxamount [rad|deg|pi]][axis y amount [rad|deg|pi]] [axis z amount [rad|deg|pi]] [x amount [rad|deg|pi]][y amount [rad|deg|pi]] [z amount [rad|deg|pi]] [axis {x yz} amount [rad|deg|pi]][bond {x1 y1 z1} {x2 y2 z2} amount [rad|deg|pi]] [angle {x1 y1 z1} {x2 y2 z2} {x3 y3z3} amount [rad|deg|pi]] –This command can do almost everything the other ones can do, and then some. It is designedto be the main function used for generating transformation matrices.Using it correctly calls for understanding how it works internally. There are three matrices:centering, rotation, and offset. The centering matrix determines where the center of rotation islocated. By default, this is the origin, but it can be changed to pivot about any point. Therotation matrix defines the rotation about that centering point, and the offset matrix defines thefinal translation after the rotation.For example, to rotate around a given point, the transformations would be 1) the centeringmatrix to bring that point to the origin, 2) the rotation about the center, and 3) the final offset toreturn the origin back to its original location.The different options for the trans command modify the matrices in various ways.–center{x yz} – Sets the centering matrix so that point x y z is brought to the origin–offset{x yz} – Sets the offset matrix so that the origin is brought to x y z–origin{x yz} – Sets both the centering and offset matrices to x y z–axisxamount [rad|deg|pi] – Adds a rotation about the x axis by the given amount to therotation matrix–axisyamount [rad|deg|pi] – Adds a rotation about the y axis by the given amount to therotation matrix152