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

# FoldingLogger

> Logger that saves CIF structures and oracle attributes for a specific FoldingOracle instance.

## Parameters

<ResponseField name="folding_oracle" type="FoldingOracle" required>
  The FoldingOracle instance to log (e.g. an ESMFold instance).
</ResponseField>

<ResponseField name="log_interval" type="int" required>
  Interval (in steps) at which to log structures for the current system.
</ResponseField>

## Methods

### on\_optimization\_start

**Parameters**

<ResponseField name="context" type="CallbackContext" required />

### on\_step\_end

**Parameters**

<ResponseField name="context" type="CallbackContext" required />

## Example

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

esmfold = bg.oracles.ESMFold(use_modal=True)
callbacks = [
    bg.callbacks.FoldingLogger(folding_oracle=esmfold, log_interval=50),
]
```
