Prediction Server and Enerzymette Integration#
Enerzyme can run as a long-lived prediction server that responds to HTTP requests. This mode pairs with the Enerzymette workflow manager for orchestrated scan, active-learning, and optimization campaigns.
Starting the server#
enerzyme listen -c server.yaml -m model_dir/ -o server_out/ -b 0.0.0.0:5000 -mc train.yaml
Arguments:
-c— server config (minimal YAML; see below)-m— trained model directory-mc— model config (defaults tomodel_dir/config.yaml)-b— bind address (host:port)-o— output directory for server logs and artifacts
There is no separate listen.yaml in the repository. Reuse a lightweight config derived from predict.yaml or an empty Datahub-only stub—the server loads active models from -mc.
Minimal server config#
Datahub:
preload: true
The listen process reads Modelhub from the model config, loads all active: true models, and exposes them via Flask/Waitress.
Sending a request (client)#
enerzyme request -u http://127.0.0.1:5000 -f ORCA -i input.extinp.tmp -k FF01
Arguments:
-u— server URL-f— input format (ORCAfor external optimizer workflows)-i— input file path-k— model key (must match an activeFFID in the model config)
The server returns JSON with predicted outputs and unit metadata (Hartree_in_E, Bohr_in_R).
Shutting down the server#
enerzyme kill -u http://127.0.0.1:5000
Sends a shutdown signal to the listening process.
When to use server mode#
External optimizers or workflow tools that request energies/forces repeatedly
Enerzymette launchers that batch many
simulateor scan jobs against one loaded modelAvoiding model reload overhead across hundreds of short calculations
Enerzymette workflow manager#
Install Enerzymette separately:
git clone https://github.com/Benzoin96485/Enerzymette.git
cd Enerzymette
pip install -e .
Relevant launchers:
Command |
Role |
|---|---|
|
Batch flexible scans (bond or PLUMED CV) |
|
NEB via ORCA ExtOpt + |
|
|
enerzyme_neb and enerzyme_scan start enerzyme listen when needed; enerzyme_active_learning invokes enerzyme simulate directly. See Enhanced Sampling and Hybrid Potentials for PLUMED plugin details. End-to-end example: example/NNP4MTase.
Architecture sketch#
Client / Enerzymette --POST /calculate--> enerzyme listen
|
v
ASECalculator + model