EspalomaCharge: Machine learning-enabled ultra-fast partial charge assignment

Yuanqing Wang, Iván Pulido, Kenichiro Takaba, Benjamin Kaminow, Jenke Scheen, Lily Wang, John D. ChoderaarXiv 2023 · DOI

Abstract: Atomic partial charges are crucial parameters in molecular dynamics (MD) simulation, dictating the electrostatic contributions to intermolecular energies, and thereby the potential energy landscape. Traditionally, the assignment of partial charges has relied on surrogates of ab initio semiempirical quantum chemical methods such as AM1-BCC, and is expensive for large systems or large numbers of molecules. We propose a hybrid physical / graph neural network-based approximation to the widely popular AM1-BCC charge model that is orders of magnitude faster while maintaining accuracy comparable to differences in AM1-BCC implementations. Our hybrid approach couples a graph neural network to a streamlined charge equilibration approach in order to predict molecule-specific atomic electronegativity and hardness parameters, followed by analytical determination of optimal charge-equilibrated parameters that preserves total molecular charge. This hybrid approach scales linearly with the number of atoms, enabling, for the first time, the use of fully consistent charge models for small molecules and biopolymers for the construction of next-generation self-consistent biomolecular force fields. Implemented in the free and open source package espaloma_charge, this approach provides drop-in replacements for both AmberTools antechamber and the Open Force Field Toolkit charging workflows, in addition to stand-alone charge generation interfaces.

Introduction

In molecular dynamics (MD) simulations, the accuracy of the potential energy landscape depends heavily on the assignment of atomic partial charges. These values determine the electrostatic interactions between atoms, which are critical for modeling phenomena like drug-protein binding. However, calculating these charges has traditionally been a computational bottleneck, forcing a trade-off between physical rigor and speed.

EspalomaCharge introduces a hybrid approach that combines the expressive power of Graph Neural Networks (GNNs) with the physical constraints of charge equilibration (QEq). This method achieves a speedup of approximately 2,000 times over traditional quantum-chemical surrogates while maintaining the accuracy necessary for high-fidelity simulations.

The Challenge of Partial Charges

The industry standard for assigning partial charges in small-molecule simulations is the AM1-BCC model. While AM1-BCC is faster than full ab initio quantum chemistry, it still suffers from several limitations:

  1. Computational Cost: It scales poorly ($O(N^2)$), making it impractical for large biopolymers or massive virtual screening libraries.
  2. Conformer Dependency: Charges can vary based on the initial 3D shape (conformer) of the molecule, leading to inconsistent results across different software implementations.
  3. Inconsistency: Due to its speed limitations, researchers often use different charging methods for proteins and small molecules, which can introduce artifacts into simulations.

The EspalomaCharge Architecture

To overcome these hurdles, EspalomaCharge utilizes a two-step hybrid architecture that embeds physical principles directly into the machine learning model.

The EspalomaCharge workflow: A GNN predicts latent physical parameters (electronegativity and hardness) which are then used in an analytical charge equilibration step to determine final atomic charges.

First, a GNN analyzes the molecular topology—the connectivity of atoms—to predict two latent physical parameters for each atom: electronegativity ($e_i$) and hardness ($s_i$). Unlike models that attempt to predict charges directly, this approach ensures the model learns the underlying physics of charge distribution.

Second, these parameters are fed into a streamlined Charge Equilibration (QEq) model. By using an analytical solution via Lagrange multipliers, the system solves for charges that are guaranteed to sum to the correct total molecular charge. Because the model relies on the molecular graph rather than 3D coordinates, it is entirely independent of the molecule's initial conformation, eliminating a major source of noise in traditional workflows.

Performance and Accuracy

The model was rigorously tested on diverse datasets, including the SPICE dataset (druglike molecules and peptides), FDA-approved drugs, and the ZINC250K library.

Comparison of charge RMSE for EspalomaCharge and AmberTools, grouped by total molecular charge (left) and molecule size (right).

The results demonstrate that EspalomaCharge is not only orders of magnitude faster—charging a 100-residue protein in seconds on a standard CPU—but also highly accurate. The discrepancy between EspalomaCharge and commercial gold standards like OpenEye is often smaller than the variation between different traditional implementations (e.g., AmberTools vs. OpenEye). Furthermore, validation through hydration free energy calculations showed that EspalomaCharge produces results statistically indistinguishable from more expensive traditional methods.

Conclusion

By achieving $O(N)$ linear scaling, EspalomaCharge enables the use of consistent, high-quality charge models for both small molecules and large biopolymers. This unified approach is a significant step toward the development of next-generation, self-consistent biomolecular force fields. The tool is available as an open-source Python package, espaloma_charge, designed to be a drop-in replacement for existing workflows in AmberTools and the Open Force Field Toolkit.

While currently limited to the 15 elements found in the SPICE dataset, future iterations aim to expand element coverage and incorporate active learning to further refine accuracy across broader chemical spaces.

Summary updated

BibTeX
@misc{wang2023espalomacharge,
  author = {Yuanqing Wang and Iván Pulido and Kenichiro Takaba and Benjamin Kaminow and Jenke Scheen and Lily Wang and John D. Chodera},
  title = {{EspalomaCharge: Machine learning-enabled ultra-fast partial charge assignment}},
  year = {2023},
  eprint = {2302.06758},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2302.06758},
}
Figure