Making-movies
Making movies in VMD
General stuff:
- Animated gifs can be dropped into Power Point or into a browser to play. I normally used this format.
- mp4 movies are also OK
- Unusual (and very beautiful) representations can be created in VMD using renderers other than Snapshot, but they take longer to produce, so I don't mention them here.
- In all cases, load the relevant trajectories and format how it looks.
- In VMD Main->Display->Render Mode, chose GLSL to enable transparent materials.
- Save the visualization state as a *vmd file, in case you want to make modifications in the future.
- There are specialized tutorials to learn how to use the visualization capabilities of VMD. Search for them... Here I only summarize a few topics for which guidelines appear to be harder to find.
Drawing an arrow at the pulled end (for pulling simulations)
In pulling simulations, it is sometimes useful to draw an arrow at the pulled end for visualization purposes. Steps to do this in VMD:
- Modify script script_drawArrow.tcl to your needs, to specify the atom where the arrow starts and direction of arrow.
- Run script (by typing at the VMD TkConsole "source script_drawArrow.tcl "; the "" are not typed in...)
- Move the bar in VMD main from the beginning to the end of the trajectory, so the script executes for each frame
Update the secondary structure at every frame
Some representations (e.g. NewCartoon) depend on the secondary structure of the amino acids, but by default VMD does not update it every frame to keep things light. If you need it updated at every frame:
- Save the script sscache.tcl somewhere in your machine, and then source it within VMD (by typing at the VMD Tkconsole "source sscache.tcl")
- Source the script named stride.tcl (in the same way as in 1)
- Type at the TkConsole "start_sscache"
- Move the bar in VMD main from the beginning to the end of the trajectory, so the SS is cached. You should be able to see now that it is updated at every frame.
To turn off the trace, use the command stop_sscache, which also takes the molecule number. There must be one stop_sscache for each start_sscache. The command clear_sscache resets the saved secondary structure data for all the molecules and all the frames. More info in https://www.ks.uiuc.edu/Research/vmd/vmd-1.3/ug/node256.html
Making movies (A)
This option is OK for trajectories that are not too jumpy to begin with.
In VMD Main -> Extensions -> Movie Maker:
- renderer snapshot
- movie settings: trajectory ; leave option to delete all files on
- format: Animated GIF (image magick)
- Select an empty working directory
- Click on "Make Movie", and wait until it completes
Making movies (B)
This option is better if your trajectory is jumpy.
Step 1: In VMD Main -> Extensions -> Move Maker:
- renderer snapshot
- movie settings: trajectory ; deselect option to delete all files
- format: jpeg (image magick)
- Select an empty working directory
- Click on "Make Movie", and wait until it completes
Step 2: In a Linux machine, in the directory with the jpeg images, run command convert -delay 30 myImageName.*.jpg myMovie-delay-30.gif
Try several delay values (5 to 50 is a good range) to find something that works. Remember to rename the movies according to the delay so at the end you can chose the best one.