Skip to content

Releases: atomsforhumanity/qccodec

0.21.0

Choose a tag to compare

@github-actions github-actions released this 23 Oct 23:38
09f8344

Added

  • sella codec: CalcType.irc (qcdata 0.23). Both directions run from the transition state in structure with one Sella IRC; the result is a PathData from the reverse end through the transition state (ts_index) to the forward end, with the optional hessian subprogram's Hessian on the transition-state frame. The codec removes Sella's rigid drift (mass-weighted alignment of each frame onto the previous) and ends a branch on the vibrations' curvature, so Sella no longer spins a molecule at its minimum until steps runs out. New example examples/sella/irc.py. On HCN ⇌ HNC with GFN2-xTB it gives barriers of 53.2 and 73.2 kcal/mol, as ORCA's XTB2 IRC does.

Changed

  • Requires qcdata>=0.23.1, whose Frame replaces per-step ProgramOutputs. Optimization trajectories are results.frames (each step's structure and results, without a copy of the child's input); conformer searches return conformers/rotamers as frames. Native parsers (xtb, CREST, ORCA, Psi4, TeraChem, DFTB+) build frames directly instead of inventing a per-step input, and geomeTRIC and Sella record each child output as a frame. Codecs read inp.require_structure(). Fixture expected.json files are re-saved in the new format.

0.20.1

Choose a tag to compare

@github-actions github-actions released this 23 Oct 23:03
34c5b01

Changed

  • Requires qcdata<0.23: qcdata 0.23 changes trajectories to frames and makes ProgramInput.structure optional, which this release does not handle. qccodec 0.21 supports it.

0.20.0

Choose a tag to compare

@github-actions github-actions released this 23 Oct 17:52
7ced8fe

Added

  • sella codec (pip install qccodec[sella]): Sella minimizations (optimization) and transition-state searches (transition_state) driving any gradient program in subprograms, like geometric. Keywords are Sella's own, passed unchanged (fmax and steps to Sella.run, the rest to Sella), with Sella's defaults. An optional hessian subprogram becomes Sella's hessian_function, so a search can start from xtb's or a machine-learned potential's Hessian; constraints maps Sella's Constraints methods (fix_translation, fix_bond, fix_angle, fix_dihedral) to their calls. The trajectory holds one frame per step, Hessians are attached to their frames, and a run that uses up steps fails with its trajectory.

  • qccodec.ase.ProgramCalculator: an ASE calculator whose energies and forces are calculations of any qccodec program, run by a compute function the caller passes (such as qccompute.compute). ASE-based tools (ASE optimizers, NEB, MD) can compute through qc* this way; the sella codec uses it with its child-calculation callback. See the new "ASE workflows" guide.

  • many_calculations.py examples, run in CI like the others: AIMNet2, TorchANI, MACE, Orb, and FAIR-Chem evaluate a 20-point bond scan in one batch and compare it with computing each structure alone; xtb runs 20 gradients side by side within the thread budget, with ComputeErrors handling; geomeTRIC runs four optimizations side by side in worker processes. Every codec that batches must have one (tests/test_examples.py).

Changed

  • The integration test group requires qccompute>=0.21.0 (batched lists).

0.19.0

Choose a tag to compare

@github-actions github-actions released this 23 Oct 16:42
13e4459

Added

  • A batch hook on Codec: encode_batch(inputs) -> PythonInput, whose function returns one native value per input, and batch_key(input), under which inputs may share a batch (None: computed alone), plus max_batch (default 32). Each value is decoded with the codec's ordinary decoder, so every structure keeps its own result. qccompute will batch lists of such inputs.
  • AIMNet2, TorchANI, MACE, Orb, and FAIR-Chem evaluate energies and gradients of several structures in one pass: concatenated atoms with a molecule index (AIMNet2), padded arrays (TorchANI), and batched graphs (MACE, Orb, FAIR-Chem). Batched results match single evaluations to the models' precision; structures may differ in size, and in charge where the model reads it. Hessians stay one structure at a time.

