QuantumATK Forum

QuantumATK => Scripts, Tutorials and Applications => Topic started by: ipsecog on January 9, 2009, 13:06

Title: Bulk density of states
Post by: ipsecog 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...
Title: Re: Bulk density of states
Post by: Nordland 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 :)
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.
Title: Re: Bulk density of states
Post by: M.Albert 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!
Title: Re: Bulk density of states
Post by: Nordland 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 (http://www.quantumwise.com/documents/manuals/ATK-2008.10/part.tutorials.html).
2) You can seek inspiration here on the forum.
3) There is advance tutorial to be found here (http://www.quantumwise.com/publications/tutorials)
Title: Re: Bulk density of states
Post by: Anders Blom on March 6, 2009, 11:15
Some useful Python links here: http://quantumwise.com/forum/index.php?topic=79.0
Title: Re: Bulk density of states
Post by: M.Albert 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.
  ???
Title: Re: Bulk density of states
Post by: Anders Blom 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.
Title: Re: Bulk density of states
Post by: M.Albert 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''  )
Title: Re: Bulk density of states
Post by: Anders Blom 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.
Title: Re: Bulk density of states
Post by: zdhlover 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
Title: Re: Bulk density of states
Post by: Nordland 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....
Title: Re: Bulk density of states
Post by: zdhlover 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?
Title: Re: Bulk density of states
Post by: Nordland on June 28, 2009, 13:13
I will do some magic for you :)
Title: Re: Bulk density of states
Post by: Anders Blom on June 29, 2009, 17:07
For DOS in 1D systems, see http://quantumwise.com/forum/index.php?topic=261.0