[gpaw-users] GPAW versions

Christian Glinsvad christian.glinsvad at fysik.dtu.dk
Fri Nov 12 17:49:08 CET 2010


Poul Georg Moses wrote:
>   On 11/12/10 6:55 AM, Jens Jørgen Mortensen wrote:
>> On Fri, 2010-11-12 at 15:42 +0100, Christian Glinsvad wrote:
>>> Jens Jørgen Mortensen wrote:
>>>>> On Wed, 2010-11-10 at 19:34 -0800, Monica Garcia Mota wrote:
>>>>> Hi,
>>>>>
>>>>> I have calculated oxygen adsorption energy on TiO2 using two
>>>>> different GPAW versions: 0.7.6383 and 0.7.2.6974. The absolute
>>>>> energy values for TiO2 surface and O-TiO2 are shifted up 0.37 eV
>>>>> with the new GPAW version.
>>>>>
>>>>> I’m using Dipole correction in my calculations. Does it work in
>>>>> both GPAW versions in the same way?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Monica Garcia
>>> There's no difference in the way the dipole correction is implemented
>>> between revision 6383 and 6974, as far as I can tell, nor did we fix any
>>> major bugs. We did however do a bit of restructuring:
>>> 6383:6974 diff:
>>> https://trac.fysik.dtu.dk/projects/gpaw/changeset?new=trunk%406974&old=trunk%406383
>>> 6383:6974 timeline:
>>> https://trac.fysik.dtu.dk/projects/gpaw/timeline?from=08%2F13%2F10&daysback=112
>>>
>>>> On Thu, 2010-11-11 at 09:02 +0100, Jens Jørgen Mortensen wrote:
>>>>
>>>> Thanks, I got your text files and it does look very strange. I'll see
>>>> if I can figure out what the problem is.
>>>>
>>>> The text files didn't make it to the mailing list because they were
>>>> too big, but I have them on casimir in /tmp, so those of you in
>>>> Lyngby can find them there.
>>>>
>>>> Jens Jørgen
>>> I looked through them and did a side-by-side comparison (jens: there are
>>> 4 files matching /tmp/O*.txt so I assume you meant the two largest?).
>> No.  You should compare the last configuration of O-TiO2v072-DP.txt with
>> the configuration in O-TiO2v076-DP.txt.  The configurations are
>> identical, but give different energies.
>>
>> JJ
>>
> I think there must be some link to the dipole correction. I did a
> test for a different system not using the dipole correction and find
> no difference in energy. Monica also finds no difference in total
> energies when not using the dipole correction (Correct me if I am
> wrong Monica).
> 
> I have noticed that the poisson solver changes settings when the
> dipole correction is included. Could it be that something has been
> changed in the Poisson solver between versions?
> 
> Cheers,
> 
> Poul Georg


Oh that's probably it. We changed the default stencil for the Poisson
solver from Mehrstellen to 3rd-nearest-neighbor in revision 6406. This
only affects your script because you're explicitly creating your own
instance of the PoissonSolver class for DipoleCorrectionPoissonSolver.

> 
> 
>>>   It
>>> appears to me that you're getting slightly different geometries during
>>> the QN relaxation and you probably just need to tighten your convergence
>>> criteria as 'density' and 'energy' have influence on force evaluation.
>>>
>>> Additionally, it strikes me that you've run these with quite different
>>> parallelization options, which may explain the difference in "entropy"
>>> that led to the two calculations to diverge a bit.
> In my world 0.5 eV does not fall within the range of "a bit". To me this
> is quite puzzling.

Of course the final result is not "a bit" off, but I meant that it could 
cause the relaxation paths to diverge a bit in configuration space and 
thus potentially lead to either just approaching the same minima from 
different directions or ending up in different local minima entirely.

Regards
Christian Glinsvad

> 
>>> It's also curious to me that the forces at the end of the relaxation are
>>> quite large for the atoms I assume are fixed, and there are quite many
>>> of them. Just be warned that atom fixation can lead to an oblong minima
>>> in the potential energy landscape and therefor also convergence issues.
>>>
>>> Regards
>>> Christian Glinsvad
>>>
>>>>> Here is my script:
>>>>>
>>>>> import os,sys
>>>>> import numpy as np
>>>>> from math import *
>>>>> from gpaw import GPAW
>>>>> from ase import Atoms
>>>>> from ase import Atom
>>>>> from ase.constraints import FixAtoms
>>>>> from ase.optimize import QuasiNewton
>>>>> from ase.visualize import *
>>>>> from ase.io import *
>>>>> from ase.data import reference_states as _refstate
>>>>> from ase.lattice.tetragonal import SimpleTetragonalFactory
>>>>> from gpaw.mixer import Mixer
>>>>> from gpaw.poisson import PoissonSolver
>>>>> from gpaw.dipole_correction import DipoleCorrectionPoissonSolver
>>>>>
>>>>>
>>>>> slab=read('OonCUS-TiO2-2.gpw')
>>>>>
>>>>> name = 'OonCUS-TiO2-pru'
>>>>>
>>>>> calc_name=name + '.txt'
>>>>> traj_name=name + '.traj'
>>>>> log_name=name + '.log'
>>>>> gpwdat = name + '.gpw'
>>>>>
>>>>>
>>>>> mask=[atom.tag<1 for atom in slab]
>>>>> slab.set_constraint(FixAtoms(mask=mask))
>>>>>
>>>>>
>>>>> p = PoissonSolver()
>>>>> mixer=Mixer(0.1, 5, weight=50.0)
>>>>> calc = GPAW(h=0.2,
>>>>>              kpts=(4, 4, 1),     # k-points
>>>>> 	    xc = 'RPBE',
>>>>>              #eigensolver='cg',
>>>>>              txt=calc_name,
>>>>>              convergence = { 'energy' : 0.001,  #default is 0.0005?
>>>>>                              'density' : 1.0e-3, # default is 1.0e-4
>>>>>                              'eigenstates' : 1.0e-9}, #default
>>>>>              nbands=-20,
>>>>>              width=0.10,
>>>>>              verbose=True,
>>>>>              mixer=mixer,
>>>>>              poissonsolver=DipoleCorrectionPoissonSolver(p,2))
>>>>>
>>>>> calc.attach(calc.write, 1,gpwdat)
>>>>>
>>>>> slab.set_calculator(calc)
>>>>> traj = PickleTrajectory(traj_name,'w',slab)
>>>>> qn = QuasiNewton(slab,logfile = log_name)
>>>>> qn.attach(traj)
>>>>> qn.run(fmax=0.05)
>>>>> calc.write(gpwdat)
>>>>>
>>> _______________________________________________
>>> gpaw-users mailing list
>>> gpaw-users at listserv.fysik.dtu.dk
>>> https://listserv.fysik.dtu.dk/mailman/listinfo/gpaw-users
>> _______________________________________________
>> gpaw-users mailing list
>> gpaw-users at listserv.fysik.dtu.dk
>> https://listserv.fysik.dtu.dk/mailman/listinfo/gpaw-users
> 
> _______________________________________________
> gpaw-users mailing list
> gpaw-users at listserv.fysik.dtu.dk
> https://listserv.fysik.dtu.dk/mailman/listinfo/gpaw-users



More information about the gpaw-users mailing list