print("rNum = ",rNum) #lmax = valence[-1][1] lmax = str(elem_list[6]) print("lmax = ",lmax) # Setting up the atomic DFT instance(s) and # calculating the eigenvalues and Hubbard values atom = AtomicDFT(element, configuration=configuration, valence=valence, xc=xc, scalarrel=True, mix=0.005, maxiter=50000, confinement=PowerConfinement(r0=40., s=4), txt=None) atom.run() atom.info = {} 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
weight=1., distribution={ 'type': 'Boltzmann', 'kBT': 1.5 }) elements = ['N', 'O'] atoms = [] for element in elements: occ_2p = 3 if element == 'N' else 4 atom = AtomicDFT(element, configuration='[He] 2s2 2p%d' % occ_2p, valence=['2s', '2p'], xc='LDA', scalarrel=False, confinement=PowerConfinement(r0=40., s=4), txt='atomic.out') atom.run() atom.info = {} atom.info['eigenvalues'] = { nl: atom.get_eigenvalue(nl) for nl in atom.valence } U_p = atom.get_hubbard_value('2p', scheme='central', maxstep=1.) atom.info['hubbardvalues'] = {'s': U_p} atom.info['occupations'] = {'2s': 2, '2p': occ_2p} atoms.append(atom) sk_kwargs = { 'N': { 'default': 380,
scalarrel=False, ) atom.run() eigenvalues = {nl: atom.get_eigenvalue(nl) for nl in valence} # --------------------------------------- # Compute Hubbard values of the free atom # --------------------------------------- atom = AtomicDFT( element, xc=xc, configuration=configuration, valence=valence, scalarrel=False, confinement=PowerConfinement(r0=40., s=4), ) U = atom.get_hubbard_value('3p', scheme='central', maxstep=1.) hubbardvalues = {'s': U} # ------------------------------- # Compute Slater-Koster integrals # ------------------------------- r_cov = covalent_radii[atomic_numbers[element]] / Bohr r_wfc = 2 * r_cov r_rho = 3 * r_cov atom = AtomicDFT( element, xc=xc, confinement=PowerConfinement(r0=r_wfc, s=2),
print("rNum = ", rNum) #lmax = valence[-1][1] lmax = str(elem_list[6]) print("lmax = ", lmax) # Setting up the atomic DFT instance(s) and # calculating the eigenvalues and Hubbard values atom = AtomicDFT(element, configuration=configuration, valence=valence, xc=xc, scalarrel=True, mix=0.005, maxiter=50000, confinement=PowerConfinement(r0=40., s=4), txt=None) atom.run() atom.info = {} 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
#!/usr/bin/python3 from ase.units import Ha from hotcent.atomic_dft import AtomicDFT from hotcent.confinement import PowerConfinement atom = AtomicDFT( 'Si', xc='LDA', configuration='[Ne] 3s2 3p2', valence=['3s', '3p'], scalarrel=False, # Add a very weak confinement potential to aid anion convergence: confinement=PowerConfinement(r0=40., s=4), ) # Like above, we use a central difference scheme # with changes in the occupation of 1 |e| U = atom.get_hubbard_value('3p', scheme='central', maxstep=1) print('=======================================') print('U [Ha]:', U, '[eV]:', U * Ha)
""" This example aims to reproduce the Au-Au Slater-Koster table generation procedure by Fihey and coworkers (doi:10.1002/jcc.24046). """ from hotcent.slako import SlaterKosterTable from hotcent.confinement import PowerConfinement from hotcent.atomic_dft import AtomicDFT element = 'Au' xc = 'GGA_X_PBE+GGA_C_PBE' # Get KS all-electron ground state of confined atom conf = PowerConfinement(r0=9.41, s=2) wf_conf = { '5d': PowerConfinement(r0=6.50, s=2), '6s': PowerConfinement(r0=6.50, s=2), '6p': PowerConfinement(r0=4.51, s=2), } atom = AtomicDFT( element, xc=xc, confinement=conf, wf_confinement=wf_conf, configuration='[Xe] 4f14 5d10 6s1 6p0', valence=['5d', '6s', '6p'], scalarrel=True, timing=True, nodegpts=150, mix=0.2, txt='-', ) atom.run()
def check(x, y, eps): line = 'Result: {: .8f} | Ref.: {: .8f} | '.format(x, y) line += 'OK' if abs(x - y) < eps else 'FAIL' return line def check_abs(x, y, eps): return check(abs(x), abs(y), eps) # Check confined boron atom atom1 = AtomicDFT( 'B', xc='LDA', confinement=PowerConfinement(r0=2.9, s=2), configuration='[He] 2s2 2p1', valence=['2s', '2p'], txt=None, ) atom1.run() ener = atom1.get_energy() print('B -- Etot | %s' % check(ener, -23.079723850586106, eps_etot)) e_2s = atom1.get_epsilon('2s') print('B -- E_2s | %s' % check(e_2s, 0.24990807910273996, eps)) e_2p = atom1.get_epsilon('2p') print('B -- E_2p | %s' % check(e_2p, 0.47362603289831301, eps)) # Check confined hydrogen atom atom2 = AtomicDFT( 'H',
from ase.build import bulk from ase.data import atomic_numbers, covalent_radii from hotcent.atomic_dft import AtomicDFT from hotcent.confinement import PowerConfinement from hotcent.tools import ConfinementOptimizer, DftbPlusBandStructure # Setting up the atomic DFT instance(s) and # calculating the eigenvalues and Hubbard values atom = AtomicDFT('Si', configuration='[Ne] 3s2 3p2 3d0', valence=['3s', '3p', '3d'], xc='LDA', scalarrel=False, mix=0.05, maxiter=500, confinement=PowerConfinement(r0=40., s=4), txt=None) atom.run() atom.info = {} atom.info['eigenvalues'] = {nl: atom.get_eigenvalue(nl) for nl in atom.valence} U_p = atom.get_hubbard_value('3p', scheme='central', maxstep=1.) atom.info['hubbardvalues'] = {'s': U_p} atom.info['occupations'] = {'3s': 2, '3p': 2, '3d': 0} # 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_Si='d',