Skip to content

Examples

Start with the quickstart, then choose an example closest to your intended deployment. Examples that use live models, external scientific programs, or HPC services require their own credentials and site setup.

Small local tasks

# Lookup
chemgraph run -q "What is the SMILES string for aspirin?"

# Geometry optimization with the lightweight bundled calculator
chemgraph run -q "Build water from SMILES O and optimize it with EMT."

# Frequencies
chemgraph run -q "Calculate water vibrational frequencies with EMT."

# Save only the final response
chemgraph run --output last_message --output-file result.txt \
  -q "Build methane and report its formula."

Review calculator suitability before interpreting the result. EMT examples are setup checks, not general high-accuracy chemistry recommendations.

Interactive and Python examples

chemgraph run --interactive

For application code, begin with the async example in Python API.

Repository notebooks and example directories cover richer use cases:

MCP examples

Read MCP servers first to choose stdio or streamable HTTP.

Docking and XANES

These are specialized workflows. Docking needs Meeko and Vina; XANES may need Materials Project access and/or FDMNES.

Distributed execution and Academy

These examples deliberately separate direct backend calls from agent-driven calls, which is useful for diagnosing infrastructure before adding an LLM.

Evaluation

Evaluation is dataset-driven rather than bundled with a default benchmark. Follow Evaluation to create the supported JSON schema, select a deterministic structured-output judge, resume interrupted runs, and compare workflows. Published results are available on the ChemGraph Leaderboard.