MD Movie Maker
Turn a molecular dynamics trajectory into a multi-panel movie:
the molecule, live analysis plots and labels, all in step, exported to MP4 or GIF.
Made by one command, mdmovie adk.psf adk.dcd: adenylate kinase opening up, drawn from the trajectory, with backbone RMSD and radius of gyration.
Try it in a minute
pip install "mdmovie[demo]" # everything comes from pip, ffmpeg included; [demo] adds the example data
mdmovie --example # the movie above, open in the app: drag the protein to turn it
With your own simulation:
mdmovie md.tpr md.xtc # a ready-made movie, open in the app to adjust
mdmovie render md.tpr md.xtc md.mp4 # or straight to MP4, with no display (clusters, scripts)
Any topology and trajectory that MDAnalysis reads works: GROMACS, AMBER, CHARMM/NAMD, OpenMM, LAMMPS and more. Give the files in any order; several trajectories are joined in the order given. You can also drop the files on the window.
You get the molecule as a cartoon, RMSD and Rg plots that grow in step with it, and a time label. Molecules split across the periodic box are joined on the fly, and long runs are sped up to about 30 s. From there, change anything: the layout, the representations, the analyses, the timing.
What else you can make
|
Frames from your favourite viewer. Images rendered in VMD, PyMOL or ChimeraX (here, simple stand-in drawings) next to synced RMSD, Rg and DSSP panels, with a clock in the corner. |
Trajectories on free-energy surfaces. The current CV values move with a fading trail over a FES computed from PLUMED COLVAR, .xvg or CSV data, or over your own picture of one.
|
The built-in renderer: cartoon by secondary structure, rainbow with licorice side chains, ball-and-stick, spheres. No OpenGL needed, so it renders on headless machines too.
Features
The molecule
- Drawn in the app from the trajectory: cartoon (helix ribbons, strand arrows), tube, licorice, ball-and-stick, spheres and lines, coloured by secondary structure, element, chain or residue. Drag to rotate, scroll to zoom.
- Helices and strands form and melt as the movie plays (DSSP, smoothed so the cartoon doesn't flicker). Overall tumbling is fitted away, and frames can be smoothed.
- Periodic boundaries handled: molecules split across the box are made whole on the fly, as
gmx trjconv -pbc mol -centerdoes, for drawing and for analysis. An RMSD or Rg of a broken protein is meaningless. - Or bring frames rendered elsewhere as an image sequence, cropped to a fixed aspect ratio. Auto-trim fits the crop around the molecule over the whole run.
Analysis and plots
- Built-in presets run on the trajectory: RMSD, Rg, RMSF, distances, dihedrals, H-bonds, native contacts (Q), DSSP, atoms within a cutoff, custom Python expressions. They run in the background and the results are cached.
- PLUMED COLVAR, GROMACS
.xvgand CSV files load directly; no trajectory needed. - Four animation styles: the line grows, a marker moves, the axis scrolls, or the plot stays still, with an optional live value readout. Twin y-axes, several trajectories per plot.
- Publication styles (SciencePlots science, nature, ieee), optional LaTeX, full control over ticks, limits, log scales, reference lines and legends.
- Your own presets take a few lines of Python.
Layout and timing
- Any layout: split, resize and swap cells, or start from a template. Labels, logos and inset plots float on top. Resolution-independent: 1080p, 4K, square, portrait.
- Sync groups map movie frames to simulation time. Shift, speed up, trim, hold, hide or loop each group, so panels play in step or each on its own clock.
Output
- MP4 (H.264), GIF or a PNG sequence from the app, or headless with
mdmovie render. The preview shows exactly what gets exported. - Undo/redo for every edit. Projects are small JSON files with relative paths, easy to version and share.
Learn more
The illustrated tutorial builds a complete movie step by step in about 15 minutes with the example data. It covers layouts, image sequences and cropping, timing, plot styles, free-energy surfaces and export, plus troubleshooting.
Install
pip install mdmovie # the app
pip install "mdmovie[demo]" # plus MDAnalysisTests, for the example trajectory and the tutorial
Python 3.10 or newer. Everything, ffmpeg included, comes from pip.
| Command | What it does |
|---|---|
mdmovie |
open the app |
mdmovie md.tpr md.xtc [more.xtc …] |
open a ready-made movie of a trajectory |
mdmovie --example |
the same for the adenylate kinase example |
mdmovie movie.mdmovie.json |
open a saved project |
mdmovie render movie.mdmovie.json movie.mp4 |
render a project without the app (--scale, --fps, --start, --stop, …) |
mdmovie render md.tpr md.xtc movie.mp4 |
render a ready-made movie of a trajectory without the app |
Code map
mdmovie/core/ sync model (timemap), layout tree, crop math, project file, quick start from a trajectory
mdmovie/sources/ image sequences + LRU cache, trajectory metadata, periodic-boundary unwrapping
mdmovie/analysis/ preset registry, built-in presets, cached runner
mdmovie/mol/ molecule renderer: structure + secondary structure, cartoon mesh, software rasteriser
mdmovie/panels/ image (+ data overlay), molecule, plot, heatmap, CV map, text
mdmovie/render/ compositor (single drawing path for preview and export), exporter
mdmovie/ui/ main window, canvas editor, inspector, timeline, dialogs
docs/ tutorial + make_tutorial_images.py (regenerates every screenshot and GIF)
Development
git clone https://github.com/dmighty007/mdmovie && cd mdmovie
pip install -e ".[dev]"
python -m pytest # headless
QT_QPA_PLATFORM=offscreen python docs/make_tutorial_images.py # refresh the docs pictures
Releasing
- Bump
__version__inmdmovie/__init__.pyand commit. - Tag and push:
git tag v0.2.0 && git push origin v0.2.0.
The publish workflow then runs the tests, builds the sdist and wheel, checks that the tag matches the version, and uploads to PyPI with Trusted Publishing, so no API token is stored anywhere. One-time setup: on PyPI, add a pending publisher for project mdmovie, owner dmighty007, repository mdmovie, workflow publish.yml, environment pypi. In the GitHub repository settings, create an environment named pypi.
License
MIT, see LICENSE.
Metadata
Release files for mdmovie 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mdmovie-0.3.0.tar.gz | 145.0 kB | With provenance | Details for mdmovie-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mdmovie-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for mdmovie-0.3.0-py3-none-any.whl |
Total release size: 290.4 kB
Release files / mdmovie-0.3.0.tar.gz
| Download URL | mdmovie-0.3.0.tar.gz |
|---|---|
| Size | 145.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
154370ed7f452acead9a020a475e3406908f35a488910f82d944a28f065b1c30
|
|
BLAKE2b-256 checksum How to use checksums |
38a13686c9efe47bb40d1ece8986498ae5b234d0eede4235a4fce1520f474bbf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.
Transparency logRelease files / mdmovie-0.3.0-py3-none-any.whl
| Download URL | mdmovie-0.3.0-py3-none-any.whl |
|---|---|
| Size | 145.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
52690d8d6d6c0187787329b97aa683b13ffb275521939351e9dedfe4547f620f
|
|
BLAKE2b-256 checksum How to use checksums |
201eea21643a440d3d146eee7c48d6985cdd324c6de0b1db696ff13d961aff19
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.
Transparency logSecurity for mdmovie 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for mdmovie-0.3.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.