예제 #1
0
파일: hf.py 프로젝트: ncrubin/pyscf
    def get_hcore(self, cell=None, kpt=None):
        if cell is None: cell = self.cell
        if kpt is None: kpt = self.kpt

        if self.analytic_int:
            logger.info(self, "Using analytic integrals")
            return scfint.get_hcore(cell, kpt)
        else:
            return get_hcore(cell, kpt)
예제 #2
0
파일: khf.py 프로젝트: ncrubin/pyscf
def get_hcore(mf, cell, kpts):
    '''Get the core Hamiltonian AO matrices at sampled k-points.

    Args:
        kpts : (nkpts, 3) ndarray

    Returns:
        hcore : (nkpts, nao, nao) ndarray
    '''
    nao = cell.nao_nr()
    nkpts = len(kpts)
    hcore = np.zeros((nkpts,nao,nao), np.complex128)
    for k in range(nkpts):
        kpt = kpts[k,:]
        if mf.analytic_int:
            hcore[k,:,:] = scfint.get_hcore(cell, kpt)
        else:
            hcore[k,:,:] = pbchf.get_hcore(cell, kpt)
    return hcore