Ejemplo n.º 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
Ejemplo n.º 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