Page 1 of 1

CHGDIFF.pl - Different atom numbers

Posted: Thu Jan 09, 2014 4:13 pm
by JasselM
HI, I was previously able to work out the charge difference between a 97 and 96 atom cell (one with an interstitial, and one pure system), but now I can't seem to get the script to do this subtraction. The error message I receive is:

Atoms in file1: 97, Atoms in file2: 96
Points in file1: 6998400, Points in file2: 6096384
Number of points not same in two files! at ./chgdiff.pl line 71, <IN2> line 106.

I did not encounter this problem before and I wonder what I have done wrong. I experience the same problem when I try this in VESTA.

My aim is to see the charge density difference between a defective and non-defective cell.

Re: CHGDIFF.pl - Different atom numbers

Posted: Fri Jan 10, 2014 4:02 am
by graeme
The problem is that the two files have different numbers of grid points (not different number of atoms). If you explicitly specify the grid with the NGXF, NGYF, and NGZF tags in your INCAR file, they will be the same and you will be able to subtract the files. The chgdiff script is very simple -- it just subtracts the numbers element by element. If the grids are different, it would have to do some kind of interpolation.

Re: CHGDIFF.pl - Different atom numbers

Posted: Fri Jan 10, 2014 10:42 am
by JasselM
Thanks so much - that's really helpful!