PM7 CPU batch validation against MOPAC

PM7 heat of formation for NaH

Single-point calculation for neutral NaH. Both programs use the same Cartesian coordinates for each case. Energies are in kcal/mol.

GeometryMOPAC 23.2.5MLXMolKit CPU batch
1.85 Å, diagonal58.6075458.60754
1.85 Å, reversed atom order58.6075458.60754
2.05 Å, stretched74.8199274.81992

Compared with MOPAC’s PM7 CHARGE=0 1SCF SCFCRT=1.D-9 calculation. The regression test also checks the Mulliken charges for all three geometries. Regression test.

MMFF optimisation from identical starting coordinates

Packed Metal BFGS completed the batch faster. RDKit reached lower residual forces. The energy tolerance measures agreement with RDKit for each conformer.

Packed Metal BFGS and RDKit MMFF94

Both methods start from the same 2,500 ETKDGv3 conformers across 50 molecule entries. Times are medians of seven warm runs. Metal timing includes parameter extraction, packing, optimisation and writing back coordinates.

MethodIteration capWall timeWithin 0.1 kcal/molMean |ΔE| (kcal/mol)
RDKit 2026.09.2, 14 threads1,000555.15 msReference—
Packed Metal BFGS500299.82 ms2,444 / 2,5000.09888

Residual forces at the returned coordinates

Independently rescored by RDKit MMFF94. Each conformer contributes the largest Euclidean force norm on any of its atoms, in kcal/mol/Å.

MethodMedian95th percentileMaximum
RDKit, 14 threads0.000640.002510.01028
Packed Metal BFGS0.019240.067890.41884

The reproduction script runs with python -m benchmarks.mmff_matched_accuracy --repeats 7. The median uses the same per-conformer force values as the 95th percentile and maximum reported by the script.

Dynamic Butina clustering

Ordered clusters on the LIT-PCBA ADRB2 fixture

Times start from precomputed fingerprints, already on the GPU for Metal. Metal timings are medians of seven warm runs. Each RDKit timing is one run including the distance calculation.

FingerprintsTanimoto similarity cutoffMetalRDKitOrdered clusters
8,1920.255.671 ms3.514 s1,481
20,0000.4015.680 ms21.616 s9,111

With reordering=True, the order of clusters and of molecules within each cluster matches RDKit exactly. The input contains 1,024-bit Morgan fingerprints of radius 3 without chirality. We shuffle the LIT-PCBA ADRB2 inactive_T.smi rows with NumPy seed 20261203 and retain valid molecules with unique canonical SMILES. The smaller fixture uses the first 8,192 entries of the same 20,000-fingerprint sample. Dataset · Reproduction script.

Fingerprint search

Exact top-eight fingerprint search

64 queries against the same 20,000 LIT-PCBA ADRB2 fingerprints. Times are medians of seven warm runs.

MethodSearch timeWith index construction and any upload
RDKit128.111 ms—
Metal0.785 ms1.227 ms
Native CPU NEON2.284 ms2.609 ms
Automatic backend, NumPy input0.700 ms—

Every returned index and similarity score agrees with RDKit in rank order. The resident Metal search starts with its index and queries already on the GPU. Reproduction script.

Conformer quality against RDKit

Heavy-atom RMSD to the nearest RDKit conformer

ETKDGv2 with RDKit 2026.09.2. Twenty conformers per method for each of seeds 1, 19 and 42. Each Metal pose is matched to its closest RDKit pose for the same seed using symmetry-aware alignment without reflections. Statistics pool the 60 matches per row.

MoleculeAtoms incl. HBefore MMFF, medianAfter MMFF, medianAfter MMFF, 90th percentile
Benzene120.008 Å<0.001 Å<0.001 Å
Aspirin210.045 Å<0.001 Å0.0014 Å
(R)-Ibuprofen330.107 Å0.0011 Å0.476 Å
(S)-Ibuprofen330.115 Å0.0011 Å0.476 Å
Acetaminophen200.029 Å<0.001 Å0.0080 Å

Matching in the reverse direction, from RDKit to Metal, gave a 90th percentile of 0.42 Å for (R)-ibuprofen and 0.46 Å for (S)-ibuprofen. This matched the two independently seeded RDKit ensembles at the precision shown.

In a separate test starting both optimisers from the same 120 ibuprofen conformers, the largest heavy-atom RMSD was 0.0144 Å and the largest absolute energy difference under RDKit’s MMFF94 was 0.000916 kcal/mol. Reproduction script.

