Dear Steve and LAMMPS users,
Recently I read the code of EAM potential section in LAMMPS (pair_eam.cpp). The spline interpolation is used to calculate the energy and interaction force from the tabulated values. I want to know the type (or name) of spline and its reference. Could you please give me some help?
I compared the formula used in the code with cubic spline, Hermite spline, B-spline and Akima spline (http://www.alglib.net/interpolation/spline3.php). It looks like the Akima spline, they are all local interpolation (http://www.iue.tuwien.ac.at/phd/rottinger/node60.html). Except that the slope of the curve at point 3 (x1<x2<x3<x4<x5) in EAM is determined by
s = ((y1-y5)* + 8*(y4-y2))/dx
(The code in pair_eam.cpp:
spline[m] = ((spline[m-2]-spline[m+2]) + 8.0*(spline[m+1]-spline[m-1])) / 12.0;)
While the slope of the curve at point 3 in Akima is determined by
s = (|g4-g3|*g2 + |g2-g1|*g3)/(|g4-g3| + |g2-g1|)
g(i)=y(i+1)- y(i)/ x(i+1)- x(i)
On the other hand, the interpolation curve looks like the cubic one as shown in the attachment.
Any help is appreciated greatly. Thank you.