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.1

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.1
File Size Uploaded Provenance Actions
qcopt-0.2.1.tar.gz 182.9 kB With provenance Details for qcopt-0.2.1.tar.gz

Built distribution (wheel)

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

Total release size: 246.8 kB

Release files / qcopt-0.2.1.tar.gz

Download URL qcopt-0.2.1.tar.gz
Size 182.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ef64a820993b312a619b843bacfd9d2eb36513b3f43f1eb07cda0afa85021fdd
BLAKE2b-256 checksum
How to use checksums
b26ed41b5843913c4982c33a5a5566061eb72446379756c2a6460c4432fdbce8
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.1-py3-none-any.whl

Download URL qcopt-0.2.1-py3-none-any.whl
Size 63.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
081a3776911f3cddc2e0d8a33baf161f221d97993398ec98c7df86ff25fc0893
BLAKE2b-256 checksum
How to use checksums
9889c64b557cf3e0dbbccbb61d6538c5f44940055ad860f61e7a9309ca23651f
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.1

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.1.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