📄 Paper
MDGYM is a benchmark for evaluating AI agents on molecular dynamics (MD) simulation tasks. Each task gives an agent a natural-language problem description — a system to build, a set of simulation parameters, and a physical property to compute — and asks it to produce a numeric result that is checked against a held-out ground truth.
Tasks are organized by simulation engine:
| Engine | Tasks |
|---|---|
| GROMACS | 100 |
| LAMMPS | 99 |
| Total | 199 |
| Rank | Model | Harness | Easy | Medium | Hard | Overall |
|---|---|---|---|---|---|---|
| 1 | Claude Opus 4.8 | OpenHands | 68.4% | 34.5% | 24.6% | 52.3% |
| 2 | DeepSeek-V4 Pro | OpenHands | 43.9% | 20.0% | 8.8% | 24.2% |
| 3 | GPT-OSS 20B | OpenHands | 0% | 0% | 0% | 0% |
| 4 | Qwen3-Coder | OpenHands | 2% | 0% | 0% | 0% |
Solve a single problem:
python main.py '{"id":"npt","problem_description":"NPT ensemble of Al at 300K","metrics":["temperature","pressure"],"ground_truth":{"temperature":"300","pressure":"1"}}' \
--agent claude_code --engine lammpsRun a full task set (batch mode):
python main.py --input-dir data/GROMACS --agent claude_code --engine gromacs
python main.py --input-dir data/LAMMPS --agent claude_code --engine lammpsUseful flags: --agent {claude_code,codex,gemini,openhands}, --engine {lammps,gromacs},
--session-id (resumable batch runs), --timeout, --inter-problem-delay,
--script-dir (post-processing mode against pre-run simulation files), --log-level.
Run python main.py --help for the full reference.
Each problem's output — generated scripts, logs, final_answer.json, and
trajectory_log.json — is written to working_directory/<problem_id>/ in
single-problem mode, or working_directory/<session_id>/<problem_id>/ in batch
mode, alongside a results.csv summary of scores per problem for the session.
Agents live in md_simulation_interface/agents/ and implement BaseAgent
(agents/base_agent.py).
- Add a value to the
AgentTypeenum inagents/base_agent.py. - Create
agents/my_agent.pywith a class that subclassesBaseAgentand implementsget_agent_type(),execute(prompt, working_dir, timeout, engine), andrun_command(command, working_dir, log_file, timeout). Seeagents/claude_agent.pyfor a minimal reference implementation. - Register the class in
_agent_registryinagents/factory.py(or callAgentFactory.register_agent(...)at runtime). - Add the new agent name to the
--agentchoices inmain.py, and, if it needs a CLI path or default timeout, an entry underagentsinconfig.py'sDEFAULT_CONFIG.
Validators check an agent's final_answer.json against a task's ground_truth
and return a ValidationResult (pass/fail plus a 0–1 score). They live in
md_simulation_interface/validators/ and implement BaseValidator
(validators/base_validator.py).
- Create
validators/my_validator.pywith a class that subclassesBaseValidatorand implementsget_engine()andvalidate(output, working_dir, ground_truth). Reuse the base class's_validate_ground_truth()(numeric comparison within a relative tolerance) and_calculate_score()helpers where the default behavior applies — seevalidators/gromacs_validator.pyorvalidators/lammps_validator.pyfor reference. - Register the class in
_validator_registryinvalidators/factory.py(or callValidatorFactory.register_validator(...)at runtime). - If the validator targets a new simulation engine, add it to the
MDEngineenum inmodels/problem.pyand to the--enginechoices inmain.py.
Run your model/harness on the dataset and write us at vinay.kumar@scai.iitd.ac.in, krishan@iitd.ac.in and mausam@iitd.ac.in. We will evaluate your submission against the held-out ground truth values.
If you use MDGYM in your work, please cite:
Kumar, Vinay, Satyendra Rajput, and N. M. Krishnan. "MDGYM: Benchmarking AI Agents on
Molecular Simulations." ArXiv, (2026). Accessed September 10, 2026.
https://arxiv.org/abs/2605.08941.
