Coverage for eminus/xc/lda_c_pw_mod.py: 100.00%
5 statements
« prev ^ index » next coverage.py v7.6.9, created at 2024-12-18 08:43 +0000
« prev ^ index » next coverage.py v7.6.9, created at 2024-12-18 08:43 +0000
1# SPDX-FileCopyrightText: 2021 The eminus developers
2# SPDX-License-Identifier: Apache-2.0
3"""Modified Perdew-Wang LDA correlation.
5Reference: Phys. Rev. B 45, 13244.
6"""
8from .lda_c_pw import lda_c_pw, lda_c_pw_spin
11def lda_c_pw_mod(n, **kwargs):
12 """Modified Perdew-Wang parametrization of the correlation functional (spin-paired).
14 Corresponds to the functional with the label LDA_C_PW_MOD and ID 13 in Libxc.
16 Reference: Phys. Rev. B 45, 13244.
18 Args:
19 n: Real-space electronic density.
21 Keyword Args:
22 **kwargs: Throwaway arguments.
24 Returns:
25 Modified PW correlation energy density and potential.
26 """
27 return lda_c_pw(n, A=0.0310907, **kwargs)
30def lda_c_pw_mod_spin(n, zeta, **kwargs):
31 """Modified Perdew-Wang parametrization of the correlation functional (spin-polarized).
33 Corresponds to the functional with the label LDA_C_PW_MOD and ID 13 in Libxc.
35 Reference: Phys. Rev. B 45, 13244.
37 Args:
38 n: Real-space electronic density.
39 zeta: Relative spin polarization.
41 Keyword Args:
42 **kwargs: Throwaway arguments.
44 Returns:
45 Modified PW correlation energy density and potential.
46 """
47 # fzeta0 = 4 / (9 * (2**(1 / 3) - 1))
48 return lda_c_pw_spin(
49 n,
50 zeta,
51 A=(0.0310907, 0.01554535, 0.0168869),
52 fzeta0=1.709920934161365617563962776245,
53 **kwargs,
54 )