jkitchin / dft-book

A book on modeling materials using VASP, ase and vasp
http://kitchingroup.cheme.cmu.edu/dft-book
351 stars 139 forks source link

Bader Analysis #2

Closed prtkm closed 8 years ago

prtkm commented 9 years ago

You probably already knew this, but a quick comment about the example on bader analysis here:

https://github.com/jkitchin/dft-book/blob/master/dft.org#bader-analysis

If you reference the charge to to core charge it seems to give a reasonable answer. You have to run vasp with laechg=True. Then chgsum the AECCAR0 and AECCAR2 files and use it as reference to Bader. Then it seems to give values comparable to https://wiki.fysik.dtu.dk/gpaw/tutorials/bader/bader.html

Also, the attach_charges function from ase.io.bader references the charge to the atomic number, which might lead to misleading results for VASP due to only using the valence charge density.

See below. http://theory.cm.utexas.edu/henkelman/code/bader/

Note for VASP users One major issue with the charge density (CHGCAR) files from the VASP code is that they only contain the valance charge density. The Bader analysis assumes that charge density maxima are located at atomic centers (or at pseudoatoms). Aggressive pseudopotentials remove charge from atomic centers where it is both expensive to calculate and irrelevant for the important bonding properties of atoms.

Recently, the VASP developers have added a module (aedens) which allows for the core charge to be written out from PAW calculations. This module is included in vasp version 4.6.31 08Feb07 and later. By adding the LAECHG=.TRUE. to the INCAR file, the core charge is written to AECCAR0 and the valance charge to AECCAR2. These two charge density files can be summed using the chgsum.pl script:

chgsum.pl AECCAR0 AECCAR2 The total charge will be written to CHGCAR_sum. The bader analysis can then be done on this total charge density file:

bader CHGCAR -ref CHGCAR_sum One finally note is that you need a fine fft grid to accurately reproduce the correct total core charge. It is essential to do a few calculations, increasing NG(X,Y,Z)F until the total charge is correct.

jkitchin commented 8 years ago

Thanks! At long last I have updated this. Thanks for the tips!

prtkm commented 8 years ago

Great! I pushed some changes into jasp recently, that automates the calculation of bader charges.

https://github.com/jkitchin/jasp/pull/52

jkitchin commented 8 years ago

nice. Any chance you know the easy way for me to merge those back into jasp from your fork? It seems like that should be a few git commands.

John


Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu

On Fri, Feb 12, 2016 at 4:26 PM, Prateek Mehta notifications@github.com wrote:

Great! I pushed some changes into jasp recently, that automates the calculation of bader charges.

jkitchin/jasp#52 https://github.com/jkitchin/jasp/pull/52

— Reply to this email directly or view it on GitHub https://github.com/jkitchin/dft-book/issues/2#issuecomment-183493246.

prtkm commented 8 years ago

I think you've already merged it! I made the PR on a clean fork of your master. On Feb 12, 2016 4:36 PM, "John Kitchin" notifications@github.com wrote:

nice. Any chance you know the easy way for me to merge those back into jasp from your fork? It seems like that should be a few git commands.

John


Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu

On Fri, Feb 12, 2016 at 4:26 PM, Prateek Mehta notifications@github.com wrote:

Great! I pushed some changes into jasp recently, that automates the calculation of bader charges.

jkitchin/jasp#52 https://github.com/jkitchin/jasp/pull/52

— Reply to this email directly or view it on GitHub https://github.com/jkitchin/dft-book/issues/2#issuecomment-183493246.

— Reply to this email directly or view it on GitHub https://github.com/jkitchin/dft-book/issues/2#issuecomment-183496893.

prtkm commented 8 years ago

These are the new functions in your jasp/master https://github.com/jkitchin/jasp/blob/master/jasp/jasp_extensions.py#L1340

and https://github.com/jkitchin/jasp/blob/master/jasp/jasp_atoms.py#L89

jkitchin commented 8 years ago

sigh.. I am obviously too tired today. I was confused earlier because I thought I couldn't find it! Thanks!

John


Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu

On Fri, Feb 12, 2016 at 4:44 PM, Prateek Mehta notifications@github.com wrote:

These are the new functions in your jasp/master https://github.com/jkitchin/jasp/blob/master/jasp/jasp_extensions.py#L1340

and https://github.com/jkitchin/jasp/blob/master/jasp/jasp_atoms.py#L89

— Reply to this email directly or view it on GitHub https://github.com/jkitchin/dft-book/issues/2#issuecomment-183498861.