Esempio n. 1
0
    def readData(self, item, **kwargs):
        if isinstance(item, Charges):
            return extractHirshfeldCharge(self.siestaOutFile())
        elif isinstance(item, BandStructure):
            filename = join(item.runDirectory(), 'siesta.bands')
            return readValenceBandEdge(filename)
        elif isinstance(item, PDOS):
            filename = join(item.runDirectory(), 'siesta.PDOS')

            return readPDOS(filename=filename, **kwargs)

        elif isinstance(item, FermiLevel):
            filename = join(item.runDirectory(), 'siesta.EIG')
            return getFermiEnergy(filename)

        elif isinstance(item, TotalEnergy):
            filename = self.siestaOutFile()
            return readTotalEnergy(filename=filename)

        raise ValueError
Esempio n. 2
0
    def totalEnergy(cls, path, filename='siesta.out'):
        filename = join(path, filename)

        return readTotalEnergy(filename)