Repository navigation
ProteinMotion 0.14.0 — torsions, structure morphs, and smoother rendering
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 withSetTorsionsandRotateTorsions. 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, andTorsionMarkerlabels 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 withProtein.from_file(path, assembly="1"), PDB and AlphaFold DB downloads withProtein.fetch("1ANF"), andcamera.look_along(axis). - Examples: hemoglobin T to R, adenylate kinase closing, and Cas9 binding its DNA target.
Data on structures
Heatmapfor 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 1for 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"toProtein.from_filefor 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.0For 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.