[gpaw-users] Simple code, yet did not converge, please help
Ask Hjorth Larsen
askhl at fysik.dtu.dk
Sat Jan 15 02:41:34 CET 2011
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
More information about the gpaw-users
mailing list