Page 1 of 1

technical question: how to write CHGCAR more often?

Posted: Thu Sep 14, 2006 11:15 pm
by hra
As far as I know, CHGCAR is only written at end of run. Is there some secret tag in the INCAR, or has ayone modified the code to write CHGCAR say after each ionic step? Any tips greatly appreciated before I start hacking myself
;)

technical question: how to write CHGCAR more often?

Posted: Mon Sep 18, 2006 2:45 pm
by admin
instead of CHGCAR, use the CHG file, which is written after evey 10th ionic step in the default version of VASP. The data are written in a shorter format (G11.5 instead of E17.11) in CHG, otherwise the files are equivalent.
In principle, the number of steps after which CHG is written (NSTEP) can be changed by modifying the line
IF (IO%LCHARG .AND. MOD(NSTEP,10)==1) THEN
(line 3430 in main.F, vasp release 4.6.28)

technical question: how to write CHGCAR more often?

Posted: Tue Sep 19, 2006 8:06 pm
by hra
Thanks. However, the CHG file doesn't contain the PAW one-center occupancies, and is therefore of little use. To be completely honest, I don't see why the CHG exists at all (historcal reasons?), because it cannot be used for restarting (unless you use pseudopotentials, and why would anyone do that?). If the CHG file were significantly smaller in size I could see some point in writing charge density in two fromats, but usually the CHG is about 2/3 of CHGCAR size, and once you have written the CHGCAR (which isn't that big, either) the CHG file has absolutely no use. How about getting rid of the CHG file, and instead writing the full CHGCAR more often in the next VASP version?

Anyhow, thanks for pointing out where the CHG is written -- I also added a call to WRT_RHO_PAW and increased accuracy, which I believe should significantly improve the quality of my CHG files ;-)