
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.
API Reference
Configuration for balanced amino acid constraint.This class defines configuration parameters for evaluating whether a protein
sequence has balanced representation of all amino acid types. The constraint
penalizes sequences that have too many underrepresented amino acids (those
appearing below a minimum frequency threshold). The penalty score increases
both with the number of underrepresented amino acids beyond the threshold and
with the severity of under-representation (how far below min_aa_frequency each
amino acid falls).
Minimum acceptable relative frequency for any amino acid type.
Maximum acceptable number of underrepresented amino acid types. Sequences with more are penalized.
ReturnsConstraintOutput
One result per sequence. score ranges from 0.0 (best,
acceptable number of underrepresented amino acids) to 1.0 (worst, many severely
underrepresented amino acids), scaled by excess count and severity below the
minimum frequency. metadata carries:underrepresented_aa_score: Float score indicating overall underrepresentation severityamino_acid_counts: Dictionary mapping amino acids to their countsunderrepresented_amino_acids: List of amino acids that are underrepresentedunderrepresented_aa_count: Integer count of underrepresented amino acid typesmin_aa_frequency_threshold: The minimum frequency threshold used
Usage
Evaluating amino acid balance in protein:python
Metadata
| Property | Value |
|---|---|
| Key | balanced-aa |
| Function | balanced_aa_constraint |
| Category | protein_quality |
| Mode | discrete |
| Uses GPU | False |
| Supported Types | protein |