Author Topic: Bulk density of states  (Read 21981 times)

0 Members and 1 Guest are viewing this topic.

Offline ipsecog

  • Heavy QuantumATK user
  • ***
  • Posts: 35
  • Country: se
  • Reputation: 0
    • View Profile
Bulk density of states
« on: January 9, 2009, 13:06 »
Does anyone have a script that can compute the bulk density of states (DOS) with ATK? The basic functionality is already available in ATK, in some sense; it's really just a matter of k-point sampling, compute E(k), then do some statistics... Ideally, one would want to use the tetrahedron method ;)

But of course it's not trivial...

Offline Nordland

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 812
  • Reputation: 18
    • View Profile
Re: Bulk density of states
« Reply #1 on: January 10, 2009, 20:15 »
I have some time ago written this script for calculating the bulk density of states using ATK.
It uses a tetrahedrone method I developed at the university, but I never got to publish it, so please feel free to use, but please do not publish my method as your own work :)
  • The algorithm divides the irreducible brillouin zone down into tiny tetrahedrone, calculates the eigenvalues in the corner of these tetrahedrones, uses an analytic expression for calculation the density of states given this tetrahedrones and its corners. This method gives a mucher better resolution of the density of states using roughly less than 1/100 for the k-points that the usually histogram approach does.
  • To use this functionality, download both the calculate_dos.py and tetrahedronemethod.py and place them in the same directory. Modify the calculate_dos.py to point at the netcdf file with your bulk calculation in, and simply run the calculate_dos.py.
    You are also welcome to tune parameters in the script, if you want faster but lower resolution. Or higher resolution, but slower.  It should be noted that,
    as soon as the program is able to do so, it will report the time remaining of the calculation :)
I have attached an example for both spin polarized iron and unpolarized silicon.

P.S:
   If you look at the iron example you can see one of the reason it requires some patiences to convergence FeMgOFe systems.

Offline M.Albert

  • Regular QuantumATK user
  • **
  • Posts: 13
  • Reputation: 0
    • View Profile
Re: Bulk density of states
« Reply #2 on: March 6, 2009, 08:23 »
  Hi,Nordland!
  I used your function to calculate DOS of bulk GaN  and bulk Si.
  I set the energy from -5 eV to 5eV, but I found that atk stopped running at 1.85eV for Si and 1.75 eV for GaN. 
  And the picture of Si_dos from -5eV to 1.85eV is the same with yours.

 I don't understand  your code, ???becuse I don't learn this language script before. What should I learn if
 I  want to program  my own functions  like you ?
 Thank you!

Offline Nordland

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 812
  • Reputation: 18
    • View Profile
Re: Bulk density of states
« Reply #3 on: March 6, 2009, 11:09 »
Dear Albert.

Does it come with an error when it stops calculating or does it just take a long time?

Regarding writing your own functions, then the best place to start is the tutorials:

1) You can find the tutorials here.
2) You can seek inspiration here on the forum.
3) There is advance tutorial to be found here

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Bulk density of states
« Reply #4 on: March 6, 2009, 11:15 »

Offline M.Albert

  • Regular QuantumATK user
  • **
  • Posts: 13
  • Reputation: 0
    • View Profile
Re: Bulk density of states
« Reply #5 on: March 6, 2009, 11:51 »
 Dear Nordland.
 thank you for your reply. There is no error .
 It didn't take a long time before 1.85eV(Si_dos),about 10 minutes ,but  1 hour later, it was still running without any result calculated.
  ???

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Bulk density of states
« Reply #6 on: March 6, 2009, 13:07 »
The output is not flushed regularly, but in bursts. So it might be that at 1.85 the buffer was full, and ATK flushed it to the output file.

Offline M.Albert

  • Regular QuantumATK user
  • **
  • Posts: 13
  • Reputation: 0
    • View Profile
Re: Bulk density of states
« Reply #7 on: March 6, 2009, 14:35 »
Dr.Anders Blom ,
  I think you are properly right.
I didn't drag the script to "Job Manager'' this time .Insted, I run the script in Windows CMD using this command line ''atk calculate_dos.py > GaN_DOS.dat'',and it worked. All data from -5 ev to 5 ev appeared in output file GaN.dat.

  But how can we solve the problem that The output  bursts when data is too much ?( drag it to "Job Manager''  )

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Bulk density of states
« Reply #8 on: March 6, 2009, 14:44 »
Running these kinds of calculations requires a bit of patience ;)

I'm not sure if the Job Manager manages stdout better, it might (because it reads the pipe directly). But on the other hand, if you want to run in parallel, the Job Manager is not an option. I'm quite sure that your calculation would have run much faster in parallel. The present ATK-version is however only parallelized in Linux.

Offline zdhlover

  • QuantumATK Guru
  • ****
  • Posts: 106
  • Reputation: 2
    • View Profile
Re: Bulk density of states
« Reply #9 on: June 28, 2009, 10:47 »
 :) Hi,when use this script compute the dos of the two repetition of arm GNR , it stop working and export:Warning: invalid value encountered in divide!



and look at the two( .py) script ,I could not find the key word of divide ,How could I solve the problem?
by the way: I have only modify the route of  .nc file

Offline Nordland

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 812
  • Reputation: 18
    • View Profile
Re: Bulk density of states
« Reply #10 on: June 28, 2009, 11:38 »
Ahh.... The script is created for 3D bulk systems, is your system a 1D/2D system? Then I have to make some small modifications....

Offline zdhlover

  • QuantumATK Guru
  • ****
  • Posts: 106
  • Reputation: 2
    • View Profile
Re: Bulk density of states
« Reply #11 on: June 28, 2009, 11:53 »
 :) :)my GNR is created by the  graphene_ribbon.py that I download from Graphene nanoribbon tutorial .
  And I think it's a 3D bulk, just it is vacuum in other direction  contrast 2D or 1D.
 :( but why the calculate-dos script doesn't work?
« Last Edit: June 28, 2009, 13:13 by zdhlover »

Offline Nordland

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 812
  • Reputation: 18
    • View Profile
Re: Bulk density of states
« Reply #12 on: June 28, 2009, 13:13 »
I will do some magic for you :)

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Bulk density of states
« Reply #13 on: June 29, 2009, 17:07 »