Exemplo n.º 1
0
# Add the root path of the pygra library
import os ; import sys ; sys.path.append(os.environ['PYGRAROOT'])

from pygra import geometry
from pygra import topology
g = geometry.honeycomb_lattice()
h = g.get_hamiltonian(has_spin=False)
h.add_sublattice_imbalance(0.6)
from pygra import topology
topology.parallel.cores = 6

op = h.get_operator("valley",projector=True) # valley operator
(x1,y1) = topology.write_berry(h)
(x,y) = topology.write_berry(h,operator=op)
import matplotlib.pyplot as plt
plt.plot(x,y,c="blue",label="Valley Berry")
plt.scatter(x1,y1,c="red",label="Berry")
plt.legend()
plt.show()
Exemplo n.º 2
0
Arquivo: main.py Projeto: obaica/pygra
# Add the root path of the pygra library
import os
import sys
sys.path.append(os.environ['PYGRAROOT'])

import numpy as np
from pygra import geometry
from pygra import groundstate
from pygra import meanfield
g = geometry.honeycomb_lattice()
h = g.get_hamiltonian(has_spin=False)  # create hamiltonian of the system
nk = 10
filling = 0.5

mf = meanfield.guess(h, "random")  # initialization
scf = meanfield.Vinteraction(h, mf=mf, V2=2.0, nk=nk, filling=filling, mix=0.1)
print(scf.identify_symmetry_breaking())
h = scf.hamiltonian  # get the Hamiltonian
print("Topological invariant", h.get_topological_invariant())
h.get_bands()  # calculate band structure
from pygra import topology
groundstate.hopping(h)
topology.write_berry(h)
Exemplo n.º 3
0
# Add the root path of the pygra library
import os
import sys
sys.path.append(os.environ['PYGRAROOT'])

from pygra import geometry
from pygra import topology
from pygra import klist
g = geometry.honeycomb_lattice()
h = g.get_hamiltonian(has_spin=False)
#h.add_haldane(0.05)
#h.add_zeeman(0.3)
#h.add_rashba(0.3)
h.add_sublattice_imbalance(0.6)
from pygra import dos
from pygra import topology
#op = h.get_operator("valley",projector=True) # valley operator
op = None
#topology.write_berry(h,mode="Green",operator=op,delta=0.00001)
op = None
(x1, y1) = topology.write_berry(h, mode="Wilson", operator=op)
(x, y) = topology.write_berry(h, mode="Green", operator=op)
import matplotlib.pyplot as plt
plt.plot(x, y, c="blue", label="Wilson")
plt.scatter(x1, y1, c="red", label="Berry")
plt.legend()
plt.show()
Exemplo n.º 4
0
# Add the root path of the pygra library
import os ; import sys ; sys.path.append(os.environ['PYGRAROOT'])

from pygra import geometry
from pygra import topology
from pygra import klist
g = geometry.honeycomb_lattice()
h = g.get_hamiltonian(has_spin=False)
#h.add_haldane(0.05)
#h.add_zeeman(0.3)
#h.add_rashba(0.3)
h.add_sublattice_imbalance(0.6)
from pygra import dos
from pygra import topology
op = h.get_operator("valley",projector=True) # valley operator
(x1,y1) = topology.write_berry(h)
(x,y) = topology.write_berry(h,operator=op)
import matplotlib.pyplot as plt
plt.plot(x,y,c="blue",label="Valley Berry")
plt.scatter(x1,y1,c="red",label="Berry")
plt.legend()
plt.show()
Exemplo n.º 5
0
# Add the root path of the pygra library
import os ; import sys ; sys.path.append(os.environ['PYGRAROOT'])

from pygra import geometry
from pygra import topology
from pygra import klist
g = geometry.honeycomb_lattice()
h = g.get_hamiltonian(has_spin=False)
#h.add_haldane(0.05)
#h.add_zeeman(0.3)
#h.add_rashba(0.3)
h.add_sublattice_imbalance(0.6)
from pygra import dos
from pygra import topology
#op = h.get_operator("valley",projector=True) # valley operator
op = None
#topology.write_berry(h,mode="Green",operator=op,delta=0.00001)
op = None
(x1,y1) = topology.write_berry(h,mode="Wilson",operator=op)
(x,y) = topology.write_berry(h,mode="Green",operator=op)
import matplotlib.pyplot as plt
plt.plot(x,y,c="blue",label="Wilson")
plt.scatter(x1,y1,c="red",label="Berry")
plt.legend()
plt.show()