"get_view" and "set_view" on PyMol

This section provides a tutorial on how to inspect nd control viewing parameters, which are used to map the model space to the camera space.

You can use "get_view" and "set_view" commands to inspect and control viewing parameters in PyMol to map the model space to the camera space.

Here is default viewing parameters when you start PyMol:

PyMOL>get_view

### cut below here and paste into script ###
set_view (\
     1.000000000,    0.000000000,    0.000000000,\
     0.000000000,    1.000000000,    0.000000000,\
     0.000000000,    0.000000000,    1.000000000,\
     0.000000000,    0.000000000,  -50.000000000,\
     0.000000000,    0.000000000,    0.000000000,\
    40.000000000,  100.000000000,  -20.000000000 )
### cut above here and paste into script ###

Values listed in the above array represent the following viewing parameters:

Transformation Matrix - Value #1 to #9 - Represents rotation from model space to camera space. The default is no rotation:

1.000000000,    0.000000000,    0.000000000
0.000000000,    1.000000000,    0.000000000
0.000000000,    0.000000000,    1.000000000

Origin of Camera Rotation - Value #10 to #12 - Represents the origin of rotation relative to camera in camera space. The default is (0.0, 0.0, -50.0). When you request to turn the camera, it will rotate relative to this given point.

Origin of Model Rotation - Value #13 to #15 - Represents the origin of rotation in model space. The default is (0.0, 0.0, 0.0). When you request to turn the molecule, it will rotate relative to this given point.

Front Clipping Plane - Value #16 - Represents the front clipping plane (also called the Front Slab) distance from the camera. The default is 40.0. So any visualization elements less than 40.0 in the Camera direction will be removed.

Rear Clipping Plane - Value #17 - Represents the rear clipping plane (also called the Back Slab) distance from the camera. The default is 100.0. So any visualization elements greater than 40.0 in the Camera direction will be removed.

Orthoscopic Flag and Field of View - Value #18 - Represents the orthoscopic flag (+/-) and the field of view (if abs(value) > 1). The default is -20.0.

As you may noticed, the output of the "get_view" command is presented in a format ready for the "set_view" command. So you can adjust modify some values and run the command to update the viewing parameters.

Table of Contents

 About This Book

 Introduction of Molecules

 Molecule Names and Identifications

 Molecule Mass and Weight

 Protein and Amino Acid

 Nucleobase, Nucleoside, Nucleotide, DNA and RNA

 Gene and Chromosome

 Protein Kinase (PK)

 DNA Sequencing

 Gene Mutation

 SDF (Structure Data File)

 PyMol Installation

PyMol GUI and CLI

 PyMol Screen Layout

 Load Molecule from File into PyMol

 Virtual Trackball Rotation on PyMol

 Zoom In and Out on PyMol

 PyMol Command Line Interface

 "load" and "delete" Commands on PyMol

 "log_open" and "log_close" Commands on PyMol

 Model Space and Camera Space on PyMol

"get_view" and "set_view" on PyMol

 View Parameters Auto Adjusted on PyMol

 Zoom In/Out by Moving Camera

 Rotation with Transformation Matrix

 Rotation with "turn" Command

 Difference of "turn" and "rotate" Commands

 Difference of "move" and "translate" Commands

 "center", "zoom" and "reset" Commands

 Model-to-Camera Space Coordinates Mapping

 Camera-to-Model Space Coordinates Mapping

 Turn Structure around Camera

 "show lines" Presentation Command

 "show sticks" Presentation Command

 "show spheres" Presentation Command

 "show surface" Presentation Command

 "show mesh" Presentation Command

 PyMol Selections

 PyMol Editing Functions

 PyMol Measurement Functions

 PyMol Movie Functions

 PyMol Python Integration

 PyMol Object Functions

 ChEMBL Database - European Molecular Biology Laboratory

 PubChem Database - National Library of Medicine

 PDB (Protein Data Bank)

 INSDC (International Nucleotide Sequence Database Collaboration)

 HGNC (HUGO Gene Nomenclature Committee)

 Relocated Tutorials

 Resources and Tools

 Molecule Related Terminologies

 References

 Full Version in PDF/EPUB