The following is not supported by the Educational version of PyMOL. If you installed PyMOL like that:

sudo apt-get install pymol

you are OK.

The main steps are:
1. make a movie in PyMOL 2. type the commands that will make the final result high resolution 3. export frames as PNG files 4. stick the PNG files together in a movie

You also need Avidemux. http://avidemux.sourceforge.net/. These instructions helped me install it, but it depends on your Operating System: http://ubuntuhandbook.org/index.php/2017/08/install-avidemux-2-7-0-in-ubuntu-16-04-or-17-04/
(Of course you can use any other software that can stitch images together in a movie)

1) Run PyMOL and fetch a structure using the PyMOL command line, for example:

fetch 3fhr

Make the movie you want - PyMOLWiki has many instructions on that: https://www.pymolwiki.org/index.php/MovieSchool I will focus on how to end up with an MP4 HD movie, so I will not explain how to make nice movies and will just construct a very simple one, like this:
Go to: Movie→Program→Camera→X-Rock→2 Seconds

2) After you've made the movie you want in PyMOL, type the following commands (using the PyMOL command line):

set ray_trace_frames, 1
set ray_shadows,0
viewport 2600, 2600
viewport 2600, 2600

ray features are not supported in the Educational version of PyMOL and the set ray_trace_frames, 1 is necessary for high resolution.

ray_shadows,0 just turns off shadows on the structure; leave them on if you like them: ray_shadows,1

viewport changes the size of the graphics display area. It depends on your OS whether it will work or not. Type the command twice in case it just fits the window in the screen the first time. Also, you can play around with the width and height used with viewport; I used 2600 and 2600.

IMPORTANT: It is very very very important to first make the movie and then type the commands. I don't understand what happens when I do it the other way round :(

3) The following will save the frames the movie consists of in the current directory:
File→Save Movie As→ PNG Images…
It will number the frames - the longer the movie the more they will be. For our example they will be 60.

4) Now we have to stitch the frames (these 60 PNG files) together. This is what we need Avidemux for. Open Avidemux, drag and drop the first image and choose the following settings:

For the Video Output:
Mpeg4 ASP(ff)
For the Output Format:
MP4v2 Muxer
and click save.

Isn't it lovely?

research/howto/hd_movies_using_pymol.txt · Last modified: 2018/07/20 21:47 (external edit)