Skip to content

atomli.calculators.qc

Generated from the public Python surface of Atomli 0.1.18.

QC(xc='PBE', basis='def2-SVP', density_fitting=None, charge=None, unpaired=None, settings=None, skala_checkpoint=None, device='cpu', adapter=None, require_convergence=True, scf=None, kpts=None, auxiliary_basis=None, *, pseudopotential=None, smearing=None, convergence=None, maxiter=None, download: bool = True)

Section titled “QC(xc='PBE', basis='def2-SVP', density_fitting=None, charge=None, unpaired=None, settings=None, skala_checkpoint=None, device='cpu', adapter=None, require_convergence=True, scf=None, kpts=None, auxiliary_basis=None, *, pseudopotential=None, smearing=None, convergence=None, maxiter=None, download: bool = True)”

Construct the native QC calculator.

Device selection additionally uses Atomli’s shared resolver, so device= or adapter= accepts atomli.gpu.Adapter objects and QC inherits atomli.set_default_device(...) exactly like XTB/MLIP. This wrapper also adds automatic SKALA 1.1 checkpoint delivery. With xc="SKALA-1.1" and no skala_checkpoint, the pinned checkpoint is fetched once from the model release and cached locally.

  • download: Whether a missing checkpoint may be fetched. Pass False to require a cache hit. Ignored unless the checkpoint is being resolved, so it never affects a non-SKALA functional or an explicitly supplied skala_checkpoint.

Native molecular and three-dimensionally periodic DFT calculator.

QC follows the normal ASE calculator protocol and accepts both atomli Atoms and ASE-provided Atoms objects. With settings=None it constructs a molecular calculation. Select periodic calculation explicitly with settings={"periodic": True}; periodic mode requires a cell and PBC enabled on all three axes.

