"mplay" Command and Movie Settings

This section provides a quick introduction about the 'mplay' command with related movie settings in PyMol.

Once movie frames are defined, we can use the "mplay" command to play move frames sequentially at the given frame rate speed.

PyMol also supports a number movie play settings. So we need to use them to control how the movie is played.

# do not show all states, only one state at a time
set all_states, off

# do not include state #1 in other states
set static_singletons, off

# do not automatically interpolate objects
set movie_auto_interpolate, off

# automatically re-run the movie
set movie_loop, on

# set frame_rate to 30 f/s
set movie_fps, 30

Now let's run a 3-frame movie in a loop with 3 molecule structure objects:

# Build-3-Frame-Movie.pml

delete all

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

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

mset 3 2 1

You should see 3 structures displayed one by one in very fast speed. You can stop it by the "mstop" command.

You can also lower the frame rate and play it again.


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


 Full Version in PDF/EPUB