
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
The Template Modeling score (TM-score) (Zhang and Skolnick, 2004) is a length-independent measure of topological similarity between two protein structures. It scores each pair of corresponding residues with a distance-based weight that uses a protein-size-dependent normalisation, which eliminates the inherent length dependence of RMSD-style scores and lets the same TM-score value be compared across proteins of different sizes. The score ranges from 0 to 1, with 1 indicating identical structures. TMalign (Zhang and Skolnick, 2005) is a structure alignment algorithm that identifies the optimal pairwise structural superposition by combining a TM-score-based rotation matrix with dynamic programming. Three initial alignments are seeded from secondary-structure matching, gapless threading, and a hybrid scoring matrix, and the residue-to-residue correspondence is then iteratively refined by alternating rigid-body rotation with dynamic programming on the TM-score-weighted distance matrix until the alignment converges. Unlike alignment methods that optimise RMSD, TMalign directly optimises the TM-score, which decouples the alignment objective from chain length. The published benchmark reports that TMalign produces alignments with higher coverage and accuracy than CE, DALI, and SAL while running approximately four times faster than CE and twenty times faster than DALI on the same workload. A subsequent statistical analysis of the TM-score (Xu and Zhang, 2010) provides quantitative interpretation guidance. The authors compare TM-scores across all pairs in a non-redundant set of 6,684 single-domain protein structures and report that the score follows an extreme value distribution. They show that a TM-score above 0.5 is a strong probabilistic indicator of shared SCOP and CATH fold classification, while scores below 0.5 mostly indicate different folds.Learning Resources
- pylelab/USalign (Pyle Lab, Yale University). The canonical distribution that bundles TMalign together with USalign, MMalign, and TMscore. This toolkit compiles the TMalign program from this repository.
- Zhang Lab TMalign page (Zhang Lab). Background documentation and an online TMalign web service maintained by the original developers.
Tools
TMalign Structure Alignment (tmalign-alignment)
Aligns two protein structures with TMalign and returns the Template Modeling score normalised by the length of each input chain. The tool takes a query and reference Structure, runs the compiled TMalign program, and reports tm_score_chain_1 (normalised by the query length) and tm_score_chain_2 (normalised by the reference length).API Reference
Config: TMalignConfig
Config: TMalignConfig
True 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: TMalignOutput
Output: TMalignOutput
output.metrics.tm_score_chain_1 or output.tm_score_chain_1 (the forwarded shortcut from :class:BaseToolOutput).| Metric | Type | Range | Availability |
|---|---|---|---|
tm_score_chain_1 | float | 0.0 to 1.0 | always |
tm_score_chain_2 | float | 0.0 to 1.0 | always |
Applications
This tool is the standard method for pairwise protein structure comparison. Representative applications include validating that a designed protein adopts the intended fold, ranking predicted structures by topological similarity to a reference, classifying experimentally determined structures into known folds, and detecting distant structural homology where sequence similarity is too low for sequence-based comparison.Usage Tips
- The two TM-scores differ when the query and reference have different lengths. Each score is normalised by the length of the named chain, so the score normalised by the shorter chain is typically the larger of the two. Use the score normalised by the chain whose length matters for the comparison, typically the reference or target when ranking candidates against a fixed structure.
- A TM-score above 0.5 indicates the structures share the same fold. This threshold is statistically derived from a non-redundant analysis of the Protein Data Bank (Xu and Zhang, 2010) and is the standard fold-similarity cutoff in the literature. Scores above 0.3 are significantly above random with a P-value below 0.001, while scores below 0.17 are indistinguishable from random pairs (the random-pair distribution is centred near a TM-score of 0.15).
- TMalign is designed for monomeric protein chains. Multi-chain assemblies are processed as a single chain and chain breaks are not preserved. For genuine multi-chain alignment use the USalign tool in this category, which is built for protein complexes.
- Very short inputs produce unreliable scores. The TM-score
d0length-normalisation factor is calibrated for chains of approximately 15 residues and above and saturates rapidly for shorter chains, so short-chain comparisons lose the standard topological interpretation. Restrict comparison to chains of meaningful length before drawing fold-level conclusions.
Toolkit Notes
These apply to every TMalign tool in this toolkit (tmalign-alignment).
- Outputs are returned as typed metric objects. Each
TMalignMetricsresult carries bothtm_score_chain_1andtm_score_chain_2. 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 TMalign through a temporary file. - TMalign runs on CPU and is fast enough for all-against-all comparison of large structure sets. No GPU is used, and per-pair runtime scales with the product of the two chain lengths.