예제 #1
0
cell.pseudo = 'gth-pade'
cell.gs = [10] * 3
cell.verbose = 5
cell.build()

nk = [1, 1, 1]
kpts = cell.make_kpts(nk)

mf = scf.KRHF(cell)
mf.chkfile = 'scf.dump'
ehf = mf.kernel()

import h5py

from pyscftools import integrals_from_chkfile
hcore = mf.get_hcore()  # obtain and store core hamiltonian
fock = (hcore + mf.get_veff())  # store fock matrix (required with orthoAO)
X, nmo_per_kpt = integrals_from_chkfile.getOrthoAORotation(
    cell, kpts, 1e-8)  # store rotation to orthogonal PAO basis
with h5py.File(mf.chkfile) as fh5:
    fh5['scf/hcore'] = hcore
    fh5['scf/fock'] = fock
    fh5['scf/orthoAORot'] = X
    fh5['scf/nmo_per_kpt'] = nmo_per_kpt

integrals_from_chkfile.eri_to_h5("choldump",
                                 "./scf.dump",
                                 orthoAO=False,
                                 gtol=1e-5,
                                 gtol_chol=1e-5)
예제 #2
0
파일: scf.py 프로젝트: zenandrea/qmcpack
                                                       getOrthoAORotation)

alat0 = 3.6

cell = gto.Cell()
cell.a = numpy.eye(3) * alat0
cell.atom = [('He', 0, 0, 0)]
cell.basis = 'gth-dzv'
cell.pseudo = 'gth-pade'
cell.mesh = [71] * 3
cell.verbose = 5
cell.build()

nk = [2, 2, 2]
kpts = cell.make_kpts(nk)

mf = scf.KRHF(cell, kpts=kpts)
mf.chkfile = 'scf.dump'
ehf = mf.kernel()

hcore = mf.get_hcore()
fock = (hcore + mf.get_veff())
X, nmo_per_kpt = getOrthoAORotation(cell, kpts, 1e-8)
with h5py.File(mf.chkfile) as fh5:
    fh5['scf/hcore'] = hcore
    fh5['scf/fock'] = fock
    fh5['scf/orthoAORot'] = X
    fh5['scf/nmo_per_kpt'] = nmo_per_kpt

eri_to_h5("ham_chol_uc", "./scf.dump", orthoAO=True, gtol=1e-5)