Variable $NumDOS in doslplot.pl

Vasp transition state theory tools

Moderator: moderators

Post Reply
mbaeker
Posts: 2
Joined: Mon Oct 14, 2019 10:24 am

Variable $NumDOS in doslplot.pl

Post by mbaeker »

Dear all,
I'm quite new to these tools and am confused by the gnuplot script created by doslplot.pl:
I have a system with 4 atoms; when I plot a single atom with doslplot.pl d 1,
the gnuplot-file contains a line
"DOS1" u 1:(($10-$11+$12-$13+$14-$15+$16-$17+$18-$19)*5)
I understand (I hope), that there are 5 terms for the 5 d-orbitals with spin up and five with spin down.
However, I do not understand the factor of 5. From the script, this is the variable $NumDOS; but the way this is created seems to count DOS0 as well, so it is always 1 more than the number of atoms.
Is this intentional and if so, why?
Thanks,
Martin
graeme
Site Admin
Posts: 2291
Joined: Tue Apr 26, 2005 4:25 am
Contact:

Re: Variable $NumDOS in doslplot.pl

Post by graeme »

The factor of 5 should be equal to the total number of atoms in your system. If I remember correctly, this factor scales the local dos plots so that they can be directly compared to the total DOS, which is not scaled.
mbaeker
Posts: 2
Joined: Mon Oct 14, 2019 10:24 am

Re: Variable $NumDOS in doslplot.pl

Post by mbaeker »

Hi graeme,
That's what I thought, but IIUC, NumDOS counts the number of DOS*-files, incuding DOS0 and is thus 1+ the number of atoms.
In line 80, the number of atoms is set as
$NumPlot = $NumDOS-1
and in my example, I have 4 atoms, but NumDOS is 5.
So could this be a (minor) bug?
graeme
Site Admin
Posts: 2291
Joined: Tue Apr 26, 2005 4:25 am
Contact:

Re: Variable $NumDOS in doslplot.pl

Post by graeme »

I think that you are right. We have one more DOS file than the number of atoms because of DOS0 and so $NumDOS is the number of atoms plus 1.

I've updated the doslplot.pl script where the local dos plots are scaled by ($NumDOS-1)
Post Reply