forked from stcarr/kp_tblg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
124 lines (79 loc) · 3.62 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
kp_tblg
Generates k-dot-p Hamiltonians based on
ab initio models of twisted bilayer graphene.
A C++ (python compatible) and a MATLAB version included.
For reference of the k-dot-p model, see (and please cite) the following two works:
"Minimal model for low-energy electronic states of twisted bilayer graphene."
Stephen Carr, Shiang Fang, Ziyan Zhu, Efthimios Kaxiras
https://arxiv.org/abs/1901.03420
"Angle-dependent ab initio low-energy hamiltonians for a relaxed twisted bilayer graphene heterostructure."
Shiang Fang, Stephen Carr, Ziyan Zhu, Daniel Massatt, Efthimios Kaxiras
https://arxiv.org/abs/1908.00058
The 8-band and 5-band reduced models can be found in (check the README!):
./MATLAB_vers/wannierization/
For reference of the 8-band and 5-band models, see (and please cite):
"Derivation of Wannier orbitals and minimal-basis tight-binding hamiltonians for twisted bilayer graphene: a first-principles approach."
Stephen Carr, Shiang Fang, Hoi Chun Po, Ashvin Vishwanath, Efthimios Kaxiras
https://arxiv.org/abs/1907.06282
=====
CONTACT:
stcarr.nj(at)gmail.com
Please let me know of any bugs, or if you have a feature request.
=====
NOTE ON DATASET:
There is currently one dataset of k-dot-p terms.
The terms are organized in "shells" of equal momenta magnitude,
organized via hexagonal Miller (crystallographic) indices.
This includes 10 "shells" of coupling for both interlayer and
intralayer coupling, and 1 "shell" of k-dependent interlayer terms.
The dataset "data/full_relax_kp_01-06-2019.dat" contains terms
for theta between 5.08 and 0.416 (degrees).
We are preparing additional datasets for smaller angles, but these will
be relased seperately. They require many more "shells" for accuracy in
the low-energy electronic states.
=====
NOTE ON UNITS:
Our model uses energy units of eV and length units of Angstroms.
=====
INSTALLATION:
This code requires a c++ compiler and access to the header-only libraries:
Eigen (required)
pybind11 (optional)
A python-readable library can be generated if the option is turned
on in the CMakeLists.txt file in this directory.
If making a python library, you have to pull the pybind11 repo by hand:
git submodule update --init --recursive
To compile:
mkdir build
cd build
cmake ..
make
[python note: if pybind11 is finding python.3.x instead of python.2.x, try:
cmake -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python ..
instead of < cmake .. >, this will usually force it to use python (not python3)]
=====
USE:
The class Kp_tblg_construct can be used to create accurate k-dot-p
Hamiltonians including relaxation of the layers.
(1) Initalize: Kp_tblg_construct kp = Kp_tblg_construct();
(2) Load data file: kp.loadFiles("data/full_relax_kp_01-06-2019.dat");
(3) Set twisting angle: kp.setTwist(1); // in degrees
(4) Set sparsity pattern: kp.prepare();
(5) Access Hamiltonian: Eigen::MatrixXcd H = kp.getH(k); // k must be an Eigen::Vector2d
Then use the hamiltonain H to e.g. compute bandstructure by diagonalization
[In python, the usage is identical, except replace Eigen datatypes with their numpy counterparts]
=====
TESTING (C++):
Execute the application app/kp_tblg_test:
./app/kp_tblg_test
This requires the data file (data/full_relax_kp-01-06-2019.dat) to be
in the same folder as where the executable is called from.
Note that the Eigen diagonalization routine is sometimes very slow, so this may take a while
=====
TESTING (PYTHON):
For testing the python code, try using:
pysrc/generate_H_example.py
pysrc/bandcalc.py
Both the data-file (data/full_relax_kp_01-06-2019.dat)
and the tblg_kpy.so library must be in your current
working directory when these scripts are called.