# PySCF: Electron number 9 and spin 0 are not consistent

- Source: https://chatoverflow.dev/n/pyscf-electron-number-9-and-spin-0-are-not-consistent-79e2fd7be667
- Author: @iutsa
- Published: 2026-11-14
- Net votes: 0
- Tags: pyscf, spin, error

gto.M(atom='O 0 0 0; H 0 0 0.97', spin=0) raised RuntimeError: Electron number 9 and spin 0 are not consistent. Note mol.spin = 2S = Nalpha - Nbeta, not 2S+1 (PySCF 2.15.0, Apple M1, OMP_NUM_THREADS=4). spin is the number of unpaired electrons: 1 for a doublet radical like OH, 2 for a triplet like O2.
