chemgraph-agent-guide
ChemGraph Agent Guide
Overview
ChemGraph is an agentic framework from Argonne National Lab that automates molecular simulation workflows using LLMs. Built on LangGraph and ASE (Atomic Simulation Environment), it enables natural language control of computational chemistry tasks — structure generation, geometry optimization, thermochemistry, and more. Supports DFT (NWChem, ORCA), semi-empirical (xTB), and ML potentials (MACE).
Installation
pip install chemgraph
# Or via Docker
docker pull ghcr.io/argonne-lcf/chemgraph:latest
Core Capabilities
Natural Language Chemistry
from chemgraph import ChemGraphAgent
agent = ChemGraphAgent(
llm_provider="anthropic",
calculator="xtb", # fast semi-empirical
)
# Natural language molecular tasks
result = agent.run("Optimize the geometry of caffeine and calculate its vibrational frequencies")
print(result.energy)
print(result.frequencies)
# Thermochemistry
result = agent.run("Calculate the enthalpy of formation of ethanol at 298K")
print(f"ΔHf = {result.enthalpy:.2f} kJ/mol")
Supported Calculators
| Calculator | Type | Speed | Accuracy |
|---|---|---|---|
| xTB (TBLite) | Semi-empirical | Fast | Moderate |
| MACE | ML potential | Fast | Good |
| NWChem | Ab initio DFT | Slow | High |
| ORCA | Ab initio/DFT | Slow | High |
| UMA | Universal ML | Fast | Good |
Workflow Automation
# Multi-step workflow
workflow = agent.create_workflow([
"Generate 3D structure of aspirin from SMILES",
"Optimize geometry with DFT/B3LYP/6-31G*",
"Calculate IR spectrum",
"Identify key functional group vibrations",
])
results = workflow.execute()
# Reaction pathway
pathway = agent.run(
"Find the transition state for the Diels-Alder reaction "
"between butadiene and ethylene"
)
Integration with ASE
from ase.io import read
from chemgraph.calculators import get_calculator
# Use ChemGraph's calculator with ASE directly
atoms = read("molecule.xyz")
calc = get_calculator("xtb")
atoms.calc = calc
energy = atoms.get_potential_energy()
forces = atoms.get_forces()
Agent Architecture
ChemGraph uses LangGraph's state machine to orchestrate:
- Parser Agent — Interprets natural language into chemistry tasks
- Structure Agent — Generates/retrieves molecular structures (SMILES, PDB, CIF)
- Calculator Agent — Selects and runs appropriate simulation backend
- Analysis Agent — Processes results and generates reports
Use Cases
- High-throughput screening: Automated property calculation for molecular libraries
- Reaction discovery: Transition state finding and reaction pathway analysis
- Materials design: Optimize structures for target properties
- Education: Natural language interface for learning computational chemistry
Requirements
- Python 3.10+
- At least one calculator backend (xTB recommended for getting started)
- LLM API key (Anthropic, OpenAI, or local)
References
More from wentorai/research-plugins
academic-paper-summarizer
Summarize academic papers with structured extraction of key elements
40academic-translation-guide
Academic translation, post-editing, and Chinglish correction guide
30academic-writing-refiner
Checklist-driven academic English polishing and Chinglish correction
27academic-citation-manager
Manage academic citations across BibTeX, APA, MLA, and Chicago formats
26ai-writing-humanizer
Remove AI-generated patterns to produce natural, authentic academic writing
12abstract-writing-guide
Craft structured research abstracts that maximize clarity and journal acceptance
12