hybrid/overlay vs coulomb term included in potential

Hi all.

I had a question about the difference between several potential implementations in LAMMPS. Many potentials come with the coulomb interaction included for example: buck/coul/long, born/coul/long, lj/cut/coul/long. What is the difference between that and just using a 'hybrid/overlayto include the coulomb interactioncoul/long`?

I have done a simple test with the buckingham potential and found the energy and an pressure to be identical. I did some benchmarks with 1000 atoms on how long the run 0 command takes for each buck/coul/long 46ms±1ms vs. buck + coul/long 54ms±1ms. So it looks like the only difference is performance? Obviously 1000 atoms does not highlight the performance difference but it does show it.

The benchmarks were done with a fairly mature python lammps wrapper I have written lammps-cython.

buck/coul/long


kspace_style pppm 1e-6
set atom 1 charge 1.400000
set atom 2 charge -1.400000

pair_style buck/coul/long 10.0 10.0
pair_coeff 1 1 1309362.276647 0.104000 0.00000
pair_coeff 1 2 9892.357000 0.201990 0.000000
pair_coeff 2 2 2145.734500 0.300000 30.222200

buck + coul/long


kspace_style pppm 1e-6
set atom 1 charge 1.400000
set atom 2 charge -1.400000

pair_style hybrid/overlay coul/long 10.0 buck 10.0
pair_coeff * * coul/long
pair_coeff 1 1 buck 1309362.276647 0.104000 0.000000
pair_coeff 1 2 buck 9892.357000 0.201990 0.000000
pair_coeff 2 2 buck 2145.734500 0.300000 30.222200

Hi all.

I had a question about the difference between several potential implementations in LAMMPS. Many potentials come with the coulomb interaction included for example: buck/coul/long, born/coul/long, lj/cut/coul/long. What is the difference between that and just using a 'hybrid/overlayto include the coulomb interactioncoul/long`?

​when using hybrid/overlap, you go over the neighbor list twice, so there is some redundant computation like computing the distance and comparing it to the cutoff.
the result should be the same (minus allowance for floating point math being not associative and thus having different truncation errors because of summing up forces and energies in a different order).

axel.