Molecule Tutorials - Herong's Tutorial Examples - v1.26, by Herong Yang
"get_position" - Viewing Center
This section provides a tutorial on how to use the 'get_position' command to see the viewing center location in the model space in PyMol.
If you want to know the camera viewing center location in the model space, you can run the "get_position" command.
For example, the following PyMol session shows the viewing center is located at the center of the methane molecule by default:
PyMOL>delete all PyMOL>load Carbon-Atom.sdf PyMOL>h_add PyMOL>get_position cmd.get_position: [ 0.840, -1.030, -0.000] PyMOL>get_extent id 1 cmd.extent: min: [ 0.840, -1.030, 0.000] cmd.extent: max: [ 0.840, -1.030, 0.000]
But if the camera is moved, the viewing center is moved accordingly in the opposite direction:
PyMOL>move x, 0.2 PyMOL>get_position cmd.get_position: [ 0.649, -0.971, 0.010] PyMOL>get_extent id 1 cmd.extent: min: [ 0.840, -1.030, 0.000] cmd.extent: max: [ 0.840, -1.030, 0.000]
Of course, we can translate the entire molecule back to match the viewing center:
PyMOL>translate [-0.2, 0.0, 0.0] PyMOL>get_position cmd.get_position: [ 0.649, -0.971, 0.010] PyMOL>get_extent id 1 cmd.extent: min: [ 0.649, -0.971, 0.010] cmd.extent: max: [ 0.649, -0.971, 0.010]
Table of Contents
Molecule Names and Identifications
Nucleobase, Nucleoside, Nucleotide, DNA and RNA
"get_extent" - Picked Atom Location
"label" - Generate Labels on Atoms
Distance between Atoms in PyMol
Angle Formed by 3 Atoms in PyMol
Dihedral Angle Formed by 3 Atoms in PyMol
Use Selection Expressions in PyMol
"get_area" - Surface Areas of Atoms
Surface Area of Entire Molecule
►"get_position" - Viewing Center
ChEMBL Database - European Molecular Biology Laboratory
PubChem Database - National Library of Medicine
INSDC (International Nucleotide Sequence Database Collaboration)
HGNC (HUGO Gene Nomenclature Committee)