Problem with interpolation for the table pair style


I am having a problem with the interpolation when using the table pair style. I am using a fe-he potential that uses DFT data for close range interactions (0.001A-1A). Beyond 1A, it uses a tersoff style potential. Unfortunately the tersoff potential in LAMMPS doesn’t match the modified version given within the fe-he potential so I have had to write it in table form along with the DFT points.

I notice in an old post that it mentioned increasing the number of points for linear interpolation to 1000+ would improve accuracy. I did this, which did help to some degree but the short range interactions are still quite off.

I previously tried removing ‘R’ or ‘RSQ’ from the table file with not much improvement. I have also played around with various types like lookup, linear and spline. I have made sure the two N values in the input file and the table file are the same.

Prior to adding more points, I compared the DMOL table and the output file

From the output file from pair_write (pot.table)
1 0.02 31792.1 896554
2 0.04 31415.7 1.7716e+06

From the DMOL file (DMOL3.table)
1 0.02 31792.090048 896554.46115
2 0.04 13861.000825 285057.7224

These values should be similar.

DMOL2 is the original table file with all the points within it. I removed the first few points in DMOL3:

1 0.001 742308.990941 374379882.807
2 0.002 367929.108134 124782308.295
3 0.003 243146.799839 62357436.139
4 0.004 180789.3637 37403250.35
5 0.005 143386.11335 24923545.156
6 0.006 118462.568194 17789142.938
7 0.007 100673.425256 13328657.112
8 0.008 87344.768144 10354494.221
9 0.009 76990.273923 8270528.493
10 0.01 68719.74543 6755756.963
11 0.011 61963.988467 5619622.116
12 0.012 56344.366351 4746411.52
13 0.013 51597.954831 4061467.748
14 0.014 47536.487083 3513607.57
15 0.015 44022.879513 3068257.259
16 0.016 40954.622254 2702214.235
17 0.017 38252.408019 2397318.567
18 0.018 35855.089452 2140432.877
19 0.019 33714.656575 1922566.527

Because I wanted to see if making the position points ® evenly spaced would improve the interpolation accuracy. I didn’t seem to improve the situation.

After this, I added more points to see if this would improve the accuracy (DMOL.table).

After various altering and playing about with the table, I was hoping someone might be able to help us get it working. I have attached the different table variations I have tried, the pair_write file (pot.table) and the input file (in.neb.fehe). If someone could help get the close range interactions matching the DFT data, I would be most grateful.



DMOL.table (38.3 KB)

DMOL3.table (8.06 KB)

DMOL2.table (8.72 KB)

pot.table (1.48 MB)

in.neb.fehe (1.86 KB)

Juslin, Nordlund - 2008 - Pair potential for Fe–He.pdf (266 KB)

Sorry I added the paper describing the potential in the email but apparently it made the email too large. “Juslin, N. Nordlund, K. , Pair potential for Fe–He, 2008”

DMOL.table (38.3 KB)

DMOL3.table (8.06 KB)

DMOL2.table (8.72 KB)

pot.table (1.48 MB)

in.neb.fehe (1.86 KB)

Paul can likely comment.


First off, the really close-range interactions could be contributing to the difficulties. Typically, people have been using tables for separation distances greater than an angstrom. Even so, this should be doable.

Please carefully review the suggestions from the documentation that I’ll paste below (especially the 4th bullet) and see if any of them help. Also, please re-read the documentation on pair_table since I think it could really help you in this situation. See:


Here are some guidelines for using the pair_style table command to best effect:

  • Vary the number of table points; you may need to use more than you think to get good resolution.
  • Always use the pair_write command to produce a plot of what the final interpolated potential looks like. This can show up interpolation “features” you may not like.
  • Start with the linear style; it’s the style least likely to have problems.
  • Use N in the pair_style command equal to the “N” in the tabulation file, and use the “RSQ” or “BITMAP” parameter, so additional interpolation is not needed. See discussion below.
  • Make sure that your tabulated forces and tabulated energies are consistent (dE/dr = -F) along the entire range of r values.
  • Use as large an inner cutoff as possible. This avoids fitting splines to very steep parts of the potential.