Skip to main content
Structural TM-score Similarity
License: This constraint can use multiple tools, each under its own license. See the Tools Used tab and each tool’s page for license details.

This constraint 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.


proto-bio/proto-language/proto_language/constraint/protein_structure/structure_similarity_constraint.py
View source
Predicts structure and compares TM-score. Returns (1.0 - TMscore). This constraint automatically selects the appropriate alignment tool based on the oligomer state of the inputs:
  • Monomer vs monomer comparisons use standard TMalign.
  • Comparisons involving multiple chains use USalign with -mm 1 and default values for all other parameters.
The two raw TM-scores are combined per config.tm_score_normalization (default: arithmetic mean of the proposal- and target-normalized scores); the target is the reference structure. Metadata describes the predicted full input tuple/complex, not an individual chain.

API Reference

ConfigStructureTMScoreConfig Source
Configuration for TM-score based structure similarity.This configuration extends StructureSimilarityConfig for calculating the Template Modeling score (TM-score) between the target and proposal structures. TM-score is a metric for assessing the topological similarity of protein structures and is less sensitive to local variations than RMSD.The constraint returns a score calculated as (1.0 - TM_score), where 0.0 indicates a perfect match (TM-score = 1.0) and values closer to 1.0 indicate poor structural similarity.Inherits target specification (target_chains, target_structure, min_target_plddt) from StructureSimilarityConfig and tool selection (structure_tool, esmfold_config, esmfold2_config, alphafold3_config, boltz2_config, chai1_config, protenix_config, alphafold2_config, alphafold2_binder_config) from StructureBasedConstraintConfig.
plddt_threshold
number
Drop residues with pLDDT (0-100 scale, in B-factor) below this before alignment; None keeps all.
tm_score_normalization
enum
default:"mean"
How to combine the two TM-scores from TM-align/US-align: structure1, structure2, max, min, or mean.Options: structure1, structure2, max, min, mean
structure_tool
enum
default:"esmfold"
Predictor: esmfold/esmfold2/alphafold3/boltz2/chai1/protenix/alphafold2/alphafold2_binder.Options: esmfold, esmfold2, alphafold3, boltz2, chai1, protenix, alphafold2, alphafold2_binder
esmfold_config
ESMFoldConfig
Configuration for ESMFold structure prediction.
esmfold2_config
ESMFold2Config
Configuration for ESMFold2 structure prediction.
alphafold3_config
AlphaFold3Config
Configuration for AlphaFold3 structure prediction.
boltz2_config
Boltz2Config
Configuration for Boltz2 structure prediction.
chai1_config
Chai1Config
Configuration for Chai1 structure prediction.
protenix_config
ProtenixConfig
Configuration for Protenix structure prediction.
alphafold2_config
AlphaFold2Config
Configuration for the general AlphaFold2 multimer structure predictor.
alphafold2_binder_config
AlphaFold2BinderStructureConfig
Configuration for the AF2 binder-design backend.
target_chains
array | Complex
Target chains: a tuple of sequence strings (entity types auto-detected).
target_structure
Structure | string
Target structure: a Structure object, file path (.pdb/.cif), or raw PDB/CIF content string.
min_target_plddt
number
default:"0.6"
Min mean pLDDT (0-1 scale) for a target folded from sequence; ignored when target_structure is set.

Usage

python
from proto_language.core import Constraint
from proto_language.constraint import structure_tmscore_constraint, StructureTMScoreConfig

constraint = Constraint(
    inputs=[segment],
    function=structure_tmscore_constraint,
    function_config=StructureTMScoreConfig(
        # Configure parameters here
    ),
)

scores = constraint.evaluate()

Metadata

PropertyValue
Keystructure-tmscore
Functionstructure_tmscore_constraint
Categoryprotein_structure
Modediscrete
Uses GPUTrue
Supported Typesprotein, rna, dna, ligand