Page 1 of 3

Core charge

Posted: Sat Feb 03, 2007 5:28 am
by graeme
It is now possible to get core charges from the VASP code. This is important for Bader calculations in which most or all of the valance electrons participate with bonding.

Getting the core charge density from a PAW calculation requires updating to the latest version of the vasp code (4.6.31 08Feb07). With this code, the core and valance charge density will be written if the LAECHG = .TRUE. tag is set in the INCAR file. It is essential to increase the FFT grid (NGXF, NGYF, and NGZF) until the core charge converges to the expected value.

The core charge is written to the AECCAR0 and the valance to AECCAR2. These can be added using our chgsum.pl script. The bader analysis on this total charge density will not have any pseudopotential errors.

Re: Core charge

Posted: Tue Jul 15, 2008 1:23 am
by wnagne
I used LAECHG flag for CaAlSi. It gives three charge files : AECCAR0, AECCAR1, AECCAR2.
If AECCAR0 is core charge denisty and AECCAR2 is the valence, what is AECCAR1?
Am I getting 1 and 2 because Ca has 10 valence electrons?
Should I add all three of them to get total charge density?
(like chgsum.pl AECCAR0 AECCAR1 -> mv CHGCAR_sum CHGCAR_tmp -> chgsum.pl CHGCAR_tmp AECCAR2)
Thanks in advance.

Re: Core charge

Posted: Tue Jul 15, 2008 4:27 am
by graeme
AECCAR1 is written whenever the LAECHG flag is set, but we don't use it for the Bader analysis. The files are described by the author of that code, Martijn Marsman, as:

AECCAR0 : the all-electron core charge densities
AECCAR1 : the all-electron overlapping atomic charge densities from which
a standard calculations starts
AECCAR2 : the SCF all-electron charge density at the end of a calculation

Re: Core charge

Posted: Tue Jan 06, 2009 4:12 pm
by jd_au
I've used LAECHG = .TRUE. to generate charge density for a large system. However, only AECCAR0 and AECCAR1 files were generated and there was no AECCAR2.

Have you encountered similar problem before? Can I use CHGCAR to replace AECCAR2 for valence charge density?

Many thanks!
JD

Re: Core charge

Posted: Tue Jan 06, 2009 4:57 pm
by graeme
Are you using the PAW potentials? The AECCAR2 is the not same as the CHGCAR.

Re: Core charge

Posted: Tue Jan 06, 2009 6:00 pm
by jd_au
Yes. PAW potentials were used in the calculations.

Re: Core charge

Posted: Tue Jan 06, 2009 7:02 pm
by Wenjie
Maybe it is because your calculation has been interrupted somehow and didn't finish.
In the vasp code, the time to write the AECCAR0 and AECCAR1 is much earlier than the time to write AECCAR2. I think it only need the information from POTCAR to generate the AECCAR0 and AECCAR1. However, to write the AECCAR2, it should wait until the system's charge density is optimized. If your job get wrong during the optimizing process, AECCAR2 may not be written.

Re: Core charge

Posted: Tue Mar 17, 2009 3:06 am
by xiong_eyecan
hi, I also occurred the same problem that I get the empty AECCAR2 file.
the AECCAR2 only contains:
---------------------------------------------------------
unknown system
4.73727000000000
1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 0.672620
2 4
Direct
0.000000 0.000000 0.000000
0.500000 0.500000 0.500000
0.305732 0.305732 0.000000
0.694268 0.694268 0.000000
0.194268 0.805732 0.500000
0.805732 0.194268 0.500000
---------------------------------------------------------
I have already updated the vasp code and bader program. Also I check the bader calculation of several material system for several times. Any suggestion will be appreciated.

Re: Core charge

Posted: Tue Mar 17, 2009 3:41 am
by graeme
Are you using PAW potentials?

Re: Core charge

