Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Q2MM

Quantum-guided molecular mechanics force field optimization.

CI PyPI Python

Q2MM optimizes molecular mechanics (MM) force field parameters by minimizing the difference between MM-calculated properties and quantum mechanics (QM) reference data. It is designed for building transition state force fields (TSFFs) that enable rapid virtual screening of enantioselective catalysts.

📖 Documentation

Why Q2MM?

  • Hessian-informed initialization — the Seminario method extracts bond and angle force constants directly from QM Hessians, providing excellent starting parameters before optimization begins.
  • Open-source backends — first-class support for OpenMM and Psi4 alongside commercial packages (Gaussian, Schrödinger, Tinker).
  • Clean, modular architecture — format-agnostic data models (ForceField, Q2MMMolecule) decouple algorithms from file formats.
  • Modern optimization — powered by scipy.optimize with L-BFGS-B, Nelder-Mead, trust-region, and Levenberg-Marquardt methods.
  • Transition state support — negative force constants, torsion parameters, and proper eigenvalue handling for saddle-point geometries.

Quick Start

pip install "q2mm[openmm,optimize]"   # OpenMM backend + scipy optimizer

Pre-release: the current version is an alpha. Add --pre to any install command (e.g. pip install --pre "q2mm[openmm,optimize]") if a stable release hasn't been published yet.

For development, clone the repo and install in editable mode:

pip install -e ".[dev]"
from q2mm.optimizers.objective import ReferenceData, ObjectiveFunction
from q2mm.optimizers.scipy_opt import ScipyOptimizer
from q2mm.models.seminario import estimate_force_constants
from q2mm.backends.mm import OpenMMEngine

# 1. Load QM reference data and molecule from a Gaussian checkpoint
ref, mol = ReferenceData.from_fchk("ts-optimized.fchk", bond_tolerance=1.4)

# 2. Estimate initial force field from the QM Hessian (Seminario method)
ff = estimate_force_constants(mol, au_hessian=True)

# 3. Set up the objective function and optimize
engine = OpenMMEngine()
obj = ObjectiveFunction(ff, engine, [mol], ref)
result = ScipyOptimizer(method="L-BFGS-B").optimize(obj)

print(result.summary())

ReferenceData.from_fchk() auto-extracts bond lengths and angles from the QM geometry. You can also use from_gaussian() for .log files, or from_molecule() for maximum control. See the Tutorial for the full workflow including frequencies, eigenmatrix data, and multi-molecule fits.

Supported Backends

Backend Type License
OpenMM MM MIT
Psi4 QM BSD-3
Tinker MM Free (academic)
Gaussian QM Commercial
Schrödinger QM/MM Commercial

License

MIT. See LICENSE.

Metadata

Release files for q2mm 5.0.0a2

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

Source distribution (sdist)

Source distribution for q2mm 5.0.0a2
File Size Uploaded
q2mm-5.0.0a2.tar.gz 5.9 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for q2mm 5.0.0a2
File Interpreter ABI Platform
q2mm-5.0.0a2-py3-none-any.whl Python 3 none any Details

Total release size: 6.1 MB

Release files / q2mm-5.0.0a2.tar.gz

Download URL q2mm-5.0.0a2.tar.gz
Size 5.9 MB
Tags Source
SHA-256 checksum
How to use checksums
cef8d0868b1a7bddbfe9691606ba33b7a1d812cad615d1e6050acc31b76b487a
BLAKE2b-256 checksum
How to use checksums
12e4f832f825f06407cb426bcf5407cd4bed5c9c90b3fba7a347ceeb569c2535
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Mar 21, 2026.

Transparency log

Release files / q2mm-5.0.0a2-py3-none-any.whl

Download URL q2mm-5.0.0a2-py3-none-any.whl
Size 135.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
23c5f4a5272b87a36bbc4076505b074c393af5a3158956277549cf6b32b361c2
BLAKE2b-256 checksum
How to use checksums
fef45cea84efb38bd5c082a9f34dc91d2c93fd3f7dd2cad2807eac2b43d2ce33
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Mar 21, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

5.0.0a2 This release

2 release files

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