Examples¶
Examples assume CSPilot is installed and .env.cspilot is configured for any
external programs being used.
Inspect XYZ¶
LangGraph equivalent:
If examples/water.xyz is not present, use tests/examples/input.xyz.
Molecule Name to XYZ¶
Direct agent:
cspilot agent "Create an XYZ file for water at runs/water_agent/water.xyz" \
--workdir runs/water_agent --agent-profile chem
Python deterministic call:
python -c "from cspilot.tools.mol_tools import molecule_name_to_xyz; print(molecule_name_to_xyz('water', 'runs/water.xyz'))"
xTB Optimization¶
ORCA Single Point¶
xTB to ORCA¶
cspilot workflow xtb-orca-sp tests/examples/input.xyz \
--charge 0 --mult 1 --method r2scan-3c --basis def2-SVP
Frequency workflow:
cspilot workflow xtb-orca-freq tests/examples/input.xyz \
--charge 0 --mult 1 --method r2scan-3c --basis def2-SVP
stk Build and xTB¶
Graph request:
cspilot graph-run "use stk to build benzene from SMILES c1ccccc1 and optimize with xTB" \
--workdir runs/stk_benzene
stk to xTB to ORCA¶
cspilot graph-run "use stk to build benzene from SMILES c1ccccc1 then run xTB and ORCA single point" \
--workdir runs/stk_orca
This is a planned/executed agent workflow path, not a fixed deterministic
workflow subcommand.
AGAPI Materials Query¶
cspilot graph-run "Find all Al2O3 materials" \
--profile auto --agent-mode multi --html --workdir runs/al2o3
Result JSON Property Extraction¶
cspilot run "extract Gibbs free energy from the latest result JSON in runs/water" \
--workdir runs/query --profile analysis