compute pair/local for TIP4P/2005 potential

Dear all,

My simulation system contains several ions surrounded by water molecules. The “ lj/cut/tip4p/long” pair style is used to describe the intermolecular interactions in the system. I am trying to calculate the ion-water interaction energies by using the following commands in Lammps:

"compute 1 all property/local patom1 patom2
compute 2 all pair/local dist eng "

However, it shows the error messages of “Pair style does not support compute property/local and compute pair/local” This error doesn’t show when I use SPC/E water model with the “lj/cut/coul/long” pair style.

Are there any other methods by which I could calculate the interaction energy between an ion and water molecules modeled by TIP4P/2005 model ? I look forward for your advice. Thanks


pair style lj/cut/coul/long does support the Pair::single() function for evaluation of energy and force of a single pair of atoms. This function has not been implemented for pair style lj/cut/tip4p/long, so you cannot use compute pair/local to compute. You either have to implement this function in the C++ source code or write your own post-processing analysis code.

BTW: it would be more accurate, to compute this kind of energy based in the coul/cut pair styles instead of coul/long (which is missing the long-range contribution and its results will much more strongly depend on the coulomb cutoff than for the cutoff variants, which could be used after the fact with the re-run command, as you need the coul/long versions for generating accurate trajectories.