xnn.common.models.pme.spread_charges#
- xnn.common.models.pme.spread_charges(charges, pos, cell, mesh, order)[source]#
Charges on the mesh by B-spline assignment (paper eq 4.6).
- Parameters:
- Returns:
The charge grid
(C, K_1 K_2 K_3)(C = 1for(N,)charges), the flat grid indices(N, p^3)and the weights(N, p^3)of every atom, for the back-interpolation.- Return type:
tuple of Tensor