[ase-users] IDPP method slow or not working for large system

Gaël Donval G.Donval at bath.ac.uk
Thu Mar 16 15:23:44 CET 2017


Hi,
> Dear ASE experts,
> 
> I have recently started using this package and have had a good
> experience so I would like to thank the developers and the community
> for their work.
> 
> However, I have encountered one problem and hope that some expert can
> provide useful advice. I am trying to use the recommended IDPP method
> for creating initial images for NEB calculations. The LI method
> (linear interpolation) works without any problems. However, the IDPP
> method seems very slow, running for a few hours. The attached python
> script (see below) uses first LI and then sets some constraints and
> tries to use the IDPP.  As mentioned, the script seems to run without
> errors but the IDPP portion seems quite slow. Is there any way to
> make
> it faster?

A few comments in general:

 * `ase.calculator.emt` is known to be slow (with crazy parameters for
   H, C, N and O): you should use ASAP or another calculator instead.
 * Next time, be more specific about what exactly is slow: I guess you
   are talking about the optimisations procedure and that, in this
   particular case, you are seeing many more optimizations steps with
   your IDPP-interpolated geometries.
 * Interpolation in NEB is a tough subject: its purpose is to provide
   initial guesses as close as possible from the minimum energy path.
   In some cases, a crude approximation like a linear interpolation
   gives better results than more complicated ones and there is nothing
   wrong in using it then. However for your problem, I doubt this is
   the case.
 * You are actually comparing **two different things**: unlike in the
   IDPP-interpolation case, there are no constraints set in the linear-
   interpolation one. That's a huge difference that has nothing to do
   with your interpolator choice.

Also keep in mind that adding constraints is the same thing as biasing
the physics. It can make sense, for instance to approximate an
infinitely thick slab from a handful of layers, but this is something
that can't be guessed and must be rigorously checked.

In this case, many more relaxation steps after adding constraints is
not a good omen: it is probable that your constraints are altering the
physics a great deal.

Gaël


> 
> Note that my system contains about 350 atoms but the majority of the
> atoms are fixed/constrained prior to the IDPP calculation.
> 
> Thank you in advance,
> Garold
> 
> -------------------------------------------------------------------
> -----------------------------------------------
> 
> from __future__ import print_function
> from ase import io
> from ase.neb import NEB
> from ase.calculators.emt import EMT
> from ase.optimize.fire import FIRE as QuasiNewton
> from ase.constraints import FixAtoms
> #
> # Read files and set number of frames for the neb, etc.
> #
> images_total = 8
> images_between = images_total - 2
> A, B, C = 40.0, 40.0, 25.64
> initial = io.read('initial.xyz')
> final = io.read('final.xyz')
> #
> # Do the Linear Interpolation (li), without any constraints
> #
> images_li = [initial]
> for i in range(images_between):
>     images_li.append(initial.copy())
> images_li.append(final)
> for image in images_li:
>     image.set_calculator(EMT())
>     image.set_cell([[ A,  0.,  0.], [ 0.,  B,  0.], [ 0.,  0.,  C]])
>     image.set_pbc((True, True, True))
> #
> neb_li = NEB(images_li)
> neb_li.interpolate()
> cnt_li = QuasiNewton(neb_li,
> trajectory='path_li.traj',  logfile='path_li.log')
> #cnt_li.run(fmax=0.05)
> cnt_li.run(fmax=1.0e6)
> io.write('path_li.xyz', images_li)
> #
> # Do the IDPP Interpolation (idpp), after first setting some
> constraints
> #
> del initial.constraints
> for atom in initial:
>     i = atom.index
>     j = i + 1
>     if ( (j >= 1 and j <= 113) or
>     (j >=116 and j <= 165) or
>     (j == 168) or
>     (j >=174 and j <= 219) or
>     (j >=225 and j <= 336) ):
>         atom.tag = 2
>         print("Constrained: j, atom.tag =  ", j, atom.tag)
>     else:
>         atom.tag = 1
>         print("Free: j, atom.tag =  ", j, atom.tag)
> constraint = FixAtoms(mask=[atom.tag > 1 for atom in initial])
> images_idpp = images_li[:]
> for image in images_idpp:
>     image.set_constraint(constraint)
> #
> neb_idpp = NEB(images_idpp)
> neb_idpp.interpolate('idpp')
> cnt_idpp = QuasiNewton(neb_idpp, trajectory='path_idpp.traj',
> logfile='path_idpp.log')
> #cnt_idpp.run(fmax=0.05)
> cnt_idpp.run(fmax=1.0e6)
> io.write('path_idpp.xyz', images_idpp)
> 
> -------------------------------------------------------------------
> -----------------------------------------------
> _______________________________________________
> ase-users mailing list
> ase-users at listserv.fysik.dtu.dk
> https://listserv.fysik.dtu.dk/mailman/listinfo/ase-users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3199 bytes
Desc: not available
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20170316/7010108a/attachment.bin>


More information about the ase-users mailing list