code: def get_gap(self, tol=0.001, abs_tol=False, spin=None):
          
          (cbm, vbm) = self.get_cbm_vbm(tol, abs_tol, spin)
          return max(cbm - vbm, 0.0)
docs: Expects a DOS object and finds the gap.
  
          Args:
              tol: tolerance in occupations for determining the gap
              abs_tol: An absolute tolerance (True) and a relative one (False)
              spin: Possible values are None - finds the gap in the summed
                  densities, Up - finds the gap in the up spin channel,
                  Down - finds the gap in the down spin channel.
  
          Returns:
              gap in eV