Quantum-guided molecular mechanics force field optimization
Project description
Q2MM
Quantum-guided molecular mechanics force field optimization.
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.
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.optimizewith 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
--preto 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file q2mm-5.0.0a2.tar.gz.
File metadata
- Download URL: q2mm-5.0.0a2.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cef8d0868b1a7bddbfe9691606ba33b7a1d812cad615d1e6050acc31b76b487a
|
|
| MD5 |
5c771067728a0d0a46602e888ea4dda9
|
|
| BLAKE2b-256 |
12e4f832f825f06407cb426bcf5407cd4bed5c9c90b3fba7a347ceeb569c2535
|
Provenance
The following attestation bundles were made for q2mm-5.0.0a2.tar.gz:
Publisher:
publish.yml on ericchansen/q2mm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
q2mm-5.0.0a2.tar.gz -
Subject digest:
cef8d0868b1a7bddbfe9691606ba33b7a1d812cad615d1e6050acc31b76b487a - Sigstore transparency entry: 1154174761
- Sigstore integration time:
-
Permalink:
ericchansen/q2mm@8f25655dfed9dfc6a92b9f7288eeecfff4ed04fd -
Branch / Tag:
refs/tags/v5.0.0a2 - Owner: https://github.com/ericchansen
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8f25655dfed9dfc6a92b9f7288eeecfff4ed04fd -
Trigger Event:
push
-
Statement type:
File details
Details for the file q2mm-5.0.0a2-py3-none-any.whl.
File metadata
- Download URL: q2mm-5.0.0a2-py3-none-any.whl
- Upload date:
- Size: 135.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
23c5f4a5272b87a36bbc4076505b074c393af5a3158956277549cf6b32b361c2
|
|
| MD5 |
3342eb5415f6d98b0e985365c7300830
|
|
| BLAKE2b-256 |
fef45cea84efb38bd5c082a9f34dc91d2c93fd3f7dd2cad2807eac2b43d2ce33
|
Provenance
The following attestation bundles were made for q2mm-5.0.0a2-py3-none-any.whl:
Publisher:
publish.yml on ericchansen/q2mm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
q2mm-5.0.0a2-py3-none-any.whl -
Subject digest:
23c5f4a5272b87a36bbc4076505b074c393af5a3158956277549cf6b32b361c2 - Sigstore transparency entry: 1154174762
- Sigstore integration time:
-
Permalink:
ericchansen/q2mm@8f25655dfed9dfc6a92b9f7288eeecfff4ed04fd -
Branch / Tag:
refs/tags/v5.0.0a2 - Owner: https://github.com/ericchansen
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8f25655dfed9dfc6a92b9f7288eeecfff4ed04fd -
Trigger Event:
push
-
Statement type: