Page 1 of 1

CHGCAR/PARCHG understanding from wiki

Posted: Fri Feb 16, 2024 1:25 am
by awang95
Hi,

From the following description in the wiki
https://www.vasp.at/forum/download/file.php?mode=view&id=1461&sid=b762dc8883ffc296a9c2519a72111972
I'm still a bit confused since I thought NGXF/Y/Z are just numbers specifying how dense the grid is and don't have units, so if the raw data in CHGCAR/PARCHG files contain the charge density*(NGXF*NGXY*NGXZ), then if we divide the numbers (which are already in units of density) by the cell volume wouldn't we get units of 1/Ang^6?

I could make it work out if NGXF/Y/Z have units of Ang, but if that's the case how do we interpret it since from the wiki it just says it's the number of grid points?

Alternatively, it would also work out if the numbers are in units of charge and not charge density

Appreciate any help and clarification you could provide on this

thanks!

Re: CHGCAR/PARCHG understanding from wiki

Posted: Fri Feb 16, 2024 2:24 pm
by ferenc_karsai
If you read further in the text on the CHGCAR page, you have "data(Nx,Ny,Nz)". That is written to the CHGCAR file after the structure information. It is unitless. As written on the wiki page it can be easily confirmed by summing up all contributions and divide it by Nx*Ny*Nz (I can also confirm this by just testing it). Nx, Ny, Nz are just unitless integer numbers.

Re: CHGCAR/PARCHG understanding from wiki

Posted: Fri Feb 16, 2024 5:48 pm
by awang95
yes I've seen that, sorry I think I wasn't clear enough before so please let me rephrase: if data(x,y,z)=(charge density)*(NGFX)*(NGFY)*(NGFZ), and NGFX/Y/Z are just unitless numbers, doesn't that mean data(x,y,z) have units of charge density which is e/Ang^3 (or 1/Ang^3)? Dividing this by the cell volume would give 1/Ang^6 which doesn't make sense, so if like what you said data(x,y,z) is unitless, how do we interpret the fact that it's the charge density (as mentioned in the screenshot below, which I'm assuming has units of e/Ang^3 or 1/Ang^3) times some unitless number? Or is it actually something else being multiplied by NGFX/Y/Z?

thanks

Re: CHGCAR/PARCHG understanding from wiki

Posted: Fri Feb 16, 2024 10:45 pm
by ferenc_karsai
Ok, I understand what your problem is and I just see the wiki is not fully correct. Data ist not (charge density)*(NGFX)*(NGFY)*(NGFZ), it is rather (charge)*(NGFX)*(NGFY)*(NGFZ). So to get the charge density it has to divided by the volume. The rest of the wiki page should be ok.

Re: CHGCAR/PARCHG understanding from wiki

Posted: Sat Feb 17, 2024 2:35 am
by awang95
ok I see; it should be the same for both CHG and PARCHG as well right? thanks!

Re: CHGCAR/PARCHG understanding from wiki

Posted: Sat Feb 17, 2024 8:44 am
by ferenc_karsai
The CHG file contains the same but with less digits than the CHGCAR file.

Re: CHGCAR/PARCHG understanding from wiki

Posted: Sun Feb 18, 2024 8:39 pm
by awang95
thanks!