Skip to main content
Structure Composite Confidence
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.


Structure Prediction · 6 tools
Go to Category
proto-bio/proto-language/proto_language/constraint/protein_structure/structure_confidence_constraint.py
View source
Evaluate structure quality using a composite of all confidence metrics from one prediction call. Runs predict_structures once per batch and combines avg_plddt, iptm, ptm, and avg_pae into a single scalar in [0, 1] where lower is better (more confident). All four raw metrics plus the resulting structure are also exposed via metadata / structures so callers can threshold on individual metrics post-hoc (e.g., Germinal’s final-filter gates in examples/germinal/configs/vhh_pdl1.yaml) without re-running the predictor. The composite is the equal-weighted mean of normalized deviations: (1 - plddt_norm + 1 - iptm + 1 - ptm + pae / PAE_MAXIMUM) / 4. Versus stacking structure-plddt + structure-iptm + structure-ptm
  • structure-pae as four separate constraints, this is 4x cheaper (one predict_structures call instead of four) and exposes all metrics for post-hoc threshold labeling.
Supported tools: ESMFold2, AlphaFold3, Boltz2, Chai1, Protenix, AlphaFold2 (NOT ESMFold v1 — it does not produce iptm and cannot handle multi-chain complexes, whereas ESMFold2 does both; NOT AF2 binder because its interface TM value is exposed as a differentiable objective rather than the same forward confidence metric used here).
Metadata values are all normalized to [0, 1] so downstream threshold code is tool-agnostic (unlike sibling single-metric constraints, which store raw values and require the caller to know the tool’s scale):
  • composite_avg_plddt: Normalized pLDDT in [0, 1] (divided by 100 for alphafold3).
  • composite_iptm: ipTM in [0, 1].
  • composite_ptm: pTM in [0, 1].
  • composite_avg_pae: Normalized PAE in [0, 1] (raw Angstroms divided by PAE_MAXIMUM = 31.75, clamped at 1).
  • pdb_output: Stored PDB file handle.
  • structure_tool: Tool name used for prediction.

API Reference

ConfigStructureBasedConstraintConfig Source
Base configuration for constraints using structure prediction tools.This base class standardizes how structure prediction tools and their configurations are specified across all structure-based constraints. Each tool has its own dedicated config field.Subclasses can optionally restrict which tools are supported by overriding the structure_tool field with a narrower Literal type.
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.
ReturnsConstraintOutput
Per-proposal composite score in [0, 1] (lower is better). Metadata carries the four normalized components (composite_avg_plddt, composite_iptm, composite_ptm, composite_avg_pae) plus pdb_output and structure_tool for the predicted full input tuple; the predicted Structure attaches to slot 0.

Usage

Ranking binder candidates by composite structure quality with Chai-1:
python
>>> from proto_language.core import Segment
>>> binder = Segment(length=80, sequence_type="protein")
>>> target = Segment(sequence="MKTL...", sequence_type="protein")
>>> chai1_composite = Constraint(
...     inputs=[binder, target],
...     function=structure_composite_constraint,
...     function_config={"structure_tool": "chai1"},
... )

Metadata

PropertyValue
Keystructure-composite
Functionstructure_composite_constraint
Categoryprotein_structure
Modediscrete
Uses GPUTrue
Supported Typesprotein, rna, dna, ligand