xc : str, default “PBE” Exchange-correlation functional. PBE, r2SCAN and SKALA-1.1 run on molecules and periodic cells; wB97X-V, wB97M-V, PBEsol and revPBE are molecular (PBEsol and revPBE on the CPU only); LDA,VWN is periodic with its matched GTH-PADE pseudopotential. basis : str, default “def2-SVP” Molecular orbital basis. In periodic mode set settings["basis"] instead and leave this top-level argument at its default. density_fitting : {“none”, “default”}, optional Molecular density-fitting selection. Molecular calculations default to "default" (RI-J density fitting). B97-V hybrids also use RI-K exchange. Pass "none" for conventional Coulomb builds. Periodic mode requires "none" and defaults to it. pseudopotential : str or None Molecular GTH pseudopotential. For a molecular gth-* basis, None resolves to "gth-pade" for LDA/VWN and "gth-pbe" for PBE, r2SCAN, and SKALA. It is molecular-only; periodic pseudopotentials belong in settings["pseudopotential"]. charge : float or None Optional total-charge override. It must be finite and integer-valued when the native QC calculation is built. unpaired : int or None Number of unpaired electrons. The electron count and this number must have the same parity, so an odd-electron system needs an odd value: a radical such as CH3 (9 electrons) is QC(..., unpaired=1). Leaving it at the default None on an odd-electron system raises electron/spin parity mismatch: 9 electrons and 0 unpaired electrons; pass unpaired=1 to fix it. Per-site moments are declared separately; see “Magnetic structure” below. skala_checkpoint : str or None Path to the pinned SKALA 1.1 model file (skala-1.1.fun). Required with, and only valid for, xc="SKALA-1.1". Both molecular and periodic SKALA use it. device : {“cpu”, “gpu”}, optional Exchange-correlation compute device. "cpu" is the default. "gpu" is available only on the QC routes implemented by the native Gpu runtime; unsupported combinations fail closed. "wgpu" remains accepted as a compatibility alias. adapter : atomli.gpu.Adapter, int, str, or None Optional physical GPU selected from the process-global atomli.gpu inventory. PCI selectors are preferred on multi-GPU hosts. It is valid only with device="gpu"/"wgpu"; supported periodic SKALA GPU routes bind their Atomli QC Gpu context to this adapter, while unsupported QC GPU routes continue to raise rather than ignoring the selector. require_convergence : bool, default True Whether an SCF that ran out of cycles without meeting its thresholds raises instead of returning its energy. The default refuses it: that energy is a point on an oscillating trajectory, not an observable, and a returned float carries no marker distinguishing it from a correct one. Pass False to take the last iterate deliberately; the call then warns, and calc.converged / results["converged"] report False. The opt-out covers the energy only. Forces and stress are differentiated from the converged state itself, so they are refused on an unconverged SCF either way. Convergence is readable on any calculator: calc.converged (also results["converged"]) and calc.scf_iterations (also results["scf_iterations"]). calc.converged is None until something has been calculated, which is distinct from False. A converged SCF is also necessary but not sufficient: a periodic run can converge cleanly on an under-resolved mesh and still settle on the wrong physical state, so converged=True is not a licence to skip convergence testing against mesh, basis and k-point sampling. scf : Scf, dict, str, or None SCF numerical controls, molecular and periodic alike: an atomli.calculators.qc.Scf, an equivalent dict, or a preset name ("default", "robust"). Scf.fields() lists every field with its documentation, and an unknown key raises naming them. None keeps the engine default. The resolved block reads back from calc.parameters["scf"]. kpts : tuple, dict, KMesh, array, or None ASE-conventional k-point sampling. kpts=(2, 2, 2) is a gamma-centered mesh, kpts={"size": (2, 2, 2), "gamma": False} the shifted Monkhorst-Pack one, and kpts=KMesh((4, 4, 4), symmetry="time_reversal") the full mesh identity. kpts={"density": d} targets d k-points per inverse angstrom along each reciprocal vector. Passing kpts implies periodic mode. An N-by-3 array specifies fractional reciprocal coordinates with equal weights, resolved against the current cell. This keyword is an alias for settings["kpoints"] / settings["kpoint_density"]: exactly one spelling may declare the sampling, and declaring both raises naming the two. Unsupported ASE forms (even, unequal point weights) are rejected with an error naming what is supported, and KMesh.fields() lists every mesh field with its documentation. auxiliary_basis : str or None Explicit RI fitting basis for the molecular density-fitted Coulomb build, e.g. "def2-universal-jfit". The default None lets the engine choose the auxiliary set matching the functional. It is molecular-only, and it is the fitting set itself: passing it with density_fitting="none" or with periodic settings raises, because neither of those runs a fitted Coulomb build. It reads back from calc.parameters["auxiliary_basis"]. smearing : dict or None GPAW-conventional occupation broadening, smearing={"name": "fermi-dirac", "width": 0.1}, with the width in eV and "gaussian" the other accepted name. It is sugar for settings["smearing"], whose sigma is in Hartree: the width divides by 27.211386245988 on the way in, and the resolved block reads back from calc.parameters["settings"]["smearing"]. Exactly one spelling may declare the broadening, and declaring both raises naming the two. Broadening needs a periodic mode to act on, selected by settings["periodic"] or by kpts; without one this raises. The native key’s chemical_potential and fixed_spin have no ASE spelling and stay in settings["smearing"]. convergence : dict or None ASE-conventional SCF thresholds, convergence={"energy": 1e-6} with the tolerance in eV. It is sugar for scf["energy_tolerance"], which is in Hartree, and any other key raises naming energy as the one this engine’s SCF converges on. Exactly one spelling may declare the tolerance: an scf dict naming energy_tolerance, or an Scf instance or preset name (which specifies the whole block), conflicts with it and raises naming both. maxiter : int or None ASE-conventional SCF cycle limit, sugar for scf["max_cycles"], and subject to the same one-spelling rule as convergence. It must be at least 1; scf={"max_cycles": 0} is the spelling for evaluating the initial density without an SCF. Disjoint scf keys compose: maxiter=99, scf={"level_shift": 0.25} sets both. settings : dict or None Periodic settings schema:

  • periodic: required boolean selector. True enables periodic mode.
  • basis: orbital basis, default "gth-dzvp-molopt-sr".
  • pseudopotential: default "gth-pbe", or "gth-pade" for LDA/VWN.
  • energy_cutoff: FFT-grid cutoff in Hartree, default 100.0.
  • mesh: optional positive [nx, ny, nz] FFT mesh override.
  • kpoint_density: minimum kpt * length product in angstrom, default 15.0. Each automatic dimension is max(1, ceil(kpoint_density / lattice_length_angstrom)).
  • kpoints: optional explicit mesh. Either positive [kx, ky, kz] dimensions (gamma-centered) or a mesh mapping / KMesh carrying size, centering, symmetry, wrap_around and ao_symmetry. It is echoed as the full mesh identity either way.
  • precision: integral and grid target, default 1e-8.
  • derivative_mode: "analytical" (default) or "automatic" (an alias of analytical). Forces and stress are always analytical; there is no finite-difference route.
  • smearing: optional occupation broadening, as a nested mapping. See “Occupation broadening” below.
  • dft_u: optional Hubbard +U corrections. See “DFT+U” below.

