Oracle categories
BAGEL defines three categories of oracles: Folding oracles predict 3D structures and confidence metrics (pLDDT, pTM, PAE). These power structure-based energy terms likePTMEnergy, PLDDTEnergy, and PAEEnergy.
Embedding oracles produce per-residue embedding vectors that capture biochemical and evolutionary context. These are used by EmbeddingsSimilarityEnergy to maintain functional similarity during design.
Property oracles compute scalar values directly from sequences — for example, predicting solubility or counting polar residues. You can build these by subclassing Oracle directly.
How BAGEL uses oracles
BAGEL wraps boileroom models, which handle the raw inference (model loading, GPU execution, batching). On top of the raw predictions, BAGEL performs additional processing relevant to protein design:- Residue-level pLDDT extraction — pulling per-residue confidence scores from the predicted structure
- PAE submatrix computation — extracting PAE values for specific residue group pairs, enabling targeted interaction scoring
- Multimer linker masking — excluding artificial linker regions from confidence and structural metrics when predicting multimers
Built-in oracles
Writing custom oracles
To plug in your own model, subclassOracle (or the more specialized FoldingOracle / EmbeddingOracle) and implement the prediction method. See the Custom Oracles guide for a full walkthrough with examples.
