CHGDIFF.pl - Different atom numbers

Vasp transition state theory tools

Moderator: moderators

Post Reply
JasselM
Posts: 3
Joined: Thu Jan 09, 2014 4:08 pm

CHGDIFF.pl - Different atom numbers

Post 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.
graeme
Site Admin
Posts: 2291
Joined: Tue Apr 26, 2005 4:25 am
Contact:

Re: CHGDIFF.pl - Different atom numbers

Post 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.
JasselM
Posts: 3
Joined: Thu Jan 09, 2014 4:08 pm

Re: CHGDIFF.pl - Different atom numbers

Post by JasselM »

Thanks so much - that's really helpful!
Post Reply