mesh overrides the mesh derived from energy_cutoff; kpoints overrides the sampling derived from kpoint_density. Unknown keys, invalid dimensions, non-positive numerical settings, non-3D PBC, and missing or degenerate cells raise errors rather than selecting fallback values. The resolved values read back from calc.parameters["settings"].

Atoms with pbc=True need these settings; without them the calculation raises periodic atoms require explicit QcPeriodicSettings. The fix is to pass settings={"periodic": True, ...}, naming at least a periodic basis and pseudopotential.

Charge and spin resolve independently for native and ASE atoms. Calculator arguments take precedence over explicit native Atoms constructor arguments, then atoms.info entries, then initial-array sums. Omitted native arguments permit inference. Explicit zero values remain declarations.

Per-site initial magnetic moments follow the ASE convention: atoms.set_initial_magnetic_moments([...]) (or initial_magmoms in an extxyz file) declares the starting magnetic state, and the calculator reads it automatically. The declared moments seed the unrestricted SCF’s initial density with the matching per-site alpha/beta split — the only way to reach a ferrimagnetic or antiferromagnetic solution — and any nonzero declaration selects spin-polarized treatment even at zero net moment. When both unpaired and per-site moments are given, the summed moments must equal the unpaired count or the calculation raises an error naming both numbers; when only moments are given, the net spin is derived from their sum, which must then be an integer.

In a k-point-sampled unrestricted cell the declared per-cell moment is enforced at every kpoints mesh. This deliberately diverges from PySCF through 2.14, whose KUHF.nelec leaves cell.spin unscaled and so holds only unpaired / nkpts per cell.

settings["smearing"] is a nested mapping broadening the occupations. A metal has no gap for integer occupations to fill against, so its SCF oscillates between degenerate states and never converges; broadening is what makes such a cell solvable. It is absent by default, because integer occupations are the correct description of an insulator.

atoms.calc = QC(xc="PBE", settings={
"periodic": True,
"basis": "gth-szv-molopt-sr",
"pseudopotential": "gth-pbe",
"mesh": [18, 18, 18],
"kpoints": [1, 1, 1],
"smearing": {"sigma": 0.01, "method": "fermi"},
})

sigma is the width in Hartree and is required: it must be positive and finite. method is "fermi" (default) or "gaussian". chemical_potential fixes the Hartree chemical potential instead of optimizing it against the electron count each cycle. fixed_spin=True holds the alpha and beta electron counts apart, keeping the requested moment rather than letting one common chemical potential relax it. With smearing on, the reported energy is the Mermin free energy E - sigma*S, the quantity the returned forces and stress differentiate. The smearing keyword above is the ASE-conventional spelling of the same block.

settings["dft_u"] adds Hubbard +U corrections, named the way the literature quotes them: element, then shell, then U in eV.

atoms.calc = QC(xc="PBE", settings={
"periodic": True,
"basis": "gth-dzvp-molopt-sr",
"pseudopotential": "gth-pbe",
"dft_u": {"Fe": {"3d": 4.0}},
})

Every iron site in the cell gets the same 4 eV correction on its 3d shell. Several elements and several shells per element are allowed: {"Ni": {"3d": 6.0}, "O": {"2p": 1.0}}. The mapping echoes back from calc.parameters["settings"]["dft_u"] exactly as written, and an atomli.calculators.qc.DftU instance is the typed spelling of the same mapping, accepted wherever the dict is.

The projectors are built against PySCF’s MINAO reference basis, not the periodic basis the SCF runs in, so the shell name has to exist in MINAO for that element. A shell that selects nothing there is refused at energy time, naming the pattern it tried (DFT+U selection "Fe 3q" matched no AOs in the "MINAO" reference) rather than quietly running plain DFT and reporting it as +U. Construction cannot check this: it takes the cell’s own elements to know which AOs exist.

dft_u runs on MultiGrid for spin-polarized (KUKS+U) cells. Atomli QC rejects restricted MultiGrid DFT+U.

