QuantumATK Forum

QuantumATK => General Questions and Answers => Topic started by: qiuminz on June 4, 2019, 15:14

Title: How to export the data of surfacebandstructure?
Post by: qiuminz on June 4, 2019, 15:14
Dear Quantumwise staffs:
   In ATK2019.03, surfacebandstructure can be calculated, but the data in the hdf5 file can't be export as 'txt' file? and it can only polt the A(ε,K║)?
 what about the 2D Brillouin District at the definite Z along the C axis? just like the paper you post on the NANOLETTER(DOI:10.1021/acs.nanolett.7b02511). could you help me for these problems?
Title: Re: How to export the data of surfacebandstructure?
Post by: Petr Khomyakov on June 11, 2019, 12:54
You can do projections on groups of atoms to get layer-resolved surface band structure, see https://docs.quantumatk.com/manual/Types/SurfaceBandstructure/SurfaceBandstructure.html. You can set projections in the GUI or in the script.

There is no standard option of saving the surface band structure data to a text file, using the NanoLab GUI. You may however always save the data to such a file through python-scripting.

Code
sbs=nlread('filename.hdf5',SurfaceBandstructure)[-1]

energies=sbs.energies().inUnitsOf(eV)

kpoints=sbs.kpoints()

sbs_dos=sbs.evaluate().inUnitsOf(eV**-1)

for nk in range(len(kpoints)):
 for ne in range(len(energies)):
   print(kpoints[nk], energies[ne], sbs_dos[nk,ne])

This creates a log file with the data arranged in a kind of xyz format, where x->k-point, y->energy, z->density of states that quantifies the surface band structure at the (k,E) point, see  https://docs.quantumatk.com/manual/Types/SurfaceBandstructure/SurfaceBandstructure.html for more details
Title: Re: How to export the data of surfacebandstructure?
Post by: qiuminz on June 17, 2019, 10:22
thank you very much for your reply :)