Page 1 of 1

Nonfloat in PARCHG

Posted: Mon May 13, 2024 9:50 am
by jeffrey_zom
Hello,

In some postprocessing band-decomposed charge density calculations, I have encountered that the output PARCHG file contains a single nonfloat value, specifically 11 asterisks: ***********.

example of some lines in PARCHG:
-.18111 -.23962 -.31474 -.41033 -.53118 -.68329 -.87389 -1.1114 -1.4050 -1.7642
-2.1981 -2.7146 -3.3199 -4.0180 -4.8100 -5.6942 -6.6654 -7.7153 -8.8322 ***********
-11.197 -12.396 -13.557 -14.633 -15.566 -16.291 -16.745 -16.876 -16.654 -16.078

Weirdly enough, this only appears exactly once among all values, and it occurs in most PARCHG files, but not all (the only difference is a slight difference in the POSCAR). They also only occur in the second part of the PARCHG file, containing the magnetisation density.
I can still visualise the charge density with VESTA despite this nonfloat value, it does however mess up with decomposing the PARCHG file into spin up/spin down.

My question: What is the origin of this non-float, and how should I treat it?

The PARCHG and WAVECAR files are too large to be added, but the input files used to generate the WAVECAR and subsequently the PARCHG are added as attachments.

Re: Nonfloat in PARCHG

Posted: Tue May 14, 2024 7:13 am
by jonathan_lahnsteiner2
Dear jeffrey_zom,

These non-numerical values you are reporting in the PARCHG originate from the format statements used in the code writing the PARCHG file.
The asterisks tell you that the number that should be written does not fit in the format statement supplied to the Fortran write(*,*) statement.

Since the PARCHG file is written in the format of an FFT grid you could in principle
obtain the values by interpolation from the neighboring grid points.
Another option would be to change the format statements of the writing routine for the PARCHG file and recompile vasp.

I will discuss this issue with the rest of the vasp team. Maybe the PARCHG file should get a new floating-point format to prevent such errors.

All the best Jonathan