[lammps-users] How can I turn off the Ewald calculation

Hello,

In a simulation of two contacted layers, I tried to include Ewald long range interaction.

To make my problem clear, I put my input script here:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
units real
atom_style full
#2D simulation
boundary p p f

bond_style harmonic
angle_style harmonic
dihedral_style harmonic
improper_style cvff
special_bonds lj/coul 0.0 0.0 1.0

#simple cutoff
#pair_style lj/cut/coul/cut 25.0

#2D Ewald
pair_style lj/cut/coul/long 15.0
kspace_style ewald 1.0e-4
kspace_modify slab 3.0

read_data 2layers-100-100.lammps05

#pair_coeff * * 0.0 0.0

#define layer groups
region down block INF INF INF INF INF 30 units box
region up block INF INF INF INF 30 INF units box
group layer1 region down
group layer2 region up

#turn off interaction within a layer
delete_bonds layer1 multi
neigh_modify exclude group layer1 layer1
delete_bonds layer2 multi
neigh_modify exclude group layer2 layer2
neigh_modify exclude group layer1 layer2
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

It's very simple, two layers in a 2D PBC box. I would like to
measure the interaction energy between these two layers.
I use "neigh_modify exclude" to exclude the interaction within
each layer. However, if I switch the charge interaction calculation
from simple cutoff method to Ewald method, I always get a very
negative number for E_long, no matter if I turn off the interaction
between two layers or not! As you can see in the the input file,
I excluded all the interactions. But if I switch back to the cutoff
method, I can get the control. Can anyone help, please?

Ting

Ting,

Note that the "neigh_modify exclude" command does not turn off the long-range electrostatics calculations between the specified groups. It only turns off the short-range pair-wise interactions. I'd recommend using cutoff electrostatics with a long cutoff in this case.

Paul

Thank you, Paul!
I'm using the cutoff style right now. But I found the interaction energy between two layers show obvious ripples while changing the separation of the two layers, which in me feeling is due to the cutoff for the long range electrostatic interaction.
In order to use Ewald, I plan to calculate the energy difference E(inter) = E(two_layer) - E(layer1) -E(layer2). Is this a possible solution?

Ting

Crozier, Paul S wrote:

You're welcome Ting. Yes, I think that your idea will work, and I agree that if it does work, it is better than using a cutoff.

Paul