# [lammps-users] Erroneous non-bonded energies

Dear Steve,

Thank you for your prompt replies.

For example, if
you have a bond length of 4 and a box size of 4, then
there can be many periodic images of the atom J that I is
bonded to that are close to I. Which one is it bonded to?

You mean that LAMMPS does not discern between
"original" atom and its images?

The safe thing
is not to have a cutoff distance greater than the box size
minus a bond length.

Thank you, this does work!
(I've increased the box to 12 x 12 x 12 A and set the cutoff distance to 8.0; everything was o'k)
However, the problem is that I usually work with "acicular"
boxes: typical dimensions 6 x 6 x 50 A.
So I need to make a cutoff distance 6 A minus, say, 2 A
as bond length = 4 A.
As I understand this, for Ewald calculations this cutoff distance means the "boundary" between real-space and
inverse-space domains.
Up to my experience, so small cutoff distances (as 4 A) lead to
substantial decay of both computational efficency and accuracy
of Ewald calculations.
Hence I would ask you to patch LAMMPS in order to allow cutoff distances greater than minimum box dimension.
I hope you will find a time for this.

Thank you very much in advance!

Best regards,

[...]

However, the problem is that I usually work with "acicular"
boxes: typical dimensions 6 x 6 x 50 A.
So I need to make a cutoff distance 6 A minus, say, 2 A
as bond length = 4 A.
As I understand this, for Ewald calculations this cutoff
distance means the "boundary" between real-space and
inverse-space domains.

please note, that a regular 3d-ewald is assuming a roughly
spherical shape (=> near cubic for parallelepipeds) of the
charge distribution. with 6x6x50 cell, you'd be deviating
much from that and might be better off with a different
kind of ewald that is adapted to the shape of the cell.

another alternative would be to include, as you propose,
multiple copied of the principal cell, at least in x and y
dimensions in the calculation of the non-bonded interactions.

i would expect that you can achieve the same effect without
changing the LAMMPS source code and without much additional
computational cost, by simply using the replicate command
to use real copies instead of periodic images.

cheers,
axel.