def vind(dm1): if hermi == 2: v1 = numpy.zeros_like(dm1) else: # nr_rks_fxc_st requires alpha of dm1 v1 = numint.nr_rks_fxc_st(ni, cell, mf.grids, mf.xc, dm0, dm1, 0, True, rho0, vxc, fxc, kpts, max_memory=max_memory) v1 *= .5 if abs(hyb) > 1e-10: if hermi != 2: vj, vk = mf.get_jk(cell, dm1, hermi=hermi, kpts=kpts) v1 += vj - .5 * hyb * vk else: v1 -= .5 * hyb * mf.get_k( cell, dm1, hermi=hermi, kpts=kpts) elif hermi != 2: v1 += mf.get_j(cell, dm1, hermi=hermi, kpts=kpts) return v1
def vind(dm1): if hermi == 2: v1 = numpy.zeros_like(dm1) else: # nr_rks_fxc_st requires alpha of dm1 v1 = numint.nr_rks_fxc_st(ni, cell, mf.grids, mf.xc, dm0, dm1, 0, False, rho0, vxc, fxc, kpts, max_memory=max_memory) v1 *= .5 if hybrid: v1 += -.5 * hyb * mf.get_k(cell, dm1, hermi=hermi, kpts=kpts) return v1