Test suite

The full source suite recorded 1,882 passed, 8 failed, 142 skipped and 4 expected failures. The eight failures also reproduce on the GitHub main revision used as the base. They cover four PM6 reference checks that depend on RDKit-generated coordinates, two package checks and two PM7 tests that expect a separate hydrogen-bond term in MOPAC’s output. The NaH CPU batch regression cases passed.

Historical benchmarks

MMFF speed and energy agreement

The legacy fused optimiser reached the 0.1 kcal/mol tolerance for 800 conformers at 200 iterations and 2,326 at 2,000 iterations. The historical kernel could report the energy from before its final coordinate update.

02550751000.00.40.81.21.6RDKit 14TRDKit 1T200 it500 it1,000 it2,000 itMulti, 1,000 and 2,000 itFused kernelfaster thanRDKit 14TMilliseconds per conformerWithin 0.1 kcal/mol of RDKit (%)
Each point is one iteration budget from the legacy sweep. The shaded band is faster than the historical RDKit 14-thread baseline.

Legacy fused and multi-molecule optimisers

Historical measurements on an Apple M3 Max. 50 molecule entries × 50 conformers, 9–49 atoms. ΔE in kcal/mol against RDKit.

MethodTotalms/confvs RDKit 14TMean |ΔE|Within 0.1 kcal/mol
RDKit, 1 thread3.98 s1.590.13×——
RDKit, 14 threads0.50 s0.201.00×0.000—
Fused, 200 iterations0.41 s0.161.22×1.742800
Fused, 500 iterations0.84 s0.340.59×0.5201,431
Fused, 1,000 iterations1.59 s0.640.31×0.2032,019
Fused, 2,000 iterations3.10 s1.240.16×0.0732,326
Multi, 1,000 iterations3.39 s1.360.15×0.0152,470
Multi, 2,000 iterations3.69 s1.480.13×0.0152,470

How the comparison is timed

  1. mmff_optimize_batch(mol, conf_ids) batches the conformers of a single molecule. Use the multi-molecule entry points to measure throughput across molecules.
  2. MMFFOptimizeMoleculeConfs optimises in place. Start each method from a fresh Chem.Mol(m).
  3. Run comparisons on a quiet machine so other work does not slow the multithreaded CPU baseline.

Historical conformer throughput

Earlier Metal pipeline measurements for N molecule entries × k conformers per entry. The original input manifest is unavailable.

ScalePipelineTimeConformers/sConverged
N = 1,000, k = 10DG + ETK5.0 s2,01799.7%
N = 1,000, k = 10DG + ETK + MMFF8.0 s1,25099.7%
N = 10,000, k = 1DG + ETK17.7 s56599.6%
N = 10,000, k = 1DG + ETK + MMFF37.9 s26499.6%
N = 10,000, k = 10DG + ETK38.1 s2,62599.7%
N = 10,000, k = 10DG + ETK + MMFF67.9 s1,47399.7%

Historical batch-size sweep

20 molecule entries × 50 conformers. Larger batches reduced the number of kernel launches in this run.

BatchBatchesTimeConformers/s
100100.62 s1,610
50020.29 s3,394
1,000+10.22 s4,442

Historical Enamine REAL clustering

Enamine REAL subset, Morgan fingerprints, Tanimoto cutoff 0.40. This implementation built the neighbour graph on the GPU and clustered it on the CPU.

MoleculesSimilarity → CSRButinaTotalMemory
20,0000.26 s0.09 s0.35 s0.1 MB
50,0001.26 s0.36 s1.62 s0.5 MB
100,0004.87 s0.97 s5.84 s1.3 MB

GPU memory per conformer

BFGS keeps a dense (3n)² Hessian, so it grows as O(n²); the pipeline switches to L-BFGS above ~150 atoms.

AtomsDG (4D)ETK (3D)MMFF, BFGSMMFF, L-BFGS
51.9 KB1.4 KB1.3 KB1.4 KB
124.4 KB3.3 KB6.0 KB3.3 KB
217.6 KB5.7 KB17.2 KB5.7 KB
3010.8 KB8.1 KB34.1 KB8.1 KB
5018.0 KB13.5 KB92.0 KB13.5 KB
6423.1 KB17.3 KB149.2 KB17.3 KB

The earlier pipeline used 2.6 MB for 10,000 conformers at a fixed batch size of 500, processing batches sequentially.