@@ -18,7 +18,7 @@ abstract type NormConservingPsp end
1818# eval_psp_projector_fourier(psp, i, l, p::Real)
1919# eval_psp_local_real(psp, r::Real)
2020# eval_psp_local_fourier(psp, p::Real)
21- # eval_psp_energy_correction(T::Type, psp, n_electrons::Integer )
21+ # eval_psp_energy_correction(T::Type, psp)
2222
2323# ### Optional methods:
2424# eval_psp_density_valence_real(psp, r::Real)
@@ -86,15 +86,15 @@ eval_psp_local_fourier(psp::NormConservingPsp, p::AbstractVector) =
8686 eval_psp_local_fourier (psp, norm (p))
8787
8888@doc raw """
89- eval_psp_energy_correction([T=Float64,] psp, n_electrons)
89+ eval_psp_energy_correction([T=Float64,] psp::NormConservingPsp)
90+ eval_psp_energy_correction([T=Float64,] element::Element)
9091
91- Evaluate the energy correction to the Ewald electrostatic interaction energy of one unit
92- cell, which is required compared the Ewald expression for point-like nuclei. `n_electrons`
93- is the number of electrons per unit cell. This defines the uniform compensating background
94- charge, which is assumed here.
95-
96- Notice: The returned result is the *energy per unit cell* and not the energy per volume.
97- To obtain the latter, the caller needs to divide by the unit cell volume.
92+ Evaluate the energy correction to the Ewald electrostatic interaction energy per unit
93+ of uniform negative charge. This is the correction required to account for the fact that
94+ the Ewald expression assumes point-like nuclei and not nuclei of the shape induced by
95+ the pseudopotential. The compensating background charge assumed for this expression is
96+ scaled to ``1``. Therefore multiplying by the number of electrons and dividing by the unit
97+ cell volume yields the energy correction per volume for the DFT simulation.
9898
9999The energy correction is defined as the limit of the Fourier-transform of the local
100100potential as ``p \t o 0``, using the same correction as in the Fourier-transform of the local
@@ -103,12 +103,14 @@ potential:
103103\l im_{p \t o 0} 4π N_{\r m elec} ∫_{ℝ_+} (V(r) - C(r)) \f rac{\s in(p·r)}{p·r} r^2 dr + F[C(r)]
104104 = 4π N_{\r m elec} ∫_{ℝ_+} (V(r) + Z/r) r^2 dr.
105105```
106+ where as discussed above the implementation is expected to return the result
107+ for ``N_{\r m elec} = 1``.
106108"""
107109function eval_psp_energy_correction end
108110# by default, no correction, see PspHgh implementation and tests
109111# for details on what to implement
110- eval_psp_energy_correction (psp :: NormConservingPsp , n_electrons) =
111- eval_psp_energy_correction (Float64, psp, n_electrons )
112+
113+ eval_psp_energy_correction (psp :: NormConservingPsp ) = eval_psp_energy_correction (Float64, psp)
112114
113115"""
114116 eval_psp_density_valence_real(psp, r)
0 commit comments