Derived from the ase.neb.NEB class, NEBEspresso orchestrates (i)Espresso calculators of individual images in a NEB calculation. This way a NEBEspresso object facilitates parallel NEB jobs, where each image calculator uses a subset of the pool of CPUs available to the job.

This tutorial explains the use of NEBEspresso to do a NEB calculation on methyl group rotation in ethane, built on this ASE example.

Initial and final structures of the NEB

As opposed to the Effective Medium Potential used in the original example, Quantum Espresso needs periodic boundaries defined by a unit cell. That is defined in the ethane.traj trajectory file containing the optimized structure. The final structure is created simply by permuting the H atoms in one of the methyl groups.

from espresso import iEspresso
from import read

initial = read('ethane.traj')
final = initial.copy()
final.positions[2:5] = initial.positions[[3, 4, 2]]

Assigning calculators to intermediate images

Initially, images are created as copies of the initial structure and are each asssigned a calculator. Here we use the interactive iEspresso calculator, but the non-interactive Espresso calculator is equally valid.

images = [initial]
for _ in range(7):
    image = initial.copy()
    image.set_calculator(iEspresso(pw=300, dw=4000,kpts='gamma',xc='PBE'))

Running the NEB calculation and analyzing the results

The NEBEspresso class is instantiated with the list of images and is used just as the ase.neb.NEB super class, with one exception: the parallel keyword. NEBEspresso ignores 'parallel'=False and will always attempt to distribute the image calculators over the CPU pool available to the job.

from espresso.nebespresso import NEBEspresso
from import FIRE as QuasiNewton

neb = NEBEspresso(images)

qn = QuasiNewton(neb, logfile='ethane_linear.log', trajectory='neb.traj')

from ase.neb import NEBTools
nt = NEBTools(neb.images)
fig = nt.plot_band()