Energy and free energy are in eV. Forces are in eV/angstrom. Periodic stress is in eV/angstrom**3 and defaults to ASE Voigt order [xx, yy, zz, yz, xz, xy]; get_stress(voigt=False) returns a symmetric 3 by 3 tensor. Molecular QC does not advertise stress and raises ASE’s PropertyNotImplementedError when stress is requested.

The native backend and results are retained across ASE optimizer, molecular dynamics, and repeated property calls. Exact state comparison includes atomic numbers, positions, cell, PBC, charge, and unpaired-electron overrides. An unchanged state reuses available results; a changed state invalidates them. reset() also discards the retained backend.

Molecular ASE geometry:

from ase import Atoms
from atomli.calculators.qc import QC
atoms = Atoms("H2", positions=[[0, 0, 0], [0, 0, 0.74]])
atoms.calc = QC(xc="PBE", basis="def2-SVP")
energy = atoms.get_potential_energy()
forces = atoms.get_forces()

Periodic ASE geometry with automatic kpt * length >= 15 sampling:

from ase.build import bulk
from atomli.calculators.qc import QC
atoms = bulk("Si", "diamond", a=5.43)
atoms.calc = QC(settings={"periodic": True})
stress = atoms.get_stress()
stress_tensor = atoms.calc.get_stress(atoms, voigt=False)

analyze_fields(self, /, kinds, *, shape=None, origin=None, axes=None, margin=2.0, spin=0, band=0, density_floor=1e-12, kinetic_density=None, charges=False, atoms=None)

Section titled “analyze_fields(self, /, kinds, *, shape=None, origin=None, axes=None, margin=2.0, spin=0, band=0, density_floor=1e-12, kinetic_density=None, charges=False, atoms=None)”

Evaluate related fields from one retained state and one density grid. Kinds include electron_density, spin_density, orbital_amplitude, electrostatic_potential, gradient_norm, laplacian, rdg, sign_lambda2_rho, and elf. Analytic producers also supply kinetic_energy_density, gradient_x, gradient_y, gradient_z, hessian_xx, hessian_xy, hessian_xz, hessian_yy, hessian_yz, and hessian_zz. rdg is the reduced density gradient. elf is the electron localization function. sign_lambda2_rho is density times the sign of the middle Hessian eigenvalue. density_floor uses electron/angstrom^3; kinetic_density is a flat C-order array in electron/angstrom^5. It overrides the producer’s positive kinetic density.

analyze_fields_at_points(self, /, kinds, points, *, density_floor=1e-12, atoms=None)

Section titled “analyze_fields_at_points(self, /, kinds, points, *, density_floor=1e-12, atoms=None)”

Evaluate analytic density jets at coordinates in angstrom.

begin_independent_evaluations(self, /, atoms=None)

Section titled “begin_independent_evaluations(self, /, atoms=None)”

Save one electronic reference for independent geometry evaluations.

calculate(self, /, atoms, properties=None, system_changes=None)

Section titled “calculate(self, /, atoms, properties=None, system_changes=None)”

Calculate requested properties for an ASE or atomli Atoms object.

properties defaults to ["energy"]. system_changes is accepted for ASE protocol compatibility; invalidation uses an exact native state key that includes geometry, cell, PBC, and electronic overrides.

calculation_required(self, /, atoms, properties)

Section titled “calculation_required(self, /, atoms, properties)”

Report whether any requested property needs calculation.

The comparison uses the exact native state rather than ASE’s caller-supplied system_changes list.

Release the independent electronic reference.

estimate_memory(self, /, atoms=None, properties=None)

Section titled “estimate_memory(self, /, atoms=None, properties=None)”

Estimate peak host RAM and device VRAM before running a calculation.

flip_atom_spins(self, /, atom_indices, atoms=None)

Section titled “flip_atom_spins(self, /, atom_indices, atoms=None)”

Flip local spin polarization on atom_indices in-place in the retained state to seed a broken-symmetry (BS) calculation.

Net atomic charges from the retained state, without a real-space grid.

get_basis_diagnostics(self, /, atoms=None)

Section titled “get_basis_diagnostics(self, /, atoms=None)”

Inspect periodic basis conditioning on the CPU without running SCF.

Actual retained overlap metadata. This method does not run SCF.

Analytical capabilities for this geometry; never performs SCF.

