Repository navigation
Releases: atomsforhumanity/qccodec
Release list
0.21.0
Added
sellacodec:CalcType.irc(qcdata 0.23). Both directions run from the transition state instructurewith one SellaIRC; the result is aPathDatafrom the reverse end through the transition state (ts_index) to the forward end, with the optionalhessiansubprogram'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 untilstepsruns out. New exampleexamples/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, whoseFramereplaces per-stepProgramOutputs. Optimization trajectories areresults.frames(each step'sstructureandresults, without a copy of the child's input); conformer searches returnconformers/rotamersas 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 readinp.require_structure(). Fixtureexpected.jsonfiles are re-saved in the new format.
0.20.1
Changed
- Requires
qcdata<0.23: qcdata 0.23 changes trajectories to frames and makesProgramInput.structureoptional, which this release does not handle. qccodec 0.21 supports it.
0.20.0
Added
-
sellacodec (pip install qccodec[sella]): Sella minimizations (optimization) and transition-state searches (transition_state) driving any gradient program insubprograms, likegeometric. Keywords are Sella's own, passed unchanged (fmaxandstepstoSella.run, the rest toSella), with Sella's defaults. An optionalhessiansubprogram becomes Sella'shessian_function, so a search can start from xtb's or a machine-learned potential's Hessian;constraintsmaps Sella'sConstraintsmethods (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 upstepsfails with its trajectory. -
qccodec.ase.ProgramCalculator: an ASE calculator whose energies and forces are calculations of any qccodec program, run by acomputefunction the caller passes (such asqccompute.compute). ASE-based tools (ASE optimizers, NEB, MD) can compute through qc* this way; thesellacodec uses it with its child-calculation callback. See the new "ASE workflows" guide. -
many_calculations.pyexamples, 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, withComputeErrorshandling; 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
Added
- A batch hook on
Codec:encode_batch(inputs) -> PythonInput, whose function returns one native value per input, andbatch_key(input), under which inputs may share a batch (None: computed alone), plusmax_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
Added
- The machine-learned-potential codecs declare one GPU (
gpus=1) unlessdeviceis"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
Added
SubprocessInputandPythonInputdeclare the resources a calculation uses:threads(CPU threads, default 1) andgpus(default 0). The codecs fill them from what they encode: CREST'sthreads(including its default of all cores, at most 16), ORCA'spal, Psi4's-n/--nthread, xtb'sparallel, and TeraChem'sgpus(1 by default). qccompute uses them to run lists of calculations without oversubscribing cores or sharing a GPU.invocation()takesthreadsandgpus.
0.16.1
Added
- Supports Python 3.15; CI tests the oldest (3.11) and newest (3.15) supported versions.
0.16.0
Changed
- 🚨 Requires Python 3.11 or newer. Python 3.10 reached end of life in October 2026.
0.15.0
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,temperaturein 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-nsetakes open shells, and the closed-shell models refuse them.torchani: ANI-2x, ANI-1ccx, and the othertorchani.modelsenergies, 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.modelfiles; 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, oromolfor UMA, unlesstasksays otherwise; it is recorded inextras["fairchem_task"]. Models run uncompiled by default, so any molecule is ready in seconds;inference_settingstakes a fairchem preset orInferenceSettingsfields. 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.
devicepicks the hardware (a GPU when PyTorch sees one, by default), unknown keywords are rejected, and results are converted to Hartree and bohr. Library errors raiseCalculationErrornaming the exception. Run them undergeometricfor optimizations and transition states. -
qccodec.clear_model_cache()and theqccodec.model_cachemodule: loaded models stay in memory for later calculations in the same process, up toQCCODEC_MAX_MODELSof them (2 by default; 0 turns caching off), least recently used unloaded first, with GPU memory handed back to the driver. -
A
dftbpluscodec for DFTB+: energies, gradients, Hessians (SecondDerivatives; no energy or gradient at the input geometry, andSCCTolerancetightened to 1e-8), and optimizations (LBFGS, every step's structure and energy) withDFTB3,SCC-DFTB,DFTB, and DFTB+'sGFN2-xTB,GFN1-xTB, andIPEA1-xTB.model.basisnames the Slater-Koster parameter set (3ob-3-1,mio-1-1), whose per-element settings (angular momenta, DFTB3 Hubbard derivatives, H-bond damping) come fromqcref.dftb_parameter_sets; the files are found under theslater_koster_dirkeyword orQCCODEC_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, raiseCalculationError. -
xtbtakes point charges for QM/MM electrostatic embedding in theexternal_potentialskeyword, in the Psi4 codec's[charge, [x, y, z]]form (bohr), optionally with the atomic number whose hardness damps each charge. Gradients fillpoint_charge_gradientfrom xtb'spcgrad. The codec rejects point charges with GFN0, GFN-FF, and g-xTB, which xtb 6.7.1 silently ignores them for. -
terachemoptimizations take aconstraintskeyword: the geomeTRIC codec's constraint dictionary (freezeandset;xyz,distance,angle,dihedral; 0-based atoms; distances in bohr), written as TeraChem's$constraint_freezeand$constraint_setgroups with 1-based atoms and distances in angstrom. -
terachemHessians fillfreqs_wavenumberandnormal_modes_cartesianfromscr.*/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.0fordftb_parameter_sets, andqcdata>=0.20.2for 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, whoseg98.outfiles did not belong to their inputs, are replaced by recorded runs. orcaHessians fillfreqs_wavenumberandnormal_modes_cartesianfrom<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
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, andtests/test_examples.pyfails 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
psi4codec: energy, gradient, hessian (with frequencies and normal modes), optimization, and transition_state (optking, with energies and gradients for every step; transition states setopt_type tsand, 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 topsi4.set_optionsunchanged, except driver arguments (external_potentialsfor QM/MM point charges in bohr,dertype,project_trans,project_rot) and the molecule'ssymmetry. The molecule keeps the input's frame (no_com,no_reorient); Psi4 detects only symmetry that frame already has, andsymmetry: c1turns it off. Results also fillatomic_charges(Mulliken),point_charge_gradient, orbital energies and occupations, the dipole, and every scalar Psi4 variable inextras["psi4_variables"]. Psi4 errors raiseCalculationErrorwith 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
xtbcodec 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 fillatomic_charges. xtb errors, unknown command-line options (which xtb only warns about, for example--gxtbon a build without g-xTB), and optimizations that run out of cycles raiseCalculationError, although xtb exits 0 for the last two. - A "Supported programs" README section, including when to run xTB through
xtborcrest. - 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
xtbextra. 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, ORCAwB97X-D3, TeraChemwb97xd3) instead of HF/STO-3G. - When a program exits with an error and the codec's failure hook explains why,
Codec.decodenow raisesCalculationErrorwith 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 newreport_failureargument raises the explanation on request. - Require
qcdata>=0.20.1forSinglePointData.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.Truenow adds a simple-input word,False/Noneleaves it out, and any other non-dictionary value is an error. - TeraChem optimizations from newer builds (2026.10 confirmed), which write
optim_trajectory.xyzwith the energy inside aframe N SCF Energy = ...comment instead ofoptim.xyz.