Electrostatic energy calculation between two groups

Hi

I want to calculate the electrostatic interactions energy between two groups of particles. Thus, I have used two commands in my input script

Pair_style lj/cut/coul/long 12 12
Pair_modify lj/cut compute no (or mix arithmetic compute no)

Kspace_style pppm 0.0001

As we know, pair energy = evdw+elong+ecoul and electrostatic energy = elong + ecoul. In this case, as I am omitting the vdw interaction energy by pair_modify lj/cut compute no , is it only calculating the electrostatic energy? Or to calculate the only electrostatic energy i should use this command: pair_style mix arithmetic compute no? Please advise.

If I do simulation only with pair_style coul/long 12, i am getting error like this-
PPPM initialization …
using 12-bit tables for long-range coulomb (src/kspace.cpp:321)
G vector (1/distance) = 0.20238
grid = 24 24 30
stencil order = 6
estimated absolute RMS force accuracy = 0.00899096
estimated relative force accuracy = 2.7076e-05
using double precision FFTs
3d grid and FFT values/proc = 12958 4608
ERROR: All pair coeffs are not set (src/pair.cpp:225)
Last command: run 50000

LAMMPS will compute what you tell it to compute. but for that to work, you have to use the correct syntax and not just make things up or apply commands or keywords that are supposed to be used under certain circumstances in a different setting and hope that LAMMPS will do the right thing. as a computer program LAMMPS will only do what it is programmed to do and refuse incorrect syntax.

the error message you quoted is self-explanatory: you need to provide pair_coeff statements for all pairs of atom types, even if there are no potential parameters like in coulomb-only pair styles.

you cannot selectively turn off the LJ part of a lj/coul combined pair style with a pair_modify command. only through setting the lennard-jones epsilon parameters to zero. your pair_modify command syntax applies only when using pair style hybrid or hybrid/overlay and not in the case you quoted.

axel.

You should check out the compute group/group command and see if it does
what you want.

Steve

Thank you for the clarification.