def test_band_offsets_fallback(): """Test calculation of band positions and offsets via fallback on Anderson's rule.""" # define a couple of semiconductors without valenceBandOffset matlib = materials.Materials() matlib.add_material('GaAs', 'semi', electronAffinity=4070., directBandGap=1519.) matlib.add_material('InAs', 'semi', directBandGap=417., electronAffinity=4900.) matlib.add_material('InSb', 'semi', electronAffinity=4590., directBandGap=235.) mat1 = matlib.find('InSb', eunit='eV') mat2 = matlib.find('InAs', eunit='eV') mat3 = matlib.find('GaAs', eunit='eV') assert matlib.conduction_band_minimum(mat1) - mat1['directBandGap'] == \ approx(matlib.valence_band_maximum(mat1)) assert matlib.conduction_band_minimum( mat1) - matlib.conduction_band_minimum(mat2) == approx( materials.conduction_band_offset(mat1, mat2)) assert matlib.valence_band_maximum(mat1) + mat1['directBandGap'] == \ approx(matlib.conduction_band_minimum(mat1)) assert matlib.valence_band_maximum(mat1) - matlib.valence_band_maximum( mat2) == approx(materials.valence_band_offset(mat1, mat2)) assert materials.conduction_band_offset(mat1, mat2) + \ materials.conduction_band_offset(mat2, mat3) == \ approx(materials.conduction_band_offset(mat1, mat3)) assert materials.valence_band_offset(mat1, mat2) + \ materials.valence_band_offset(mat2, mat3) == \ approx(materials.valence_band_offset(mat1, mat3))
def test_band_offsets_fallback(): """Test calculation of band positions and offsets via fallback on Anderson's rule.""" # define a couple of semiconductors without valenceBandOffset matlib = materials.Materials() matlib.add_material("GaAs", "semi", electronAffinity=4070.0, directBandGap=1519.0) matlib.add_material("InAs", "semi", directBandGap=417.0, electronAffinity=4900.0) matlib.add_material("InSb", "semi", electronAffinity=4590.0, directBandGap=235.0) mat1 = matlib.find("InSb", eunit="eV") mat2 = matlib.find("InAs", eunit="eV") mat3 = matlib.find("GaAs", eunit="eV") assert matlib.conduction_band_minimum( mat1) - mat1["directBandGap"] == approx( matlib.valence_band_maximum(mat1)) assert matlib.conduction_band_minimum( mat1) - matlib.conduction_band_minimum(mat2) == approx( materials.conduction_band_offset(mat1, mat2)) assert matlib.valence_band_maximum(mat1) + mat1["directBandGap"] == approx( matlib.conduction_band_minimum(mat1)) assert matlib.valence_band_maximum(mat1) - matlib.valence_band_maximum( mat2) == approx(materials.valence_band_offset(mat1, mat2)) assert materials.conduction_band_offset( mat1, mat2) + materials.conduction_band_offset(mat2, mat3) == approx( materials.conduction_band_offset(mat1, mat3)) assert materials.valence_band_offset( mat1, mat2) + materials.valence_band_offset(mat2, mat3) == approx( materials.valence_band_offset(mat1, mat3))
def test_band_offsets(): """Test calculation of band positions and offsets.""" matlib = materials.Materials() mat1 = matlib.find("InSb", eunit="eV") mat2 = matlib.find("InAs", eunit="eV") mat3 = matlib.find("GaAs", eunit="eV") assert matlib.conduction_band_minimum(mat1) - mat1["directBandGap"] == approx( matlib.valence_band_maximum(mat1) ) assert matlib.conduction_band_minimum(mat1) - matlib.conduction_band_minimum( mat2 ) == approx(materials.conduction_band_offset(mat1, mat2)) assert matlib.valence_band_maximum(mat1) + mat1["directBandGap"] == approx( matlib.conduction_band_minimum(mat1) ) assert matlib.valence_band_maximum(mat1) - matlib.valence_band_maximum( mat2 ) == approx(materials.valence_band_offset(mat1, mat2)) assert materials.conduction_band_offset( mat1, mat2 ) + materials.conduction_band_offset(mat2, mat3) == approx( materials.conduction_band_offset(mat1, mat3) ) assert materials.valence_band_offset(mat1, mat2) + materials.valence_band_offset( mat2, mat3 ) == approx(materials.valence_band_offset(mat1, mat3))
def test_band_offsets(): """Test calculation of band positions and offsets.""" matlib = materials.Materials() mat1 = matlib.find('InSb', eunit='eV') mat2 = matlib.find('InAs', eunit='eV') mat3 = matlib.find('GaAs', eunit='eV') assert matlib.conductionBandMinimum(mat1) - mat1['directBandGap'] == \ approx(matlib.valenceBandMaximum(mat1)) assert matlib.conductionBandMinimum(mat1) - matlib.conductionBandMinimum( mat2) == approx(materials.conduction_band_offset(mat1, mat2)) assert matlib.valenceBandMaximum(mat1) + mat1['directBandGap'] == \ approx(matlib.conductionBandMinimum(mat1)) assert matlib.valenceBandMaximum(mat1) - matlib.valenceBandMaximum( mat2) == approx(materials.valence_band_offset(mat1, mat2)) assert materials.conduction_band_offset(mat1, mat2) + \ materials.conduction_band_offset(mat2, mat3) == \ approx(materials.conduction_band_offset(mat1, mat3)) assert materials.valence_band_offset(mat1, mat2) + \ materials.valence_band_offset(mat2, mat3) == \ approx(materials.valence_band_offset(mat1, mat3))