#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} 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_Tl=lmax, Hamiltonian_PolynomialRepulsive='SetForAll {Yes}')
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', xc='LDA', confinement=PowerConfinement(r0=1.1, s=2), configuration='1s1', valence=['1s'], txt=None,