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

Garold Murdachaew g.murdachaew at gmail.com
Thu Mar 16 12:06:45 CET 2017


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?

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)

------------------------------------------------------------------------------------------------------------------


More information about the ase-users mailing list