Making movies in VMD

Given a trajectory with maybe hundreds of frame, we can render each frame and then use a movie encoder to combine all frames into a movie. VMD has facilities to render and directly pass all the images to a movie encoder of your choice — here we use the free FFmpeg encoder.

Movie encoder: FFmpeg

Install ffmpeg from https://ffmpeg.org

Linux

Try installing with your package manager, e.g., on Ubuntu and Debian:

sudo aptitude install ffmpeg

or get static build from https://www.ffmpeg.org/download.html and install it in your ~/bin directory. Then make sure that ffmpeg is found on your PATH:

echo "export PATH=$HOME/bin:$PATH" >> ~/.profile

(You might have to log out and log in for this to have full effect later on.)

Mac OS X

Get the dmg installer package from https://www.ffmpeg.org/download.html and make sure that ffmpeg can be found on your PATH.

Windows

Get the installer package from https://www.ffmpeg.org/download.html — make sure you know where the ffmpeg.exe ended up.

AdK transition movie

We use the standard VMD plugin MovieMaker.

  1. Load the AdK transition trajectory from Analyzing protein dynamics.
  2. Use a nice representation, e.g. color the CORE, LID, and NMP domains. You can also find a number of salt bridges (pairs of basic/positively charged and acidic/negatively charge residues) that “zip up” AdK (see the AdK zipping movie from Beckstein et al [Beckstein2009]).
  3. Open Extension ‣ Visualization ‣ Movie Maker
  4. Settings
    • Renderer: Snapshot (for “Hollywood”-style movies, use one of the ray tracers such as tachyon + AO)
    • Movie Settings: Trajectory
    • Set Format to MPEG-1 (ffmpeg). (MPEG-2 is better but support for MPEG-2 is not always present and then you cannot display it — but try it!).
    • Set your working directory to e.g. ~/USERNAME/movies (so that you can easily find the finished movie)
    • Name your movie, e.g. adk_transition.
  5. Make Movie: should step through your trajectory, write out frames, and finally run ffmpeg.
  6. Go to your movie directory and play it (e.g., by double clicking or opening from the shell).

Advanced movie making

In order to rotate and zoom a movie during a trajectory we can use the VMD ViewChangeRender plugin together with MovieMaker.

Open ViewChangeRender: Extensions ‣ Visualization ‣ ViewChangeRender.

Generate “viewpoints” of your movie:

  1. Adjust position in trajectory, rotate, zoom.
  2. Save Viewpoint
  3. Repeat for as many viewpoints as you want to include.

Add all viewpoints to movie: The final movie will smoothly interpolate between these points. You can check with Preview Movie. (Note that this plugin has a few bugs so you might have to quit and restart when it stops working.)

Once you are ready to render the movie:

  1. In ViewChangeRender: Enable
  2. In MovieMaker:
    1. Movie Settings: User defined procedure
    2. Adjust other settings as needed...
    3. Make movie