Posted: Tue Mar 17, 2009 4:22 am
by xiong_eyecan
yes, I am using the PAW.
this is my OUTCAR
----------------------------------------------------------------------------------------------
running on 32 nodes
distr: one band on 1 nodes, 32 groups
vasp.4.6.35 3Apr08 complex
POSCAR found : 2 types and 6 ions
LDA part: xc-table for Ceperly-Alder, standard interpolation
POSCAR, INCAR and KPOINTS ok, starting setup
FFT: planning ... 1
reading WAVECAR
augmentation electrons 32.7332805804915
augmentation electrons 32.7332805804915
augmentation electrons 32.7332805804915
soft electrons 0.000000000000000E+000
augmentation electrons 32.7332805804915
soft electrons 0.000000000000000E+000
augmentation electrons 32.7332805804915
soft electrons 0.000000000000000E+000
augmentation electrons 32.7332805804915
soft electrons 0.000000000000000E+000
soft electrons 0.000000000000000E+000
augmentation electrons 32.7332805804915
augmentation electrons 32.7332805804915
soft electrons 0.000000000000000E+000
augmentation electrons 32.7332805804915
soft electrons 0.000000000000000E+000
augmentation electrons 32.7332805804915
soft electrons 0.000000000000000E+000
augmentation electrons 32.7332805804915
soft electrons 0.000000000000000E+000
augmentation electrons 32.7332805804915
soft electrons 0.000000000000000E+000
augmentation electrons 32.7332805804915
augmentation electrons 32.7332805804915
augmentation electrons 32.7332805804915
soft electrons 0.000000000000000E+000
soft electrons 0.000000000000000E+000
soft electrons 0.000000000000000E+000
soft electrons 0.000000000000000E+000
soft electrons 0.000000000000000E+000
augmentation electrons 32.7332805804915
soft electrons 0.000000000000000E+000
total electrons 32.7332805804915
total electrons 32.7332805804915
augmentation electrons 32.7332805804915
soft electrons 0.000000000000000E+000
augmentation electrons 32.7332805804915
soft electrons 0.000000000000000E+000
augmentation electrons 32.7332805804915
soft electrons 0.000000000000000E+000
augmentation electrons 32.7332805804915
soft electrons 0.000000000000000E+000
augmentation electrons 32.7332805804915
soft electrons 0.000000000000000E+000
augmentation electrons 32.7332805804915
soft electrons 0.000000000000000E+000
augmentation electrons 32.7332805804915
soft electrons 0.000000000000000E+000
augmentation electrons 32.7332805804915
soft electrons 0.000000000000000E+000
augmentation electrons 32.7332805804915
soft electrons 0.000000000000000E+000
augmentation electrons 32.7332805804915
augmentation electrons 32.7332805804915
soft electrons 0.000000000000000E+000
soft electrons 0.000000000000000E+000
augmentation electrons 32.7332805804915
soft electrons 0.000000000000000E+000
augmentation electrons 32.7332805804915
soft electrons 0.000000000000000E+000
augmentation electrons 32.7332805804915
augmentation electrons 32.7332805804915
augmentation electrons 32.7332805804915
soft electrons 0.000000000000000E+000
soft electrons 0.000000000000000E+000
soft electrons 0.000000000000000E+000
total electrons 32.7332805804915
total electrons 32.7332805804915
total electrons 32.7332805804915
total electrons 32.7332805804915
total electrons 32.7332805804915
total electrons 32.7332805804915
total electrons 32.7332805804915
total electrons 32.7332805804915
total electrons 32.7332805804915
total electrons 32.7332805804915
total electrons 32.7332805804915
total electrons 32.7332805804915
total electrons 32.7332805804915
total electrons 32.7332805804915
total electrons 32.7332805804915
total electrons 32.7332805804915
total electrons 32.7332805804915
total electrons 32.7332805804915
total electrons 32.7332805804915
total electrons 32.7332805804915
total electrons 32.7332805804915
total electrons 32.7332805804915
augmentation electrons 1898.18147717310
augmentation electrons 1898.18147717310
augmentation electrons 1898.18147717310
augmentation electrons 1898.18147717310
augmentation electrons 1898.18147717310
augmentation electrons 1898.18147717310
augmentation electrons 1898.18147717310
augmentation electrons 1898.18147717310
augmentation electrons 1898.18147717310
augmentation electrons 1898.18147717310
soft electrons 0.000000000000000E+000
augmentation electrons 1898.18147717310
augmentation electrons 1898.18147717310
soft electrons 0.000000000000000E+000
augmentation electrons 1898.18147717310
augmentation electrons 1898.18147717310
soft electrons 0.000000000000000E+000
soft electrons 0.000000000000000E+000
soft electrons 0.000000000000000E+000
soft electrons 0.000000000000000E+000
augmentation electrons 1898.18147717310
augmentation electrons 1898.18147717310
augmentation electrons 1898.18147717310
augmentation electrons 1898.18147717310
augmentation electrons 1898.18147717310
augmentation electrons 1898.18147717310
augmentation electrons 1898.18147717310
soft electrons 0.000000000000000E+000
augmentation electrons 1898.18147717310
soft electrons 0.000000000000000E+000
augmentation electrons 1898.18147717310
augmentation electrons 1898.18147717310
soft electrons 0.000000000000000E+000
soft electrons 0.000000000000000E+000
augmentation electrons 1898.18147717310
augmentation electrons 1898.18147717310
augmentation electrons 1898.18147717310
soft electrons 0.000000000000000E+000
soft electrons 0.000000000000000E+000
soft electrons 0.000000000000000E+000
soft electrons 0.000000000000000E+000
augmentation electrons 1898.18147717310
soft electrons 0.000000000000000E+000
augmentation electrons 1898.18147717310
soft electrons 0.000000000000000E+000
soft electrons 0.000000000000000E+000
soft electrons 0.000000000000000E+000
soft electrons 0.000000000000000E+000
soft electrons 0.000000000000000E+000
soft electrons 0.000000000000000E+000
soft electrons 0.000000000000000E+000
soft electrons 0.000000000000000E+000
soft electrons 0.000000000000000E+000
soft electrons 0.000000000000000E+000
soft electrons 0.000000000000000E+000
soft electrons 0.000000000000000E+000
soft electrons 0.000000000000000E+000
soft electrons 0.000000000000000E+000
soft electrons 0.000000000000000E+000
soft electrons 0.000000000000000E+000
total electrons 1898.18147717310
total electrons 1898.18147717310
total electrons 1898.18147717310
total electrons 1898.18147717310
total electrons 1898.18147717310
soft electrons 0.000000000000000E+000
total electrons 1898.18147717310
total electrons 1898.18147717310
total electrons 1898.18147717310
total electrons 1898.18147717310
total electrons 1898.18147717310
total electrons 1898.18147717310
total electrons 1898.18147717310
total electrons 1898.18147717310
total electrons 1898.18147717310
total electrons 1898.18147717310
total electrons 1898.18147717310
total electrons 1898.18147717310
total electrons 1898.18147717310
total electrons 1898.18147717310
total electrons 1898.18147717310
total electrons 1898.18147717310
entering main loop
N E dE d eps ncg rms rms(c)
DAV: 1 0.570460239893E+02 0.57046E+02 -0.18323E+04 18432 0.885E+02
DAV: 2 -0.483470148182E+02 -0.10539E+03 -0.10417E+03 26976 0.144E+02
DAV: 3 -0.492007266895E+02 -0.85371E+00 -0.85371E+00 20320 0.166E+01
DAV: 4 -0.492021236622E+02 -0.13970E-02 -0.13970E-02 34464 0.699E-01
DAV: 5 -0.492021237426E+02 -0.80452E-07 -0.80518E-07 20256 0.298E-03
DAV: 6 -0.492021237427E+02 -0.39563E-10 -0.39175E-10 33696 0.773E-05
DAV: 7 -0.492021237427E+02 0.00000E+00 -0.33039E-12 18560 0.132E-06
DAV: 8 -0.492021237427E+02 -0.45475E-12 -0.12994E-12 20000 0.393E-07
DAV: 9 -0.492021237427E+02 0.00000E+00 -0.67896E-13 12512 0.152E-07
DAV: 10 -0.492021237427E+02 0.00000E+00 -0.14820E-12 12128 0.605E-08
DAV: 11 -0.492021237427E+02 0.00000E+00 -0.11571E-12 10400 0.245E-08
DAV: 12 -0.492021237427E+02 0.00000E+00 -0.27504E-12 10784 0.999E-09 0.143E+01
RMM: 13 -0.441347967084E+02 0.50673E+01 -0.40552E+00 18450 0.859E+00 0.640E+00
RMM: 14 -0.427978692381E+02 0.13369E+01 -0.24264E+00 19180 0.633E+00 0.315E+00
RMM: 15 -0.425709404947E+02 0.22693E+00 -0.20000E-01 19785 0.260E+00 0.718E-01
RMM: 16 -0.425506968073E+02 0.20244E-01 -0.23853E-02 20636 0.633E-01 0.136E-01
RMM: 17 -0.425510015551E+02 -0.30475E-03 -0.57560E-03 20360 0.366E-01 0.250E-01
RMM: 18 -0.425497809674E+02 0.12206E-02 -0.38130E-03 20123 0.285E-01 0.443E-02
RMM: 19 -0.425497508516E+02 0.30116E-04 -0.31141E-05 11696 0.271E-02
1 F= -.42549751E+02 E0= -.42549751E+02 d E =-.265302E-11
augmentation electrons 1.44154228312637
augmentation electrons 1.44154228312637
augmentation electrons 1.44154228312637
soft electrons 30.9765419411349
augmentation electrons 1.44154228312637
soft electrons 30.9765419411349
augmentation electrons 1.44154228312637
augmentation electrons 1.44154228312637
augmentation electrons 1.44154228312637
augmentation electrons 1.44154228312637
augmentation electrons 1.44154228312637
soft electrons 30.9765419411349
soft electrons 30.9765419411349
augmentation electrons 1.44154228312637
soft electrons 30.9765419411349
soft electrons 30.9765419411349
soft electrons 30.9765419411349
soft electrons 30.9765419411349
augmentation electrons 1.44154228312637
soft electrons 30.9765419411349
augmentation electrons 1.44154228312637
augmentation electrons 1.44154228312637
augmentation electrons 1.44154228312637
augmentation electrons 1.44154228312637
augmentation electrons 1.44154228312637
augmentation electrons 1.44154228312637
soft electrons 30.9765419411349
soft electrons 30.9765419411349
augmentation electrons 1.44154228312637
augmentation electrons 1.44154228312637
augmentation electrons 1.44154228312637
soft electrons 30.9765419411349
augmentation electrons 1.44154228312637
soft electrons 30.9765419411349
augmentation electrons 1.44154228312637
augmentation electrons 1.44154228312637
soft electrons 30.9765419411349
augmentation electrons 1.44154228312637
augmentation electrons 1.44154228312637
soft electrons 30.9765419411349
augmentation electrons 1.44154228312637
soft electrons 30.9765419411349
soft electrons 30.9765419411349
augmentation electrons 1.44154228312637
augmentation electrons 1.44154228312637
soft electrons 30.9765419411349
soft electrons 30.9765419411349
augmentation electrons 1.44154228312637
soft electrons 30.9765419411349
soft electrons 30.9765419411349
soft electrons 30.9765419411349
soft electrons 30.9765419411349
total electrons 32.4180842242613
total electrons 32.4180842242613
total electrons 32.4180842242613
total electrons 32.4180842242613
total electrons 32.4180842242613
total electrons 32.4180842242613
total electrons 32.4180842242613
total electrons 32.4180842242613
total electrons 32.4180842242613
total electrons 32.4180842242613
total electrons 32.4180842242613
total electrons 32.4180842242613
total electrons 32.4180842242613
total electrons 32.4180842242613
total electrons 32.4180842242613
total electrons 32.4180842242613
soft electrons 30.9765419411349
soft electrons 30.9765419411349
soft electrons 30.9765419411349
soft electrons 30.9765419411349
soft electrons 30.9765419411349
soft electrons 30.9765419411349
soft electrons 30.9765419411349
soft electrons 30.9765419411349
soft electrons 30.9765419411349
total electrons 32.4180842242613
total electrons 32.4180842242613
total electrons 32.4180842242613
total electrons 32.4180842242613
total electrons 32.4180842242613
total electrons 32.4180842242613
total electrons 32.4180842242613
total electrons 32.4180842242613
total electrons 32.4180842242613
total electrons 32.4180842242613
total electrons 32.4180842242613
total electrons 32.4180842242613
total electrons 32.4180842242613
total electrons 32.4180842242613
total electrons 32.4180842242613
total electrons 32.4180842242613

