Skip to content

Accept spin_multiplicity for the spin multiplicity - #2255

Open
frostedoyster wants to merge 2 commits into
mainfrom
spin-multiplicity
Open

frostedoyster wants to merge 2 commits into
mainfrom
spin-multiplicity

Conversation

@frostedoyster

Copy link
Copy Markdown
Contributor

Currently, spin is the spin multiplicity 2S+1, not S, so the name is ambiguous. This PR adds spin_multiplicity as the preferred name, and spin is treated as a shorthand. Solves #2242

Throughout fairchem, spin is the spin multiplicity (2S+1), not S, but the name keeps being misread. Add spin_multiplicity as the preferred, unambiguous name while keeping spin working everywhere:

- AtomicData.from_ase/to_ase and validate_uma_atoms_data accept atoms.info[spin_multiplicity] (spin remains a legacy alias); conflicting values raise. Validation warns for omol with multiplicity 0 and for nonzero charge/spin on non-omol tasks.
- AllScAIP delegates to the shared validator instead of duplicating it.
- LAMMPS accepts spin_multiplicity: in lammps_fc_config.yaml (example omol config now 1) and spin_multiplicity= in its Python API; spin is a deprecated alias.
- Docs use spin multiplicity (2S+1) consistently: fix FAIRChemCalculator defaults (omol -> 1) and range (1-100 for omol; 0 is the null token for non-omol tasks), and update quickstart, UMA guide, tutorial, FAQ, MD, batch inference and LAMMPS docs (llms regenerated).

Existing scripts, datasets and checkpoints keep working: the internal AtomicData.spin field is unchanged.
Replace 'alias' with 'shorthand' in the spin_multiplicity wording (code, docs, tests; llms regenerated).
@meta-cla meta-cla Bot added the cla signed label Oct 24, 2026
@frostedoyster frostedoyster added documentation Improvements or additions to documentation enhancement New feature or request minor Minor version release labels Oct 24, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla signed documentation Improvements or additions to documentation enhancement New feature or request minor Minor version release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant