> ## 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.

# System

> Top level object defining the input for a protein design pipeline. In practice, a system will be a collection of states, each representing a (potentially different) collection of chains.

## Parameters

<ResponseField name="states" type="list[State]" required />

<ResponseField name="name" type="str | None" default="None" />

<ResponseField name="total_energy" type="float | None" default="None" />

## Methods

### get\_total\_energy

### dump\_config

Saves information about how each energy term was configured in a csv file named "config.csv". Columns include 'state\_name', 'energy\_name', and 'weight'.

**Parameters**

<ResponseField name="path" type="pl.Path" required>
  The directory in which the config.csv file will be created.
</ResponseField>

### add\_chain

Add a chain to the state.

**Parameters**

<ResponseField name="sequence" type="str" required>
  amino acid sequence of the chain
</ResponseField>

<ResponseField name="mutability" type="list[int]" required>
  list of 0s and 1s indicating if the residue is mutable or not
</ResponseField>

<ResponseField name="chain_ID" type="str" required />

<ResponseField name="state_index" type="list[int]" required>
  index of the state in the system
</ResponseField>

## Example

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

state = bg.State(name='state_A', chains=[], energy_terms=[])
system = bg.System(states=[state], name='example_system')
system.add_chain(sequence='AAAA', mutability=[1, 1, 0, 0], chain_ID='A', state_index=[0])
```
