The LDOS, or local density of states, is the the density of state at a particular site of a crystal with some asymetry. For example: A slab will have a different band structure on the surface than in the bulk region.
The PDOS is a projected density of states. In the context of VASP this means site-projected DOS, where the information about the different contributions of the different orbitals is computed. You then know which states (spd) contribute at which energy. You have to select the proper LORBIT tag in the INCAR file (e.g. LORBIT=11) to get the spd decomposed DOSCAR file output. The formatting is explained in the DOSCAR file link provided.
For quick visualization of both of these things I would recommend the free program p4vasp, which reads the vasprun.xml output file and lets you select both special atoms to plot the DOS for (LDOS), or special orbitals (PDOS), or both. For better looking plots suitable for publication you will have to reformat the data provided in the DOSCAR file for gnuplot or some other program, though.
Since quite some people are reading this answer every week and I recently became aware of a problem with VASP and the LORBIT flag, I am writing this update:
In VASP 4 and 5, partial charges and other projected quantities (For example the partial DOS) are not correctly treated by the symmetry routines. This has been known for quite some time apparently (https://cms.mpi.univie.ac.at/vasp-forum/viewtopic.php?f=3&t=306) but only very recently an entry has been added to the wiki. This leads to potentially significant differences in charge between symmetrically equivalent orbitals or atomic positions if ISYM is NOT set to 0!
For instance, in bulk cubic SrTiO3 the three oxygen should be equivalent, but with ISYM=2 (the default!) the partial charges are not correct (from the OUTCAR output of VASP 5.4.4):
and the DOS of all three O atoms (via p4vasp and the .xml output) looks different as can be seen in the attached figure. The CHARGECAR however, is correct.
Although the issue will be fixed in VASP 6, there is apparently no intention of correct this in VASP 5, so be very careful to set ISYM=0 in a final static run to calculate partial properties with LORBIT=11.
In the VASP wiki this is mentioned since a couple of weeks ago when a colleague of mine insisted on the significance of the errors with the developers (using the SrTiO3 example given also here): https://cms.mpi.univie.ac.at/wiki/index.php/LORBIT
However, since the document linked to in my original answer is no longer maintained, it is not written there.
The LDOS, or local density of states, is the the density of state at a particular site of a crystal with some asymetry. For example: A slab will have a different band structure on the surface than in the bulk region.
The PDOS is a projected density of states. In the context of VASP this means site-projected DOS, where the information about the different contributions of the different orbitals is computed. You then know which states (spd) contribute at which energy. You have to select the proper LORBIT tag in the INCAR file (e.g. LORBIT=11) to get the spd decomposed DOSCAR file output. The formatting is explained in the DOSCAR file link provided.
For quick visualization of both of these things I would recommend the free program p4vasp, which reads the vasprun.xml output file and lets you select both special atoms to plot the DOS for (LDOS), or special orbitals (PDOS), or both. For better looking plots suitable for publication you will have to reformat the data provided in the DOSCAR file for gnuplot or some other program, though.
Since quite some people are reading this answer every week and I recently became aware of a problem with VASP and the LORBIT flag, I am writing this update:
In VASP 4 and 5, partial charges and other projected quantities (For example the partial DOS) are not correctly treated by the symmetry routines. This has been known for quite some time apparently (https://cms.mpi.univie.ac.at/vasp-forum/viewtopic.php?f=3&t=306) but only very recently an entry has been added to the wiki. This leads to potentially significant differences in charge between symmetrically equivalent orbitals or atomic positions if ISYM is NOT set to 0!
For instance, in bulk cubic SrTiO3 the three oxygen should be equivalent, but with ISYM=2 (the default!) the partial charges are not correct (from the OUTCAR output of VASP 5.4.4):
and the DOS of all three O atoms (via p4vasp and the .xml output) looks different as can be seen in the attached figure. The CHARGECAR however, is correct.
Although the issue will be fixed in VASP 6, there is apparently no intention of correct this in VASP 5, so be very careful to set ISYM=0 in a final static run to calculate partial properties with LORBIT=11.
In the VASP wiki this is mentioned since a couple of weeks ago when a colleague of mine insisted on the significance of the errors with the developers (using the SrTiO3 example given also here): https://cms.mpi.univie.ac.at/wiki/index.php/LORBIT
However, since the document linked to in my original answer is no longer maintained, it is not written there.
Dear Dr. Michael Wolloch, I want to ask here one thing why my total dos is different when I am calculating simple dos (without LORBIT=11) and pdos (with LORBIT=11). It happens so or I have done mistake somewhere in potting. My other query is that how will assign s p d f states contribution in pdos.
I have attached here all my input files.
Thank you for your kind help and support always !!!!!!!
The total DOS should be the same in both cases (with or without LORBIT=11). I would guess you have done some mistake with the plotting... In the two figures you provide there is a difference in the y-axis of more than two orders of magnitude (160 vs. 1.4), which hints at some mistake. What program do you use for plotting? It would help if you could send me your gnuplot script or whatever you are using. I had trouble with your DOSCAR with my script, as it is not written for ISPIN=1, but if you could send me your vasprun.xml files for both runs I can produce some output for you.
Looking at the DOSCAR file you send I see in the total DOS (second column after the header) that you have a DOS of ~40 at ~0 eV. This is not the case in both of your plots, but you are close in the first one! Also you seem to have shifted the Fermi energy to 0 for your first plot and left it at 2.2 in the second.
As a general tip, set NEDOS to a higher value (e.g. 3001) than the default of 301 to get higher resolution and thus a less spiky DOS.
Dear Dr. Michael Wolloch thank you for your kind help !
I was doing mistake in plotting. Now I got it, first what I did I took only begining dos data from DOSCAR when DOSCAR starts writting partial DOS.
Now I plotted it first in p4vasp then extracted data from p4vasp to dat file after that I plotted dat file in origin as well as in GNUPLOT. In this way I am getting total dos same in both cases with LORBIT=11 and without LORBIT=11.
I want to ask one thing, Is it right way to plot pdos. I have attached here my pdos plot and vasprun.xml file.
Please confirm me from my vasprun.xml file I am getting right plot or not and my plotting way is right or wrong.
For the LDOS p4vasp allows you to select specific atoms also, should you need that still.
To increase the quality of the plot increase NEDOS, adjust EMIN and EMAX to limit the range of the DOS to the interesting regime and use a higher KPOINT mesh if possible. Increasing NEDOS will not require more compute time, but a denser K mesh will of course.
Another thing: I think p4vasp sometimes puts a little broadening on the DOS, so if you need to know exact band gaps it might be problematic to take data exported from p4vasp. For visualization, analysis, and comparison however, it is totally OK.
If you are indeed interested in band gaps I have attached a little script which could interest you. It analyses the OUTCAR file and calculates band gaps. I hope it is documented well enough, but I am happy to answer further questions if you have any.
I will try to use this script . I want to ask again one thing about pdos calculation. I have known about NEDOS but I am not cleared about EMIN and EMAX value. How will set these values I went through VASP wiki but could not get. I saw default values It was showing EMIN 10 and EMAX -10. How will change it according requirement. In my pdos spectra without editing on x-axis it was showing energy range -70 to +20 and default I saw in OUTCAR -10 to +10. So I want to ask how will salect EMIN and EMAX values for pdos calculation.
Hi! It is not always necessary to set EMIN and EMAX as VASP will set it according to the calculated Kohn-Sham eigenvalues. So if you do not set them you will get all values in the DOS.
The values of EMIN = 10 and EMAX = -10 tell VASP to set them automatically as EMIN > EMAX! EMIN = 3 and EMAX = 2 would have the same effect.
But often you do not want to show some low energy states in the DOS because you are only interested in the region around the Fermi level. Then, for the example system you sent me) you can set EMIN = -18 and EMAX = 9 and you will have all the interesting features of the DOS without the uninteresting region on the left.
Be careful, EMIN and EMAX are total energy values and do not account for the Fermi level! So in the System you sent me, just from looking at the DOS plots from p4vasp (or data you exported from there) would give you EMIN = -18 and EMAX = 7, but as the Fermi energy is at ~2eV (check DOSCAR) you have to set EMIN = -16 and EMAX = 9!
So often the best way to proceed is to get the Fermi energy from your relaxation runs and then follow up with a highly accurate static calculation where you use more Kpoints, ISMEAR=-5, a high NEDOS and appropriate values for EMIN and EMAX.
I hope this clears up all your questions and enables you to obtain correct DOSs.
Dear Dr. Michael Wolloch, I got all things related to DOSs as you told me but now my problem is that quality of DOS plot. I am not getting good quality plot as people report in journals. I do not now how they improve quality either in plotting or in calculation.
Here I have attached my modified dos plot and vasprun.xml file in which I have used NEDOS =3001, EMIN=-16 and EMAX=9 as you told and KPOINTS Gamma centered 20*20*30 . I am getting many spikes in dos plot. My system is tetragonal LaVO4. So I want to know how to improve plot quality.
After optimizing structure I did CONTCAR to POSCAR and with following tags I did calculation
Hello again, sorry for the delay, I was busy in the last few days.
If you use the tetrahedron method you get very accurate results, but no smearing (as you would with ISMEAR=0, depending on your sigma value.) Thus, if your KPOINT mesh is not extremely dense you get a spiky DOS. This is no problem if you need it to check hybridization or integrate regions, but if you want to make nice plots for publication it is. For this case I would just smooth things out with some readily available method. For example use gnuplot to interpolate with smoothing splines or Bezier curves.
Alternatively you can convolute your DOS with some broadening function, but you will need a script for that. I attached a fortran script I last used more than 5 years ago and did not write myself. To be honest I do not have the time to go through it and completely understand it, but I have modified it a bit to fit your system. It seems to give the correct output, but there is an error at runtime which I do not understand and have no time to get into. However, set your desired broadening in line 56 (hws, currently at 0.2) compile and run. It should give you broadened spd output for each atom and a broadened total DOS.
please send all your input files (KPOINTS is missing) and also the OSZICAR. also include input for the calculation you used to generate your CHGCAR and WAVECAR files prior to the DOS calculation.
on the first glance all seems to be in order. to get a smoother DOS, I would increase the smearing on your DOS calculation, it is pretty small. Also try to use the tetrahedron method instead of gaussian smearing, it is recommended for DOS, but your KPOINTS file will not work there (no tetrahedra!).
Increasing kpoint denisty might also be a good idea as well as a higher value of NEDOS.
you have not used the core charges (AECCAR0+AECCAR2) as input for the DOS calculation have you?
George Kurian, as explained in my initial answer to this question (which is on top of this thread and thus not really hard to find):
You have to select the proper LORBIT tag in the INCAR file (e.g. LORBIT=11) to get the spd decomposed DOSCAR file output.
However, since you ask especially about the core states: They are not even in the pseudo-potential for most elements and so you would not be able to see or plot them. Selecting a _pv or _sv potential might help for some materials here.
As my understanding, first you need to have its primitive crystal structure (structure of the target atom). For example, Ga has only one atom in its primitive cell (I attached its POSCAR file below). Then you will find its chemical potential from the OUTCAR file.
If there are more than one atoms in the primitive cell (for example Ge has two), divide the energy to the total number of atoms to get the chemical potential per atom.