Exemple #1
0
 def test_berry_phase_loop(self, setup):
     g = setup.g.tile(2, 0).tile(2, 1).tile(2, 2)
     H = Hamiltonian(g)
     bz1 = BandStructure.param_circle(H, 20, 0.01, [0, 0, 1], [1 / 3] * 3)
     bz2 = BandStructure.param_circle(H,
                                      20,
                                      0.01, [0, 0, 1], [1 / 3] * 3,
                                      loop=True)
     assert np.allclose(berry_phase(bz1), berry_phase(bz2))
Exemple #2
0
 def test_berry_phase_fail_loop(self, setup):
     g = setup.g.tile(2, 0).tile(2, 1).tile(2, 2)
     H = Hamiltonian(g)
     bz = BandStructure.param_circle(H,
                                     20,
                                     0.01, [0, 0, 1], [1 / 3] * 3,
                                     loop=True)
     elec.berry_phase(bz)
Exemple #3
0
 def test_berry_phase(self, setup):
     R, param = [0.1, 1.5], [1., 0.1]
     g = setup.g.tile(2, 0).tile(2, 1).tile(2, 2)
     H = Hamiltonian(g)
     H.construct((R, param))
     bz = BandStructure.param_circle(H, 20, 0.01, [0, 0, 1], [1 / 3] * 3)
     berry_phase(bz)
     berry_phase(bz, sub=0)
     berry_phase(bz, eigvals=True, sub=0)
Exemple #4
0
 def test_berry_phase_fail_sc(self, setup):
     g = setup.g.tile(2, 0).tile(2, 1).tile(2, 2)
     H = Hamiltonian(g)
     bz = BandStructure.param_circle(H.geometry.sc, 20, 0.01, [0, 0, 1],
                                     [1 / 3] * 3)
     berry_phase(bz)