xnn.dnn.models.qrnn#
QRNN (Jacobson et al., J. Chem. Theory Comput. 18, 2354, 2022), the charge recursive neural network.
An implementation of
L. D. Jacobson, J. M. Stevenson, F. Ramezanghorbani, D. Ghoreishi, K. Leswing, E. D. Harder, R. Abel, “Transferable Neural Network Potential Energy Surfaces for Closed-Shell Organic Molecules: Extension to Ions”, J. Chem. Theory Comput. 18, 2354 (2022),
written from the paper. QRNN is a charge-aware HDNNP: atomic charges that add up to the net charge of the molecule enter the atomic energies as descriptors.
Every atom carries the ANI atomic environment vector G^AEV (radial and
angular symmetry functions, AEV) and a
charge-weighted radial vector over all neighbors (eq 7 of the paper):
G^qR_i = sum_j q_j exp(-eta (r_ij - Rs)^2) f_c(r_ij)
on the radial grid of the AEV. The charges come from effective
electronegativities chi~, predicted recursively by per-element networks
(eq 13) and turned into charges in closed form at the fixed net charge Q
(eq 12):
chi~_i^(I) = NN^QR_Z(q_i^(I-1), G^qR_i, G^AEV_i)
q_i = -(chi~_i - lambda) / J_ii, lambda = (Q + sum_i chi~_i / J_ii) / sum_i 1 / J_ii
with fixed diagonal hardnesses J_ii (the EEQ model of Caldeweyher et al.,
J. Chem. Phys. 150, 154122, 2019, used by D4). The energy is (eq 8):
E = sum_i NN^E_Z(q_i, G^qR_i, G^AEV_i) + E_coul(q) + E_disp
with the Coulomb energy of the charges attenuated at short range (eq 9):
E_coul = 1/2 sum_{i != j} k_e q_i q_j / r_ij / (1 + exp(b (a - r_ij)))
and the dispersion correction of wB97X-D (Chai and Head-Gordon, Phys. Chem. Chem. Phys. 10, 6615, 2008) on the C6 coefficients and radii of Grimme (J. Comput. Chem. 27, 1787, 2006):
E_disp = -s6 sum_{i<j} C6_ij / r_ij^6 / (1 + a_d (r_ij / R0_ij)^-12)
charge_model="qeq" gives the paper’s QeqNN instead: one network per element
predicts X_i, S_i from G^AEV_i, and the charges minimize the charge
equilibration energy with Gaussian charges of width sigma_i = sigma_0 +
S_i^2 and electronegativity chi_i = X_i^2 (eq 4-6).
Conventions worth knowing:
the paper leaves the starting charges of the recursion open: the default spreads the net charge evenly over the atoms (
initial_charges="uniform"),"zero"starts from zero;one set of charge networks serves every cycle of the recursion;
energies are in eV, lengths in Angstrom and charges in
e;the Coulomb and dispersion sums cover every pair of a molecule; periodic structures need
coulomb=Falseanddispersion=False(delta learning on a semiempirical method omits both terms as well);the charge constraint couples every atom of a structure, so the model has no bounded receptive field.
Module Attributes
H, C, N, O, F, P, S, Cl. |
|
C6 coefficients (J nm^6 / mol) and van der Waals radii R0 (Angstrom) of Grimme, J. |
|
10^6 / (N_A e) with the exact SI constants. |
Functions
|
Per-atom share of the wB97X-D dispersion energy of molecular structures. |
|
Diagonal EEQ hardnesses of D4 (Caldeweyher et al. 2019) in eV per |
Classes
|
QRNN interatomic potential: an HDNNP with recursively predicted charges. |
|
The triplets of the AEV, enumerated outside the model step for a captured step. |