Published May 27, 2026 | Version v1.0.0

shehan807/pympfit: v1.0.0

Authors/Creators

  • 1. GaTech

Description

v1.0.0

First public release of PyMPFIT on PyPI.

PyMPFIT fits partial atomic charges to Gaussian Distributed Multipole Analysis (GDMA) outputs rather than to ESP grids, with support for multi-molecule constrained fitting, virtual sites, and Bayesian inference of virtual-site charges and geometries.

Lineage

PyMPFIT is a hard fork of shehan807/openff-PyMPFIT-fork, itself originally a fork of OpenFF Recharge. The mpfit kernel, SVD solver, Psi4/GDMA driver, storage layer, and constrained multi-molecule fitting machinery all matured over many months of development in that upstream lineage before being lifted into a standalone package for v1.0.0. The complete pre-fork commit history is preserved at the upstream repository.

Features

Distributed multipole computation

  • Psi4GDMAGenerator drives Psi4 + GDMA in a subprocess to compute per-atom distributed multipoles from a Molecule and conformer.
  • GDMASettings exposes basis, method, expansion limit, integration radii, switching radius, and per-element radius overrides.

Storage

  • MoleculeGDMAStore (SQLite via SQLAlchemy) caches GDMA results keyed by canonical SMILES and full GDMASettings, so the expensive QM step runs once and any number of downstream fits reuse it.

Charge fitting

  • generate_mpfit_charge_parameter — unconstrained single-molecule fit returning an openff-recharge LibraryChargeParameter.
  • MPFITSVDSolver — per-site SVD with a configurable singular-value cutoff.
  • generate_constrained_mpfit_charge_parameter — multi-molecule joint fit with cross-molecule atom-type equivalence (Morgan-fingerprint typing via generate_global_atom_type_labels) and analytic per-molecule charge conservation.
  • ConstrainedSciPySolver — analytic loss and Jacobian over a reduced parameter space, L-BFGS-B by default.

Virtual sites and Bayesian fitting

  • MPFITObjective exposes a torch-differentiable predict() for sampling charges and virtual-site geometries with Pyro NUTS.
  • Supports openff-recharge virtual-site classes (BondCharge, divalent lone pair, trivalent lone pair).

Multi-conformer

  • Per-conformer fits are averaged with consistent atom ordering.

Documentation

  • Sphinx site on ReadTheDocs — theory page, four tutorials (quickstart, constrained fitting, multi-molecule fitting, Bayesian virtual sites), and API reference.

Install

conda create -n pympfit python=3.12 openff-recharge openff-interchange openff-utilities psi4 pygdma -c conda-forge -y
conda activate pympfit
pip install pympfit==1.0.0

Optional Bayesian path: pip install pyro-ppl arviz matplotlib sphericart-torch

Files

shehan807/pympfit-v1.0.0.zip

Files (1.2 MB)

Name Size
md5:7e428d0f40db2de334376d1e7dea679f
1.2 MB Preview Download

Additional details

Related works

Software