# [lammps-users] Issue with pair/local and property/local pair interaction cutoff

Hello,

I am running LAMMPS from Oct 29 2020.

I am trying to use the following to obtain the pairwise distance of particles in a simulation:

compute cPP chrom property/local patom1 patom2
compute cP chrom pair/local dist eng
dump 98 all local 10000 HiCp.dump index c_cPP[1] c_cPP[2] c_cP[1] c_cP[2]

Where ‘chrom’ is defined as

group chrom type 1 2 3

And the relevant pair styles and coeffficents and cutoffs are given by:

pair_style hybrid/overlay zero 7 lj/cut 1.12246
pair_coeff * * lj/cut 1.0 1.0 1.12246
pair_coeff 1 2 zero
pair_coeff 1 3 zero
pair_coeff 2 3 zero

The goal being to use the cutoff from the zero force of 7 as the cutoff for the property/local and pair/local computes. However, when I look at the pairwise distances recorded, they asymptotically approach the cutoff of 1.12246 (for the LJ pair interaction). I’ve tried switching the order for the hybrid pair style:

pair_style hybrid/overlay lj/cut 1.12246 zero 7

And switched the listing of the pair_coeff:

pair_coeff 1 2 zero
pair_coeff 1 3 zero
pair_coeff 2 3 zero
pair_coeff * * lj/cut 1.0 1.0 1.12246

These seemed kinda silly to check, but thought just in case might as well. Same results with them.

How should I configure to use the pair cutoff for the zero force for my property/local and pair/local computes?

Best,

Christian

Sorry, but I cannot reproduce this. Please find below a simple test based on the melt example.

units lj
atom_style atomic
lattice fcc 0.8442
region box block 0 4 0 4 0 4
create_box 5 box
create_atoms 1 box
set type 1 type/fraction 2 (1.0/5.0) 6523 set type 1 type/fraction 3 (1.0/4.0) 12624
set type 1 type/fraction 4 (1.0/3.0) 846234 set type 1 type/fraction 5 (1.0/2.0) 745723

mass * 1.0
velocity all create 3.0 87287 loop geom

pair_style hybrid/overlay lj/cut 1.2 zero 5.0
pair_coeff * * lj/cut 1.0 1.0 1.2
pair_coeff * * zero
neighbor 0.2 bin
neigh_modify every 10 delay 0 check no
fix 1 all nve

group chrom type 1 2 3
compute cPP chrom property/local patom1 patom2
compute cP chrom pair/local dist eng
dump 98 all local 50 HiCp.dump index c_cPP[1] c_cPP[2] c_cP[1] c_cP[2]

thermo 50
run 250

and that creates the expected output, i.e. pairs of atoms with a distance of up to 5sigma and energies only for atoms with 1.2 sigma or less.

ITEM: TIMESTEP
0
ITEM: NUMBER OF ENTRIES
22198
ITEM: BOX BOUNDS pp pp pp
0.0000000000000000e+00 6.7183847655300291e+00
0.0000000000000000e+00 6.7183847655300291e+00
0.0000000000000000e+00 6.7183847655300291e+00
ITEM: ENTRIES index c_cPP[1] c_cPP[2] c_cP[1] c_cP[2]
1 1 3 1.18765 -0.917444
2 1 6 2.65567 0
3 1 7 2.65567 0
4 1 8 2.05708 0
5 1 17 1.6796 0
6 1 19 2.05708 0
7 1 21 2.37531 0
8 1 23 3.14224 0
9 1 24 3.14224 0
10 1 68 2.65567 0
11 1 70 3.14224 0
12 1 72 3.14224 0
13 1 81 2.37531 0
14 1 82 3.14224 0
15 1 83 3.14224 0
16 1 85 2.90915 0
17 1 87 3.939 0
18 1 9 3.35919 0
19 1 10 4.28215 0
20 1 11 4.28215 0
21 1 12 3.56296 0
22 1 25 3.75569 0
23 1 27 4.59976 0
24 1 73 3.75569 0
25 1 75 4.89682 0

[…]

Thank you! I’m honestly not sure what I did, but I deleted all of the comments in my original in file, and made the cutoff a float, not integer (so it was `zero 7.0` rather than `zero 7`). Very weird, but I just looked at the results and they are correct.