Skip to main content

Definition

The Local Interaction Score (LIS) counts the fraction of inter-group residue pairs with PAE below a cutoff threshold, measuring how confidently the model predicts the spatial relationship between residue groups. For each qualifying pair, the contribution is (cutoff - PAE) / cutoff, producing a score between 0 and 1. The result is negated so that lower energy corresponds to stronger predicted interactions. When intensive=True, the score is averaged over qualifying pairs; when intensive=False, it is summed (extensive mode).

Parameters

oracle
FoldingOracle
required
The oracle to use for the energy term.
residues
list[list[Residue]]
required
Which residues to include in the first and second group.
pae_cutoff
float
default:"12.0"
The cutoff value for the PAE, in Angstroms, below which the interaction is considered “local”.
intensive
bool
default:"True"
If True, the LIS is averaged over the number of residue pairs, otherwise it’s an extensive sum.
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

# Score local interactions between two groups using PAE-based LIS
lis_energy = bg.energies.LISEnergy(
    oracle=esmfold,
    residues=[hotspot_residues, binder_residues],
    pae_cutoff=12.0,
    weight=1.0,
)

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