Beispiel #1
0
    def __init__(self,
                 calc=None,
                 label=None,
                 prefix=None,
                 debug=False,
                 colors=None):
        """Electronic Density Of States object.

        calc: quantum espresso calculator object
        label: the directory and prefix

        dos_energies
        print(pdos_info) to see the detail
        pdos_kinds[species][channel][ncomponents]

        """
        if not calc and not label:
            raise ValueError('Please give one of them: calc or label')
        if label:
            calc = Espresso(label=label, prefix=prefix, debug=True)
        calc.read_results()
        self.debug = debug
        if self.debug:
            print(calc.results)
        self.directory = calc.directory
        self.label = calc.label
        self.prefix = calc.prefix
        self.efermi = calc.get_fermi_level()
        self.atoms = calc.results['atoms']
        self.nspins = calc.get_number_of_spins()
        if self.nspins == 0: self.nspins = 1
Beispiel #2
0
    def __init__(self, calc = None, label = None,
                 ):
        """Electronic Density Of States object.

        calc: quantum espresso calculator object
        label: the directory and prefix
        """
        if not calc and not label:
            raise ValueError('Please give one of them: calc or label')
        if label:
            calc = Espresso(label = label)
        calc.read_results()
        self.directory = calc.directory
        self.label = calc.label
        self.prefix = calc.prefix
        self.efermi = calc.get_fermi_level()
        self.atoms = calc.atoms
        self.nspins = calc.get_number_of_spins()
        if self.nspins == 0:  self.nspins = 1
Beispiel #3
0
view(atoms)
print(atoms)
pseudopotentials = {
    'Al': 'Al.pbe-n-rrkjus_psl.1.0.0.UPF',
}
calc = Espresso(pseudopotentials=pseudopotentials,
                label='scf/al',
                ecutwfc=40,
                occupations='smearing',
                degauss=0.01,
                kpts=(4, 4, 1))
atoms.calc = calc
e = atoms.get_potential_energy()
calc.read_results()
e = calc.results['energy']
fermi = calc.get_fermi_level()
print('Energy: {0:1.3f}'.format(e))
#===============================================================
# post calculation
calc.post(package='pp',
          plot_num=5,
          sample_bias=0.0735,
          iflag=3,
          output_format=6,
          fileout='stm1_1eV.cube')
# ========================
# Creates: 2d.png, 2d_I.png, line.png, dIdV.png
from ase.dft.stm import STM
from ase.io.cube import read_cube_data
import pickle
ldos, atoms = read_cube_data('scf/al/stm1_1eV.cube')