本文整理汇总了Python中gpaw.xc.XC.pass_stuff_1d方法的典型用法代码示例。如果您正苦于以下问题:Python XC.pass_stuff_1d方法的具体用法?Python XC.pass_stuff_1d怎么用?Python XC.pass_stuff_1d使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gpaw.xc.XC
的用法示例。
在下文中一共展示了XC.pass_stuff_1d方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from gpaw.xc import XC [as 别名]
# 或者: from gpaw.xc.XC import pass_stuff_1d [as 别名]
#.........这里部分代码省略.........
# N - g
#
# rN
# g = --------
# beta + r
t = self.text
N = self.N
beta = self.beta
t(N, 'radial gridpoints.')
self.rgd = AERadialGridDescriptor(beta / N, 1.0 / N, N)
g = np.arange(N, dtype=float)
self.r = self.rgd.r_g
self.dr = self.rgd.dr_g
self.d2gdr2 = self.rgd.d2gdr2()
# Number of orbitals:
nj = len(self.n_j)
# Radial wave functions multiplied by radius:
self.u_j = np.zeros((nj, self.N))
# Effective potential multiplied by radius:
self.vr = np.zeros(N)
# Electron density:
self.n = np.zeros(N)
# Always spinpaired nspins=1
self.xc = XC(self.xcname)
# Initialize for non-local functionals
if self.xc.type == 'GLLB':
self.xc.pass_stuff_1d(self)
self.xc.initialize_1d()
n_j = self.n_j
l_j = self.l_j
f_j = self.f_j
e_j = self.e_j
Z = self.Z # nuclear charge
r = self.r # radial coordinate
dr = self.dr # dr/dg
n = self.n # electron density
vr = self.vr # effective potential multiplied by r
vHr = np.zeros(self.N)
self.vXC = np.zeros(self.N)
restartfile = '%s/%s.restart' % (tempdir, self.symbol)
if self.xc.type == 'GLLB' or not use_restart_file:
# Do not start from initial guess when doing
# non local XC!
# This is because we need wavefunctions as well
# on the first iteration.
fd = None
else:
try:
fd = open(restartfile, 'r')
except IOError:
fd = None
else:
try:
n[:] = pickle.load(fd)
except (ValueError, IndexError):