--- license: mit --- # QCMLForge pretrained models Pretrained checkpoints for [QCMLForge](https://github.com/Awallace3/qcmlforge) (`apnet_pt`). Files are resolved on demand by `apnet_pt.hf_pretrained`; set `QCMLFORGE_AUTO_DOWNLOAD_PRETRAINED=1` to allow non-interactive downloads. ## APNet2 weight sets | `weights=` | files | description | |---|---|---| | `qcmlforge` (default) | `am_ensemble/am_{0..4}.pt`, `ap2_ensemble/ap2_{0..4}.pt` | APNet2 ensemble trained by QCMLForge. | | `ap2_tf_paper` | `ap2_tf_paper/atom_models/atom{0..4}.pt`, `ap2_tf_paper/pair_models/pair{0..4}.pt` | The AP-Net2 ensemble published with the paper ([`zachglick/apnet`](https://github.com/zachglick/apnet)), converted from TensorFlow. | ```python from apnet_pt.pretrained_models import apnet2_model_predict pred = apnet2_model_predict(dimers, weights="ap2_tf_paper") ``` ### About `ap2_tf_paper` These are the original TensorFlow SavedModel weights converted to PyTorch checkpoints, not a retrained approximation: every atom-model tensor transfers bit-exactly, and predictions match recorded TensorFlow output to ~1e-6 on multipoles and ~1e-4 kcal/mol on interaction energies (float32 reduction order). Against the paper's *reported* MAEs, the five-member average matches exchange, induction and dispersion to 2-6e-4 kcal/mol and sits +0.134 kcal/mol high on electrostatics, which is still open; see [the parity spec](https://github.com/Awallace3/qcmlforge/blob/main/docs/specs/apnet2-tensorflow-parity.md). Two things they require, both handled by `weights="ap2_tf_paper"`: - each `pair{i}` must be loaded with its own `atom{i}` — the checkpoints carry no embedded atom submodel; - `quadrupole_scale` must be `1.5` (it is stored in the checkpoint config, not the state dict; dropping it shifts electrostatics by ~0.5 kcal/mol with no error). They also cannot be loaded by the fused `APNet2_AM_MPNN` model. Details, the parity table, and the conversion procedure: [docs/apnet2-tensorflow-weights.md](https://github.com/Awallace3/qcmlforge/blob/main/docs/apnet2-tensorflow-weights.md).