gromacs-md¶
GPU-accelerated molecular dynamics. GROMACS with hydrogen-mass repartitioning (4 fs timestep), exposed as an async HTTP service.
Pre-reqs¶
- NVIDIA GPU (L4/A10G at minimum for reasonable throughput; L40S/A100/H100 preferred)
- Docker + NVIDIA Container Toolkit
- CUDA 12.x drivers on the host
- ~8 GB GPU memory per concurrent simulation
Deploy¶
Via docker-compose (default):
Uncomment the gromacs-md block in docker-compose.yml, then:
Standalone (remote GPU box):
docker run -d \
--name novomcp-gromacs-md \
--gpus all \
-p 8024:8024 \
-e API_KEY=<choose-a-key> \
-v /path/to/persistent/results:/results \
--restart unless-stopped \
ghcr.io/novomcp/gromacs-md:latest
Wire into the engine¶
export GROMACS_MD_URL=http://localhost:8024
# or remote:
export GROMACS_MD_URL=http://gpu-box.local:8024
export GROMACS_API_KEY=<the same key> # sent as the API-Key header
Verify¶
curl -s http://localhost:8024/health
# {"status":"healthy","gpu_available":true,"gromacs_version":"2023.5"}
Tools that light up¶
run_molecular_dynamics, async MD (poll job status viaget_job_status)generate_dynamics, same, higher-level wrapper with defaults
Async pattern¶
MD jobs are long-running (minutes to hours). The engine returns a job_id immediately; poll status:
curl -s http://localhost:8018/mcp/tools/get_job_status \
-H 'Authorization: Bearer x' \
-H 'Content-Type: application/json' \
-d '{"arguments":{"job_id":"<the-id-you-got-back>"}}'
Or set email in the original call to get notified on completion (requires Resend API key via env; see below).
Env vars¶
| Var | Default | Purpose |
|---|---|---|
PORT |
8024 |
HTTP listen port |
API_KEY |
(required) | Key the engine must send; the service refuses jobs without it |
REDIS_URL |
redis://localhost:6379 |
Job status store (get_job_status reads it) |
AUTODOCK_GPU_URL |
(unset) | autodock-gpu endpoint. Protein-ligand runs dock the ligand first and start MD from the top pose; unset, the ligand is centred on the co-crystallized ligand's site (result field ligand_placement) |
MDRUN_GPU_RETRIES |
2 |
Retries of a failed GPU mdrun stage on the GPU |
MDRUN_CPU_FALLBACK |
1 |
After those, rerun the stage once on the CPU (result field mdrun_retries); 0 fails the job |
MAX_CONCURRENT |
1 |
Simulations per GPU |
RESULTS_DIR |
/results |
Where trajectories land |
RESEND_API_KEY |
(unset) | Email notifications on job completion |
HMR_HYDROGEN_MASS_DA |
3.0 |
HMR hydrogen mass (3 Da → 4 fs timestep) |
Speed + cost¶
- 10 ns simulation on dasatinib•ABL kinase (~55K atoms): ~18 minutes end-to-end (solvate + parameterize + minimize + equilibrate + 10 ns) on L40S. Sustained rate >1 µs/day.
- Cheapest cloud spot: g5.xlarge (A10G) at $0.30/hr spot; usable for short runs and hackathon-scale exploration.
- For multi-µs production simulations, prefer A100 40GB or H100.