exercises:2016_uzh_cmest:band_structure_calculation
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| exercises:2016_uzh_cmest:band_structure_calculation [2016/11/05 22:37] – created tmueller | exercises:2016_uzh_cmest:band_structure_calculation [2020/08/21 10:15] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 60: | Line 60: | ||
| SPECIAL_POINT 0.0 | SPECIAL_POINT 0.0 | ||
| SPECIAL_POINT 1./2. 0.0 0.0 | SPECIAL_POINT 1./2. 0.0 0.0 | ||
| - | | + | NPOINTS |
| - | SPECIAL_POINT 0.0 | + | |
| - | | + | |
| &END | &END | ||
| &END BAND_STRUCTURE | &END BAND_STRUCTURE | ||
| Line 93: | Line 91: | ||
| &END FORCE_EVAL | &END FORCE_EVAL | ||
| </ | </ | ||
| + | |||
| + | <note important> | ||
| + | |||
| + | Some notes on the input file: | ||
| + | * By specifying the '' | ||
| + | * While you could specify the K-Points directly, we are using the Monkhorst-Pack scheme [(http:// | ||
| + | * After the basic calculation, | ||
| + | * The keyword '' | ||
| + | * The '' | ||
| + | |||
| + | Now, when you run this input file you will get in addition the the output file, a file named '' | ||
| + | |||
| + | < | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | 8 | ||
| + | | ||
| + | | ||
| + | | ||
| + | 8 | ||
| + | | ||
| + | | ||
| + | | ||
| + | [...] | ||
| + | </ | ||
| + | |||
| + | For each set there is a block named '' | ||
| + | |||
| + | Your tasks: | ||
| + | |||
| + | * Lookup the special points for the $\Gamma$, $M$, $K$ points in the mentioned paper (make sure you choose the right lattice). Calculate and plot the band structure for graphene from $\Gamma$ over $M$, $K$ back to $\Gamma$ (you are free to decide whether to use multiple K-Point sets are multiple special points in a single set). Mark the special points. Choose an appropriate number of interpolation points to get a smooth plot. | ||
| + | * Compare your plot with plots from literature. What is different? | ||
| + | * Why do you get 8 orbital energies? Try to change the input to get more unoccupied orbitals. | ||
| + | |||
| + | To convert the band structure file to a file which can be loaded directly into MATLAB for example, you can use the script '' | ||
| + | |||
| + | <file python cp2k_bs2csv.py> | ||
| + | # | ||
| + | """ | ||
| + | Convert the CP2K band structure output to CSV files | ||
| + | """ | ||
| + | |||
| + | import re | ||
| + | import argparse | ||
| + | |||
| + | SET_MATCH = re.compile(r''' | ||
| + | [ ]* | ||
| + | SET: [ ]* (? | ||
| + | TOTAL [ ] POINTS: [ ]* (? | ||
| + | \n | ||
| + | (? | ||
| + | [\s\S]*? | ||
| + | ) | ||
| + | ''', | ||
| + | |||
| + | SPOINTS_MATCH = re.compile(r''' | ||
| + | [ ]* | ||
| + | POINT [ ]+ (? | ||
| + | ''', | ||
| + | |||
| + | POINTS_MATCH = re.compile(r''' | ||
| + | [ ]* | ||
| + | Nr\. [ ]+ (? | ||
| + | Spin [ ]+ (? | ||
| + | K-Point [ ]+ (? | ||
| + | \n | ||
| + | [ ]* (? | ||
| + | (? | ||
| + | [\s\S]*? | ||
| + | ) | ||
| + | ''', | ||
| + | |||
| + | if __name__ == ' | ||
| + | parser = argparse.ArgumentParser(description=__doc__) | ||
| + | parser.add_argument(' | ||
| + | help=" | ||
| + | |||
| + | args = parser.parse_args() | ||
| + | |||
| + | with open(args.bsfilename, | ||
| + | for kpoint_set in SET_MATCH.finditer(fhandle.read()): | ||
| + | filename = " | ||
| + | kpoint_set.group(' | ||
| + | set_content = kpoint_set.group(' | ||
| + | |||
| + | with open(filename, | ||
| + | print((" | ||
| + | " | ||
| + | | ||
| + | |||
| + | print(" | ||
| + | for point in SPOINTS_MATCH.finditer(set_content): | ||
| + | print(" | ||
| + | **point.groupdict())) | ||
| + | |||
| + | for point in POINTS_MATCH.finditer(set_content): | ||
| + | results = point.groupdict() | ||
| + | results[' | ||
| + | csvout.write(" | ||
| + | |||
| + | </ | ||
| + | |||
exercises/2016_uzh_cmest/band_structure_calculation.1478385437.txt.gz · Last modified: (external edit)
