compute_pairwise_force

Dear Lammps support team,

I’m trying to compute and dump the pairwise force between selected atoms using ‘‘compute pair/local’’, but the output forces (attached sample output) are zero always.

I was wondering if the commands I used in input script attached below are problematic.

Input script:

############### set units, dimension and global boundary type
units lj
dimension 3
boundary p p p
neighbor 0.3 bin
neigh_modify every 4 delay 0 check yes
atom_style mdpd

############### create geometry and generate particles (atoms)
region box block 0 15 0 15 0 5 units box
create_box 2 box
region top_substrate block 0 15 10 11 0 5 units box
region liquid block 5 10 5 10 0 5 units box
region bottom_substrate block 0 15 4 5 0 5 units box
create_atoms 1 random 150 123 top_substrate
create_atoms 2 random 750 456 liquid
create_atoms 1 random 150 789 bottom_substrate

############### interaction properties
mass 1 1.0
mass 2 1.0
pair_style hybrid/overlay mdpd/rhosum mdpd 1.0 1.0 65689
pair_coeff 1 1 mdpd/rhosum 0.75
pair_coeff 1 2 mdpd/rhosum 0.75
pair_coeff 2 2 mdpd/rhosum 0.75
pair_coeff 1 1 mdpd 0 0 18.0 1.0 0.75
pair_coeff 1 2 mdpd -40 25 18.0 1.0 0.75
pair_coeff 2 2 mdpd -40 25 18.0 1.0 0.75

group solid_boundary type 1
group liquid_particle type 2

fix frozen_particle solid_boundary setforce 0 0 0

############### set time step size and integration method
timestep 0.01
fix mvv all mvv/dpd

############### output pairforce
compute list_1 liquid_particle property/local patom1 patom2
compute pairforce_1 liquid_particle pair/local fx fy fz

dump pairforce_dump liquid_particle local 500 pairforce_*.txt index c_list_1[1] c_list_1[2] c_pairforce_1[1] c_pairforce_1[2] c_pairforce_1[3]

############### run
run 1000

Dear Lammps support team,

I’m trying to compute and dump the pairwise force between selected atoms using ‘‘compute pair/local’’, but the output forces (attached sample output) are zero always.

I was wondering if the commands I used in input script attached below are problematic.

yes. neither of the pair styles you use supports the “Pair::single()” method and thus it will output a 0.0 force as you are observing.

axel.