Re: Core charge

Posted: Tue Mar 17, 2009 4:53 am
by graeme
Try a serial run first. These multiple statements to the OUTCAR looks fishy. Also, it looks like you are using a slightly newer version of vasp than we are; we'll test to make sure that things have not changed in the core charge writing. But the parallel calculation is a much more likely explanation. To get the total charge, you might have to keep all the plane waves on each node (check LPLANE and NPAR).

Re: Core charge

Posted: Tue Mar 17, 2009 6:21 am
by xiong_eyecan
Thanks for your suggestion.
After setting the NPAR=1 and LPLANE=.TRUE., I still can not get the AECCAR2.
Is that reasonable to replace AECCAR2 by CHGCAR in the following treatment? I mean what's the difference between these two files?

Re: Core charge

Posted: Tue Mar 17, 2009 6:33 am
by graeme
Try the serial calculation as well.

The AECCAR2 density is not the same as the CHGCAR but I don't know how different they are and if the CHGCAR can be used in place of the AECCAR2 for the summation to get the total charge density.

Also, try a smaller calculation. If the program is crashing during the writing of the AECCAR2, it may be due to limited memory. If it works for a smaller calculation and fails as you make it more accurate, you would at least know where the error is coming from.

Re: Core charge

Posted: Thu Oct 07, 2010 2:01 pm
by danilo
When I add AECCAR0 and AECCAR1 I obtain the total charge of the system (core+valence). Now, if I do a Bader analysis on CHGCAR_sum I have strange results:


