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

# OverallPLDDTEnergy

> Overall Predicted Local Distance Difference Test energy. Unlike PLDDTEnergy, which averages pLDDT over specific residue groups only, OverallPLDDTEnergy averages pLDDT over all residues in the structure. This is useful when you want a measure of global structural confidence rather than per-group confidence.

## Definition

The overall pLDDT energy is the negated mean pLDDT over all residues in the structure.

$$
E_{\mathrm{pLDDT}} = -\frac{1}{N} \sum_{\alpha} \mathrm{pLDDT}_\alpha
$$

* $N$ is the total number of residues in the structure
* $\mathrm{pLDDT}_\alpha$ is the predicted local distance difference test score for residue $\alpha$

## Parameters

<ResponseField name="oracle" type="FoldingOracle" required>
  The oracle to use for the energy term.
</ResponseField>

<ResponseField name="weight" type="float" default="1.0">
  The weight of the energy term.
</ResponseField>

<ResponseField name="name" type="str | None" default="None">
  Optional name to append to the energy term name.
</ResponseField>

## Example

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

# Create the folding oracle
esmfold = bg.oracles.ESMFold()

# Create the energy term
overall_plddt = bg.energies.OverallPLDDTEnergy(
    oracle=esmfold,
    weight=1.0,
)

# Add to a state
state = bg.State(
    chains=[chain],
    energy_terms=[overall_plddt],
    name="my_state",
)
```
