Skip to main content

Definition

The separation energy is the Euclidean distance between the backbone centroids of two residue groups. Esep=c1c2E_{\mathrm{sep}} = \| \mathbf{c}_1 - \mathbf{c}_2 \|
  • c1\mathbf{c}_1 and c2\mathbf{c}_2 are the centroids of the backbone atoms in residue groups 1 and 2
  • If a custom function ff is provided, the energy becomes Esep=f(c1c2)E_{\mathrm{sep}} = f(\| \mathbf{c}_1 - \mathbf{c}_2 \|)

Parameters

oracle
FoldingOracle
required
The oracle to use for the energy term.
residues
tuple[list[Residue], list[Residue]]
required
A tuple containing two lists of residues, those to include in the first [0] and second [1] group.
function
Callable[[float], float] | None
default:"None"
Optional callable f(x) applied to the centroid distance x (in Å) before weighting. If None, the identity function is used (i.e., energy equals the distance).
inheritable
bool
default:"True"
If a new residue is added next to a residue included in this energy term, this dictates whether that new residue could then be added to this energy term.
weight
float
default:"1.0"
The weight of the energy term.
name
str | None
default:"None"
Optional name to append to the energy term name.

Methods

compute

Parameters
oracles_result
OraclesResultDict
required

Example

import bagel as bg

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

# Define two groups of residues (e.g. hotspot and binder)
hotspot_residues = [residues_target[i] for i in range(10, 20)]
binder_residues = residues_binder

# Minimize the distance between the centroids of the two groups
separation = bg.energies.SeparationEnergy(
    oracle=esmfold,
    residues=[hotspot_residues, binder_residues],
    weight=1.0,
)

# Add to a state
state = bg.State(
    chains=[binder_chain, target_chain],
    energy_terms=[separation],
    name="my_state",
)