Skip to main content

linus (Python package, distributed as afh-linus and afh-linus-cuda13)

Hartree-Fock and Kohn-Sham DFT in-process: energies, analytic gradients, analytic Hessians, frequencies and thermochemistry, for closed and open shells, with global, range-separated and VV10 functionals, D3(BJ)/D4 dispersion, ECPs and implicit solvent (PCM, SMD), on the CPU or an NVIDIA GPU (the afh-linus-cuda13 build). The core is Rust; results are bitwise identical at any thread count. The package speaks qcdata: linus.compute(ProgramInput) for one calculation, linus.Session(ProgramInput) for one molecule at many geometries (each step starts from its predecessor's orbitals), and qccompute's program protocol (linus.qc.program, registered as the qccompute.programs entry point linus).

pip install afh-linus            # the CPU build, with numpy and qcdata
pip install afh-linus-cuda13     # or: the same with the GPU backend (NVIDIA GPUs, CUDA 13)
pip install qccompute            # to run many calculations (lists, a result store, workers)

Both distributions have the same version and install the package linus: install one of them, not both. afh-linus-cuda13 runs everything afh-linus does, and with backend: "gpu" on an NVIDIA GPU; at run time it needs an NVIDIA driver with CUDA 13 support (580 or newer) and the CUDA 13 libraries NVRTC, cuBLAS and cuSOLVER on the dynamic loader's path (a CUDA 13 toolkit's lib64, or LD_LIBRARY_PATH). Without them it still runs on the CPU. linus.GPU_BUILD is True in the GPU build. Linux x86-64 (glibc 2.28 or newer), Python >= 3.11. The basis sets (Basis Set Exchange JSON) ship in the package; LINUS_BASIS_DIR points linus at another directory of them.

import linus
from qcdata import ProgramInput, Structure

inp = ProgramInput(program="linus", calctype="gradient", structure=Structure.open("mol.xyz"),
                   model={"method": "b3lyp-d3bj", "basis": "def2-svp"}, keywords={"threads": 8})
out = linus.compute(inp)                            # a qcdata.ProgramOutput; raises if it fails
out.results.energy, out.results.gradient, out.resolved.settings    # Eh, Eh/bohr; what it used

with linus.Session(inp) as s:
    f = s.compute(x)                                # positions in bohr: a qcdata.Frame
    h = s.compute(x, calctype="hessian", outputs=["ir"])   # Hessian, harmonic analysis, thermochemistry
    h.results.vibrational_analysis.frequencies, h.results.thermochemistry[0].gibbs_correction

A failed calculation raises a linus.LinusError, a qcdata.ProgramError carrying what it reached (results; a session's failed frame, linus.compute's failed output): InputError (a ValueError), UnsupportedError (a NotImplementedError), ResourceError (a MemoryError), ConvergenceError, BackendError (the GPU backend failed) and NumericalError (an ArithmeticError), with qcdata's kind and code in .error.

Documentation: sessions and the Python API in docs/python.md, recipes in docs/usage.md; every setting and the result fields in docs/cli.md.

License: MIT. The default build links linus-disp (D3/D4 dispersion, LGPL-3.0-or-later) and libxc (MPL-2.0) and ships basis-set data under BSD-3-Clause; the wheel carries the notices and license texts (THIRD_PARTY_NOTICES.md, LICENSES/).

Metadata

Release files for afh-linus 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for afh-linus 0.1.4
File Interpreter ABI Platform Actions
afh_linus-0.1.4-cp311-abi3-manylinux_2_28_x86_64.whl CPython 3.11 abi3 Linux glibc 2.28+ x86-64 Details for afh_linus-0.1.4-cp311-abi3-manylinux_2_28_x86_64.whl

Release files / afh_linus-0.1.4-cp311-abi3-manylinux_2_28_x86_64.whl

Download URL afh_linus-0.1.4-cp311-abi3-manylinux_2_28_x86_64.whl
Size 22.1 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
b6666857d6ea70ecfd8dd2a4ff780c9eeb12be064f772deb4d788e6fe9c0b54b
BLAKE2b-256 checksum
How to use checksums
d584d012ed45f1e85086f8236f4cf339a943f484fe4d140d8352cb7f34c28f9f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

Security for afh-linus 0.1.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

1 file in this release has been uploaded with provenance metadata.

Attestation for afh_linus-0.1.4-cp311-abi3-manylinux_2_28_x86_64.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page