0.18.0

Choose a tag to compare

@github-actions github-actions released this 22 Oct 17:53
fce76b5

Added

  • The machine-learned-potential codecs declare one GPU (gpus=1) unless device is "cpu", so qccompute gives each calculation of a list its own GPU instead of loading a model per worker onto one; an explicit index such as "cuda:1" declares none and opts out of pinning.
  • geomeTRIC declares the threads and GPUs of its gradient child, so lists of optimizations share the machine correctly.

0.17.0

Choose a tag to compare

@github-actions github-actions released this 21 Oct 20:54
ea4d9c4

Added

  • SubprocessInput and PythonInput declare the resources a calculation uses: threads (CPU threads, default 1) and gpus (default 0). The codecs fill them from what they encode: CREST's threads (including its default of all cores, at most 16), ORCA's pal, Psi4's -n/--nthread, xtb's parallel, and TeraChem's gpus (1 by default). qccompute uses them to run lists of calculations without oversubscribing cores or sharing a GPU. invocation() takes threads and gpus.

0.16.1

Choose a tag to compare

@github-actions github-actions released this 21 Oct 20:43
dc42313

Added

  • Supports Python 3.15; CI tests the oldest (3.11) and newest (3.15) supported versions.

0.16.0

Choose a tag to compare

@github-actions github-actions released this 21 Oct 19:11
571e7cd

Changed

  • 🚨 Requires Python 3.11 or newer. Python 3.10 reached end of life in October 2026.

0.15.0

Choose a tag to compare

@github-actions github-actions released this 20 Oct 23:53
565e59d

