[gpaw-users] The ELF function

Jens Jørgen Mortensen jensj at fysik.dtu.dk
Fri Mar 12 10:09:14 CET 2010


On Thu, 2010-03-11 at 18:24 +0200, 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.
> 
> Thus, one result obtain using this part of code:
> 
> ------------------------------------------------------------------------------
> name = 'Na'
> atom = Atoms (read (name +".xyz"))
> 
> atom.set_cell([7.92, 7.92, 7.92])
> calc = GPAW(h=0.18, nbands=-10, xc='PBE', txt=name+'.out')
> atom.set_calculator(calc)
> atom.get_potential_energy()
> 
> from gpaw.elf import *
> elf = ELF(calc)
> 
> elf.initialize(calc)
> elf.update(calc.wfs)
> 
> elf_out = elf.get_electronic_localization_function(gridrefinement=2)
> write ('Na.plt', molecule, data=elf_out)
> 
> ------------------------------------------------------------------------------
> 
> and another was obtain, just by restarting gpw file. Thus, with this
> code:
> 
> ------------------------------------------------------------------------------
> 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)

In your second script, you left out the two lines:

elf.initialize(calc)
elf.update(calc.wfs)

Are they not needed when you restart from a file?

JJ

> 
> ------------------------------------------------------------------------------
> 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)
> 
> 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).
> 
> Best regard,
> 
> Katarzyna Kacprzak
> 
> katarzyna.a.kacprzak at jyu.fi
> 
> PhD student
> Nanoscience Center
> Univeristy of Jyvaskyla
> 
> 
> 
> _______________________________________________
> gpaw-users mailing list
> gpaw-users at listserv.fysik.dtu.dk
> https://listserv.fysik.dtu.dk/mailman/listinfo/gpaw-users



More information about the gpaw-users mailing list