get_density(self, /, points, *, spin_density=False, atoms=None)

Section titled “get_density(self, /, points, *, spin_density=False, atoms=None)”

Evaluate electron or spin density at coordinates in angstrom.

get_dfpt_force_constants(self, /, supercell, atoms=None)

Section titled “get_dfpt_force_constants(self, /, supercell, atoms=None)”

Image-resolved force constants in eV/angstrom**2 from primitive-cell monochromatic DFPT. Shape: (n_images, n_atoms, 3, n_atoms, 3).

Molecular dipole in electron*angstrom, about the laboratory origin.

get_dos(self, /, width=0.1, window=None, npts=401, atoms=None)

Section titled “get_dos(self, /, width=0.1, window=None, npts=401, atoms=None)”

Gaussian DOS from retained orbitals. Energies and window are relative to the Fermi level, in eV, matching ASE DOS.

get_eigenvalues(self, /, kpt=0, spin=0, atoms=None)

Section titled “get_eigenvalues(self, /, kpt=0, spin=0, atoms=None)”

Orbital eigenvalues in eV for one spin and retained SCF k-point.

get_electronic_state(self, /, atoms=None, *, matrices=True)

Section titled “get_electronic_state(self, /, atoms=None, *, matrices=True)”

Independent arrays with explicit spin/k/band axes; energies in eV.

get_energy_components(self, /, atoms=None)

Section titled “get_energy_components(self, /, atoms=None)”

Named total, free, electronic, and nuclear energies in eV.

Chemical potential or molecular frontier reference, in eV.

get_field(self, /, kind='electron_density', *, shape=None, origin=None, axes=None, margin=2.0, spin=0, band=0, atoms=None)

Section titled “get_field(self, /, kind='electron_density', *, shape=None, origin=None, axes=None, margin=2.0, spin=0, band=0, atoms=None)”

Evaluate a field on a grid. Coordinates use angstrom.

get_field_at_points(self, /, points, kind='electron_density', *, spin=0, band=0, atoms=None)

Section titled “get_field_at_points(self, /, points, kind='electron_density', *, spin=0, band=0, atoms=None)”

Evaluate electron_density, spin_density, electrostatic_potential, orbital_amplitude, or kinetic_energy_density at coordinates in angstrom.

get_forces(self, /, atoms=None, apply_constraint=None)

Section titled “get_forces(self, /, atoms=None, apply_constraint=None)”

Return forces in eV/angstrom as a copied (n_atoms, 3) array.

When atoms is omitted, the last retained atomic state is used. apply_constraint is accepted for ASE protocol compatibility; ASE Atoms applies positional constraints around calculator calls.

Return the analytical Hessian in eV/angstrom**2.

The array is ASE-shaped (n_atoms, 3, n_atoms, 3). When atoms is omitted, the last retained atomic state is used.

Configurations without analytical second derivatives raise an unsupported-operation error.

get_hessian_vector(self, /, direction, atoms=None)

Section titled “get_hessian_vector(self, /, direction, atoms=None)”

Apply the analytical Hessian to a dimensionless (natoms, 3) direction. Returns eV/angstrom**2. No finite-difference fallback is permitted.

Atom-resolved physical magnetic moments (n_alpha - n_beta) from the retained state.

get_occupation_numbers(self, /, kpt=0, spin=0, atoms=None)

Section titled “get_occupation_numbers(self, /, kpt=0, spin=0, atoms=None)”

Copied overlap matrices with axes (kpoint, ao, ao), dimensionless.

get_pdos(self, /, grouping='atom', width=0.1, window=None, npts=401, atoms=None)

Section titled “get_pdos(self, /, grouping='atom', width=0.1, window=None, npts=401, atoms=None)”

AO Mulliken-projected DOS grouped by atom or shell.

get_potential_energy(self, /, atoms=None, force_consistent=None)

Section titled “get_potential_energy(self, /, atoms=None, force_consistent=None)”

Return potential energy in eV.

When atoms is omitted, the last retained atomic state is used. force_consistent=True requests the ASE free_energy result.

get_property(self, /, name, atoms=None, allow_calculation=None)

Section titled “get_property(self, /, name, atoms=None, allow_calculation=None)”

Return one named property, calculating it when necessary.

allow_calculation=False returns None when the current state has no cached value. Unsupported names raise ASE’s PropertyNotImplementedError when ASE is installed.

