A simple movie that rotates the molecule can be used to improve the spatial 3D perception of a more complicated structure.
First prepare the representation of the molecule and the view. With the GUI you next use the option:
Menu: Movie, Program, Camera Loop, Y-Rock, 60 deg. over 8 sec.
This rotates the molecule left and right for 60° over a 8 second time period. The corresponding command is:
movie.add_rock(8,60,axis='y',start=1)
The start=n option specifies at which frame the movie will be added to a longer movie of different parts.
To rotate the structure around the vertical (y) axis for 360° use the option:
Menu: Movie, Program, Camera Loop, Y-Roll, 16 sec.
or
movie.add_roll(16.0,axis='y',start=1)
To play the movie in PyMOL, press the play button (▶) at the movie controls in the bottom right of the GUI.
To save the movie, use Menu: File, Export Movie As, MPEG... A menu pops up, in which you can specify the movie size (determine that beforehand by using the viewport x,y command and check if the dimensions fit for the whole movie). You can also specify the video encoder, which may require installation of external software. I saved the following movies using the mpeg_encode encoder and converted it later with the VSDC video editor.
Commented script of the followinr example using the movie rock/roll commands
reinitialize set bg_rgb, white fetch 7yon remove not chain L+R dss hide all show cartoon show surface, chain R set surface_color, white set transparency, 0.5 orient turn z, 90 center clip slab, 50 util.chainbow chain R color black, chain L util.performance(0) zoom complete=1 move y, 3 #movie.add_rock(8,60,axis='y',start=1) movie.add_roll(16.0,axis='y',start=1) |
If these movies do not start automatically, you need to allow the loading and display of videos in your browser.
Back to PyMOL tutorial main page.