Page 1 of 1

difference in Charge density

Posted: Wed Sep 14, 2011 4:36 pm
by vimal
I wanted to use the CHGdiff.pl script to find the difference in Charge density
between the Slab-Adsobate(S-A) and the Slab.
ie (Slab+Adsobate) - Slab.

So, i calculated the CHGCAR for Slab and Slab+adsorbate
and tried using chgdiff.pl CHGCAR(S+A) - Charge(S), but
i end up with the following error message.

--------------
Atoms in file1: 252, Atoms in file2: 239
Points in file1: 15240960, Points in file2: 13436928
Number of points not same in two files! at
--------------

Could you please help me to know how this could be done.

best regards
Vimal

Re: difference in Charge density

Posted: Wed Sep 14, 2011 9:25 pm
by graeme
Ah, I see how this is a problem. First, you will need to do each calculation with the same values of NGXF, NGYF, and NGZF. This will make sure that you have the same number of points in each file. Then, just copy the atomic section from the top of the CHGCAR(S+A) file to the CHGCAR(S) so that you can do the subtraction.

You actually may want to add the CHGCAR(S) with the CHGCAR(A) and compare this (with the chgdiff.pl script) to the CHGCAR(S+A) charge density to see where charge has moved with respect to the isolated systems.

Re: difference in Charge density

Posted: Thu Sep 15, 2011 4:58 am
by tarzan11_11
hi
One more way is to do all calcualtions with the same ENAUG= (better to take the ENAUG= 1.5* ENAUG of the atom with max. value)
hope this helps