KSpace style ewald is incompatible with pair_style table

Dear LAMMPS users,

ich have now currently compiled the LAMMPS version from the 12th of April 2013. In my older LAMMPS input Script I combine a short range tabulated potential (including the short range Coulomb part) with the kspace_style ewald:

  #read potentials from bitmap table with 2^16 entries
pair_style table bitmap 16

pair_coeff 1 1 VBB.bitmap Entry #B-B
pair_coeff 1 2 VBO.bitmap Entry #B-O
pair_coeff 2 2 VOO.bitmap Entry #O-O

kspace_style ewald 1.0e-5

The last LAMMPS version I used was from the 22nd of August 2012. There everything worked fine. But now I get the following error:

ERROR: KSpace style is incompatible with Pair style (../kspace.cpp:146)

It seems that now the combination of the pair_style table with kspace_style ewald is not allowed anymore. Could this be? If yes, what is the reason for that. It doesn't seem to make sense.

Thank You very much for Your help.

Cheers

Christoph

Dear LAMMPS users,

ich have now currently compiled the LAMMPS version from the 12th of
April 2013. In my older LAMMPS input Script I combine a short range
tabulated potential (including the short range Coulomb part) with the
kspace_style ewald:

  #read potentials from bitmap table with 2^16 entries
pair_style table bitmap 16

pair_coeff 1 1 VBB.bitmap Entry #B-B
pair_coeff 1 2 VBO.bitmap Entry #B-O
pair_coeff 2 2 VOO.bitmap Entry #O-O

kspace_style ewald 1.0e-5

The last LAMMPS version I used was from the 22nd of August 2012. There
everything worked fine. But now I get the following error:

ERROR: KSpace style is incompatible with Pair style (../kspace.cpp:146)

It seems that now the combination of the pair_style table with
kspace_style ewald is not allowed anymore. Could this be? If yes, what
is the reason for that. It doesn't seem to make sense.

it *does* make sense. due to inclusion of a more varieties of ways to
handle long-range interactions, the method of how to detect whether a
pair style is compatible with a given long-range style has changed.

it would probably be best to introduce (global) keywords to pair style
table that allow a user to flag to which long-range style the provided
tables are compatible (or not).

cheers,
     axel.

yes - we can add such flags - the problem is that
LAMMPS is trying to be careful about which short-range
pair styles are used with which long-range Coulombic solvers,
and there are now lots of options. Pair style table is
generic, so we need to have some way for the user
to tell LAMMPS what kind of table they have constructed.

Steve

As Axel suggested, I added optional keywords to the pair_style table
command, so you can tell LAMMPS your tables are OK to use
with an Ewald (or other) Kspace solver. Please try it out
and see if it now works as you expect.

Steve

Thank you very much,

I just tested the new LAMMPS version and everything worked as I expected.

The reason for me to use pair_style table with an Ewald Kspace solver is that I use a slightly modified version of the short range part of the Coulomb potential. The difference between the on of the pair_style coul/long and the tabulated version I use is that I shift V_Coul^short(r) to zero at the cutoff of the short range Coulomb part (r_cut^Coul) and multiply it with a smoothing function. That has only a very slight effect on the potential energy and the forces despite the fact that the potential is overall smooth and there is no "step" at the cutoff of the short range Coulomb part.

Cheers

Christoph Scherer