This old version of Proteopedia is provided for student assignments while the new version is undergoing repairs. Content and edits done in this old version of Proteopedia after March 1, 2026 will eventually be lost when it is retired in about June of 2026.
Apply for new accounts at the new Proteopedia. Your logins will work in both the old and new versions.
Jmol/Quaternions
From Proteopedia
(Difference between revisions)
| Line 17: | Line 17: | ||
Jmol shows structures (e.g. atom positions) on a display and allows the view to be rotated and individual atomic positions to be manipulated. The atoms have Cartesian coordinates x, y, z, and when you rotate the model, the coordinate system is rotated (same coordinates x, y, z, but axes of coordinate system point in different directions). | Jmol shows structures (e.g. atom positions) on a display and allows the view to be rotated and individual atomic positions to be manipulated. The atoms have Cartesian coordinates x, y, z, and when you rotate the model, the coordinate system is rotated (same coordinates x, y, z, but axes of coordinate system point in different directions). | ||
| - | <jmol><jmolButton><script>axes on</script> | + | <jmol><jmolButton><script>axes on</script><text>show axes</text></jmolButton></jmol> |
| - | <text>show axes</text></jmolButton></jmol> | + | |
When a new structure is loaded, the axes point left, up, and out of the screen. The Jmol command "reset" puts the coordinate system back into that initial orientation. | When a new structure is loaded, the axes point left, up, and out of the screen. The Jmol command "reset" puts the coordinate system back into that initial orientation. | ||
| - | <jmol><jmolButton><script>reset</script> | + | <jmol><jmolButton><script>reset</script><text>reset to initial orientation</text></jmolButton></jmol> |
| - | <text>reset to initial orientation</text></jmolButton></jmol> | + | |
| + | The Jmol command "q = quaternion()" assigns the current orientation to q. | ||
| + | |||
| + | <jmol><jmolButton><script>q = quaternion()</script><text>save orientation</text></jmolButton></jmol> | ||
| + | |||
| + | How is an orientation different from a rotation? An orientation is the rotation necessary to get the coordinate system from the "reset" orientation to the current orientation. The quaternion q0 for the initial orientation corresponds to no rotation, i.e. {0 0 1 0}. To get back to an orientation q after rotating, use "moveto 0 quaternion q". | ||
| + | |||
| + | <jmol><jmolButton><script>moveto 0 quaternion q</script><text>go to saved orientation</text></jmolButton></jmol> | ||
| - | The Jmol command "q = quaternion()" assigns the current orientation to q. How is an orientation different from a rotation? An orientation is the rotation necessary to get the coordinate system from the "reset" orientation to the current orientation. The quaternion q0 for the initial orientation corresponds to no rotation, i.e. {0 0 1 0}. To get back to an orientation q after rotating, use "moveto 0 quaternion q". | ||
==Combining two rotations== | ==Combining two rotations== | ||
Revision as of 19:22, 24 July 2019
Examples
| |||||||||||
