[gpaw-users] Simple code, yet did not converge, please help
Yuelin Li
ylli at aps.anl.gov
Sun Jan 16 21:59:41 CET 2011
Thanks for the reply.
I also tried without the line magmoms=[1] and even with out the line,
same result.
Tried hund and spinpol and looks like the code recognize either.
I assume a neutral O atom has no spin, is this script right in doing it?
On 1/14/2011 19:41, Ask Hjorth Larsen wrote:
> Hi Yuelin
>
> On Fri, 14 Jan 2011, Yuelin Li wrote: .\
>
>> a very script:
>>
>>
>> from ase import Atoms, Atom
>> from gpaw import GPAW
>>
>> a = 4. # Size of unit cell (Angstrom)
>> c = a / 2
>> # Oxygen atom:
>> atom1 = Atoms('O',
>> positions=[(c, c, c)],
>> magmoms=[0],
>> cell=(a, a, a))
>> # gpaw calculator:
>> calc = GPAW(xc='PBE', txt='O.out')
>> atom1.set_calculator(calc)
>> e1 = atom1.get_potential_energy()
>> calc.write('O.gpw')
>>
>>
>> I get the following, please help.
>>
>> File "opt1.py", line 14, in <module>
>> e1 = atom1.get_potential_energy()
>> File "/home/ylli/ase/ase/atoms.py", line 503, in get_potential_energy
>> return self.calc.get_potential_energy(self)
>> File "/home/ylli/gpaw/gpaw/aseinterface.py", line 33, in
>> get_potential_energy
>> self.calculate(atoms, converge=True)
>> File "/home/ylli/gpaw/gpaw/paw.py", line 272, in calculate
>> raise KohnShamConvergenceError('Did not converge!')
>> gpaw.KohnShamConvergenceError: Did not converge!
>>
>> _______________________________________________
>> gpaw-users mailing list
>> gpaw-users at listserv.fysik.dtu.dk
>> https://listserv.fysik.dtu.dk/mailman/listinfo/gpaw-users
>>
>
> This script performs a spin-paired calculation on an isolated O atom.
>
> You probably want a spin-polarized one, which you can perform by
> specifying hund=True to the calculator (or more generally
> spinpol=True). hund=True will use Hund's rule to establish the initial
> guess, and will also result in a spin-polarized calculation.
>
> Regards
> Ask
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserv.fysik.dtu.dk/pipermail/gpaw-users/attachments/20110116/61652ac8/attachment.html
More information about the gpaw-users
mailing list