reading_procedures

At this moment there are three procedures that can read input files:

**read_FIREBALL_all(name = 'phi_' , geom='answer.bas', fermi=None, orbs = 'sp', pbc=(1,1), imaginary = False, cut_min=-15.0, cut_max=5.0, cut_at=-1, lvs = None, lower_atoms=[], lower_coefs=[])**

This procedure reads geometry from *geom* – '*answer.bas*'.

It reads the The Fermi Level, eigen-energies and the LCAO coefficients from *name*+'*s.dat*',+'*px.dat*',+'*py.dat*',+'*pz.dat*'; in case of 'spd' orbitals also *name*+'*dxy.dat*',+'*dxz.dat*',+'*dyz.dat*',+'*dz2.dat*',+'*dx2y2.dat*'

**read_GPAW_all(name = 'OUTPUT.gpw', fermi = None, orbs = 'sp', pbc=(1,1), imaginary = False, cut_min=-15.0, cut_max=5.0, cut_at=-1, lower_atoms=[], lower_coefs=[] )**

This procedure reads all needed informations (eigen-energies, LCAO coefficients, geometry, the Fermi Level) from the *name* (*GPAW* output) file.

**read_AIMS_all(name = 'KS_eigenvectors.band_1.kpt_1.out', geom='geometry.in', fermi=None, orbs = 'sp', pbc=(1,1), imaginary = False, cut_min=-15.0, cut_max=5.0, cut_at=-1, lower_atoms=[], lower_coefs=[])**

This procedure reads geometry from *geom* – '*geometry.in*'. BEWARE if the PP-AFM pre-calculations are done from a Hartree potential from *FHI-AIMS* and when the cube file DOESN'T have an origin at (0.0,0.0,0.0), then the atomic geometry written in *geometry.in* differs by the AFM calculations by a shift that is written the cube origin (!!! the cube is in atomic units !!!).

The eigen-energies (relative to the Fermi level) and the LCAO coefficient are read from the *name* file.

*FHI-AIMS* is the only DFT code, which can serve as an input for PP-STM calculations for spin-polarized systems. An example how to take into account tunneling from orbitals from both spins:

eigEn1, coefs1, Ratin = RS.read_AIMS_all(name = 'KS_eigenvectors_up.band_1.kpt_1.out', geom='geometry.in',fermi=fermi, orbs = 'spd', pbc=(0,0), imaginary = False, cut_min=-15., cut_max=5., cut_at=-1, lower_atoms=[], lower_coefs=[]) eigEn2, coefs2, Ratin = RS.read_AIMS_all(name = 'KS_eigenvectors_dn.band_1.kpt_1.out', geom='geometry.in',fermi=fermi, orbs = 'spd', pbc=(0,0), imaginary = False, cut_min=-15., cut_max=5., cut_at=-1, lower_atoms=[], lower_coefs=[]) eigEn = np.concatenate((eigEn1, eigEn2), axis=0) coefs = np.concatenate((coefs1, coefs2), axis=0)

These procedures has three outputs: eigen-energies (one dimensional numpy array); LCAO coefficients (two dimensional numpy array); Atomic geometry coordinates (two dimensional numpy array).

There is also a procedure, how to plot a pseudo projected density of state, pseudo means that the density is not normalized, off-site terms are not take into account and normalizations to the overlap matrix is also missing:

**pPDOS(eig, coeffs, energies, eta=0.1, atoms=[], orbs='sp' ,spherical='all')**

eig - eigen-energies obtained from reading procedures.

coeffs - the LCAO coefficients obtained from the reading procedures.

energies - array of energies on which you want to calculate DOS - e.g energies = np.arange(-2.,2.,0.01).

eta - width of the Lorentzian for smearing of the eigenstates.

atoms = [] … all atoms; [0] 1st atom only; [1,5] 2nd & 6th atom ….

orbs = 'sp' or 'spd'.

spherical = 'all' or 's' or 'p' or 'd' or 'px', 'py', 'pz', 'dxy', 'dxz', 'dyz', 'dz2', 'dx2y2'- projection to only some of the spherical harmonics of the atomic orbitals.

reading_procedures.txt · Last modified: 2017/05/05 17:22 (external edit)