Added

  • Codecs for programs that are Python libraries, run inside the calling process (install the library next to qccompute; nothing goes on PATH):

    • tblite: GFN2-xTB, GFN1-xTB, and IPEA1-xTB energies and gradients, with partial charges and the dipole. Keywords are tblite's own calculator settings (accuracy, max-iter, temperature in Hartree, ...) and interactions (alpb-solvation, gbsa-solvation, ddX-solvation, electric-field, spin-polarization, ...).
    • aimnet2: AIMNet2 energies, gradients, and Hessians (automatic differentiation) with partial charges; aimnet2-nse takes open shells, and the closed-shell models refuse them.
    • torchani: ANI-2x, ANI-1ccx, and the other torchani.models energies, gradients, and Hessians, in float64 by default; neutral closed-shell molecules only.
    • mace: MACE-OFF, MACE-MP, MACE-OMOL (the one family that reads charge and spin), and .model files; energies, gradients, and Hessians.
    • orb: Orb v3 and OrbMol energies and gradients; OMol25 models read charge and spin.
    • fairchem: UMA, eSEN, and AllScAIP energies, gradients, and Hessians. The task head is the checkpoint's only one, or omol for UMA, unless task says otherwise; it is recorded in extras["fairchem_task"]. Models run uncompiled by default, so any molecule is ready in seconds; inference_settings takes a fairchem preset or InferenceSettings fields. The weights are gated on Hugging Face.

    MACE, Orb, and FAIR-Chem are called below their ASE calculators (MACE's raw model, Orb's model on its adapter's graph, FAIR-Chem's predict unit), so no calculator state carries over between calculations and the models can later take batches; AIMNet2 and TorchANI are called directly too. device picks the hardware (a GPU when PyTorch sees one, by default), unknown keywords are rejected, and results are converted to Hartree and bohr. Library errors raise CalculationError naming the exception. Run them under geometric for optimizations and transition states.

  • qccodec.clear_model_cache() and the qccodec.model_cache module: loaded models stay in memory for later calculations in the same process, up to QCCODEC_MAX_MODELS of them (2 by default; 0 turns caching off), least recently used unloaded first, with GPU memory handed back to the driver.

  • A dftbplus codec for DFTB+: energies, gradients, Hessians (SecondDerivatives; no energy or gradient at the input geometry, and SCCTolerance tightened to 1e-8), and optimizations (LBFGS, every step's structure and energy) with DFTB3, SCC-DFTB, DFTB, and DFTB+'s GFN2-xTB, GFN1-xTB, and IPEA1-xTB. model.basis names the Slater-Koster parameter set (3ob-3-1, mio-1-1), whose per-element settings (angular momenta, DFTB3 Hubbard derivatives, H-bond damping) come from qcref.dftb_parameter_sets; the files are found under the slater_koster_dir keyword or QCCODEC_DFTB_PARAMETERS. Keywords are DFTB+'s HSD input as nested dictionaries, merged into the generated input. DFTB+ errors, including the input it did not recognize, raise CalculationError.

  • xtb takes point charges for QM/MM electrostatic embedding in the external_potentials keyword, in the Psi4 codec's [charge, [x, y, z]] form (bohr), optionally with the atomic number whose hardness damps each charge. Gradients fill point_charge_gradient from xtb's pcgrad. The codec rejects point charges with GFN0, GFN-FF, and g-xTB, which xtb 6.7.1 silently ignores them for.

  • terachem optimizations take a constraints keyword: the geomeTRIC codec's constraint dictionary (freeze and set; xyz, distance, angle, dihedral; 0-based atoms; distances in bohr), written as TeraChem's $constraint_freeze and $constraint_set groups with 1-based atoms and distances in angstrom.

  • terachem Hessians fill freqs_wavenumber and normal_modes_cartesian from scr.*/Frequencies.dat.

  • Example scripts and documentation pages for the new codecs, and integration tests that check every library codec's gradient (and Hessian) against finite differences.

Changed

  • Require qcref>=0.4.0 for dftb_parameter_sets, and qcdata>=0.20.2 for its definition of normal modes.
  • Normal modes follow qcdata's definition in every codec: unit-length Cartesian displacements in the input's frame and atom order. Psi4's already did; TeraChem's are now scaled to unit length.

Fixed

  • xtb and CREST normal modes were wrong. Both read g98.out, where xtb writes mass-weighted vectors, but the codecs treated them as Cartesian displacements in angstrom (scaling by 1.89) and returned vectors that were not the normal modes (overlap 0.84 to 0.89). CREST's were also in its own reoriented frame. They are now converted with the atomic masses, rotated onto the input structure, and scaled to unit length. The hand-assembled CREST Hessian fixtures, whose g98.out files did not belong to their inputs, are replaced by recorded runs.
  • orca Hessians fill freqs_wavenumber and normal_modes_cartesian from <basename>.hess, leaving out translations and rotations; ORCA's modes are already unit-length Cartesian displacements, and the codec checks they are in the input's frame.
  • qccodec.testing.check_normal_modes(data, symbols) checks that modes have unit length and are eigenvectors of the mass-weighted Hessian at the reported frequencies; every recorded case with modes runs it.

0.14.0

Choose a tag to compare

@github-actions github-actions released this 16 Oct 06:18
dbac94b

Added

  • A runnable example script for every program and calculation type in examples/<program>/ (single_point.py, optimization.py, transition_state.py, conformer_search.py), showing every common option (implicit solvent, parallelism, convergence, program extras) and each program's quirks. The integration suite runs every script, and tests/test_examples.py fails if a program lacks one.
  • A documentation site at https://qccodec.docs.atomsforhumanity.org: a page per program (the codec module's docstring plus its example scripts), guides to decoding output and writing a codec, and an API reference. A Docs workflow builds it on pull requests and publishes it on release tags or by hand. The README now points there.
  • A psi4 codec: energy, gradient, hessian (with frequencies and normal modes), optimization, and transition_state (optking, with energies and gradients for every step; transition states set opt_type ts and, unless given, full_hess_every 0) for any Psi4 method. Psi4 runs a small driver script with its own interpreter (psi4 input.py -k), so the calling environment never imports Psi4, and results come back as JSON instead of parsed text. Keywords pass to psi4.set_options unchanged, except driver arguments (external_potentials for QM/MM point charges in bohr, dertype, project_trans, project_rot) and the molecule's symmetry. The molecule keeps the input's frame (no_com, no_reorient); Psi4 detects only symmetry that frame already has, and symmetry: c1 turns it off. Results also fill atomic_charges (Mulliken), point_charge_gradient, orbital energies and occupations, the dipole, and every scalar Psi4 variable in extras["psi4_variables"]. Psi4 errors raise CalculationError with Psi4's own message. Point charges are rejected for hessian, optimization, and transition_state, which Psi4 1.11 gets wrong (Hessians fail or disagree with finite differences of its gradients; optimizations never leave the starting geometry); run geomeTRIC with Psi4 gradients for QM/MM optimizations.
  • AGENTS.md and CONTRIBUTING.md require every codec to keep results in the input structure's frame.
  • Recorded integration cases replace this machine's home directory and hostname in text files.
  • An xtb codec that runs the xtb program on the command line: energies, gradients, Hessians (with frequencies and normal modes), and optimizations with GFN0-, GFN1-, GFN2-xTB, GFN-FF, and g-xTB. Keywords pass through as xtb's own command-line flags; partial charges fill atomic_charges. xtb errors, unknown command-line options (which xtb only warns about, for example --gxtb on a build without g-xTB), and optimizations that run out of cycles raise CalculationError, although xtb exits 0 for the last two.
  • A "Supported programs" README section, including when to run xTB through xtb or crest.
  • Integration tests in tests/integration/ that run CREST, xtb, Psi4, TeraChem, ORCA, geomeTRIC, and every example script through qccompute (a test-only dependency group). They are deselected by default (pytest -m integration), skip when a program is missing, and can save runs as fixture cases with --record-cases. A new Integration workflow runs them nightly on GitHub-hosted runners (CREST, geomeTRIC) and on a self-hosted runner for private and GPU programs (TeraChem, ORCA) once one is configured.

Removed

  • The xtb-python codec and the xtb extra. xtb-python has had no release since 2022 and has no wheels for current Python; program="xtb" now runs the xtb program instead.

Changed

  • Examples and documentation use ωB97X with dispersion and def2-SVP (Psi4 wb97x-d, ORCA wB97X-D3, TeraChem wb97xd3) instead of HF/STO-3G.
  • When a program exits with an error and the codec's failure hook explains why, Codec.decode now raises CalculationError with that explanation and the recovered data, instead of returning partial data whose only trace of the failure was the exit status. parse(..., failed=True) still recovers quietly; its new report_failure argument raises the explanation on request.
  • Require qcdata>=0.20.1 for SinglePointData.atomic_charges.

Fixed

  • geomeTRIC trajectories included every finite-difference gradient behind a Hessian (2 x 3N per Hessian), so a transition-state search on ammonia reported 27 "steps". The trajectory now holds one frame per optimizer step, and each Hessian geomeTRIC computes is attached to the frame at its geometry (hessian="first+last" puts one on the final frame).
  • geomeTRIC's coordsys="hdlc" ran TRIC; it now adds Cartesian coordinates as geomeTRIC's own interface does.
  • CREST optimization trajectories were shifted to the center of mass; they are now in the input's frame.
  • ORCA: {"numgrad": False} still requested numerical gradients, and scalar keywords such as {"tightscf": True} were dropped silently. True now adds a simple-input word, False/None leaves it out, and any other non-dictionary value is an error.
  • TeraChem optimizations from newer builds (2026.10 confirmed), which write optim_trajectory.xyz with the energy inside a frame N SCF Energy = ... comment instead of optim.xyz.