[gpaw-users] The ELF function
Jussi Enkovaara
jussi.enkovaara at csc.fi
Wed Mar 24 09:50:34 CET 2010
Kacprzak, Katarzyna wrote:
> Hi,
>
> I have been trying to analyze some of my results with electron localization function. Since the analysis gave strange results, I have tried to run this analysis for Na atom. I attached figures with two different results for Na.
> ------------------------------------------------------------------------------
> from ase import *
> from gpaw import *
>
>
> calc = GPAW('Na.gpw')
> atom = calc.get_atoms()
>
> from gpaw.elf import *
> elf = ELF(calc)
>
> elf_out = elf.get_electronic_localization_function(gridrefinement=2)
> write ('Na_2.plt', atom, data=elf_out)
>
> ------------------------------------------------------------------------------
> Each of these scripts gave two different results. First one, gave values from 0 to 0.456, and the second, gave values from 0 to 1. Even though the second gave correct values, plotting them I obtain localization far away from the atom... I attached the figure to this email. The "A" figure is related to the first case, the "B"- is related to the second case. Both of the figures are plotted for maximal values (A for 0.456, and B for 1)
Hi,
I think that the problem here is that after GPAW('Na.gpw') the wave functions are not properly initialized.
As it is possible that wave functions consume huge amounts of memory, the wave function object contains
only references to the .gpw file, and apparently the ELF object cannot deal directly with these references.
In order to get wave functions initialized before ELF, you could do something like:
-----
calc = GPAW('Na.gpw')
atom = calc.get_atoms()
calc.set_positions()
from gpaw.elf import *
elf = ELF(calc)
elf.initialize(calc)
elf.update(calc.wfs)
elf_out = elf.get_electronic_localization_function(gridrefinement=2)
-----
I think that in your latter case (restarting) you obtained just some random values which coincidentally
happend to be between 0 and 1.
> I will be grateful for any suggestions how to fix this problem and get correct analysis from GPAW.
>
> I have also compared the elf for another system using Octopus, and GPAW. And again I obtain two different results (from Octopus results are correct).
Note that there is controversy in the definition of ELF, resulting in different (by a factor of two)
prefactors, see
https://lists.berlios.de/pipermail/gridpaw-developer/2008-November/001046.html
https://lists.berlios.de/pipermail/gridpaw-developer/2008-November/001050.html
https://lists.berlios.de/pipermail/gridpaw-developer/2008-November/001053.html
https://lists.berlios.de/pipermail/gridpaw-developer/2008-November/001061.html
So, if you take into account the factor of two, do the ELF's calculated with GPAW and other codes
look similar? Afterall, 2*0.456 is quite close to 1, so the maybe the "correct" results are just
using different prefactor?
Best regards,
Jussi
More information about the gpaw-users
mailing list