[gpaw-users] Simple code, yet did not converge, please help

Yuelin Li ylli at aps.anl.gov
Sat Jan 15 00:03:44 CET 2011


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!



More information about the gpaw-users mailing list