def psi(V, W, cell, forceR=True):
"""Calculates the normalized wave functions using the basis coefficients.
Args:
V (pydft.potential.Potential): describing the potential for the
particles.
W (numpy.ndarray): wave function sample points.
cell (pydft.geometry.Cell): describing the unit cell and sampling
points.
forceR (bool): forces the result to be real.
"""
WN = Y(W, cell)
mu = np.dot(WN.conjugate().T, H(V, WN, cell))
epsilon, D = np.linalg.eig(mu)
if forceR:
epsilon = np.real(epsilon)
return (np.dot(WN, D), epsilon)
评论列表
文章目录