Skip to content

Instantly share code, notes, and snippets.

@quantum-kite
Last active June 10, 2018 18:06
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save quantum-kite/4bfad15826a0680fbfae0afa9d2dfb6e to your computer and use it in GitHub Desktop.
""" DOS and DC conductivity of the Haldane model
Lattice : Honeycomb lattice;
Disorder : Disorder class Uniform at different sublattices;
Configuration : size of the system 256x256, with domain decomposition (nx=ny=12), periodic boundary conditions,
double precision, automatic scaling;
Calculation : DOS and conductivity_dc;
Modification : magnetic field is off;
"""
import kite
import pybinding as pb
from math import sqrt
def haldane():
"""Return the lattice specification for Haldane model"""
a = 0.24595 # [nm] unit cell length
a_cc = 0.142 # [nm] carbon-carbon distance
t=-1
t2 = t/10
m=0
# create a lattice with 2 primitive vectors
lat = pb.Lattice(
a1=[a, 0],
a2=[a/2, a/2 * sqrt(3)]
)
lat.add_sublattices(
# name and position
('A', [0, -a_cc/2],-m),
('B', [0, a_cc/2],m)
)
lat.add_hoppings(
# inside the main cell
([0, 0], 'A', 'B', t),
# between neighboring cells
([1, -1], 'A', 'B', t),
([0, -1], 'A', 'B', t),
([1, 0], 'A', 'A', t2 * 1j),
([0, -1], 'A', 'A', t2 * 1j),
([-1, 1], 'A', 'A', t2 * 1j),
([1, 0], 'B', 'B', t2 * -1j),
([0, -1], 'B', 'B', t2 * -1j),
([-1, 1], 'B', 'B', t2 * -1j)
)
return lat
# make a haldane lattice
lattice = haldane()
# add Uniformly distributed disorder
disorder = kite.Disorder(lattice)
disorder.add_disorder('A', 'Uniform', +0.0, 0.6)
disorder.add_disorder('B', 'Uniform', +0.0, 0.6)
# number of decomposition parts in each direction of matrix.
# This divides the lattice into various sections, each of which is calculated in parallel
nx = ny = 2
# number of unit cells in each direction.
lx = ly = 256
# make config object which caries info about
# - the number of decomposition parts [nx, ny],
# - lengths of structure [lx, ly]
# - boundary conditions, setting True as periodic boundary conditions, and False elsewise,
# - info if the exported hopping and onsite data should be complex,
# - info of the precision of the exported hopping and onsite data, 0 - float, 1 - double, and 2 - long double.
# - scaling, if None it's automatic, if present select spectrum_bound=[e_min, e_max]
configuration = kite.Configuration(divisions=[nx, ny], length=[lx, ly], boundaries=[True, True],
is_complex=True, precision=0)
calculation = kite.Calculation(configuration)
# require the calculation of DOS and conductivity_dc
calculation.dos(num_points=1000, num_moments=512, num_random=10, num_disorder=1)
calculation.conductivity_dc(num_points=1000, num_moments=256, num_random=50, num_disorder=1,
direction='xy', temperature=100)
# configure the *.h5 file
kite.config_system(lattice, configuration, calculation, filename='haldane.h5',
disorder=disorder)
@quantum-kite
Copy link
Author

quantum-kite commented Jun 9, 2018

image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment