Author Topic: Function for calculating Projected Density of States  (Read 85706 times)

0 Members and 1 Guest are viewing this topic.

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5583
  • Country: dk
  • Reputation: 100
    • View Profile
    • QuantumATK at Synopsys
Re: Function for calculating Projected Density of States
« Reply #30 on: February 8, 2010, 00:14 »
The statement
Code
pdos = calculateProjectedDensityOfStates(scf,numpy.arange(-3,3.01,0.01)*Units.eV,
                                         projection_atoms = projection_atoms)
explicitly specifies the energy spacing between points (0.01 eV in this case).

Offline Sabrina

  • Regular QuantumATK user
  • **
  • Posts: 17
  • Reputation: 0
    • View Profile
Re: Function for calculating Projected Density of States
« Reply #31 on: February 8, 2010, 07:25 »
But I want to fix the 0.001 eV between the two points. Is it impossible?

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5583
  • Country: dk
  • Reputation: 100
    • View Profile
    • QuantumATK at Synopsys
Re: Function for calculating Projected Density of States
« Reply #32 on: February 8, 2010, 07:50 »
Code
pdos = calculateProjectedDensityOfStates(scf,numpy.arange(-3,3.01,0.001)*Units.eV,
                                         projection_atoms = projection_atoms)

Offline xhsh

  • Heavy QuantumATK user
  • ***
  • Posts: 32
  • Reputation: 0
    • View Profile
Re: Function for calculating Projected Density of States
« Reply #33 on: March 31, 2010, 10:54 »
Hello, Dear Anders Blom and Nordland,

About this script, I want to report one problem.

Still for the Li-H2-Li example that we always take, when I calculate the PDOS for the atom list [0,1,2,3,4,5,6,7], we really get exactly the same result by this script as by the function calculateDensityOfStates(). However, when I calculate the PDOS for the 3rd and 4th (which are the first and the second H atoms) separately, I get a very strange result.  These two atoms are equivalent, thus their PDOS should be the same. However, from the calculations with this script,  it is not the same at all. It is totally different. What's more, one is positive, while the other is always negative!  Please see the attached figure. I do not think the negative PDOS in the whole energy range is caused by the small imaginary part in the Green's function. Are there any problems with my calculations? Or could you try it, please? 

Thank you very much.

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5583
  • Country: dk
  • Reputation: 100
    • View Profile
    • QuantumATK at Synopsys
Re: Function for calculating Projected Density of States
« Reply #34 on: April 1, 2010, 04:45 »
If you calculate the PDOS of each atom individually, and sum them up, do you get the total DOS of atoms 0 to 7?

Offline xhsh

  • Heavy QuantumATK user
  • ***
  • Posts: 32
  • Reputation: 0
    • View Profile
Re: Function for calculating Projected Density of States
« Reply #35 on: April 1, 2010, 09:27 »
Yes. When I sum them up, I can get exactly the same result as the total DOS.  The output of each atom, the total DOS and the comparison of them are attached.

Does it mean that the projected DOS obtained in this way might be wrong?
« Last Edit: April 1, 2010, 11:51 by xhsh »

Offline Nordland

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 812
  • Reputation: 18
    • View Profile
Re: Function for calculating Projected Density of States
« Reply #36 on: April 5, 2010, 16:33 »
I am unable to open your eps files.

Can you save them in PDF or PNG or JPEG so my humble windows machince has a chance of opening without installing 10 programs ? :)

Offline xhsh

  • Heavy QuantumATK user
  • ***
  • Posts: 32
  • Reputation: 0
    • View Profile
Re: Function for calculating Projected Density of States
« Reply #37 on: April 6, 2010, 03:10 »
OK. These are the pdf and png formats of the figure.

Offline Nordland

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 812
  • Reputation: 18
    • View Profile
Re: Function for calculating Projected Density of States
« Reply #38 on: April 7, 2010, 09:47 »
I have gone through the formula's and inspect the code to see if I could spot any problem.
The formula looks to be implemented correctly, and the code seems to be bug-free on this point.

What we need to find out, is it allowed for the density of states to be negative when we perform a limited trace?
Even though it is rare, the Mulliken population can be negative when projected onto atoms, while the entire trace must be
positive.

Can you share your input files with me so I can rerun the exactly the same system as you?

Offline xhsh

  • Heavy QuantumATK user
  • ***
  • Posts: 32
  • Reputation: 0
    • View Profile
Re: Function for calculating Projected Density of States
« Reply #39 on: April 7, 2010, 10:50 »
These are the input files I used. In fact, they were simply copied from the ATK "examples" directory.

Whether it can be negative or not is just one thing.  Another thing is that the two equivalent H atoms should have the same DOS. But actually completely not.
« Last Edit: April 7, 2010, 10:54 by xhsh »

Offline xhsh

  • Heavy QuantumATK user
  • ***
  • Posts: 32
  • Reputation: 0
    • View Profile
Re: Function for calculating Projected Density of States
« Reply #40 on: April 15, 2010, 03:22 »
Any furthr comments on this topic?

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5583
  • Country: dk
  • Reputation: 100
    • View Profile
    • QuantumATK at Synopsys
Re: Function for calculating Projected Density of States
« Reply #41 on: April 16, 2010, 16:44 »
Sorry, no. Only that I've tested the same setup, and I get the same result.

Offline eastnobil

  • Regular QuantumATK user
  • **
  • Posts: 19
  • Reputation: 0
    • View Profile
Re: Function for calculating Projected Density of States
« Reply #42 on: April 27, 2010, 07:06 »
The "lih2li.nc"," projected_density_of_states.py" and "example.py" have been placed in the same directory. And the "example.py" file has been runned on ATK SE2010.02. The error message appears as following.
Code
Traceback (most recent call last):
  File "c:\docume~1\fanghui\locals~1\temp\8573268483295537.py", line 1, in <module>
    from ATK.TwoProbe import *; import numpy 
ImportError: No module named ATK.TwoProbe
NanoLanguageScript execution failure
How to deal with this situation?

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5583
  • Country: dk
  • Reputation: 100
    • View Profile
    • QuantumATK at Synopsys
Re: Function for calculating Projected Density of States
« Reply #43 on: April 27, 2010, 08:51 »
ATK 2010.02 uses slightly different keywords, so there's no "TwoProbe" module anymore. Instead, use
Code
from NanoLanguage import *
Do note, however, that you will need to modify other parts of the code as well; the scripts are not compatible. Your best option is actually to rebuild it from scratch in VNL or by hand. You can find the Li-H2-Li example still in the manual.

Offline xhsh

  • Heavy QuantumATK user
  • ***
  • Posts: 32
  • Reputation: 0
    • View Profile
Re: Function for calculating Projected Density of States
« Reply #44 on: May 24, 2010, 03:15 »
Hello,

PDOS is a very important and very general analysis tool for ab initio calculations. It is very strange that ATK does not provide it.

The results from this script of Nordland are wrong.  However, many people might be using it for scientific research.  It is a serious problem. I hope the development team will work out a correct script to realize it ASAP.