Scalar convergence evidence. The orbital residual uses eV and the backend’s normalization; it is not an atomic force.

get_spin_contamination(self, /, atoms=None)

Section titled “get_spin_contamination(self, /, atoms=None)”

Spin-expectation and broken-symmetry diagnostics (<S^2>, exact S(S+1), spin_contamination, nalpha, nbeta, sz).

get_stress(self, /, atoms=None, apply_constraint=None, voigt=None)

Section titled “get_stress(self, /, atoms=None, apply_constraint=None, voigt=None)”

Return stress in eV/angstrom**3.

The default is ASE Voigt order [xx, yy, zz, yz, xz, xy]. Pass voigt=False for a copied symmetric (3, 3) array. When atoms is omitted, the last retained atomic state is used. apply_constraint is accepted for ASE protocol compatibility; ASE Atoms applies cell constraints around calculator calls.

get_wavefunction(self, /, format='hdf5', atoms=None)

Section titled “get_wavefunction(self, /, format='hdf5', atoms=None)”

Wavefunction file bytes. HDF5 supports molecules and PBC; Molden and WFN require a supported molecular orbital state.

Explicit SCF entry point, returning energy in eV. dm0 uses real AO density blocks, with one restricted or two unrestricted spin channels.

Copied AO density with axes (spin, kpoint, ao, ao). Restricted density is spin summed; CC uses its correlated analysis density.

read_checkpoint(self, /, path, atoms=None)

Section titled “read_checkpoint(self, /, path, atoms=None)”

Load a compatible electronic seed and return its atoms.

read_wavefunction(self, /, path, atoms=None)

Section titled “read_wavefunction(self, /, path, atoms=None)”

Import a compatible HDF5 SCF density as an initial guess.

Clear cached results, retained atoms, and the native backend.

restore_independent_evaluation_state(self, /)

Section titled “restore_independent_evaluation_state(self, /)”

Restore the common seed and invalidate observable caches.

Transactionally apply settings and invalidate cached electronic results. SCF/periodic dictionaries merge with the existing resolved controls.

Return normalized constructor parameters as a new dictionary.

Return a new calculator with nested SCF/periodic overrides; no state is shared.

write_checkpoint(self, /, path, atoms=None)

Section titled “write_checkpoint(self, /, path, atoms=None)”

Save an atomic native checkpoint with its model identity.

write_cube(self, /, path=..., kind='electron_density', *, shape=None, origin=None, axes=None, margin=2.0, spin=0, band=0, atoms=None)

Section titled “write_cube(self, /, path=..., kind='electron_density', *, shape=None, origin=None, axes=None, margin=2.0, spin=0, band=0, atoms=None)”

Write a standard Cube file directly from the native state.

write_field(self, /, path=..., kind='electron_density', *, shape=None, origin=None, axes=None, margin=2.0, spin=0, band=0, atoms=None)

Section titled “write_field(self, /, path=..., kind='electron_density', *, shape=None, origin=None, axes=None, margin=2.0, spin=0, band=0, atoms=None)”

Write Cube by default. An explicit .h5 path selects a standalone HDF5 field.

write_wavefunction(self, /, path=..., format='hdf5', atoms=None)

Section titled “write_wavefunction(self, /, path=..., format='hdf5', atoms=None)”

SCF numerical controls, molecular and periodic alike.

Keyword arguments name the engine’s own settings fields; an unknown key raises a message naming every valid field. Scf.fields() lists the fields with their documentation. Scf.default() and Scf.robust() are the named presets, also accepted wherever settings are taken as strings.

