> ## Documentation Index
> Fetch the complete documentation index at: https://bagel.softnanolab.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Canonical

> Canonical mutation protocol, making a substitution at random n residues. It cannot add or remove residues.

## Parameters

<ResponseField name="n_mutations" type="int" default="1">
  Number of mutations to perform in each step.
</ResponseField>

<ResponseField name="mutation_bias" type="Dict[str, float]" default="mutation_bias_no_cystein">
  Bias for the substitution. The keys are the amino acids, the values are the probabilities.
</ResponseField>

<ResponseField name="exclude_self" type="bool" default="True" />

## Methods

### one\_step

**Parameters**

<ResponseField name="system" type="System" required />

## Example

```python theme={null}
import bagel as bg

residues = [bg.Residue(name='A', chain_ID='A', index=i, mutable=True) for i in range(6)]
state = bg.State(name='state_A', chains=[bg.Chain(residues)], energy_terms=[])
system = bg.System(states=[state])

mutator = bg.mutation.Canonical(n_mutations=1)
mutated_system, mutation_record = mutator.one_step(system)
```
