Performance Tuning#

Guidelines for large datasets and expensive simulations.

Data loading#

preload: true

Reuse HDF5 cache across runs with identical preprocessing hash.

compressed: true

Share static fields across frames of the same stoichiometry.

max_memory

Increase HDF5 cache (GB) for random-access heavy workloads.

num_workers

Dataloader parallelism; increase until CPU saturates; watch memory.

data_in_memory

Load full training set into RAM — fast but memory-intensive.

Training#

batch_size

Largest value that fits GPU memory.

dtype: float32

Default for speed; float64 for numerical experiments.

neighbor_list: full (precomputed)

Faster epochs if memory allows; otherwise on-the-fly lists.

lightning: true

Multi-GPU training when single-process cuda is insufficient.

Simulation#

dtype: float64 vs float32

Optimization and NEB often need float64; MD may use float32 if stable.

cuda: true

GPU inference for ML calculator; external QC still runs on its own resources.

log_interval

Reduce trajectory I/O frequency for long MD.

Neighbor list memory#

Full neighbor lists scale as \(O(N^2)\). For large enzyme clusters:

  • Use compressed in training data

  • Avoid storing redundant frames

  • Consider smaller QM fragment training sets via extract/annotate rather than full-cluster every step

When to use server mode#

listen amortizes model load cost over hundreds of short requests (e.g. ORCA optimization loops). For one-off batch predict, use enerzyme predict.