[chimerax-users] Morph movie saving from a script file

Elaine Meng meng at cgl.ucsf.edu
Mon Jan 9 10:51:57 PST 2023


Hi Pranav,
Normally you would use a command script to do the whole thing.  The "movie" command starts and stops recording and creates a movie file.  The content of the movie would be between those commands, and could include all kinds of things like changing the color and display, 2D labels for titles or labeling things, rotations/translations, and playing back the previously calculated morph trajectory with the "coordset" command.  Normally you would save a session after calculating the morph.  Then you could reopen the session and run the command file (plain text file named something.cxc, just a series of the same commands that could be typed into the command line.  That way you don't need to repeatedly recalculate the morph, as it will simply exist as a trajectory model in your session when you open it.

Creating a movie command file generally takes a lot of trial and error.  When I do it, I build it up gradually first including only the commands for what I want to show and repeatedly re-running the script (reopen session, open .cxc file which runs the script).  Only after it shows what I want do I add the movie-recording and movie-saving commands to the file.

See the "making movies" page:
<https://rbvi.ucsf.edu/chimerax/docs/user/movies.html>

See the ChimeraX morphing highlight, which includes the command scripts used:
<https://www.rbvi.ucsf.edu/chimerax/features.html#morphing>

More about command scripts (.cxc. files):
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/usageconventions.html#cxc-files>

Save session:
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/save.html#session>

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

> On Jan 9, 2023, at 10:42 AM, Pranav Shah via ChimeraX-users <chimerax-users at cgl.ucsf.edu> wrote:
> 
> Hi Team,
> Would there be a way to record a morph between two structures using
> the command line? Currently, I am clicking the play and record buttons
> from the GUI in quick succession to achieve this.
> Best,
> Pranav




More information about the ChimeraX-users mailing list