Ejemplo n.º 1
0
def test_get_band_projection_kpt_9_band_11_gan_3d(file_path):
    """
    Verify if the informations returned about projection
    in the 11ª band of the 9º kpoint is correct for the 3d GaN.
    """
    filename = file_path("/gan-3d/PROCAR")
    procar = Procar(filename)

    kpt_9_band_11_projection = {
        '1': [0.375, 0.000, 0.000, 0.001, 0.003, 0.007, 0.011, 0.003, 0.034],
        '2': [0.001, 0.080, 0.080, 0.132, 0.000, 0.000, 0.000, 0.000, 0.000]
    }

    band_projection = procar.get_band_projection(9, 11)

    for atom_index, projections in band_projection.items():
        for index, element in enumerate(projections):
            assert np.isclose(element,
                              kpt_9_band_11_projection[atom_index][index])
Ejemplo n.º 2
0
def test_get_band_projection_kpt_1_band_5_bn_2d(file_path):
    """
    Verify if the informations returned about projection
    in the 5ª band of the 1º kpoint is correct for the 2d BN.
    """
    filename = file_path("/bn-2d/PROCAR")
    procar = Procar(filename)

    kpt_1_band_5_projection = {
        '1': [0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000],
        '2': [0.041, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000]
    }

    band_projection = procar.get_band_projection(1, 5)

    for atom_index, projections in band_projection.items():
        for index, element in enumerate(projections):
            assert np.isclose(element,
                              kpt_1_band_5_projection[atom_index][index])
Ejemplo n.º 3
0
def test_get_band_projection_kpt_9_band_11_sic_2d(file_path):
    """
    Verify if the informations returned about projection
    in the 11ª band of the 9º kpoint is correct for the 2d SiC.
    """
    filename = file_path("/sic-2d/PROCAR")
    procar = Procar(filename)

    kpt_9_band_11_projection = {
        '1': [0.051, 0.056, 0.000, 0.058, 0.000, 0.000, 0.000, 0.000, 0.000],
        '2': [0.089, 0.002, 0.000, 0.001, 0.000, 0.000, 0.000, 0.000, 0.000]
    }

    band_projection = procar.get_band_projection(9, 11)

    for atom_index, projections in band_projection.items():
        for index, element in enumerate(projections):
            assert np.isclose(element,
                              kpt_9_band_11_projection[atom_index][index])