Definition
The separation energy is the Euclidean distance between the backbone centroids of two residue groups.
Esep=∥c1−c2∥
- c1 and c2 are the centroids of the backbone atoms in residue groups 1 and 2
- If a custom
function f is provided, the energy becomes Esep=f(∥c1−c2∥)
Parameters
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).
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.
The weight of the energy term.
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",
)