
This toolkit is open source. Any third-party models, product names, or trademarks referenced are the property of their respective owners, and Proto is not affiliated with them.
Background
Root mean square deviation (RMSD) measures the average distance between corresponding atoms of two structures after optimal rigid-body superposition. It is the standard summary statistic for assessing how closely a model recapitulates a reference structure, comparing alternative poses of the same complex, and quantifying conformational change between two states of the same protein. Computing a meaningful RMSD requires a residue correspondence between the two structures, which the upstream alignment routine establishes before the superposition is performed. Open-Source PyMOL exposes two distinct alignment routines that this toolkit invokes. Thecealign command implements the Combinatorial Extension (CE) algorithm (Shindyalov and Bourne, 1998), which builds a structural alignment from aligned fragment pairs based on local geometry rather than a global sequence alignment. CE was developed to detect remote structural similarity below the sequence-similarity twilight zone, where the underlying sequences share too little identity for a meaningful sequence-based alignment. The align command in contrast first computes a sequence alignment using the BLOSUM62 substitution matrix, performs a structural superposition over the aligned residues, and then iterates several cycles of outlier rejection to remove residues with poor structural agreement. This routine is appropriate when the two structures share substantial sequence identity and the goal is a residue-matched superposition that excludes locally divergent regions.
Learning Resources
- schrodinger/pymol-open-source (Schrödinger, LLC). The official Open-Source PyMOL repository and the source of the
cealignandaligncommands invoked by this toolkit. - PyMOL Wiki (community-maintained). Reference documentation for the
alignandcealigncommands and the broader PyMOL scripting interface.
Tools
PyMOL RMSD Alignment (pymol-rmsd-alignment)
Aligns two Structure inputs with Open-Source PyMOL and returns the post-alignment RMSD together with method-specific alignment statistics. The method configuration field selects between the CE-based cealign and the sequence-aware align routine.API Reference
Config: PyMOLRMSDConfig
Config: PyMOLRMSDConfig
cealign, alignTrue is coerced to 1 and False to 0.None waits indefinitely.BaseToolOutput.approx_equal), and the seed participates in cache keys. When None, cacheable seed-sensitive tools skip cache until seeded.Output: PyMOLRMSDOutput
Output: PyMOLRMSDOutput
| Metric | Type | Range | Availability |
|---|---|---|---|
rmsd | float | ≥ 0.0 | always |
aligned_length | int | ≥ 0.0 | cealign only |
aligned_atoms | int | ≥ 0.0 | align only |
alignment_cycles | int | ≥ 0.0 | align only |
alignment_score | float | unbounded | align only |
pre_refinement_rmsd | float | ≥ 0.0 | align only |
pre_refinement_aligned_atoms | int | ≥ 0.0 | align only |
aligned_residues | int | ≥ 0.0 | align only |
Applications
This tool is appropriate for any analysis that needs a pairwise structural superposition of two proteins. Representative applications include scoring designed structures against a reference template, quantifying conformational drift across molecular dynamics snapshots, comparing predicted poses against experimental structures, and evaluating backbone or side-chain changes introduced by mutation.Usage Tips
methodselects the alignment routine and should match the expected sequence relationship between the two inputs. The defaultcealignruns the Combinatorial Extension algorithm and is appropriate for proteins with low sequence similarity.alignperforms a sequence alignment followed by structural superposition and iterative outlier rejection, and is more appropriate when the two inputs share substantial sequence identity.cealignandalignpopulate different metric fields. Acealigncall returnsrmsdandaligned_length(the length of the CE alignment in CA atoms, equivalent to aligned residues sincecealignoperates only on CA atoms). Analigncall returnsrmsd(after refinement),aligned_atoms,alignment_cycles,alignment_score,pre_refinement_rmsd,pre_refinement_aligned_atoms, andaligned_residues. Metric fields that do not apply to the selected method are returned asNone.target_selectionandmobile_selectionaccept arbitrary PyMOL selection strings. The defaults select the full target and mobile objects. Pass a refined selection such as"target and name CA"or"target and chain A"to restrict the alignment to a specific residue subset, chain, or atom set. Selection syntax follows the standard PyMOL grammar documented on the PyMOL Wiki.- A failed alignment returns
failure_rmsdrather than raising an exception. When PyMOL cannot align the two structures (for example, when the structures are too dissimilar for CE to converge), the call returns the configuredfailure_rmsdvalue (default999.0) and attaches the underlying error message to the result metadata asalignment_error. This sentinel-value approach lets calling code distinguish a failed alignment from a near-zero RMSD between two essentially identical structures.
Toolkit Notes
These apply to every PyMOL RMSD tool in this toolkit (pymol-rmsd-alignment).
- Outputs are returned as typed metric objects. Each
PyMOLRMSDMetricsresult carries the post-alignmentrmsdtogether with the method-specific metrics described under Usage Tips. The headlineprimary_metricisrmsd, and results can be exported to JSON through the standard export method. - Inputs accept a
Structureobject, a file path, or raw PDB or mmCIF content. Each input is normalised to aStructurebefore scoring, and the corresponding PDB text is passed to PyMOL through a temporary file.