atomscf.scf

Functions

run_lsda_pz81(cfg[, verbose, progress_every])

运行 LSDA(Dirac 交换 + PZ81 关联)的自洽场计算,并给出能量分解。

run_lsda_vwn(cfg[, verbose, progress_every])

运行 LSDA(Dirac 交换 + VWN 关联)的自洽场计算,并给出能量分解。

run_lsda_x_only(cfg[, verbose, progress_every])

运行 LSDA X-only 的自洽场计算(球对称、径向)。

Classes

SCFConfig(Z, r, w[, lmax, mix_alpha, ...])

SCF 配置参数。

SCFResult(converged, iterations, ...[, ...])

SCF 结果容器。

class atomscf.scf.SCFConfig(Z, r, w, lmax=3, mix_alpha=0.3, maxiter=200, tol=1e-07, occ=None, eigs_per_l=3, eig_solver='fd', compute_all_l=True, compute_all_l_mode='final', mix_kind='density', adapt_mixing=False, mix_alpha_min=0.05, xc='PZ81', delta=None, Rp=None, spin_mode='LSDA', numerov_samples=None, numerov_bisection_iter=None, shooting_refine=False, shooting_channels=None, shooting_E_tol=None, shooting_max_iter=None)[源代码]

SCF 配置参数。

参数:
Z

原子序数。

Type:

int

r

径向网格 \(r_i\),要求严格单调递增且 \(r_0>0\)

Type:

numpy.ndarray

w

梯形积分权重 \(w_i\)

Type:

numpy.ndarray

lmax

最大角动量量子数 :math:`ell_{max}`(决定求解哪些通道)。

Type:

int

mix_alpha

密度(或势)混合参数 \(\alpha \in (0,1]\)

Type:

float

maxiter

最大自洽迭代次数。

Type:

int

tol

收敛阈值(默认用于密度无穷范数)。

Type:

float

occ

占据方案;若为 None 则使用 default_occupations()

Type:

list[OrbitalSpec] | None

eigs_per_l

每个 \(\ell\) 通道求解的最低本征态数量(需覆盖所有占据的 \(n\))。

Type:

int

spin_mode

自旋处理模式:"LSDA"(自旋极化,默认)或 "LDA"(自旋非极化,强制 \(n_\uparrow = n_\downarrow\))。

Type:

str

Z: int
r: ndarray
w: ndarray
lmax: int = 3
mix_alpha: float = 0.3
maxiter: int = 200
tol: float = 1e-07
occ: Optional[List[OrbitalSpec]] = None
eigs_per_l: int = 3
eig_solver: str = 'fd'
compute_all_l: bool = True
compute_all_l_mode: str = 'final'
mix_kind: str = 'density'
adapt_mixing: bool = False
mix_alpha_min: float = 0.05
xc: str = 'PZ81'
delta: float | None = None
Rp: float | None = None
spin_mode: str = 'LSDA'
numerov_samples: int | None = None
numerov_bisection_iter: int | None = None
shooting_refine: bool = False
shooting_channels: List[Tuple[int, int]] = None
shooting_E_tol: float | None = None
shooting_max_iter: int | None = None
__post_init__()[源代码]

参数验证。

__init__(Z, r, w, lmax=3, mix_alpha=0.3, maxiter=200, tol=1e-07, occ=None, eigs_per_l=3, eig_solver='fd', compute_all_l=True, compute_all_l_mode='final', mix_kind='density', adapt_mixing=False, mix_alpha_min=0.05, xc='PZ81', delta=None, Rp=None, spin_mode='LSDA', numerov_samples=None, numerov_bisection_iter=None, shooting_refine=False, shooting_channels=None, shooting_E_tol=None, shooting_max_iter=None)
参数:
返回类型:

None

class atomscf.scf.SCFResult(converged, iterations, eps_by_l_sigma, u_by_l_sigma, n_up, n_dn, v_h, v_x_up, v_x_dn, v_c_up=None, v_c_dn=None, energies=None)[源代码]

SCF 结果容器。

参数:
converged: bool
iterations: int
eps_by_l_sigma: Dict[Tuple[int, str], ndarray]
u_by_l_sigma: Dict[Tuple[int, str], ndarray]
n_up: ndarray
n_dn: ndarray
v_h: ndarray
v_x_up: ndarray
v_x_dn: ndarray
v_c_up: ndarray | None = None
v_c_dn: ndarray | None = None
energies: dict | None = None
__init__(converged, iterations, eps_by_l_sigma, u_by_l_sigma, n_up, n_dn, v_h, v_x_up, v_x_dn, v_c_up=None, v_c_dn=None, energies=None)
参数:
返回类型:

None

atomscf.scf.run_lsda_x_only(cfg, verbose=False, progress_every=10)[源代码]

运行 LSDA X-only 的自洽场计算(球对称、径向)。

参数:
  • cfg (SCFConfig) -- 自洽计算的配置。

  • verbose (bool)

  • progress_every (int)

返回:

自洽结果(是否收敛、迭代数、能级/波函数、密度与势)。

返回类型:

SCFResult

备注

  • 占据方案以径向通道为单位(指定 \(\ell\) 与通道内序号 \(n_{\text{index}}\))。

  • 对 C 原子,2p 壳层采用 m 平均且自旋极化:上自旋每个 m 的分数占据 \(2/3\),下自旋为 0。

  • 混合策略:密度线性混合(数值稳健,易用)。

atomscf.scf.run_lsda_pz81(cfg, verbose=False, progress_every=10)[源代码]

运行 LSDA(Dirac 交换 + PZ81 关联)的自洽场计算,并给出能量分解。

返回类型:

SCFResult

参数:
atomscf.scf.run_lsda_vwn(cfg, verbose=False, progress_every=10)[源代码]

运行 LSDA(Dirac 交换 + VWN 关联)的自洽场计算,并给出能量分解。

返回类型:

SCFResult

参数: