 Going from MEP to ASE-NEB

Good afternoon everyone,

I’m working on a nudged elastic band project. Our team previously used MEP tools to plot the pathway. We could set our boundaries and Import energies from a .txt file. Unfortunately, the author is no longer maintaining the project and referred us to ASE. From my reading, I’m unable to resolve if ASE-NEB supports our needs. I’ve attached a copy of the python script we use for MEP. If anyone could help translate this to ASE that would be wonderful.

from mep.path import Path
from mep.neb import NEB
from mep.models import LEPS
from collections import deque
import numpy as np
from scipy import optimize
from tas_class import *
import matplotlib.pyplot as plt

# finds the minimum energy pathway
# requires python3 with TASMANIAN and mep to run (both available through pip)

# boundaries for each variable for SLSQP optimization
bnds = ((-20,200),(-100,100))
#tbnds = ((0.6,4.0),(60,180))

# number of images for neb calculations
nimage = 50

# set starting point x0 and end point x1
tassurf = TasSurf()
x0 = optimize.minimize(tassurf.grideval,[0, 0], method='SLSQP',bounds=bnds).x # minima one
x1 = optimize.minimize(tassurf.grideval,[180, 0], method='SLSQP',bounds=bnds).x # minima two
#x0 = [0, 70]
#x1 = [180, 70]
print(x0)
print(x1)

path = Path.from_linear_end_points(x0, x1, nimage, 3)  # and k=1
neb =NEB(tassurf, path) # initialize NEB
history = neb.run(verbose=True, n_steps=200) # run
hislen=len(history.history)
print(hislen)
x=[]
y=[]
fp = open('neb_history.txt','w')
for i in range(hislen):
j=i+1
#fp.write('step %d\n' % j)
for hisarr in history.history[i]:
for hishisarr in hisarr:
for point in hishisarr:
fp.write('%.8f    ' % point)
fp.write('\n')
x.append(hisarr[:,0])
y.append(hisarr[:,1])
fp.write('\n')
plt.scatter(x,y)
plt.xlim(-20,200)
plt.ylim(-100,100)
#plt.show()
filename = f'images/frame_{i}.png'
plt.savefig(filename, dpi=96)
plt.close()
x=[]
y=[]
fp.close()

type or paste code here