Skip to content

ProteinMotion 0.14.0 — torsions, structure morphs, and smoother rendering

Choose a tag to compare

@pdpppd pdpppd released this 02 Oct 03:09
· 7 commits to main since this release

ProteinMotion 0.14.0 makes internal coordinates and conformational change animatable, adds data overlays from AlphaFold and sequence families, and makes cartoons smoother in motion.

Torsions and secondary structure

  • Build peptides from a sequence with Protein.build, measure φ, ψ, ω, and χ, and animate them with SetTorsions and RotateTorsions. Atoms turn about bonds, so bond lengths and angles stay fixed.
  • DSSP assignment, which matches mdtraj on 9,595 test residues. Cartoons blend between coil, helix, and strand as secondary structure forms.
  • RamachandranPlot, with favored and allowed regions derived from 1,000 high-resolution PDB chains, and TorsionMarker labels on the structure.

Two states of one protein

  • StructureMorph(source, target) animates between two experimental structures, even when their chains, missing residues, ligands, or atoms differ. Domains swing along arcs about the rigid core the two states share, side chains turn through their χ angles, and atoms present in only one structure fade.
  • Supporting tools: match_structures, domain_motion, biological assemblies with Protein.from_file(path, assembly="1"), PDB and AlphaFold DB downloads with Protein.fetch("1ANF"), and camera.look_along(axis).
  • Examples: hemoglobin T to R, adenylate kinase closing, and Cas9 binding its DNA target.

Data on structures

  • Heatmap for AlphaFold PAE and distance matrices, with readers for AFDB, ColabFold, and AF3 confidence files.
  • pLDDT, hydropathy, and conservation color presets.

Rendering

  • Cartoon and ribbon orientation now follows the Cα trace, so ribbons no longer flip during morphs, trajectories, and torsion animations.
  • Native and Studio stills and movies up to 1920 × 1080 render at 2× and average down for clean edges.
  • Studio fades of individual atoms or regions end exactly on the solid image.

Upgrade notes

  • Supersampling is on by default up to 1920 × 1080. Pass ProteinScene(supersampling=1) or --supersampling 1 for the earlier output.
  • Files without helix and sheet records, such as AlphaFold models and many NMR and MD structures, now get DSSP secondary structure instead of an all-coil cartoon. Pass secondary="file" to Protein.from_file for the earlier behavior.
  • Where the twist between two residues is ambiguous, usually at sharp kinks and in loops, a ribbon turns through a short round section.

Install

python -m pip install --upgrade proteinmotion==0.14.0

For interactive preview and trajectory readers:

python -m pip install --upgrade 'proteinmotion[preview,md]==0.14.0'

Torsions guide · Morphs guide · Heatmaps and confidence · Rendered examples

Validation

A clean source archive and wheel passed strict distribution metadata validation and were installed into a fresh Python 3.12 environment outside the checkout. Native and Studio movies rendered from that installation and decoded completely. The full suite passed 319 tests, including native Metal GPU and Blender checks; five NVIDIA encoder tests were skipped on the Apple M3 Max. The website build, type checks, and 146 exported pages passed verification.

The PyPI publishing workflow additionally checks wheel installation on Linux (Python 3.11–3.14), Windows, and macOS before upload.