-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #282 from giovannipizzi/boltzwann_tests
Adding tests for BoltzWann (at least for the electrical conductivity)
- Loading branch information
Showing
11 changed files
with
7,133 additions
and
0 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
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
silicon.wpout | ||
silicon.mmn | ||
silicon_boltzdos.dat | ||
silicon_kappa.dat | ||
silicon_seebeck.dat | ||
silicon_sigmas.dat | ||
silicon_tdf.dat | ||
|
||
|
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
all: $(patsubst %.chk.fmt.bz2, %.chk, $(wildcard *.chk.fmt.bz2)) $(patsubst %.mmn.bz2, %.mmn, $(wildcard *.mmn.bz2)) | ||
|
||
%.chk: %.chk.fmt.bz2 | ||
$(eval SEEDNAME:=$(patsubst %.chk.fmt.bz2, %, $<)) | ||
echo $(SEEDNAME) | ||
cat $< | bunzip2 - > $(SEEDNAME).chk.fmt && ../../../w90chk2chk.x -f2u $(SEEDNAME) && rm $(SEEDNAME).chk.fmt | ||
|
||
%.mmn: %.mmn.bz2 | ||
$(eval SEEDNAME:=$(patsubst %.mmn.bz2, %, $<)) | ||
echo $(SEEDNAME) | ||
cat $< | bunzip2 - > $(SEEDNAME).mmn | ||
|
||
|
||
.PHONY: all |
4 changes: 4 additions & 0 deletions
4
test-suite/tests/testpostw90_boltzwann/benchmark.out.default.inp=silicon.win
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Written by the BoltzWann module of the Wannier90 code. | ||
# [Electrical conductivity in SI units, i.e. in 1/Ohm/m] | ||
# Mu(eV) Temp(K) ElCond_xx ElCond_xy ElCond_yy ElCond_xz ElCond_yz ElCond_zz | ||
5.000000000 300.0000000 6504317.803 -207173.9111 6669730.422 200281.9835 209188.4251 6478066.135 |
6,146 changes: 6,146 additions & 0 deletions
6,146
test-suite/tests/testpostw90_boltzwann/silicon.amn
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
../../checkpoints/si_geninterp_wsdistance/silicon.chk.fmt.bz2 |
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
../../checkpoints/si_geninterp/silicon.mmn.bz2 |
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 |
---|---|---|
@@ -0,0 +1,124 @@ | ||
num_bands = 12 | ||
num_wann = 8 | ||
use_ws_distance = true | ||
search_shells=12 | ||
|
||
boltzwann = true | ||
boltz_calc_also_dos = true | ||
boltz_dos_energy_step = 0.1 | ||
smr_type = gauss | ||
boltz_dos_adpt_smr = false | ||
boltz_dos_smr_fixed_en_width = 0.03 | ||
kmesh = 20 | ||
boltz_mu_min = 5. | ||
boltz_mu_max = 5. | ||
boltz_mu_step = 0.01 | ||
boltz_temp_min = 300. | ||
boltz_temp_max = 300. | ||
boltz_temp_step = 50 | ||
boltz_relax_time = 10. | ||
|
||
dis_win_max = 17.0d0 | ||
dis_froz_max = 6.4d0 | ||
dis_num_iter = 120 | ||
dis_mix_ratio = 1.d0 | ||
dis_conv_tol = 1.0e-13 | ||
|
||
num_iter = 300 | ||
num_print_cycles = 10 | ||
|
||
Begin Atoms_Frac | ||
Si -0.25 0.75 -0.25 | ||
Si 0.00 0.00 0.00 | ||
End Atoms_Frac | ||
|
||
Begin Projections | ||
Si : sp3 | ||
End Projections | ||
|
||
begin kpoint_path | ||
L 0.50000 0.50000 0.5000 G 0.00000 0.00000 0.0000 | ||
G 0.00000 0.00000 0.0000 X 0.50000 0.00000 0.5000 | ||
X 0.50000 -0.50000 0.0000 K 0.37500 -0.37500 0.0000 | ||
K 0.37500 -0.37500 0.0000 G 0.00000 0.00000 0.0000 | ||
end kpoint_path | ||
|
||
|
||
Begin Unit_Cell_Cart | ||
-2.6988 0.0000 2.6988 | ||
0.0000 2.6988 2.6988 | ||
-2.6988 2.6988 0.0000 | ||
End Unit_Cell_Cart | ||
|
||
|
||
mp_grid = 4 4 4 | ||
|
||
|
||
begin kpoints | ||
0.0000 0.0000 0.0000 | ||
0.0000 0.2500 0.0000 | ||
0.0000 0.5000 0.0000 | ||
0.0000 0.7500 0.0000 | ||
0.2500 0.0000 0.0000 | ||
0.2500 0.2500 0.0000 | ||
0.2500 0.5000 0.0000 | ||
0.2500 0.7500 0.0000 | ||
0.5000 0.0000 0.0000 | ||
0.5000 0.2500 0.0000 | ||
0.5000 0.5000 0.0000 | ||
0.5000 0.7500 0.0000 | ||
0.7500 0.0000 0.0000 | ||
0.7500 0.2500 0.0000 | ||
0.7500 0.5000 0.0000 | ||
0.7500 0.7500 0.0000 | ||
0.0000 0.0000 0.2500 | ||
0.0000 0.2500 0.2500 | ||
0.0000 0.5000 0.2500 | ||
0.0000 0.7500 0.2500 | ||
0.2500 0.0000 0.2500 | ||
0.2500 0.2500 0.2500 | ||
0.2500 0.5000 0.2500 | ||
0.2500 0.7500 0.2500 | ||
0.5000 0.0000 0.2500 | ||
0.5000 0.2500 0.2500 | ||
0.5000 0.5000 0.2500 | ||
0.5000 0.7500 0.2500 | ||
0.7500 0.0000 0.2500 | ||
0.7500 0.2500 0.2500 | ||
0.7500 0.5000 0.2500 | ||
0.7500 0.7500 0.2500 | ||
0.0000 0.0000 0.5000 | ||
0.0000 0.2500 0.5000 | ||
0.0000 0.5000 0.5000 | ||
0.0000 0.7500 0.5000 | ||
0.2500 0.0000 0.5000 | ||
0.2500 0.2500 0.5000 | ||
0.2500 0.5000 0.5000 | ||
0.2500 0.7500 0.5000 | ||
0.5000 0.0000 0.5000 | ||
0.5000 0.2500 0.5000 | ||
0.5000 0.5000 0.5000 | ||
0.5000 0.7500 0.5000 | ||
0.7500 0.0000 0.5000 | ||
0.7500 0.2500 0.5000 | ||
0.7500 0.5000 0.5000 | ||
0.7500 0.7500 0.5000 | ||
0.0000 0.0000 0.7500 | ||
0.0000 0.2500 0.7500 | ||
0.0000 0.5000 0.7500 | ||
0.0000 0.7500 0.7500 | ||
0.2500 0.0000 0.7500 | ||
0.2500 0.2500 0.7500 | ||
0.2500 0.5000 0.7500 | ||
0.2500 0.7500 0.7500 | ||
0.5000 0.0000 0.7500 | ||
0.5000 0.2500 0.7500 | ||
0.5000 0.5000 0.7500 | ||
0.5000 0.7500 0.7500 | ||
0.7500 0.0000 0.7500 | ||
0.7500 0.2500 0.7500 | ||
0.7500 0.5000 0.7500 | ||
0.7500 0.7500 0.7500 | ||
End Kpoints | ||
|
||
|
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
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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
""" | ||
Parser function parse() to parse the <seedname>_geninerp.dat output file of postw90.x. | ||
""" | ||
from __future__ import print_function | ||
|
||
import inspect | ||
import re | ||
from collections import defaultdict | ||
|
||
from . import show_output | ||
|
||
def parse_elcond(fname): | ||
""" | ||
Open the file, parses it and return the values. | ||
""" | ||
retdict = defaultdict(list) | ||
|
||
if show_output: | ||
print( "[{}.{}] Parsing file '{}'".format( | ||
__name__, inspect.currentframe().f_code.co_name, fname)) | ||
|
||
with open(fname) as f: | ||
lines = f.readlines() | ||
|
||
for lno, l in enumerate(lines): | ||
|
||
if l.strip().startswith('#'): | ||
# Skip headers | ||
continue | ||
|
||
pieces = l.split() | ||
if len(pieces) != 8: | ||
raise ValueError("Wrong line length ({}, instead of 5 or 8); line content: {}".format( | ||
len(pieces)), l) | ||
retdict['mu'].append(float(pieces[0])) | ||
retdict['temp'].append(float(pieces[1])) | ||
retdict['elcond_xx'].append(float(pieces[2])) | ||
retdict['elcond_xy'].append(float(pieces[3])) | ||
retdict['elcond_yy'].append(float(pieces[4])) | ||
retdict['elcond_xz'].append(float(pieces[5])) | ||
retdict['elcond_yz'].append(float(pieces[6])) | ||
retdict['elcond_zz'].append(float(pieces[7])) | ||
|
||
retdict = dict(retdict) | ||
if show_output: | ||
for k in sorted(retdict): | ||
print(" {}: {}".format(k, retdict[k])) | ||
print("-"*72) | ||
return retdict |