[gpaw-users] Problems with convergence under Constant Electric Field

Rasmus Karlsson rasmusk at kth.se
Tue Apr 26 19:50:42 CEST 2016


Dear Mikhail,
have you considered using the davidson eigensolver instead? I should
note that I haven't tried it with external fields. Nevertheless, it is much
more simple to get convergence when using that eigensolver. I never use
RMM-DIIS, because after all, a calculation that is finished tomorrow is
still faster than one that quickly doesn't converge and fails at 3 am while
you're in bed dreaming of the great results you'll get tomorrow. If the
default eigensolver = 'dav' still doesn't work, consider importing the
davidson and changing the options (see point 3 here:
https://wiki.fysik.dtu.dk/gpaw/documentation/convergence.html)

Rasmus

Kuklin, Mikhail via gpaw-users writes:

> 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
>
>
>
> _______________________________________________
> gpaw-users mailing list
> gpaw-users at listserv.fysik.dtu.dk
> https://listserv.fysik.dtu.dk/mailman/listinfo/gpaw-users


-- 
Rasmus Karlsson, PhD


More information about the gpaw-users mailing list