Skip to main content
MPNN Perplexity
License: ProteinMPNN is open source and free for academic and commercial use under an MIT license. Please refer to the license for full terms.

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.


Go to Tool Page
proto-bio/proto-language/proto_language/constraint/sequence_scoring/mpnn_perplexity_constraint.py
View source
@article{dauparas2022proteinmpnn,
  title={Robust deep learning--based protein sequence design using ProteinMPNN},
  author={Dauparas, Justas and Anishchenko, Ivan and Bennett, Nathaniel and Bai, Hua and Ragotte, Robert J and Milles, Lukas F and Wicky, Basile IM and Courber, Alexis and de Haas, Rob J and Bethel, Neville and others},
  journal={Science},
  volume={378},
  number={6615},
  pages={49--56},
  year={2022},
  publisher={American Association for the Advancement of Science},
  doi={10.1126/science.add2187}
}
Copy citation
Score proposals by ProteinMPNN perplexity against the configured backbone.

API Reference

ConfigMpnnPerplexityConfig Source
Configuration for ProteinMPNN perplexity scoring.
structure_input
InverseFoldingStructureInput
required
Backbone structure, optional chains_to_redesign, and fixed positions for direct ProteinMPNN scoring.
model_choice
enum
default:"proteinmpnn"
Weights: proteinmpnn (=v_48_020), v_48_{002,010,030} noise variants, abmpnn, soluble.Options: proteinmpnn, v_48_002, v_48_010, v_48_030, abmpnn, soluble
temperature
number
default:"1.0"
Softmax temperature for relaxing optimizer logits before ProteinMPNN scoring.
use_ste
boolean
default:"True"
Hard one-hot forward pass with soft-probability gradients.
device
string
default:"cuda"
Device for ProteinMPNN execution, e.g. ‘cuda’ or ‘cuda:0’.
seed
integer
Seed for ProteinMPNN decoding-order sampling. None lets proto-tools choose a fresh seed.
score_mode
enum
default:"ppl"
Return ProteinMPNN perplexity by default, or raw mean NLL when set to ‘nll’.Options: nll, ppl
logit_scale
number
default:"1.0"
Pre-scale raw logits before ProteinMPNN; gradients are scaled back by the same factor.
sequence_bias
SequenceLogitBiasConfig
Declarative sequence-symbol bias (canonical 20-AA protein) added before ProteinMPNN.

Usage

python
from proto_language.core import Constraint
from proto_language.constraint import mpnn_perplexity_constraint, MpnnPerplexityConfig

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

scores = constraint.evaluate()

Metadata

PropertyValue
Keympnn-perplexity
Functionmpnn_perplexity_constraint
Categorysequence_scoring
Modedual
Uses GPUTrue
Supported Typesprotein