6. potentials#

6.1. coulomb#

All-electron Coulomb potential.

Python

Julia

1with np.errstate(divide='ignore', invalid='ignore'):
2    Vcoul = -4 * np.pi * atoms.Z[0] / atoms.G2
3Vcoul[0] = 0
4return op.J(Vcoul * atoms.Sf)
1Vcoul = -4.0 .* pi .* atoms.Z[1] ./ atoms.G2
2Vcoul[1] = 0.0
3return op_J(atoms, Vcoul .* atoms.Sf)