Dear Alexey,
Thank you for looking into this.
Actually I don't need 80 characters when preparing the POSCAR file. But when VASP (at least for version 6.4.2) write the CHGCAR file, each atom type will take 16 characters in CHGCAR, and it exceeds 80 characters when the number of atom types is 6 or more. There is no problem when running normal SCF calculations. But when running band structure calculations (set ICHARG=11), we need to read CHGCAR file, especially need to parse that line, and then we hit this error.
I have prepared a simple example to reproduce this issue. Please find below the INCAR, POSCAR, KPOINTS files:
INCAR:
ISTART = 0
ICHARG = 11
PREC = Accurate
ENCUT = 400
ISPIN = 1
ISMEAR = 0
SIGMA = 0.05
EDIFF = 1E-6
ALGO = Normal
POSCAR:
Si
1.00000000000000
5.4300000000000000 0.0000000000000000 0.0000000000000000
0.0000000000000000 5.4300000000000000 0.0000000000000000
0.0000000000000000 0.0000000000000000 5.4300000000000000
Si Si Si Si Si Si Si Si
1 1 1 1 1 1 1 1
Direct
0.0000000000000000 0.0000000000000000 0.0000000000000000
0.5000000000000000 0.5000000000000000 0.0000000000000000
0.0000000000000000 0.5000000000000000 0.5000000000000000
0.5000000000000000 0.0000000000000000 0.5000000000000000
0.2500000000000000 0.2500000000000000 0.2500000000000000
0.7500000000000000 0.7500000000000000 0.2500000000000000
0.2500000000000000 0.7500000000000000 0.7500000000000000
0.7500000000000000 0.2500000000000000 0.7500000000000000
KPOINTS:
K-Spacing Value to Generate K-Mesh: 0.040
0
Monkhorst-Pack
2 2 2
0.0 0.0 0.0
First we run the normal SCF calculation, and it finished successfully with the first several lines of CHGCAR like this (note that there are 128 characters in Line 7):
CHGCAR:
unknown system
1.00000000000000
5.430000 0.000000 0.000000
0.000000 5.430000 0.000000
0.000000 0.000000 5.430000
Si/79d9987ad87 Si/79d9987ad87 Si/79d9987ad87 Si/79d9987ad87 Si/79d9987ad87 Si/79d9987ad87 Si/79d9987ad87 Si/79d9987ad87
1 1 1 1 1 1 1 1
Direct
0.000000 0.000000 0.000000
0.500000 0.500000 0.000000
...
...
Then if we set ICHARG=11 in INCAR and run it again, we got the following errors:
WARNING: number of atoms are different on CHGCAR file
-----------------------------------------------------------------------------
| |
| EEEEEEE RRRRRR RRRRRR OOOOOOO RRRRRR ### ### ### |
| E R R R R O O R R ### ### ### |
| E R R R R O O R R ### ### ### |
| EEEEE RRRRRR RRRRRR O O RRRRRR # # # |
| E R R R R O O R R |
| E R R R R O O R R ### ### ### |
| EEEEEEE R R R R OOOOOOO R R ### ### ### |
| |
| ERROR: charge density could not be read from file CHGCAR for |
| ICHARG>10 |
| |
| ----> I REFUSE TO CONTINUE WITH THIS SICK JOB ... BYE!!! <---- |
| |
-----------------------------------------------------------------------------
Regards,
Zhiyong