mdo" Command to Change Views

This section provides a tutorial on how to change views when playing a moview using the 'mdo' command in PyMol.



PyMol also allows you to associate a set of commands to a specific frame using the "mdo" command:

mdo frame_#: command; command; ...

Then the specified frame is played, associated commands will be executed to give you a chance to change views of the structure.

Let's update the Build-3-Frame-Movie.pml command script file with the following commands:

set movie_fps, 2
mdo 1: turn x, 10; turn y, 10;
mdo 2: turn z, 10;
mplay

You should see the molecule structures get rotated slowly.

Note that if you turn the camera in frame 1, it will stay there for next frames impacting all objects. So if you want to just rotate objects in specific frame, you can use the "rotate" command to change objects in that frame. Try the following commands:

mdo 1: rotate x, 10; rotate y, 10;
mdo 2: totate z, 10;
mplay

You should see the benzene ringe rotates in frame 1 about x-axis and y-axis. The alcohol molecule rotates in frame 2 about z-axis. The methane molecule in frame 3 is not moving at all.

If you forget what commands have been associated at each frame, you can you the "mdump" command to print them:

PyMOL>mdump
 Movie: General Purpose Commands:
    1: rotate x, 10; rotate y, 10;
    2: rotate z, 10;



 

Table of Contents

 About This Book

 Introduction of Molecules

 SDF (Structure Data File)

 PyMol Installation

 PyMol GUI and CLI

 PyMol Selections

 PyMol Editing Functions

 PyMol Measurement Functions

 PyMol Movie Functions

 PyMol Python Integration

 PyMol Object Functions

 References

 Full Version in PDF/EPUB