Пример #1
0
def test_real_space_HS(setup, k_axes, semi_axis, trs, bz, unfold):
    if k_axes == semi_axis:
        return
    RSE = RealSpaceSE(setup.HS, semi_axis, k_axes, (unfold, unfold, unfold))
    RSE.set_options(dk=100, trs=trs, bz=bz)
    RSE.initialize()
    RSE.green(0.1)
Пример #2
0
def test_real_space_H_3d():
    sc = SuperCell(1., nsc=[3] * 3)
    H = Atom(Z=1, R=[1.001])
    geom = Geometry([0] * 3, atoms=H, sc=sc)
    H = Hamiltonian(geom)
    H.construct(([0.001, 1.01], (0, -1)))
    RSE = RealSpaceSE(H, 0, [1, 2], (3, 4, 2))
    RSE.set_options(dk=100, trs=True)
    RSE.initialize()
    nk = np.ones(3, np.int32)
    nk[[1, 2]] = 23
    bz = BrillouinZone(H, nk)
    RSE.set_options(bz=bz)

    RSE.green(0.1)
    # Since there is only 2 repetitions along one direction we will have the full matrix
    # coupled!
    assert np.allclose(RSE.self_energy(0.1), RSE.self_energy(0.1, coupling=True))
    assert np.allclose(RSE.self_energy(0.1, bulk=True), RSE.self_energy(0.1, bulk=True, coupling=True))