# why the potential energy for all negative charge atoms is negative with piar_style coul/long

Dear LAMMPS users,

I’m a freshman using LAMMPS, so I apologize in advance for my probable simple problems.

Problem 1;
When I use the pair_style “coul/long” and “coul/cut” to calculate the coulomb potential energy for a simple cubic lattice with net 0.5e electric charge for each point of the lattice, I find the coulomb potential energy with “coul/long” is negative, however that for “coul/cut” is positive. There are all 1000 atoms in the box.

Here’s some of my input for lattice and pair.
units metal #eV A ps
atom_style charge
newton on
boundary p p p
lattice sc 10
region mybox block 0 10 0 10 0 10 units lattice
create_box 1 mybox
create_atoms 1 region mybox
mass 1 12
set group all charge 0.5
pair_style coul/long 11
pair_coeff * *

The coulomb potential energy for “buck/long” is -510.71783eV, however that for “coul/cut” is 1079.9734eV. The cutoff for coulomb potential is set to 11 angstrom.
Why is the negative coulomb potential energy from?

If you use a "long" pair style than the Coulombic energy
is the sum of the pair portion and the long-range contribution,

You can't use a long-range Kspace style with a non-neutral
system, like all positive charges. It makes no sense since
the infinite system has infinite energy.

The script below gives a non-zero PE with buck/coul/cut.

Steve

# 3d Lennard-Jones melt

units lj
atom_style charge
dimension 2

lattice sq2 0.8
region box block 0 10 0 10 -0.5 0.5
create_box 2 box
create_atoms 1 box
mass * 1.0

velocity all create 1.44 87287 loop geom
set group all charge 0.1

pair_style buck/coul/cut 2.5
pair_coeff * * 0.0 1.0 0.0

fix 1 all nve

fix 3 all enforce2d

thermo 50
run 0