[gpaw-users] : gpaw.KohnShamConvergenceError: Did not converge!
Yuelin Li
ylli at aps.anl.gov
Mon Nov 22 23:36:53 CET 2010
Nic,
I am pretty sure I tried, then I tried again after seeing you email, and
there is no luck. here is the python script
-----------------------
from gpaw import setup_paths
setup_paths.insert(0, '.')
from math import pi, cos, sin
from ase import Atoms
from gpaw import GPAW, FermiDirac
a = 3.937
d = a /2
atoms = Atoms(symbols='CaMnO3',
positions=[(d, d, d),(0, 0, 0),(d, 0, 0),(0, d, 0),(0,
0, d)],
cell=(a,a,a),pbc=(1,1,1))
calc3 = GPAW(nbands=36,h=0.1,setups={2: 'fch1s'})
atoms.set_calculator(calc3)
e2 = atoms.get_potential_energy() + calc3.get_reference_energy()
print 'Energy difference' , e2 - e1
-----------------------
And here is the error message,
-----------------------------------
Traceback (most recent call last):
File "xas2a.py", line 19, in <module>
e2 = atoms.get_potential_energy() + calc3.get_reference_energy()
File "/soft/ase/ase-3.4.1/ase/atoms.py", line 494, in
get_potential_energy
return self.calc.get_potential_energy(self)
File "/soft/gpaw/gpaw-0.7.2/gpaw/aseinterface.py", line 32, in
get_potential_energy
self.calculate(atoms, converge=True)
File "/soft/gpaw/gpaw-0.7.2/gpaw/paw.py", line 279, in calculate
raise KohnShamConvergenceError('Did not converge!')
gpaw.KohnShamConvergenceError: Did not converge!
Ph. D
Advanced Photon Source, Argonne National Laboratory
630 252 7863
http://sector7.xor.aps.anl.gov/~ylli/
On 11/22/2010 1:28 PM, Nichols A. Romero wrote:
> Yuelin,
>
> Can you try without spin polarization altogether? Will that converge?
>
> ----- Original Message -----
>> Thanks for offering the help.
>>
>> To clarify,
>> - For a periodic system I should not specify charge?
>> - The charge should actually be the opposite of the charge of the
>> system?
>>
>> In any case, I did try GPAW with no option but the core hole like
>> GPAW(setups={2: 'fch1s'}), as well as charge =-1, all reaches the same
>> convergence problem.
>>
>> What to do next? Thanks.
>>
>> Yuelin
>>
>>
>> On 11/19/2010 6:59 PM, Mathias Ljungberg wrote:
>>> Hi Yuelin,
>>>
>>> I think you want to put charge=-1, with the core hole you will get a
>>> neutral system
>>>
>>> Mathias
>>>
>>>
>>> On Nov 20, 2010, at 12:50 AM, Nichols A. Romero wrote:
>>>
>>>> Yuelin,
>>>>
>>>> You have a periodic system with a net charge = 1. Is this what you
>>>> want?
>>>> I am not sure that its possible to converge this for anything but
>>>> a finite system. I think this maybe your biggest problem. Try
>>>> removing
>>>> the charge keyword and seeing if it converges.
>>>>
>>>> Also, I recommend using the default eigensolver.
>>>>
>>>>
>>>>
>>>>
>>>> ----- Original Message -----
>>>>> Hi,
>>>>>
>>>>> in the past few days I was struggling with this problem on the
>>>>> following
>>>>> calculation.
>>>>>
>>>>> The problem is whatever I try, it always fail to converge as long
>>>>> as I
>>>>> include the core hole state, the things I tried include
>>>>> - nbands up to 120
>>>>> - using done to 0.1
>>>>> - both eigensolvers
>>>>> - all 3 elements
>>>>> - room temperature
>>>>> - xc='LDA', etc
>>>>>
>>>>> I wonder what else can still be done?
>>>>>
>>>>> Please help,
>>>>>
>>>>> thanks
>>>>>
>>>>> Yuelin
>>>>>
>>>>> ----------------------------------------------------------------
>>>>> from math import pi, cos, sin
>>>>> from ase import Atoms
>>>>> from gpaw import GPAW, FermiDirac
>>>>>
>>>>> t = pi / 180 * 104.51
>>>>> a = 3.937
>>>>> d = a /2
>>>>> atoms = Atoms(symbols='CaMnO3',
>>>>> positions=[(d, d, d),(0, 0, 0),(d, 0, 0),(0, d, 0),(0,
>>>>> 0, d)],
>>>>> cell=(a,a,a),pbc=(1,1,1))
>>>>> atoms.center()
>>>>>
>>>>> calc2 = GPAW(nbands=36,
>>>>> h=0.18,
>>>>> txt='CMO_exc.txt',
>>>>> xc='PBE',
>>>>> charge=1,
>>>>> spinpol=True,
>>>>> eigensolver='cg',
>>>>> occupations=FermiDirac(0.00, fixmagmom=True),
>>>>> mixer=MixerSum(0.05,5,weight=100),
>>>>> setups={2: 'fch1s'})
>>>>> atoms[2].magmom = 1
>>>>> atoms.set_calculator(calc2)
>>>>> e2 = calc2.get_reference_energy()
>>>>> --------------------------------------------------------------------
>>>>>
>>>>> The core holes are generated using
>>>>>
>>>>> --------------------------------------------------------------------
>>>>> import os
>>>>>
>>>>> from gpaw import Calculator
>>>>> from gpaw.atom.generator import Generator
>>>>> from gpaw.atom.generator import parameters
>>>>>
>>>>> # Generate setups with 0.5, 1.0, 0.0 core holes in 1s
>>>>> elements = ['Mn', 'O']
>>>>> coreholes = [0.5, 1.0, 0.0]
>>>>> names = ['hch1s', 'fch1s', 'xes1s']
>>>>> functionals = ['LDA', 'PBE']
>>>>>
>>>>> for el in elements:
>>>>>
>>>>> for name, ch in zip(names, coreholes):
>>>>>
>>>>> for funct in functionals:
>>>>>
>>>>> g = Generator(el, scalarrel=True, xcname=funct,
>>>>> corehole=(1, 0, ch), nofiles=True)
>>>>>
>>>>> g.run(name=name, **parameters[el])
>>>>> --------------------------------------------------------------------
>>>>> and
>>>>> --------------------------------------------------------------------
>>>>> from gpaw import Calculator
>>>>> from gpaw.atom.generator import Generator
>>>>> from gpaw.atom.generator import parameters
>>>>>
>>>>> # Generate setups with 0.5, 1.0, 0.0 core holes in 1s
>>>>> elements = ['Ca']
>>>>> coreholes = [0.5, 1.0, 0.0]
>>>>> names = ['hch1s', 'fch1s', 'xes1s']
>>>>> functionals = ['LDA', 'PBE']
>>>>>
>>>>> for el in elements:
>>>>>
>>>>> for name, ch in zip(names, coreholes):
>>>>>
>>>>> for funct in functionals:
>>>>>
>>>>> g = Generator(el, scalarrel=True, xcname=funct,
>>>>> corehole=(1, 0, ch), nofiles=True)
>>>>>
>>>>> g.run(name=name, empty_states='3d',**parameters[el])
>>>>>
>>>>> ------------------------------------------------------------------------
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> gpaw-users mailing list
>>>>> gpaw-users at listserv.fysik.dtu.dk
>>>>> https://listserv.fysik.dtu.dk/mailman/listinfo/gpaw-users
>>>>
>>>> --
>>>> Nichols A. Romero, Ph.D.
>>>> Argonne Leadership Computing Facility
>>>> Argonne National Laboratory
>>>> Building 240 Room 2-127
>>>> 9700 South Cass Avenue
>>>> Argonne, IL 60490
>>>> (630) 252-3441
>>>>
>>>> _______________________________________________
>>>> 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