Skip to main content

qcopt

Minimizations, transition-state searches, and IRCs for the qc* stack. Inputs and outputs are qcdata objects; gradients and Hessians come from axtb in-process or from any program qccompute runs.

import qcopt
from qcdata import Structure

# accuracy 0.01: at axtb's default SCF accuracy, g-xTB gradients carry ~1e-5 Eh/bohr
# of noise, the size of qcopt's convergence threshold (12% more time per gradient).
gxtb = {"program": "axtb", "model": {"method": "gxtb-v2.0.1"}, "keywords": {"accuracy": 0.01}}
guess = Structure.open("ts_guess.xyz")

ts = qcopt.find_ts(guess, gxtb, hessian=True, frequencies=True)  # ProgramOutput
ts.results.extras["n_imaginary"]                                   # 1
path = qcopt.irc(ts.results.final_structure, gxtb, hessian=True)   # ProgramOutput (PathData)

hessian names the program computing Hessians: True for the gradient program, or another one, often a cheaper method. Frames keep the gradient program's energies and gradients:

gfn2 = {"program": "axtb", "model": {"method": "gfn2"}, "keywords": {"accuracy": 0.01}}
ts = qcopt.find_ts(guess, gxtb, hessian=gfn2)   # g-xTB saddle from a GFN2 starting Hessian

Keyword arguments are qcopt's keywords (qcopt.keywords), such as maxiter, initial_hessian ("model", "exact", ...) or hessian_every.

Or as a qcdata input, alone or many at once (they advance together, and each round's gradients from all of them are computed in one call):

from qcdata import ProgramInput, ProgramSpec

inp = ProgramInput(
    program="qcopt",
    calctype="transition_state",
    structure=guess,
    keywords={"maxiter": 300},
    subprograms=[
        ProgramSpec(program="axtb", calctype="gradient", model={"method": "gxtb-v2.0.1"},
                    keywords={"accuracy": 0.01}),
        ProgramSpec(program="axtb", calctype="hessian", model={"method": "gxtb-v2.0.1"},
                    keywords={"accuracy": 0.01}),
    ],
)
out = qcopt.run(inp)            # or qcopt.run([inp1, inp2, ...])

What it does

Calculation Method
optimization RS-RFO in TRIC coordinates (Wang and Song, 2016: each molecule's internal coordinates plus its translation and rotation), or delocalized internals, or Cartesians; Lindh model Hessian or the program's exact one; BFGS updates (Bofill while the Hessian is indefinite); optional frequency check that steps off saddle points
transition_state RS-P-RFO climbing the lowest mode (or, in Cartesians, one following a guide direction); exact (or a cheaper method's) or finite-difference starting Hessian; TS-BFGS updates; recomputed when the negative mode is lost; fails when it ends without negative curvature (pass frequencies=True for a check by the exact Hessian's frequencies)
irc Mass-weighted steepest descent by Gonzalez-Schlegel steps (or the local quadratic approximation), both branches together, frames in the input's frame; overshoots retried at half the step; optionally both ends minimized together (minimize_ends)

Distances, angles and dihedrals can be held at target values (constraints), atoms frozen (frozen_atoms). Every frame is a qcdata Frame with the energy and gradient computed there.

With qccompute installed, qcopt is also a program it runs:

from qccompute import compute
out = compute(inp)   # the ProgramInput above

Benchmarks

benchmarks/ compares qcopt with Sella, geomeTRIC and OptKing on the same axtb gradients; results are summarized in AFH's findings.

Install

pip install qcopt               # or: pip install "qcopt[qccompute]" for any program qccompute runs

axtb (in-process g-xTB and GFN2-xTB with analytic Hessians) is installed from its repository until it is on PyPI.

Status

0.1: the API may still change between minor versions.

License

MIT.

Metadata

Release files for qcopt 0.2.0

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

Source distribution (sdist)

Source distribution for qcopt 0.2.0
File Size Uploaded Provenance Actions
qcopt-0.2.0.tar.gz 181.6 kB With provenance Details for qcopt-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for qcopt 0.2.0
File Interpreter ABI Platform Actions
qcopt-0.2.0-py3-none-any.whl Python 3 none any Details for qcopt-0.2.0-py3-none-any.whl

Total release size: 245.3 kB

Release files / qcopt-0.2.0.tar.gz

Download URL qcopt-0.2.0.tar.gz
Size 181.6 kB
Tags Source
SHA-256 checksum
How to use checksums
0d515ed7995072d7fc9be57f0eb9d44312d26accba9d8463ccfea5e081dd9461
BLAKE2b-256 checksum
How to use checksums
3d67f9f4a2e7ce6dfc997b8133945b64a69bd0fb4d677447b8b4231729e8a9f7
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 7, 2026.

Transparency log

Release files / qcopt-0.2.0-py3-none-any.whl

Download URL qcopt-0.2.0-py3-none-any.whl
Size 63.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4ad4b21def900575e9e7099eea996f26867776ced3c0878069f1e10f7d33c754
BLAKE2b-256 checksum
How to use checksums
c0b03e75347f0d586957ce792c5a82d8bca4d2522640dc7aad7799458c721864
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 7, 2026.

Transparency log

Security for qcopt 0.2.0

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for qcopt-0.2.0.tar.gz

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 7, 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