Author Topic: DOS for bulk  (Read 20438 times)

0 Members and 1 Guest are viewing this topic.

Offline Nordland

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 812
  • Reputation: 18
    • View Profile
Re: DOS for bulk
« Reply #15 on: July 6, 2009, 09:02 »
Well, It is not possible straight forward I think, but I think you can do it in two steps without having to modify the entire script.

If you go to line 6
Quote
    bs = calculateEnergyBands(scf, [k])
and insert Spin.Up into the line after [k]:
Quote
    bs = calculateEnergyBands(scf, [k], Spin.Up)

Then it will calculate the spin up density of states - replace Spin.Up with Spin.Down for the spin down density of states.

Offline tigeryzz

  • Heavy QuantumATK user
  • ***
  • Posts: 34
  • Reputation: 0
    • View Profile
Re: DOS for bulk
« Reply #16 on: July 6, 2009, 14:26 »
Hi, Nordland and Anders
The script run well for the gold atom.but i tried to calculate the DOS of a 2d system, such as graphene which can be found in the Crystal cupboard. it dose not work and the following warning has appeared
Warning: invalid value encountered in divide.
I have no way to deal with it now ???

Offline Nordland

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 812
  • Reputation: 18
    • View Profile
Re: DOS for bulk
« Reply #17 on: July 6, 2009, 15:23 »
I think that there is no script for calculating the density of states in 2D out there :)

Perhaps I should make one :)

Offline zh

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 1141
  • Reputation: 24
    • View Profile
Re: DOS for bulk
« Reply #18 on: July 7, 2009, 02:42 »
Please refer to  the tutorial page:
http://www.quantumwise.com/tutorials

Especially look at "Band structure and DOS".  The band structure and density of states for a spin-polarized case are demonstrated there. 

In addition, although the script in current thread is pasted for the non-spin-polarized case, it is easy to slightly modify this script for a spin-polarized case. The naive modification: i) do a spin-polarized calculation for your system, ii) exact the eigenvalues of the spin-up and spin-down, separately; iii) calculate the DOS for the spin-up and the spin-down, separately.








Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: DOS for bulk
« Reply #19 on: July 7, 2009, 13:00 »
Tricky bit is you need different algorithms for different dimensionalities, although the most general approach, as used in the 3D bulk case, would work for 1D and 2D (with small modifications).

For spin, Nordland had a suggestion above that certainly would work. However, modifying the script to support spin would perhaps be better; I'll have a look at it!

Offline tigeryzz

  • Heavy QuantumATK user
  • ***
  • Posts: 34
  • Reputation: 0
    • View Profile
Re: DOS for bulk
« Reply #20 on: July 10, 2009, 14:49 »
Thank you for all your attentions.
And Norland, Thanks for your hard working.and I wish the script can be complete that it can run well with any systems. It is really hard to me to modify the script in order to adapt my system.

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: DOS for bulk
« Reply #21 on: July 27, 2009, 14:47 »
For jiangning198511:

I have re-engineered the 1D DOS module to handle spin. Try the attached script instead of the original "dos1d.py". You use it exactly like the original; the script will internally determine if the calculation was spin-polarized or not. The two spin components will be plotted red and blue, but it's simple to modifiy the script to change this, or any other plotting preferences.

Note that Nordland's method, which is really simple and straightforward, works quite well too, although you need to fiddle with the script each time you want to change the spin component, of course. But it's still easier, perhaps, if you want separate plots of the up and down spins.

Offline hejun8035

  • Heavy QuantumATK user
  • ***
  • Posts: 47
  • Reputation: 0
    • View Profile
Re: DOS for bulk
« Reply #22 on: June 24, 2010, 07:20 »
Dear Anders Blom :

       I can run the script and obtain the PNG file in windos system, but can' t run in Linux system. while running in Linux there is nothing result. why?(My Linux system is CentOS5.2.)

Offline ugglebot

  • Regular QuantumATK user
  • **
  • Posts: 22
  • Country: se
  • Reputation: 1
    • View Profile
Re: DOS for bulk
« Reply #23 on: June 24, 2010, 09:14 »
In all friendliness, unless you post the script that doesn't work, how do you expect anyone can help you?

Offline hejun8035

  • Heavy QuantumATK user
  • ***
  • Posts: 47
  • Reputation: 0
    • View Profile
Re: DOS for bulk
« Reply #24 on: June 25, 2010, 04:40 »
the script is download from there, I only modify the filename.nc.

I can obtain the result in windows system.

Offline ugglebot

  • Regular QuantumATK user
  • **
  • Posts: 22
  • Country: se
  • Reputation: 1
    • View Profile
Re: DOS for bulk
« Reply #25 on: June 25, 2010, 10:24 »
the script is download from there, I only modify the filename.nc.

Which is why I asked you to attach the script. You probably changed it in a way that makes it not work. For instance, if you wrote "C:\users\me\file.nc", this will not work on Linux. Or if the file is not in the same directory as where you run it. Or several other things. Nobody can guess what's wrong with the script unless they can see it   :-\

Also, when you say it doesn't work, there are many ways it can fail. Are there any error message? Do you get an empty file? Is there a file but no results?  ???

I'm not writing this to be impolite or rude. We are many users on this Forum who are happy to help other users, but to do so, a certain amount of information is needed. Otherwise you will simply not get any answers to your questions. So in any situation where there is a problem with a script, post the script. And if something doesn't work, tell how it fails, not just that it fails. Any messages printed from the program should always be included in the post.

If everyone does this, questions can be answered faster and we can all be more productive doing what we enjoy, i.e. doing nice science with ATK

:) 8) ;D