[gpaw-users] correct_for_charge error for Li +1

Marcin Dulak Marcin.Dulak at fysik.dtu.dk
Fri Feb 24 14:38:23 CET 2012


Hi,

there are several problems here.
I guess gpaw does not know how to follow hunds rule for Li+ which 
contains 0 electrons,
it's also impossible to set the desired magnetic moment of 3 with no 
electrons.
I'm not sure about all the possible scenarios in the code and how to fix 
it, but i provide a script (attached) that works, unfortunately only for 
PBE.
I have verified with a surprise, that in fact ionization potential 
calculation (for PBE) of Li (with no electrons on Li+)
seems OK (compare 
http://toc.uni-muenster.de/GMTKN/GMTKN30/G21IPref.html), so maybe such a 
calculation makes sense.
A weird things is that PBE converges in few steps, i can't get RPBE 
converged. It reminds me https://trac.fysik.dtu.dk/projects/gpaw/ticket/217

Other suggestions: when calculating isolated atoms you should use 
width=0 (at least organic elements, and closed shell systems,
for open-shell systems, especially d-occupied there are problems 
inherent to DFT: 
https://listserv.fysik.dtu.dk/pipermail/gpaw-users/2011-December/001174.html
see the whole discussion around 
https://listserv.fysik.dtu.dk/pipermail/gpaw-users/2011-December/001163.html), 
and broken cell symmetry (this i guess is not necessary for Li+).

Marcin

Ivano Eligio Castelli wrote:
> Dear all,
> I want to calculate the energy of a Li isolated atom with charge +1.
> I got this error message:
>
> "
>   File "/home/camp/ivca/gpaw.8447/gpaw/setup.py", line 97, in 
> correct_for_charge
>     if charge >= 0:
> RuntimeError: maximum recursion depth exceeded in cmp
> GPAW CLEANUP for serial binary: exceptions.RuntimeError occured. Calling 
> sys.exit()
> "
>
> The script is:
>
> "
> from ase import *
> from gpaw import *
> from ase.lattice.spacegroup import crystal
> import sys
>
> a = 15
> b = 15
> c = 15
>
> elem = 'Li'
> charge = 1
>
> print 'Elem: '+elem+'. Charge: '+str(charge)
>
> bulk = Atoms(symbols='%s' % (elem), pbc=True,
>              positions=[(.0, .0, .0)],
>              magmoms=[3])
> bulk.set_cell([a, b, c], scale_atoms=True)
>
> # calc parameters
> h = 0.15
> xc = 'RPBE'
> k = 1
> calc = GPAW(h=h,
>             xc=xc,
>             kpts=(k, k, k),
>             txt=elem+'-ion_'+str(charge)+'.out',
>             eigensolver='cg',
>             occupations=FermiDirac(width=0.05),
>             maxiter=250,
>             hund = True,
>             charge = float(charge))
> bulk.set_calculator(calc)
> # get the potential energy
> E_bulk = bulk.get_potential_energy()
> print E_bulk
> calc.write(elem+'-ion_'+charge+'.gpw')
> "
>
> I found the same error also for other elements like Nb, Ta
> Does anyone have experienced the same problem?
> Thank you.
> Best regards,
> Ivano
>   


-- 
***********************************
 
Marcin Dulak
Technical University of Denmark
Department of Physics
Building 307, Room 229
DK-2800 Kongens Lyngby
Denmark
Tel.: (+45) 4525 3157
Fax.: (+45) 4593 2399
email: Marcin.Dulak at fysik.dtu.dk

***********************************

-------------- next part --------------
A non-text attachment was scrubbed...
Name: try.py
Type: text/x-python
Size: 978 bytes
Desc: not available
Url : http://listserv.fysik.dtu.dk/pipermail/gpaw-users/attachments/20120224/7492757e/attachment.py 


More information about the gpaw-users mailing list