Skip to content

Long range interactions

Marcus Wieder edited this page Aug 19, 2024 · 6 revisions

Long-Range Interactions in Neural Network Potentials

Introduction

Incorporating long-range interactions in neural network potentials (NNPs) typically involves combining analytical expressions for electrostatic and long-range dispersion contributions with the neural network's predictions. For long-range electrostatics, this means predicting partial charges in addition to atomic energies and employing an appropriate implementation of the Coulomb potential (or modified versions that accommodate cutoff distances). The underlying assumption is that the total energy of a system can be decomposed into short-range contributions (predicted by the NNP within its cutoff), long-range electrostatic interactions, and long-range dispersion forces, with the latter two not being directly predicted by the network. The resulting energy expression is then:

$$ E = \sum_{i=1}^{N} E_i + k_c \sum_{i=1}^{N} \sum_{j>i}^{N} q_iq_j + E_{disp} $$

Certain neural network potentials, such as PhysNet and AimNet2, already include the capability to predict partial charges, while others can be modified to do so. To enable the prediction of additional per-atom properties across various network architectures, the following approaches can be employed:

Output Heads for Scalar Values

Where possible, a separate output head (a final linear layer) is implemented for each scalar value that needs to be predicted. This approach ensures that the predictions are independent, modular, and easily extendable.

Vector Outputs

In cases where output heads are not feasible (e.g., PhysNet, which lacks output heads, or architectures that do not support this structure), the output layer can be modified to return a vector per atom instead of a scalar, thereby increasing the dimensionality of the output to accommodate multiple per-atom properties.

Charge conservation

Partial charges predicted by neural networks are not inherently constrained to sum to the total integer charge Q of the system. To enforce charge conservation, a postprocessing operation is applied to the predicted charges. Several methods have been developed to achieve this; we have implemented the approach described in Ref:

$$ \tilde{q} = q_i - \frac{1}{N}\sum_j^N \left( q_j - Q \right) $$

This method involves summing the predicted partial charges $q_j$, calculating the deviation from the system's total charge Q, and distributing the residual equally across all partial charges. Here, N is the number of atoms in the system. This ensures that the total predicted charge aligns with the expected physical property of the system

Long-range electrostatics

The electronic potential (a scalar field) can be described using Coulomb's law for pointcharges:

$$ V(r) = \frac{q_iq_j}{4\epsilon_0r_{ij}} $$

Using this equation (and others based on the coulomb potential for cutoffs), scale quadratically with the number of atoms in the system. Here, we implement the following version to calculate the electronic potential using predicted partial charges:

  1. Coulomb's law at long-range and a damped term at small distances Ref

How to train partial charges

Partial charges can be add