Problem with buck/coul/long

Dear LAMMPS developers and users,
A bug seems to have been introduced recently in LAMMPS, concerning the pair style "buck/coul/long".
Attached is a simple example to reproduce this bug for the ionic compound SrTiO3.

"pair_style buck/coul/long 8.0" used to give the correct total energy with versions of LAMMPS from early 2012. With the latest version of LAMMPS the total energy is shooting stars (it is of the order of +1e6).

A workaround is to use "pair_style buck/long/coul/long cut long 8.0 8.0", which should do exactly the same, and gives the same results as the former "pair_style buck/coul/long".

I do not know in which version of LAMMPS this bug was introduced, but I think it has to do with the recent merging of Ewald and Ewald/n. I also do not understand why "buck/coul/long" is affected, and "buck/long/coul/long" is not.

Thank you for considering this bug.

sto.lin (1009 Bytes)

STO_unitcell.lmp (622 Bytes)

Hi Pierre,

Well, that would explain my problems which have been addressed in the "Problem with new ver of lammps" post...

I run two trajectories with the exact same input and data file, same numbers of processors and I got a segmentation fault with lammps-28Oct2012 which was tracked down to be a reason of "bad physics" and everything was fine with lammps-14Oct2012.

In both cases I used the pair_style buck/coul/long 12.5 and I got way too large energies for the newer version
I'm sorry for you, but it is good to know that I'm not the only one with this problem... and it is good to know the workaround

Max