Skip to content

Enable spin calculations #121

Open
keceli wants to merge 2 commits into
devfrom
dev_spin
Open

Enable spin calculations #121
keceli wants to merge 2 commits into
devfrom
dev_spin

Conversation

@keceli

@keceli keceli commented May 5, 2026

Copy link
Copy Markdown
Contributor

This PR aims to verify that spin input is correctly used by the ASE calculators

keceli and others added 2 commits May 4, 2026 23:16
IdealGasThermo previously hardcoded spin=0 regardless of the calculator's
spin state, silently ignoring user-configured multiplicity (e.g. UMA's
spin field on FAIRChemCalc). Each calculator schema also exposed spin
inconsistently or not at all.

- FAIRChemCalc: rename "spin" -> "multiplicity" (semantics were already
  multiplicity, just misnamed). "spin=" is still accepted as a deprecated
  alias via a model_validator. atoms.info["spin"] is still emitted because
  UMA reads it from there.
- TBLiteCalc, OrcaCalc: already had "multiplicity"; add get_multiplicity().
- NWChemCalc: add "multiplicity" and "charge", injected into the theory
  block (dft/mp2/ccsd/tce/tddft) as "mult"/"charge".
- Psi4Calc: add "multiplicity" and "charge", passed through to ASE Psi4.
- ase_tools and mcp_tools thermo blocks: derive S = (M-1)/2 from
  calc_model.get_multiplicity() (defaults to 1 = singlet) and pass to
  IdealGasThermo. parsl_tools is MACE-only, so spin=0 stays.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- tool_call_eval.py imported from chemgraph.models.ase_input, which was
  moved to chemgraph.schemas.ase_input in an earlier refactor.
- Add testpaths = ["tests"] so pytest no longer collects the legacy
  scripts/evaluations/.../test_single_eval.py, which opens a
  cwd-relative JSON file at module import time and fails collection.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant