Exemple #1
0
def test_real_space_H_k_trs(setup):
    semi = RecursiveSI(setup.H, '-B')
    surf = setup.H.tile(4, 1)
    surf.set_nsc(b=1)
    RSI = RealSpaceSI(semi, surf, 0, (3, 1, 3))
    RSI.set_options(dk=100, trs=True, bz=None)
    RSI.initialize()
    RSI.green(0.1, [0, 0, 0.1], dtype=np.complex128)
Exemple #2
0
def test_real_space_HS(setup, k_axes, trs, bz, unfold, bulk, coupling):
    semi = RecursiveSI(setup.HS, '-B')
    surf = setup.HS.tile(4, 1)
    surf.set_nsc(b=1)
    RSI = RealSpaceSI(semi, surf, k_axes, (unfold, 1, unfold))
    RSI.set_options(dk=100, trs=trs, bz=bz)
    RSI.initialize()
    RSI.self_energy(0.1, bulk=bulk, coupling=coupling)
Exemple #3
0
def test_real_space_SI_fail_unfold_in_semi(setup):
    semi = RecursiveSI(setup.H, '-B')
    surf = setup.H.tile(4, 1)
    surf.set_nsc(b=1)
    RSI = RealSpaceSI(semi, surf, 0, (2, 2, 1))
Exemple #4
0
def test_real_space_SI_fail_k_no_nsc(setup):
    semi = RecursiveSI(setup.H, '-B')
    surf = setup.H.tile(4, 1)
    surf.set_nsc([1] * 3)
    RSI = RealSpaceSI(semi, surf, 0, (2, 1, 1))
Exemple #5
0
def test_real_space_SI_fail_semi_in_k(setup):
    semi = RecursiveSI(setup.H, '-B')
    surf = setup.H.tile(4, 1)
    surf.set_nsc(b=1)
    RSI = RealSpaceSI(semi, surf, [0, 1], (2, 1, 1))
Exemple #6
0
def test_real_space_SI_fail_unfold_in_semi(setup):
    semi = RecursiveSI(setup.H, '-B')
    surf = setup.H.tile(4, 1)
    surf.set_nsc(b=1)
    with pytest.raises(ValueError):
        RSI = RealSpaceSI(semi, surf, 0, (2, 2, 1))
Exemple #7
0
def test_real_space_SI_fail_k_no_nsc(setup):
    semi = RecursiveSI(setup.H, '-B')
    surf = setup.H.tile(4, 1)
    surf.set_nsc([1] * 3)
    with pytest.raises(ValueError):
        RSI = RealSpaceSI(semi, surf, 0, (2, 1, 1))
Exemple #8
0
def test_real_space_SI_H_test(setup):
    semi = RecursiveSI(setup.H, '-B')
    surf = setup.H.tile(4, 1)
    surf.set_nsc(b=1)
    RSI = RealSpaceSI(semi, surf, 0, (3, 1, 3))
    RSI.set_options(dk=100, trs=False, bz=None)
    RSI.initialize()
    RSI.green(0.1, [0, 0, 0.1], dtype=np.complex128)
    RSI.self_energy(0.1, [0, 0, 0.1])
    RSI.clear()