Using spline to define a tabulated potential

Hello,

is there a working example of a gulp input file that uses a tabulated potential, please?

As a test case, I am trying to add a tabulated potential to describe Mg-Mg interaction in MgO crystal. I use spline command in the format described in the manual

spline atom1 atom2 rmax
spline reverse Mg core Mg core 8.0

but keep getting this error:

!!!
!! ERROR : Incorrect potential coefficient input
!! : Error is apparently on line 28
!!!
Program terminated by processor 0 in potword22

I am using GULP 6.0.0 and this is the input file based on example5.gin:

opti conp comp
cell
4.212000 4.212000 4.212000 90.000000 90.000000 90.000000
fractional
Mg core 0.000000 0.000000 0.000000
Mg core 0.000000 0.500000 0.500000
Mg core 0.500000 0.000000 0.500000
Mg core 0.500000 0.500000 0.000000
O core 0.500000 0.500000 0.500000
O core 0.500000 0.000000 0.000000
O core 0.000000 0.500000 0.000000
O core 0.000000 0.000000 0.500000
O shel 0.500000 0.500000 0.500000
O shel 0.500000 0.000000 0.000000
O shel 0.000000 0.500000 0.000000
O shel 0.000000 0.000000 0.500000
species
Mg core 2.0
O core 0.86902
O shel -2.86902
buck
O shel Mg core 1295.553402 0.300000 0.00000 0.000 8.000
buck
O shel O shel 22764.000000 0.149000 27.88000 0.000 12.000
spring
O 74.92
spline reverse Mg core Mg core 8.0
0.0 0.0
1.0 0.0
2.0 0.0
3.0 0.0
4.0 0.0
5.0 0.0
6.0 0.0
7.0 0.0
8.0 0.0

Where am I going wrong? I set the tabulated potential initially to zero, so it does not affect the results of the optimisation.

Many thanks,
Dmytro

Hi Dmytro
As with other potentials, the specification of the species and cutoff comes on the line after the potential type:

spline reverse
Mg core Mg core 8.0

With this change your potential should be read correctly.
Regards,
Julian

PS I don’t think a potential between Mg and Mg is needed since the Coulomb repulsion is sufficient with formal charges.

Thank you Julian,

appreciate you help and sorry I didn’t see the obvious (I blame LAMMPS!). It all works as expected. I used the MgO example just to illustrate the problem I was having. Glad there is an easy fix.

Thanks again,
Dmytro