[ase-users] Query about NEB
Protik Das
protik77 at gmail.com
Tue Mar 28 19:40:56 CEST 2017
I used the procedure described in the example (
https://wiki.fysik.dtu.dk/ase/tutorials/neb/diffusion.html#diffusion-tutorial%29.)
for my calculation. For my case I used vasp as my calculator on 5 images.
But selecting Tools->NEB in ase-gui does not show any curve and the values
are all NaN. Also I tried the post processing script on the last 5 images.
That also shows an error. The way I coded the neb step is:
from ase.constraints import FixAtoms
from ase.calculators.vasp import Vasp
from ase.neb import NEB
from ase.optimize import BFGS
import ase.io.vasp as vp
initial = vp.read_vasp('start.vasp')
final = vp.read_vasp('end.vasp')
constraint = FixAtoms(mask=[atom.position[2] < z_thr for atom in initial])
calc1=Vasp(...)
fmax=0.05
images = [initial]
for i in range(3):
image = initial.copy()
image.set_calculator(calc1)
image.set_constraint(constraint)
images.append(image)
images.append(final)
neb = NEB(images)
neb.interpolate()
qn = BFGS(neb, trajectory='traj_neb.traj')
qn.run(fmax=fmax)
I tried post-processing with this code:
import matplotlib.pyplot as plt
from ase.neb import NEBTools
from ase.io import read
images = read('traj_neb.traj at -5:')
nebtools = NEBTools(images)
# Get the calculated barrier and the energy change of the reaction.
Ef, dE = nebtools.get_barrier()
And getting the following error:
---------------------------------------------------------------------------RuntimeError
Traceback (most recent call
last)<ipython-input-2-38055ba692ba> in <module>() 2 3 # Get
the calculated barrier and the energy change of the reaction.----> 4
Ef, dE = nebtools.get_barrier() 5 6 # # Get the barrier
without any interpolation between highest images.
C:\Users\Protik\Miniconda3\envs\ptk.pmg\lib\site-packages\ase\neb.py
in get_barrier(self, fit, raw) 536 without interpolation.
Set raw=True to get the raw energy of the 537 transition
state instead of the forward barrier."""--> 538 s, E, Sfit,
Efit, lines = self.get_fit() 539 dE = E[-1] - E[0] 540
if fit:
C:\Users\Protik\Miniconda3\envs\ptk.pmg\lib\site-packages\ase\neb.py
in get_fit(self) 581 images = self._images 582 R
= [atoms.positions for atoms in images]--> 583 E =
[atoms.get_potential_energy() for atoms in images] 584 F =
[atoms.get_forces() for atoms in images] 585 A =
images[0].cell
C:\Users\Protik\Miniconda3\envs\ptk.pmg\lib\site-packages\ase\neb.py
in <listcomp>(.0) 581 images = self._images 582
R = [atoms.positions for atoms in images]--> 583 E =
[atoms.get_potential_energy() for atoms in images] 584 F =
[atoms.get_forces() for atoms in images] 585 A =
images[0].cell
C:\Users\Protik\Miniconda3\envs\ptk.pmg\lib\site-packages\ase\atoms.py
in get_potential_energy(self, force_consistent, apply_constraint)
675 """ 676 if self._calc is None:--> 677
raise RuntimeError('Atoms object has no calculator.') 678
if force_consistent: 679 energy =
self._calc.get_potential_energy(
RuntimeError: Atoms object has no calculator.
For your convenience I have attached the trajectory file. Any idea about
how I can fix this?
--
Protik Das,
ECE Graduate Student,
LATTE (http://latte.ece.ucr.edu),
University of California, Riverside.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20170328/331b5b4c/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: traj_neb.traj
Type: application/octet-stream
Size: 217441 bytes
Desc: not available
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20170328/331b5b4c/attachment-0001.obj>
More information about the ase-users
mailing list