# About compute force between two groups with a many-body potential in LAMMPS

Hi!

I want to calculate energy and force between two groups with a many-body potential.
I try “group/group” but it doesn’t work.

I try “property/atom” and “reduce sum” command with two groups for fx fy fz.
fx fy fz in group 1 are different with fx fy fz in group 2.
It doesn’t make sense.
Is that right?

Which command can be used to calculate energy and force between two groups?

Hi!

I want to calculate energy and force between two groups with a many-body
potential.
I try "group/group" but it doesn't work.

​it *cannot* work, because this functionality depends on having pairwise

I try "property/atom" and "reduce sum" command with two groups for fx fy
fz.
fx fy fz in group 1 are different with fx fy fz in group 2.
It doesn't make sense.
Is that right?

​impossible to say with so extremely limited information.​

Which command can be used to calculate energy and force between two groups?

​there is no single global solution. for manybody potentials, the situation
has the c​omplication that the force between two individual particles
depends on the neighboring atoms which may or may not be in one of the two
groups or in neither. before even looking into how to calculate this, you
will have to defined what it is *exactly* that you want to accumulate and
how you are going to define it consistently(!).

depending on what pair style you are using and how you would be defining
what contributes to the force between the two groups and how, you may have
to do some programming of your own, use LAMMPS rerun feature and turn off
the contributions that you are not interested in or check, if the computes
from the USER-TALLY package might be applicable (perhaps some additional
tweaks might be needed).

axel.

I try "property/atom" and "reduce sum" command with two groups for fx fy
fz.
fx fy fz in group 1 are different with fx fy fz in group 2.
It doesn't make sense.
Is that right?

​impossible to say with so extremely limited information.​

There are 3 groups: group A, group 1, group 2.
Group 1, 2 are the same material and potential is used 2nd REBO.
Potential between A and 1,2 is LJ.

Force between A and 1,2 was calculated by "group/group". It was done.

Now force between 1 and 2 was calculated by "property/atom" and "reduce sum"

compute 1 group1 property/atom fz # force per atom in group 1

compute fz1 reduce sum c_1

compute 2 group2 property/atom fz # force per atom in group 2

compute fz2 reduce sum c_2

I think fz1 and fz2 are similar. But their results are different.

Can fz1 and fz2 be considered interaction force between group1 to 2?

Can "property/atom" and "reduce sum" be calculated interaction force
between atoms in the same group or between atoms in group1 , group2?

I try "property/atom" and "reduce sum" command with two groups for fx fy

fz.
fx fy fz in group 1 are different with fx fy fz in group 2.
It doesn't make sense.
Is that right?

​impossible to say with so extremely limited information.​

There are 3 groups: group A, group 1, group 2.
Group 1, 2 are the same material and potential is used 2nd REBO.
Potential between A and 1,2 is LJ.

Force between A and 1,2 was calculated by "group/group". It was done.

Now force between 1 and 2 was calculated by "property/atom" and "reduce
sum"

compute 1 group1 property/atom fz # force per atom in group 1

compute fz1 reduce sum c_1

compute 2 group2 property/atom fz # force per atom in group 2

compute fz2 reduce sum c_2

​that description is more confusing than helping and it is not offering
much more detail.

I think fz1 and fz2 are similar. But their results are different.

​there is no point in your description that allows to infer that those
forces should be the same.

Can fz1 and fz2 be considered interaction force between group1 to 2?

​no, why?​

Can "property/atom" and "reduce sum" be calculated interaction force
between atoms in the same group or between atoms in group1 , group2?

​these are questions about elementary classical mechanics. i suggest you go
to your group/department/university library and grab a book on classical
mechanics and figure it out. the total force, torque, velocity of a group
of atoms is computed the same as if it was one rigid body.

i already told you in my previous e-mail that *you* will have to figure out
*first* what ​it is going mean that you are computing. computing something
first in the hope that it may mean something and then trying to figure out
what it means (or doesn't) later, is not a very efficient way to solve such
a problem.

axel.