FieldDefaultRobustDescription
max_cycles50256Maximum SCF cycles; 0 evaluates the initial density only.
energy_tolerance2.72114e-082.72114e-07Absolute total-energy convergence threshold, eV.
density_tolerance1e-061e-06Density-matrix diagnostic threshold.
fock_damping0.00.2Linear Fock damping factor F*(1-d) + F_prev*d.
level_shift0.06.80285Virtual-space level shift, eV.
diis_start23First one-based cycle running the DIIS update.
diis_size88Fock/error pairs retained for DIIS; 0 disables it.
diis_damp0.00.0CDIIS storage damping, separate from pre-DIIS Fock damping.
initial_guess'minao''core_hamiltonian'Initial density guess: “minao” (default), “core_hamiltonian”, “atom_superposition”, or “zero_density”.
grid_schedule'single_grid''single_grid'Molecular quadrature schedule: “single_grid” (default) or “dual_grid”.
coulomb_workersNoneNoneCoulomb worker count override, or None for the backend default.
density_fitting_metric_regularizationNoneNoneRI-J auxiliary metric regularization as {“relative”: float, “absolute”: float}, or None for the backend default.
pyscf_nelec_compatFalseFalseReproduce PySCF<=2.14 KUHF electron counting (moment becomes spin/nkpts per cell).
pyscf_cycle_compatFalseFalseUse PySCF’s historical cycle convergence semantics; disables residual routing.
extrapolation'cdiis''cdiis'Fock extrapolator: “cdiis” (default) or “adiis_cdiis”.
routing_policy'auto''auto'Metallic residual routing: “auto” (default), “off”, or “force_kerker”.

The default preset.

(name, description) for every field, in declaration order.

The robust preset.

The settings as a plain dict in public units (SCF energies in eV).

Explicit periodic k-point mesh, with its centering and symmetry semantics.

The mesh dimensions alone do not identify a sampling: gamma-centered and shifted Monkhorst-Pack coordinates are different point sets for any even dimension. KMesh carries the whole identity, so kpts= and settings["kpoints"] state what was sampled instead of implying it.

QC(xc="PBE", kpts=KMesh((4, 4, 4), centering="monkhorst_pack"), settings=...)

size is positional; every other field is a keyword naming a serde field of the mesh struct, and an unknown one raises naming all of them. KMesh.fields() lists them with their documentation.

FieldDescription
sizeMesh dimensions [kx, ky, kz] along the reciprocal axes; each at least 1.
centeringBrillouin-zone centering: “gamma” (default, PySCF’s make_kpts convention) or “monkhorst_pack” (the shifted set, a different sampling for any even dimension).
symmetryIrreducible-wedge reduction: “none” (default), “time_reversal”, “space_group”, or “space_group_and_time_reversal”.
wrap_aroundWrap the mesh coordinates the way PySCF’s wrap_around does.
ao_symmetryUse PySCF’s AO-irrep block diagonalization for a symmetry-adapted SCF.

(name, description) for every field, in declaration order.

The mesh as a plain dict, exactly as the engine sees it.

Hubbard +U corrections, named the way the literature quotes them.

DftU({"Fe": {"3d": 4.0}}) corrects the 3d shell of every iron site by 4 eV. Each entry becomes a PySCF AO-label pattern ("Fe 3d") resolved against the MINAO reference cell, so the correction follows the element and shell rather than an AO index nobody can predict from a settings dict.

QC(xc="PBE", settings={..., "dft_u": DftU({"Fe": {"3d": 4.0}})})

The plain mapping is accepted anywhere this class is, so the typed spelling is for autocompletion and validation, never a requirement.

FieldDescription
<element> -> {<shell>: U_eV}Hubbard U selections; keys are element symbols, values map shells to U in eV.

(name, description) for the mapping’s shape.

The selections as a plain dict, exactly as the engine sees them.

MolecularBasis(atoms, basis='def2-SVP', *, auxiliary_basis=None)

Section titled “MolecularBasis(atoms, basis='def2-SVP', *, auxiliary_basis=None)”

Immutable molecular geometry and Gaussian basis, with analytical AO operators. Coordinates use angstrom, energy integrals use eV, overlap is dimensionless. AO values use angstrom**(-3/2); derivatives use one extra inverse angstrom per spatial derivative. No SCF or finite-difference calculation is performed.

Exact AO-to-MO Coulomb integrals for one real coefficient matrix, in eV. Returns full chemists’ (mo, mo, mo, mo) ordering.

Analytical AO values/derivatives at points in angstrom. deriv=0 returns (point, ao); deriv=1/2 returns (component, point, ao). Components are value,x,y,z,xx,xy,xz,yy,yz,zz, truncated to deriv.

Coulomb and positive exchange matrices for a real AO density, in eV. The real symmetric density has shape (ao, ao), with no implicit spin factor.

AO one-/two-electron integrals. Energy-valued outputs use eV. Supported names: int1e_ovlp, int1e_kin, int1e_nuc, int1e_hcore, ECPscalar, int2e. ERIs retain full chemists’ (ao, ao, ao, ao) axes.

AO/shell ownership and basis identity; no SCF required.