Intra-molecular and/or Inter-molecular interactions with compute group/group

Hi,

I have several molecules, and I want to measure their interactions (epair) with each other during the simulation (opls FF).
If I use the following commands, the interaction is between the 4 molecules only (inter-)? or both inter-molecular and intra-molecular?
What is the best method to measure only the inter-molecular interactions between several molecules (and not the intra-)? Maybe the sum of all individual interactions between each two molecules?
Thank you so much.

group mol1 id 1:202
group mol2 id 203:1404
group mol3 id 1405:2506
group mol4 id 2507:3002

group All_mol union mol1 mol2 mol3 mol4

compute Int_Pair All_mol group/group All_mol pair yes kspace no boundary yes
fix Int_Pair all ave/time 5 50 500 c_Int_Pair[0] file tmp.Int

What you defined is one group of atoms with all the atoms in all molecules.

So compute group/group with the same group listed twice will
naturally calc inter and intra interactions.

If you want just energy from inter-mol interactions, you can use the

rerun command with a dump file and use the neigh_modify exclude

molecule command to turn orr the intra interactions. Everything that is left

will be inter.

Steve

Thank Steve. It was really helpful.
And what should I do if I want to do that measurement during the running itself (not rerun)? Is there any other method than summing all individual interactions between each two molecules?

I don’t see anyway to do it on-the-fly. Unless you

write your own new compute to do it.

Steve

Realized this option was easy to support in compute group/group with

a new molecule inter/intra keyword. Will be in a 10Feb patch later today.

Steve

Wonderful! Thanks :slight_smile: