[chimerax-users] Making a movie from a group in PDB file

Elaine Meng meng at cgl.ucsf.edu
Tue Feb 21 08:31:35 PST 2023


Hi Aleks,
(1) opening the file as a trajectory does not play it.  You still have to use "coordset" to play it, as you said.
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/coordset.html>

(2) "graphics rate" sets interactive frame rate, has nothing to do with movie recording.  Movie framerate is set with an option of "movie encode"
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/graphics.html#rate>

(3) probably you didn't get any PNG files in the specified directory since no frames were recorded in your attempt.  Hard to tell exactly what happened without seeing your whole script.  You would use the "movie record" directory option, as you said.
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/movie.html#record>

(4)  there is no reason I know of that your recording options would be ignored.  In general, the script would be organized thus:

movie record [various options]
[commands for what happens in the movie: coordset etc.]
movie encode [various options]

You may also need appropriate wait commands, e.g. if your trajectory pdb opened as #1 has 50 frames, there should be a wait so that any subsequent commands such as the encoding won't start until after the movie actually plays.

coordset #1; wait 50

There are several examples of movie content scripts that may help to give you a better understanding of the process. See movie-making commands and examples linked therein
<https://rbvi.ucsf.edu/chimerax/docs/user/movies.html>

e.g. morphing trajectory playback movie with command scripts linked
<https://www.rbvi.ucsf.edu/chimerax/features.html#morphing>

making movies tutorial 2019
<https://www.rbvi.ucsf.edu/chimerax/data/movies-may2019/moviemaking.html>

I hope this helps,
Elaine
-----
Elaine C. Meng, Ph.D.                       
UCSF Chimera(X) team
Department of Pharmaceutical Chemistry
University of California, San Francisco

> On Feb 20, 2023, at 6:20 PM, Aleksandar Donev via ChimeraX-users <chimerax-users at cgl.ucsf.edu> wrote:
> 
> On 2/20/23 11:35 AM, Elaine Meng wrote:
>> Then there will be playback slider GUI, and/or you can use the separate command "coordset" to play it back (e.g. within a movie command script).   See ChimeraX trajectories help, and links therein:
>> <https://rbvi.ucsf.edu/chimerax/docs/user/trajectories.html>
> 
> Thanks for the help. I was able to play a movie and save it, but there is still a problem.
> 
> What I did was:
> 
> open animnew.pdb coordset true
> 
> graphics rate maxFrameRate 2
> 
> movie record format png
> 
> movie record directory Movies # Doesn't seem to do anything since no frame files (.png) saved there
> 
> but then if I try
> 
> movie encode framerate 2 quality higher output Movies/DemoMD.mp4
> 
> chimerax gives me an error that no frames have been recorded.
> 
> If I do
> 
> coordset #1
> 
> a movie gets recorded but with the default options. The only way I got my options in movie encode to apply was to execute the movie command in the middle of the animation playback before it ended, but that excluded a few frames at the end and is clearly inconvenient.
> 
> How do I record and set the encode options at the same time?
> 
> Also, is there a way to save the frames as .png files in a directory?
> 
> Thanks,
> 
> Aleks




More information about the ChimeraX-users mailing list