
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 object for protein length constraint.This class defines configuration parameters for evaluating whether protein
sequences fall within an acceptable length range. Length constraints are
useful for filtering proteins that are too short or too long. The penalty scales
linearly with the distance outside the acceptable range. For example, a protein
10 amino acids below
min_length receives a proportionally smaller penalty than
one 50 amino acids below.Minimum acceptable protein length below which sequences are penalized
Maximum acceptable protein length above which sequences are penalized
ReturnsConstraintOutput
One result per sequence. A score of 0.0 indicates
length is within the acceptable range [min_length, max_length] and
higher values indicate greater deviation from the acceptable range.
Penalties scale linearly: a sequence 10 amino acids outside the range
receives half the penalty of one 20 amino acids outside. metadata carries:protein_length: Integer length of the protein sequence in amino acids
Usage
Evaluating protein length within range:python
Metadata
| Property | Value |
|---|---|
| Key | protein-length |
| Function | protein_length_constraint |
| Category | protein_quality |
| Mode | discrete |
| Uses GPU | False |
| Supported Types | protein |