[gpaw-users] Benzene optimization 'Did not converge'
Elsebeth Schröder
elsebeth.schroder at chalmers.se
Fri Dec 7 15:27:45 CET 2012
Hi Qian Li,
I don't know about the KohnShamConvergeError, but once you figure that out, I suggest you lower the max force (0.01 eV/Å or lower) because the energy minimum in sparse systems is shallow and the forces small. Also, and the grid spacing should be even smaller than what you are testing now (I would use h=0.12 Å or smaller). Finally, since the energy differences (like the binding energy) in sparse matter systems are on the meV scale you will need to energy-converge your calculations better than the default gpaw settings. For that you can use the
convergence={'energy':SOMENUMBER}
key, where SOMENUMBER is the convergence criterium in eV per electron. Thus, if your system is a benzene dimer and you want 1 meV convergence on the binding energy you need to set SOMENUMBER to 10e-5. That will likely result in a few extra electronic iterations, compared to the default.
Best regards
Elsebeth
=====================================================================
Elsebeth Schröder, prof.
Dept. of Microtechnology and tel.: +46 31 772 8424
Nanoscience (MC2) fax: +46 31 772 3471
Chalmers Univ. of Technology e-mail: schroder at chalmers.se
SE-412 96 Gothenburg, Sweden http://fy.chalmers.se/~schroder
=====================================================================
________________________________________
From: gpaw-users-bounces at listserv.fysik.dtu.dk [gpaw-users-bounces at listserv.fysik.dtu.dk] on behalf of qian li [qian.li at chem.ku.dk]
Sent: 07 December 2012 15:04
To: gpaw-users at listserv.fysik.dtu.dk
Subject: [gpaw-users] Benzene optimization 'Did not converge'
Dear Sir or Madam,
I am the new user of GPAW.
When I optimize the benzene with h=0.20, it is converged. But when I change h from 0.2 to 0.18, it can't be converged even though I use basis dzp for optimization.
Does h have some special sensitivity to the box? Should some other parameters be added in the file to make it converged?
Thank you very much for your warmhearted help!
This is the input file.
from ase import *
from gpaw import *
from gpaw.transport.tools import sort_atoms
from ase.io<http://ase.io/> import read,write
from ase.visualize import view
from ase.lattice.surface import *
from ase.optimize import QuasiNewton
from ase.data.molecules import molecule
import numpy as np
atoms = read('benzene_gas.xyz')
atoms.set_cell([20,20,22]) # Set unit-cell (cubic 10x10x10≈)
atoms.center() # Center atoms in unit-cell
# Define GPAW calculator
vdw = 'vdW-DF'
calc = GPAW(xc=vdw,# XC functional
h=0.18,
basis='dzp',
txt="optimize_gas.txt") # Output text file
atoms.set_calculator(calc) # Attach calculator to atoms
relax = QuasiNewton(atoms, # Attach minimizer to atoms
trajectory='optimize_gas.traj', # Trajectory file
logfile='qn.log') # Optimizer output
relax.run(fmax=0.05) # Run optimization, max force 0.05 eV/≈
calc.write("optimize_gas.gpw") # Write GPAW output (density, etc...)
This is the error:
GPAW CLEANUP (node 5): gpaw.KohnShamConvergenceError occurred. Calling MPI_Abort!
File "benze.py", line 27, in ?
relax.run(fmax=0.05) # Run optimization, max force 0.05 eV/≈
File "/kemi/strange/ase/ase/optimize/optimize.py", line 114, in run
f = self.atoms.get_forces()
File "/kemi/strange/ase/ase/atoms.py", line 650, in get_forces
forces = self._calc.get_forces(self)
File "/users/kemi/strange/gpaw/gpaw/aseinterface.py", line 69, in get_forces
force_call_to_set_positions=force_call_to_set_positions)
File "/users/kemi/strange/gpaw/gpaw/paw.py", line 283, in calculate
raise KohnShamConvergenceError('Did not converge!')
gpaw.KohnShamConvergenceError: Did not converge!
Best regards
Qian Li
university of copenhagen
More information about the gpaw-users
mailing list