Skip to main content
NA-MPNN Motif Specificity
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.


evo-design/proto-language/proto_language/constraint/protein_structure/dna_motif_specificity_constraint.py
View source
Constraint contributors
Specificity score from NA-MPNN predicted base-preference matrices.
Predicts (or reuses) a protein-DNA complex for each candidate, predicts a per-position base PPM with NA-MPNN, and scores the specificity advantage of the target motif over the best off-target relative to desired_margin (using the configured scoring_mode).

API Reference

ConfigNAMPNNMotifSpecificityConfig Source
Config for the na-mpnn-motif-specificity constraint.
NAMPNNSpecificityConfig
Tool config for na-mpnn-specificity predictions.
enum
default:"alphafold3"
Predictor for the protein-DNA complex; must be DNA-capable (alphafold3/boltz2/protenix).Options: esmfold, esmfold2, alphafold3, boltz2, chai1, protenix, alphafold2, alphafold2_binder
ESMFoldConfig
Configuration for ESMFold structure prediction.
ESMFold2Config
Configuration for ESMFold2 structure prediction.
AlphaFold3Config
Configuration for AlphaFold3 structure prediction.
Boltz2Config
Configuration for Boltz2 structure prediction.
Chai1Config
Configuration for Chai1 structure prediction.
ProtenixConfig
Configuration for Protenix structure prediction.
AlphaFold2Config
Configuration for the general AlphaFold2 multimer structure predictor.
AlphaFold2BinderStructureConfig
Configuration for the AF2 binder-design backend.
string
required
Target DNA motif in A/C/G/T alphabet.
List[string]
required
Off-target motifs used for the specificity margin.
List[integer]
0-based DNA indices mapped to motif positions (required only when scoring_mode=‘cross_entropy’).
number
default:"1.0"
Specificity advantage satisfying the term; scale follows scoring_mode (CE or log-prob).
integer
default:"0"
Canonical DNA chain label for motif indexing when multiple DNA chains exist (fwd strand 0).
enum
default:"sliding_logprob"
Motif scoring: fixed-index cross_entropy or sliding-window log-prob.Options: cross_entropy, sliding_logprob
ReturnsConstraintOutput
One result per candidate; score 0.0 (best) when the target beats every off-target by desired_margin, 1.0 (worst) otherwise. Metadata carries the target/off-target scores and advantage.

Usage

python

Metadata