# X Y Z CHARGE MIN DIST ATOMIC VOL
--------------------------------------------------------------------------------
1 2.7085 1.5849 1.1265 701.2803 1.2466 17.4468 La
2 8.1281 4.7564 3.3807 701.2803 1.2466 17.4468 La
3 0.0000 0.0000 0.0000 95.2870 0.8560 8.3495 Ni
4 5.4183 3.1707 2.2536 68.8403 0.8447 7.1720 Mn
5 6.9336 3.6526 1.1646 9.1263 0.8581 11.2228 O
6 5.4021 4.9178 3.0668 9.1261 0.8581 11.2211 O
7 6.5807 2.4989 3.6363 9.1261 0.8581 11.2217 O
8 3.9030 2.6887 3.3426 9.1262 0.8581 11.2211 O
9 5.4345 1.4235 1.4404 9.1260 0.8581 11.2206 O
10 4.2559 3.8424 0.8709 9.1261 0.8581 11.2217 O
--------------------------------------------------------------------------------
VACUUM CHARGE: 0.0000
VACUUM VOLUME: 0.0000
NUMBER OF ELECTRONS: 1621.4448
The system is La2NiMnO6
La->57e, Ni->28e, Mn->25e, O->8e --------
for La2NiMnO6

57*2+28+25+8*6=215 e =/= NUMBER OF ELECTRONS: 1621.4448

What is the problem?

Thanks
Danilo

Re: Core charge

Posted: Thu Oct 07, 2010 3:20 pm
by graeme
You should add AECCAR0 and AECCAR2.