-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9686791
commit 130bf4f
Showing
7 changed files
with
31,075 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
build | ||
build_tb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
#!/usr/bin/env python | ||
|
||
# (c) 2015-2018, ETH Zurich, Institut fuer Theoretische Physik | ||
# Author: Dominik Gresch <[email protected]> | ||
|
||
# Construct a Model from wannier90 tb.dat file. | ||
import os | ||
import shutil | ||
import subprocess | ||
|
@@ -12,29 +9,30 @@ | |
|
||
if __name__ == "__main__": | ||
WANNIER90_COMMAND = os.path.expanduser("~/git/wannier90/wannier90.x") | ||
BUILD_DIR = "./build" | ||
|
||
# shutil.rmtree(BUILD_DIR, ignore_errors=True) | ||
# shutil.copytree("./input", BUILD_DIR) | ||
# subprocess.call([WANNIER90_COMMAND, "silicon"], cwd=BUILD_DIR) | ||
BUILD_DIR = "./build_tb" | ||
|
||
# model = tb.Model.from_wannier_folder(BUILD_DIR, prefix="silicon") | ||
# print(model) | ||
# print(model.hop[(2, 1, -3)]) | ||
if not os.path.exists(BUILD_DIR): | ||
shutil.copytree("./input", BUILD_DIR) | ||
subprocess.call([WANNIER90_COMMAND, "silicon"], cwd=BUILD_DIR) | ||
|
||
BUILD_DIR = "./build2" | ||
model = tb.Model.from_wannier_tb_file( | ||
tb_file=f'{BUILD_DIR}/silicon_tb.dat', | ||
wsvec_file=f'{BUILD_DIR}/silicon_wsvec.dat' | ||
model = tb.Model.from_wannier_tb_files( | ||
tb_file=f"{BUILD_DIR}/silicon_tb.dat", | ||
wsvec_file=f"{BUILD_DIR}/silicon_wsvec.dat", | ||
) | ||
print(model) | ||
# print(model.hop[(2, 1, -3)]) | ||
# exit() | ||
|
||
# Compute band structure along an arbitrary kpath | ||
theta = 37 / 180 * np.pi | ||
phi = 43 / 180 * np.pi | ||
rlist = np.linspace(0, 2, 20) | ||
klist = [[r*np.sin(theta)*np.cos(phi), r*np.sin(theta)*np.sin(phi), r*np.cos(theta)] for r in rlist] | ||
klist = [ | ||
[ | ||
r * np.sin(theta) * np.cos(phi), | ||
r * np.sin(theta) * np.sin(phi), | ||
r * np.cos(theta), | ||
] | ||
for r in rlist | ||
] | ||
|
||
eigvals = model.eigenval(klist) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Oops, something went wrong.