xnn.common.models.electrostatics.coulomb_dsf#
- xnn.common.models.electrostatics.coulomb_dsf(charges, edge_index, r, alpha, cutoff, k_e=14.39964547846902)[source]#
Per-atom share of the damped shifted-force Coulomb energy over a neighbor list.
Each pair within
cutoffcontributesq_i q_j phi(r)with the force-shifted screened kernelphi(r) = erfc(alpha r) / r - erfc(alpha r_c) / r_c + (r - r_c) [erfc(alpha r_c) / r_c^2 + 2 alpha / sqrt(pi) exp(-alpha^2 r_c^2) / r_c](zero value and slope at
r_c), and every atom carries the self term-[erfc(alpha r_c) / (2 r_c) + alpha / sqrt(pi)] q_i^2. The pair terms are accumulated in float64.- Parameters:
charges (Tensor) – Partial charges
(N,).edge_index (Tensor) – Ordered pairs
(2, E)as[src, dst]; both directions of a pair are expected, as a neighbor list provides them.r (Tensor) – The pair distances
(E,).alpha (float) – Damping parameter in 1/Angstrom.
cutoff (float) – The real-space cutoff
r_cin Angstrom; pairs beyond it are ignored, so the neighbor list may be longer.k_e (float, optional) – The Coulomb constant, by default
COULOMB_CONSTANT.
- Returns:
Per-atom energies
(N,)in eV, float64.- Return type:
Tensor