Counting collision frequency between different types of particles

Submitted by achraf on Mon, 11/02/2020 - 18:01

Hi
I would like to count the collision frequency between different types of particles in each time step.
i have 16 types of particles :
i did manage to count for each type, but what i need is to count for example :
Between Type 1 and Type 1, between Type 1 and Type 2 ...., between Type 16 and Type 16.
here is my code :

#Grouping
group type1_ type 1
group type2_ type 2
group type3_ type 3
group type4_ type 4
group type5_ type 5
group type6_ type 6
group type7_ type 7
group type8_ type 8
group type9_ type 9
group type10_ type 10
group type11_ type 11
group type12_ type 12
group type13_ type 13
group type14_ type 14
group type15_ type 15
group type16_ type 16

#Particle specification
fix pts1 type1_ particletemplate/sphere 15485863 atom_type 1 density constant 2500 radius constant 0.001000000
fix pts2 type2_ particletemplate/sphere 15485867 atom_type 2 density constant 2500 radius constant 0.001133333
fix pts3 type3_ particletemplate/sphere 32452843 atom_type 3 density constant 2500 radius constant 0.001266667
fix pts4 type4_ particletemplate/sphere 49979687 atom_type 4 density constant 2500 radius constant 0.001400000
fix pts5 type5_ particletemplate/sphere 49979693 atom_type 5 density constant 2500 radius constant 0.001533333
fix pts6 type6_ particletemplate/sphere 67867967 atom_type 6 density constant 2500 radius constant 0.001666667
fix pts7 type7_ particletemplate/sphere 67867979 atom_type 7 density constant 2500 radius constant 0.001800000
fix pts8 type8_ particletemplate/sphere 86028121 atom_type 8 density constant 2500 radius constant 0.001933333
fix pts9 type9_ particletemplate/sphere 43591 atom_type 9 density constant 2500 radius constant 0.002066667
fix pts10 type10_ particletemplate/sphere 69623 atom_type 10 density constant 2500 radius constant 0.002200000
fix pts11 type11_ particletemplate/sphere 17837 atom_type 11 density constant 2500 radius constant 0.002333333
fix pts12 type12_ particletemplate/sphere 127529 atom_type 12 density constant 2500 radius constant 0.002466667
fix pts13 type13_ particletemplate/sphere 14369 atom_type 13 density constant 2500 radius constant 0.002600000
fix pts14 type14_ particletemplate/sphere 125597 atom_type 14 density constant 2500 radius constant 0.002733333
fix pts15 type15_ particletemplate/sphere 24247 atom_type 15 density constant 2500 radius constant 0.002866667
fix pts16 type16_ particletemplate/sphere 16369 atom_type 16 density constant 2500 radius constant 0.003000000

# Collecting particle-particle collision data
compute cc_1 type1_ contact/atom
compute cc_2 type2_ contact/atom
compute cc_3 type3_ contact/atom
compute cc_4 type4_ contact/atom
compute cc_5 type5_ contact/atom
compute cc_6 type6_ contact/atom
compute cc_7 type7_ contact/atom
compute cc_8 type8_ contact/atom
compute cc_9 type9_ contact/atom
compute cc_10 type10_ contact/atom
compute cc_11 type11_ contact/atom
compute cc_12 type12_ contact/atom
compute cc_13 type13_ contact/atom
compute cc_14 type14_ contact/atom
compute cc_15 type15_ contact/atom
compute cc_16 type16_ contact/atom

#
run 1
dump myDump all custom 1000 post/dump*.atom id type x y z ix iy iz vx vy vz fx fy fz c_cc_1 c_cc_2 c_cc_3 c_cc_4 c_cc_5 c_cc_6 c_cc_7 c_cc_8 c_cc_9 c_cc_10 c_cc_11 c_cc_12 c_cc_13 c_cc_14 c_cc_15 c_cc_16 radius