CHGCAR/PARCHG understanding from wiki

Question on input files/tags, interpreting output, etc.

Please check whether the answer to your question is given in the VASP online manual or has been discussed in this forum previously!

Moderators: Global Moderator, Moderator

Locked
Message
Author
awang95
Newbie
Newbie
Posts: 41
Joined: Thu May 26, 2022 3:50 pm

CHGCAR/PARCHG understanding from wiki

#1 Post by awang95 » Fri Feb 16, 2024 1:25 am

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!
You do not have the required permissions to view the files attached to this post.

ferenc_karsai
Global Moderator
Global Moderator
Posts: 422
Joined: Mon Nov 04, 2019 12:44 pm

Re: CHGCAR/PARCHG understanding from wiki

#2 Post by ferenc_karsai » Fri Feb 16, 2024 2:24 pm

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.

awang95
Newbie
Newbie
Posts: 41
Joined: Thu May 26, 2022 3:50 pm

Re: CHGCAR/PARCHG understanding from wiki

#3 Post by awang95 » Fri Feb 16, 2024 5:48 pm

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

ferenc_karsai
Global Moderator
Global Moderator
Posts: 422
Joined: Mon Nov 04, 2019 12:44 pm

Re: CHGCAR/PARCHG understanding from wiki

#4 Post by ferenc_karsai » Fri Feb 16, 2024 10:45 pm

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.

awang95
Newbie
Newbie
Posts: 41
Joined: Thu May 26, 2022 3:50 pm

Re: CHGCAR/PARCHG understanding from wiki

#5 Post by awang95 » Sat Feb 17, 2024 2:35 am

ok I see; it should be the same for both CHG and PARCHG as well right? thanks!

ferenc_karsai
Global Moderator
Global Moderator
Posts: 422
Joined: Mon Nov 04, 2019 12:44 pm

Re: CHGCAR/PARCHG understanding from wiki

#6 Post by ferenc_karsai » Sat Feb 17, 2024 8:44 am

The CHG file contains the same but with less digits than the CHGCAR file.

awang95
Newbie
Newbie
Posts: 41
Joined: Thu May 26, 2022 3:50 pm

Re: CHGCAR/PARCHG understanding from wiki

#7 Post by awang95 » Sun Feb 18, 2024 8:39 pm

thanks!

Locked