"until.mroll()" - Movie Rolling Function

This section provides a tutorial on how to generate 'mdo' commands to turn the camera continuousely over a large number of frames using the 'util.mroll()' function in PyMol.



If you want to keep rolling the camera in a large number of frames, and tired of using the "mdo" command, you can use the "util.mroll()" function to generate "mdo" command automatically.

util.mroll(start_frame, end_frame, loop-flag) - Generates "mdo" commands, one for each frame in the given frame range. Those "mdo" commands will turn the camera 360 degree about the y-axis with equal angles.

The following PyMol command script will play 3 objects for 9 seconds. Each object will displayed and rotated for 3 seconds:

# Build-Rolling-Camera-Movie.pml
delete all
reset

set all_states, off
set static_singletons, off
set movie_auto_interpolate, off
set movie_loop, off
set movie_fps, 30

load Molecule-Methane.sdf, Methane, 1
load Molecule-Alcohol.sdf, Alcohol, 2
load Benzene-Ring.sdf, Benzene, 3

# define a movie for 9 seconds (270 frames) with each object for 3 seconds
mset 1 x90 2 x90 3 x90

# generates mdo command to turn 360 degrees about x-axis in frames (60, 90)
# not sure what is the 3rd argument is for...
util.mroll(30, 60, 1)
util.mroll(120, 150, 1)
util.mroll(210, 240, 1)

mplay

If you want to see what "mdo" commands are generated by the util.mroll() function, run the "mdump" command:

PyMOL>mdump
Movie: General Purpose Commands:
  30: turn y,  11.613
  31: turn y,  11.613
  32: turn y,  11.613
  33: turn y,  11.613
  34: turn y,  11.613
  35: turn y,  11.613
  36: turn y,  11.613
  ...



 

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