Author Topic: Bandstructure export data  (Read 4241 times)

0 Members and 1 Guest are viewing this topic.

Offline ams_nanolab

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 389
  • Country: in
  • Reputation: 11
    • View Profile
Bandstructure export data
« on: February 13, 2017, 12:10 »
In the ATK 2016.3 , the export bandstructure has lot more data including the k-point co-ordinates which is very good, but I want to export a more simple two column data (like earlier versions of ATK did) to a .dat file from the bandstructure object.

Could you help me with a python script for that?

Offline Jess Wellendorff

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 933
  • Country: dk
  • Reputation: 29
    • View Profile
Re: Bandstructure export data
« Reply #1 on: February 13, 2017, 12:54 »
Exactly what data should be in those 2 columns? It's fairly easy to write a python script that print data to file:
Code
f = open('file.dat', 'w')
data1 = [1,2,3]
data2 = [4,5,6]
for d1,d2 in zip(data1,data2):
    print >> f, d1, d2
f.close()
I suggest you take a look at the documentation for the Bandstructure object to figure out how to retrieve the band struacture data you want before writing it to file: http://docs.quantumwise.com/manuals/Types/Bandstructure/Bandstructure.html

Offline ams_nanolab

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 389
  • Country: in
  • Reputation: 11
    • View Profile
Re: Bandstructure export data
« Reply #2 on: February 13, 2017, 13:31 »
I just want the E-k plot data and nothing else.

from the link I could not pick out the variables I need. kindly help.

I am getting:

# Band 0
x           Energy / eV  Fractional k-point
0.0000e+00  -1.7795e+01   [0.0000e+00, 0.0000e+00, 0.0000e+00]
2.0000e-02  -1.7794e+01   [0.0000e+00, 0.0000e+00, 1.0000e-02]
4.0000e-02  -1.7791e+01   [0.0000e+00, 0.0000e+00, 2.0000e-02]
6.0000e-02  -1.7785e+01   [0.0000e+00, 0.0000e+00, 3.0000e-02]

But I need

x           Energy / eV 
0.0000e+00  -1.7795e+01 
2.0000e-02  -1.7794e+01   
4.0000e-02  -1.7791e+01 
6.0000e-02  -1.7785e+01   

I could of course do post-processing, but a script helps in saving data directly into the format wanted.

Offline Petr Khomyakov

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 1290
  • Country: dk
  • Reputation: 25
    • View Profile
Re: Bandstructure export data
« Reply #3 on: February 13, 2017, 15:19 »
This option of saving the band structure to a data file in xy-format will be available in the Bandstructure Analyzer in ATK2016.4 release that is really coming soon, not later than the end of this week.

Offline ams_nanolab

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 389
  • Country: in
  • Reputation: 11
    • View Profile
Re: Bandstructure export data
« Reply #4 on: February 13, 2017, 15:19 »
Okay that's good  :) Also is it possible to plot in 3D (like the Graphene mexican hat) image attached.
« Last Edit: February 13, 2017, 15:22 by ams_nanolab »

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5575
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Bandstructure export data
« Reply #5 on: February 14, 2017, 21:24 »
Sure, just compute the energy eigenvalues for a regular k-point grid in 2D, collect data in suitable arrays, and use matplotlib to plot it. Just like they did in the figure ;)

Offline ams_nanolab

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 389
  • Country: in
  • Reputation: 11
    • View Profile
Re: Bandstructure export data
« Reply #6 on: February 14, 2017, 22:06 »
Okay. Will do that.