Skip to main content
A task in MLIP Arena is one operation on one input structure that produces a result for one sample. Tasks are Python functions decorated with Prefect’s @task, which gives them caching, retry logic, and the ability to run concurrently inside a flow.

What a task is

Tasks are defined in mlip_arena/tasks/<module>.py and exported from mlip_arena/tasks/__init__.py as uppercase names (OPT, EOS, MD, etc.). Each task:
  • Accepts an atoms: Atoms structure and a calculator: BaseCalculator.
  • Applies one physical simulation or property calculation.
  • Returns a dictionary of results.
  • Caches results keyed on task source code plus all input parameters.

Tasks vs flows

Tasks can call other tasks directly (serial) or submit them (parallel). Flows are the entry point that Prefect orchestrates and tracks as a single unit of work.

Prefect @task decorator and caching

Every MLIP Arena task uses the TASK_SOURCE + INPUTS cache policy. This means a task is only re-executed when either its source code or its input arguments change:
The same pattern appears on every task (EOS, MD, PHONON, NEB, ELASTICITY).
When running a benchmark over many models, the cache ensures that if one model fails and you re-run the flow, completed calculations are not repeated. Set refresh_cache=True to force re-execution.

Task chaining: EOS calls OPT internally

Tasks are composable. EOS calls OPT as a subtask — first for a full relaxation, then for constrained relaxations at each strained volume:
The concurrent=True flag enables parallel OPT submissions for all volume points, which is significantly faster when running with a Prefect worker pool.

Available tasks

OPT — Structure optimization

Relax atomic positions and/or cell parameters using ASE optimizers (BFGS, FIRE, LBFGS, etc.) and filters (UnitCell, FrechetCell, ExpCell).

EOS — Equation of state

Compute energy-volume relationship and fit Birch-Murnaghan EOS to extract bulk modulus. Chains OPT internally.

MD — Molecular dynamics

Run NVE, NVT, or NPT simulations with flexible dynamics (VelocityVerlet, Langevin, Nose-Hoover, Berendsen) and temperature/pressure schedules.

PHONON — Phonon calculation

Compute phonon band structure and density of states driven by the phonopy library. Requires phonopy to be installed.

NEB — Nudged elastic band

Find minimum energy paths and transition states between two known endpoint structures.

NEB_FROM_ENDPOINTS

Convenience wrapper around NEB that performs linear or IDPP image interpolation from two endpoint structures.

ELASTICITY

Calculate the full elastic tensor via strain perturbations.

The task registry.yaml structure

mlip_arena/tasks/registry.yaml registers benchmarks (not individual tasks) for the leaderboard. Each entry maps a human-readable benchmark name to its Streamlit page and display category:

Importing tasks

All tasks are available from mlip_arena.tasks:
The __init__.py wraps imports in a try/except so missing optional dependencies (e.g., phonopy) do not prevent other tasks from loading: