Page 1 of 1

### Variable \$NumDOS in doslplot.pl

Posted: Mon Oct 14, 2019 10:28 am
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

### Re: Variable \$NumDOS in doslplot.pl

Posted: Mon Oct 14, 2019 8:13 pm
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.

### Re: Variable \$NumDOS in doslplot.pl

Posted: Tue Oct 15, 2019 6:08 am
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?

### Re: Variable \$NumDOS in doslplot.pl

Posted: Tue Oct 15, 2019 2:50 pm
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)