xnn.common.models.electrostatics.coulomb_ewald#
- xnn.common.models.electrostatics.coulomb_ewald(charges, pos, cell, edge_index, r, alpha, cutoff, k_cutoff, k_e=14.39964547846902)[source]#
Per-atom Ewald Coulomb energies of one periodic structure, in eV.
The real-space sum over the neighbor list within
cutoff, the reciprocal sum withink_cutoffand the self and background corrections (ewald_real(),ewald_reciprocal(),ewald_corrections()), times the Coulomb constant.- Parameters:
charges (Tensor) – Charges
(N,).pos (Tensor) – Positions
(N, 3).cell (Tensor) – Lattice vectors as rows
(3, 3).edge_index (Tensor) – Neighbor pairs
(2, E)of this structure (both directions, with the periodic images the neighbor list provides).r (Tensor) – Their distances
(E,).alpha (float) – See
ewald_parameters().cutoff (float) – See
ewald_parameters().k_cutoff (float) – See
ewald_parameters().k_e (float, optional) – The Coulomb constant, by default
COULOMB_CONSTANT.
- Returns:
(N,)in eV, float64.- Return type:
Tensor