# Path: src/obpds/units.py
# def to_units(v, u):


from .units import units, to_units, cm, cm3
import numpy
        # initialize caches
        self._Nc_Gamma = {}
        self._Nc_X = {}
        self._Nc_L = {}
        self._Nv = {}
        self._nie = {}
        self._Ei = {}
        
        self._alloy = alloy

        if doping is not None and Na is not None:
            raise ValueError('If doping is specified, Na cannot be')
        if doping is not None and Nd is not None:
            raise ValueError('If doping is specified, Nd cannot be')

        if doping is not None:
            doping = to_units(doping, 1./cm3)
            if doping >= 0:
                self._Na = doping
                self._Nd = 0.
            else:
                self._Na = 0
                self._Nd = -doping
        else:
            if Na is not None:
                self._Na = to_units(Na, 1./cm3)
            else:
                self._Na = 0.
    
            if Nd is not None:

# Path: src/obpds/units.py
# def to_units(v, u):


# Path: src/obpds/material.py
from .units import units, to_units, cm, cm3
import numpy

        # initialize caches
        self._Nc_Gamma = {}
        self._Nc_X = {}
        self._Nc_L = {}
        self._Nv = {}
        self._nie = {}
        self._Ei = {}
        
        self._alloy = alloy

        if doping is not None and Na is not None:
            raise ValueError('If doping is specified, Na cannot be')
        if doping is not None and Nd is not None:
            raise ValueError('If doping is specified, Nd cannot be')

        if doping is not None:
            doping = to_units(doping, 1./cm3)
            if doping >= 0:
                self._Na = doping
                self._Nd = 0.
            else:
                self._Na = 0
                self._Nd = -doping
        else:
            if Na is not None:
                self._Na = to_units(Na, 1./cm3)
            else:
                self._Na = 0.
    
            if Nd is not None:

                self._Nd = to_units(Nd, 1./cm3)