> ## Documentation Index
> Fetch the complete documentation index at: https://proto.evodesign.org/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Protein Low Complexity

> Penalize sliding windows whose amino-acid composition carries too little entropy

![Protein Low Complexity](https://proto-bio.github.io/proto-assets/images/constraint/protein-low-complexity/hero.png)

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.

***

&#x20;Source

![Proto](https://mintcdn.com/bio-pro/cMLt8hAqaP9M3LKy/assets/logo/logo-light.svg?fit=max\&auto=format\&n=cMLt8hAqaP9M3LKy\&q=85\&s=f5e5dfd1b8f9b9db3a0be0e2eb01f678)

evo-design/proto-language

&#x20;View source

[Open](https://github.com/evo-design/proto-language/blob/1a97e675c7e5e4ae0e92be91b1bb7b49f1331104/proto_language/constraint/protein_quality/protein_low_complexity_constraint.py#L183)

Constraint contributors[![](https://avatars.githubusercontent.com/u/61667248?v=4\&s=64)adititm](https://github.com/adititm)[![](https://avatars.githubusercontent.com/u/21143637?v=4\&s=64)bviggiano](https://github.com/bviggiano)
Score each protein by how far its least diverse windows fall below `min_entropy`.

## API Reference

ConfigProteinLowComplexityConfig[ Source](https://github.com/evo-design/proto-language/blob/1a97e675c7e5e4ae0e92be91b1bb7b49f1331104/proto_language/constraint/protein_quality/protein_low_complexity_constraint.py#L50)

Configuration for the windowed low-complexity constraint.

**window** `integer` (default: 12)

Residues per sliding window; 12 matches SEG's default.

**min\_entropy** `number` (default: 0.51)

Normalized window entropy floor; 0.51 is SEG's locut of 2.2 bits / log2(20).

ReturnsConstraintOutput

One per proposal. `score` is the mean hinge over windows, 0.0
when every window clears the floor; `metadata` carries `low_complexity_penalty`
and `min_window_entropy` (`None` for a protein shorter than one window).

## Usage

```python python icon="python" theme={null}
>>> from proto_language.core import Sequence
>>> out = protein_low_complexity_constraint([(Sequence("S" * 40, "protein"),)], ProteinLowComplexityConfig())
>>> out[0].metadata["min_window_entropy"]  # 0.0: one amino acid carries no entropy
```

## Metadata

| Property | Value |
| - | - |
| Key | `protein-low-complexity` |
| Function | `protein_low_complexity_constraint` |
| Category | `protein_quality` |
| Mode | `dual` |
| Uses GPU | `False` |
| Supported Types | `protein` |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.