Warning: force values in table are inconsistent with -dE/dr.

Hi Lammps Users

I am trying to run a polymer chain simulation. I defined the bond and angle as per the "table" style requirement.

bond_style table spline 10000
bond_coeff 1 Coeff_Bond_Table bond_type_1
bond_coeff 2 Coeff_Bond_Table bond_type_2
bond_coeff 3 Coeff_Bond_Table bond_type_3

angle_style table spline 1500
angle_coeff 1 Coeff_Angle_Table angle_type_1
angle_coeff 2 Coeff_Angle_Table angle_type_2
angle_coeff 3 Coeff_Angle_Table angle_type_3
angle_coeff 4 Coeff_Angle_Table angle_type_4
angle_coeff 5 Coeff_Angle_Table angle_type_5
angle_coeff 6 Coeff_Angle_Table angle_type_6

I initially had only the distance/angle and energy values for all bond and angle types.
I used the following lines in python to create force and derivative values:

cs = CubicSpline(bondlengthList, energyList)
forceList = cs(bondlengthList, 1)

cs = CubicSpline(angleList, energyList)
energyDerivativeList = cs(angleList, 1)

Is this a correct method? After using these force values in the bond and angle table, I get the following warning messages and a segmentation fault. Could someone help me to understand and rectify it.

WARNING: 1490 of 1501 force values in table are inconsistent with -dE/dr. Should only be flagged at inflection points
WARNING: 1490 of 1501 force values in table are inconsistent with -dE/dr. Should only be flagged at inflection points
WARNING: 1492 of 1501 force values in table are inconsistent with -dE/dr. Should only be flagged at inflection points

Hi Prabhu, you can now use pair_style python to define the potential directly in LAMMPS. The implementation of the code will take care of generating the required table internally.

Giacomo

please *always* state, which LAMMPS version you are using.

it looks like the warning message is printed by the angle table style.
however, in the current version of LAMMPS (16 Mar 2018) this warning
does not exist.
since there were multiple bug fixes to this style, i strongly
recommend to upgrade your LAMMPS installation to the latest version.

segmentation fault can have many reasons. it can even be unrelated to
these warnings. you would have to either generate a core dump and get
a stack trace from the debugger or run inside the debugger right away
to determine where the segmentation fault happens and why.

it is also highly recommended to visually check your tables.

axel.

Sorry, I didn’t read that that you wanted to implement a bond and angle table.