Issue with nebbarrier.pl if NEB doesn't start at a minimum

Vasp transition state theory tools

Moderator: moderators

Post Reply
pecher
Posts: 13
Joined: Wed Oct 29, 2014 1:51 pm

Issue with nebbarrier.pl if NEB doesn't start at a minimum

Post by pecher »

Dear everybody,

I'm investigating surface adsorption of molecules with NEB, so one end of the system is normally the molecule far away from the surface which is not a minimum. When using the nebresults.pl scripts from your (by the way, excellent) vtstscripts, I noticed that between image 0 and 1 there was a bump appearing every time, so the spline first went up in energy and then down.
In that case it isn't really a big issue, but I also use intermediate images from a converged NEB to run a more detailed calculation with more images inbetween. Here, the bump also appeared at image 0 and the gradient pointed upwards when in the previous coarse calculation it definitely pointed downwards. I think the script changes the sign of image 0 and I will explain to you why in a minute.

This is my neb.dat from the coarse calculation:
0 0.000000 0.000000 -0.051063 0
1 1.518046 -0.088686 0.068179 1
2 3.035891 -0.211489 0.096757 2
3 4.553174 -0.387998 0.140314 3
4 6.070377 -0.642579 0.195353 4
5 7.588892 -1.002703 0.236638 5
6 9.108239 -1.203561 0.066948 6
7 10.627347 -1.542170 0.578604 7
8 12.148223 -1.968906 0.186052 8
9 13.670552 -2.208601 0.140062 9
10 15.193830 -2.402605 0.115829 10
[...]

Now i ran the finer calculation between image 4 and 9 from the above NEB:
0 0.000000 0.000000 -0.193860 0
1 0.500803 -0.094420 0.177412 1
2 1.001517 -0.174169 0.144970 2
[...]
15 7.502457 -1.432412 0.156548 15
16 8.002524 -1.508124 0.145834 16
17 8.502417 -1.566022 0.110723 17

The gradients from Calc 1, Image 9 and Calc 2, Image 17 (same structure) don't perfectly align, but they fit rather well, while those from Calc 1, Image 4 and Calc 2, Image 0 seem to be almost exactly the same except for the sign!

I looked through your paper regarding the new tangent definition and found out that the tangent is defined as the unit vector between image i and the neighbouring one higher in energy. But in this case, image 0 does not have a neighbour higher in energy, so I guess in this case the script takes the vector to the next image, but ignores that tangent and gradient are now pointing in opposite directions, thus the change in sign.
I couldn't find anything specific on this in the nebbarrier.pl and nebforces.pl scripts, but I guess that they just expect the energy to go up from the end images. Am I right?

And one other question: In case I am right, if I now combine the two NEB plots, would it be better to change the sign as mentioned above or should I take the gradient from the coarse calculation because that's more in line with the tangent definition?

Thank you very much!


(By the way, I also added an image with the plots from the original neb.dat outputs)
Attachments
cocdetail3.png
cocdetail3.png (86.41 KiB) Viewed 10088 times
graeme
Site Admin
Posts: 2280
Joined: Tue Apr 26, 2005 4:25 am
Contact:

Re: Issue with nebbarrier.pl if NEB doesn't start at a minim

Post by graeme »

I think you have found a bug in one of our scripts (thank you, by the way!)

Indeed, it appears that the tangent is improperly assigned for the first point. This is not, in fact, related to the dependence of the local tangent on the energy of the images. For the spline calculation the tangent should always point from the previous image to the next.

I noticed in the nebbarrier.pl script that there appears to be a problem with the sign of the tangent at the first image. I'm surprised that we never noticed this before -- although it is likely that the force on the first image is usually zero where the sign of the tangent does not matter.

Perhaps you could do a quick check of the following code change starting at line 97 in nebbarrier.pl. If this fixes the problem, I will update things here accordingly:

change:

$force = `$Bin/nebforces.pl $file1 $file2 $ocar`;

to

$force = `$Bin/nebforces.pl $file2 $file1 $ocar`;
pecher
Posts: 13
Joined: Wed Oct 29, 2014 1:51 pm

Re: Issue with nebbarrier.pl if NEB doesn't start at a minim

Post by pecher »

Hi Graeme,

this does indeed fix the problem! The sign of image 0 is changed and everything looks fine. Thank you so much!
graeme
Site Admin
Posts: 2280
Joined: Tue Apr 26, 2005 4:25 am
Contact:

Re: Issue with nebbarrier.pl if NEB doesn't start at a minim

Post by graeme »

Well, thank you for catching and reporting this! I'll update the version on our website right now.
Post Reply