[gpaw-users] Problems with convergence under Constant Electric Field
Kuklin, Mikhail
mikhail.s.kuklin at jyu.fi
Tue Apr 26 14:34:07 CEST 2016
Hello,
I am trying to optimize 2D system with an applied electric field along z-direction by using gpaw.external_potential module. However, I encountered problems with convergence already with F=0.001 au. Does anyone can suggest me the way to solve this issue?
Here is the script:
---
from ase.visualize import view
from ase.io import read
from ase.optimize import BFGS
from gpaw import GPAW, PW, FermiDirac
from gpaw.mixer import Mixer
from gpaw.eigensolvers import RMM_DIIS
from gpaw.external_potential import ConstantElectricField
slab=read("test1.xyz")
a=4.80490
d=4.80490
slab.set_cell([a,a,d+15])
slab.center(axis=2)
slab.set_pbc([True, True, False])
#view(slab)
for h in [0.20]:
calc=GPAW(
xc="PBE",
h=h,
kpts=(8,8,1),
spinpol=False,
mixer=Mixer(0.15, 10, 50),
occupations=FermiDirac(0.10),
eigensolver=RMM_DIIS(5),
external=ConstantElectricField(0.001, [0, 0, 1]),
txt="ml3_f2_opt.txt")
slab.set_calculator(calc)
slab.get_potential_energy()
opt=BFGS(slab, trajectory="ml3_f2_opt.traj", maxstep=0.01, logfile="ml3_f2_opt.log")
opt.run(fmax=0.025)
calc.write("ml3_f2_opt.gpw”)
---
…and test1.xyz file in case if someone needs:
---
12
Ca 0.000000000 4.804903715 2.402450000
O 2.402449999 4.804903715 2.402450000
O 0.000000000 4.804903715 0.000000000
Ca 0.000000000 4.804903715 -2.402450000
O 2.402449999 4.804903715 -2.402450000
O -0.000001858 2.402451858 2.402450000
Ca 2.402451858 2.402451858 2.402450000
Ca 2.402451858 4.804901857 0.000000000
O 2.402451858 2.402451858 0.000000000
Ca 2.402451858 2.402451858 -2.402450000
O 0.000001858 2.402451858 -2.402450000
Ca 0.000000000 2.402449999 0.000000000
—
I tried to solve the problem by modifying mixer’s options and max step of BFGS, but it also did not help - forces are “walking” around the same value. It is worth to mention that under F=0.0001 convergence is fine.
Thank you.
Best regards,
Dr. Mikhail Kuklin
Postdoctoral researcher
Nanoscience center
Department of Physics
University of Jyväskylä
Finland
More information about the gpaw-users
mailing list