Skip to main content

Quantum-guided molecular mechanics force field optimization

Project description

Q2MM

Quantum-guided molecular mechanics force field optimization.

CI

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 -e .
import numpy as np
from q2mm.models.molecule import Q2MMMolecule
from q2mm.models.seminario import estimate_force_constants

# Load QM data (coordinates + Hessian from your QM package)
mol = Q2MMMolecule.from_xyz("ts-optimized.xyz")
mol.hessian = np.load("ts-hessian.npy")  # Hartree/Bohr²

# Estimate force constants from the QM Hessian (Seminario method)
ff = estimate_force_constants(mol, au_hessian=True)

print(f"Bonds: {len(ff.bonds)}, Angles: {len(ff.angles)}")
for b in ff.bonds:
    print(f"  {b.elements}: k={b.force_constant:.3f} mdyn/Å")

See the Tutorial for a complete end-to-end workflow.

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

BSD-3-Clause. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

q2mm-5.0.0a1.tar.gz (5.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

q2mm-5.0.0a1-py3-none-any.whl (96.2 kB view details)

Uploaded Python 3

File details

Details for the file q2mm-5.0.0a1.tar.gz.

File metadata

  • Download URL: q2mm-5.0.0a1.tar.gz
  • Upload date:
  • Size: 5.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for q2mm-5.0.0a1.tar.gz
Algorithm Hash digest
SHA256 10cb3c0b6ec4bee21e46f10a97cc61770de26f1931f7d2baf7bf6ddd50a4b8e2
MD5 7d51d3de2f856abbde47281f8349c865
BLAKE2b-256 45bb2004e4b0002197472c33d8230fed114d4395677df2d1c23dfceaae8e98f6

See more details on using hashes here.

Provenance

The following attestation bundles were made for q2mm-5.0.0a1.tar.gz:

Publisher: publish.yml on ericchansen/q2mm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file q2mm-5.0.0a1-py3-none-any.whl.

File metadata

  • Download URL: q2mm-5.0.0a1-py3-none-any.whl
  • Upload date:
  • Size: 96.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for q2mm-5.0.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 611934d889b17e62e80a108619410a78ad1fc50fcc564d9334ab3d44d71c82f6
MD5 28ca7f93e087f541fb5c1ace3e532023
BLAKE2b-256 f0dc83293fd82533f5997f0161d299344c95efa0c2963fb1fc99ccb258234da3

See more details on using hashes here.

Provenance

The following attestation bundles were made for q2mm-5.0.0a1-py3-none-any.whl:

Publisher: publish.yml on ericchansen/q2mm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page