Page 1 of 1

Charge transfer calculation error:Number of points not same

Posted: Tue Oct 23, 2012 3:26 pm
by nikolai
Dear all,

I want to perform a charge transfer calculation for a Cu-Si slab with 48 Cu atoms and 64 Si atoms. In order to make sure I have the same number of points in each I have done each calculation with the same values of NGXF, NGYF, and NGZF (108 90 280). Then, I add the CHGCAR files of Cu and Si by

chgsum.pl CHGCAR_Si CHGCAR_Cu and get the CHGCAR_sum.

The problem arises when I try to calculate chgdiff.pl CHGCAR_CuSi CHGCAR_sum, chgdiff.pl CHGCAR_CuSi CHGCAR_Cu or chgdiff.pl CHGCAR_CuSi CHGCAR_Si. Then, I get the following messages accordingly:

Atoms in file1: 112, Atoms in file2: 112
Points in file1: 4536000, Points in file2: 2721600
Number of points not same in two files!

Atoms in file1: 112, Atoms in file2: 48
Points in file1: 4536000, Points in file2: 2721600
Number of points not same in two files!

Atoms in file1: 112, Atoms in file2: Si
Points in file1: 4536000, Points in file2: 2721600
Number of points not same in two files!

I would appreciate your input in this. In the past I have performed other charge transfer calculations with an adsorbate (molecule) sitting on a slab substrate. Is it because of the size of my Si slab sitting on the Cu substrate that I am getting the message? Is there some way to perform a charge transfer calculation in this case?

Thanks,
~m

Re: Charge transfer calculation error:Number of points not s

Posted: Tue Oct 23, 2012 8:15 pm
by graeme
It seems like you should figure out why there are more points in your CHGCAR_CuSi file. Check if the grid is 108x90x280. Check also if spin polarization was used for this calculation, and not the other calculations. How ever you do it, there must be the same number of grid points to calculate the charge density difference.

Re: Charge transfer calculation error:Number of points not s

Posted: Tue Oct 23, 2012 8:49 pm
by nikolai
Thanks for the prompt reply. I set the NGXF, NGYF, NGZF grid to be the same (108 90 280) in all three INCAR files. I chose this size from the ionic relaxation calculation for the CuSi system and relaxed the electrons with the following INCAR file (all three INCAR files are identical):

#Self-consistent calculation
#ISTART = 0
ICHARG= 2

# Electronic relaxation:
ENCUT = 300.00
PREC = High
LREAL = Auto
ALGO=Fast

# Ionic relxation:
#IBRION = 2
#EDIFFG = -0.01
#ISIF=2

# DOS related parameters:
ISMEAR = -5
SIGMA = 0.05

NGXF = 180
NGYF = 90
NGZF=280

# (Don't) Write other output files
LWAVE= .FALSE.
LAECHG=.TRUE.
LELF=.TRUE.
LORBIT =11

Is it possible that I need to increase the grid's size in order to get the right result?

Re: Charge transfer calculation error:Number of points not s

Posted: Tue Oct 23, 2012 9:03 pm
by graeme
No, just start by looking in the CHGCAR files and see what grid size was written there. The number of grid points along each axis is written after the atom positions and before the change density data.

Re: Charge transfer calculation error:Number of points not s

Posted: Tue Oct 23, 2012 9:10 pm
by nikolai
The grid size wirtten in all three CHGCAR files is the same, i.e. 108 90 280, that's why this result is very puzzling..

Re: Charge transfer calculation error:Number of points not s

Posted: Tue Oct 23, 2012 9:27 pm
by graeme
Did you check to see if one was spin polarized (with a second data set after the first)?

Re: Charge transfer calculation error:Number of points not s

Posted: Tue Oct 23, 2012 9:37 pm
by nikolai
Yes I did, there are no results for spin polarization, i.e. the grid size appears only once in the CHGCAR file. As you pointed out, it is after the atomic coordinates and before the charge density.

Re: Charge transfer calculation error:Number of points not s

Posted: Tue Oct 23, 2012 9:39 pm
by graeme
If you make the two files available, I'll see what's going on.

Re: Charge transfer calculation error:Number of points not s

Posted: Thu Oct 25, 2012 3:27 pm
by nikolai
Dear Graeme,

Eventually I figured it out. There was some bug in the calculation that was generating errors in the CHGCAR_CuSi file. Now, it works fine and I just plotted the charge transfer, which looks as expected.

Thank you very much for your help and your time.

Best Regards,
~m

Re: Charge transfer calculation error:Number of points not s

Posted: Thu Oct 25, 2012 3:37 pm
by graeme
Ok, very good to know.

Re: Charge transfer calculation error:Number of points not s

Posted: Fri Nov 09, 2012 2:04 am
by gramos
Dear All.
Im trying to do some calculations in the same topic.
Im a trying to calculate one single atom charge transfer to a surface. I have a CHGCAR for the adsorbate(A), one for the surface(S) and one for the complex Surface-adsorbate (S-A). To analyze the Charge transfer I used the chgsum.pl to ad (A)+(S)=CHGCAR_summ, then I used the chgdiff.pl to calculate (A-S)-CHGCRA_summ=CHGCAR_diff. I've made the calculations in order to have to have the same number of points and the scripts run and generate data.
However when I try to convert the CHGCAR_diff to visualize it in xcrysden, in order to have a nice plot of charge transfer, the following message appears:
ERROR: cannot read data in file 'CHGCAR_diff
I've realized that the CHGCAR_diff does NOT have the augmentation ocupancies area.

The question is: The fact I cannot visualize is because of this area that is missing? Is this a problem from the scripts? or is this a problem with my CHGCAR files?

I'm very new in the computational calculations in genral and I've learned a lot from the discussion forums; however I have reached a point where I dont know what else to do. Any suggestion will be appreciated!!! Thank you