Hi,
I constructed a simple test case with two charged atoms in a large box to check the working principle of the potential (pair_style) coul/dsf, which uses the complimentary error function (erfc) to damp the coulomb potential. However, the potential energy of the system is not zero, when the distance between the atoms is larger than the cutoff radius. My input file looks as follows:
###########################################
units metal
atom_style charge
pair_style coul/dsf 0.02 3.5
read_data structure.inp
pair_coeff * *
thermo 1
thermo_style custom step pe ecoul
run 0
#######################################
with the structure.inp:
test system
2 atoms
2 atom types
0.0 40.000000 xlo xhi
0.0 40.000000 ylo yhi
0.0 40.000000 zlo zhi
0.000000 0.000000 0.000000 xy xz yz
Masses
1 91.224000
2 15.999400
Atoms
1 1 1.000000 0.000000 0.000000 0.000000
2 2 -1.000000 0.000000 0.000000 4.000000
The distance between the atoms is 4 Angstroem. Cutoff is 3.5 A. But LAMMPS returns a potential energy of -8.2278401 eV. How can that be?
Also, I could not reproduce the potential energy returned by LAMMPS for systems where the atoms are closer together than r_cutoff when I insert the values into the formula given in the documentation of coul/dsf (the formula given there is correct, I checked it with the original paper).
Am I understanding something wrong or is the problem in the implementation of the potential?