コード例 #1
0
atom.info['eigenvalues'] = {nl: atom.get_eigenvalue(nl) for nl in atom.valence}

if (element == "H"):
  # https://webbook.nist.gov/cgi/cbook.cgi?ID=C12385136&Mask=20
  # hubbard value = U = IE - EA = 13.59844 - 0.75497 = 12.84347 [eV]
  U_p = 12.84347/Ha
else:
  U_p = atom.get_hubbard_value(nls, scheme='central', maxstep=1.)
atom.info['hubbardvalues'] = {'s': U_p}
atom.info['occupations'] = occupations

# Creating a DFTB+ band structure evaluator and
# supplying it with a reference (DFT) band structure
dpbs = DftbPlusBandStructure(Hamiltonian_SCC='Yes',
                             Hamiltonian_OrbitalResolvedSCC='No',
                             Hamiltonian_MaxAngularMomentum_='',
                             Hamiltonian_MaxAngularMomentum_Y=lmax,
                             Hamiltonian_PolynomialRepulsive='SetForAll {Yes}')

bs_gpaw = read_json('bs_gpaw.json')  # the reference band structure (DFT)
atoms = bulk(element,struct,a=La,b=Lb,c=Lc,alpha=Lalpha)
# see hotcent.tools.DftbPlusBandStructure for more information
# on the various keyword arguments used below
dpbs.add_reference_bandstructure(bs_gpaw, atoms=atoms, kpts_scf=kpts,
                                 reference_level='vbm', nsemicore=0, weight=1.,
                                 distribution={'type': 'Boltzmann', 'kBT': 1.5})

# Setting up and running the actual optimizer
# (the keyword arguments are known from hotcent.slako.SlaterKosterTable)
confopt = ConfinementOptimizer(atom, N=500, rmin=0.4, dr=0.02, stride=4,
                               superposition='density', xc=xc)