Calculate the doping (majority carrier concentration) at a given fermi
        level and temperature. A simple Left Riemann sum is used for integrating
        the density of states over energy & equilibrium Fermi-Dirac distribution

        Args:
            fermi (float): the fermi level in eV
            T (float): the temperature in Kelvin

        Returns (float): in units 1/cm3. If negative it means that the majority
            carriers are electrons (n-type doping) and if positive holes/p-type

def get_doping(self, fermi, T):
        """
        Calculate the doping (majority carrier concentration) at a given fermi
        level and temperature. A simple Left Riemann sum is used for integrating
        the density of states over energy & equilibrium Fermi-Dirac distribution

        Args:
            fermi (float): the fermi level in eV
            T (float): the temperature in Kelvin

        Returns (float): in units 1/cm3. If negative it means that the majority
            carriers are electrons (n-type doping) and if positive holes/p-type
        """
        cb_integral = np.sum(self.tdos[self.idx_cbm:]
                             * f0(self.energies[self.idx_cbm:], fermi, T)
                             * self.de[self.idx_cbm:], axis=0)
        vb_integral = np.sum(self.tdos[:self.idx_vbm + 1]
                             * (1 - f0(self.energies[:self.idx_vbm + 1], fermi, T))
                             * self.de[:self.idx_vbm + 1], axis=0)
        return (vb_integral - cb_integral) / (self.volume * self.A_to_cm ** 3)