Atom force calculation between atom and group

Dear LAMMPS users,

I have two groups of atoms, i.e., group A and B. The problem is like this: I want to calculate the the atom attributes fx, fy, fz for each atom in groups A considering only the effects from group B.

If I use the dump custom command, I can output the the forces values in group A, but those force values are calculated considering the whole system’s effects. The command “compute property/atom” also considers the whole systems. Is there any way to exclude the effects of other atoms in group A when calculating the force attribute? Thanks all.

Best,
Jingchao

You could,
1-) Dump the forces on atoms from A when the two groups are present.
2-) Delete group B and dump again the forces an atoms from A.
The difference is what you are looking for.
Carlos

My previous comment obviously only applies to an instantaneous configuration.
Just making sure you are clear on that.
Carlos

Dear LAMMPS users,

I have two groups of atoms, i.e., group A and B. The problem is like this: I
want to calculate the the atom attributes fx, fy, fz for each atom in groups
A considering only the effects from group B.

If I use the dump custom command, I can output the the forces values in
group A, but those force values are calculated considering the whole
system's effects. The command "compute property/atom" also considers the
whole systems. Is there any way to exclude the effects of other atoms in
group A when calculating the force attribute? Thanks all.

do you want that condition to happen *during* the MD or only as
"diagnostic output"?

the best way to exclude interactions like you want them to be ignored
is to use "neigh_modify exclude".

if you are looking for the "diagnostic output", you can use the rerun
feature, i.e. you first run your simulation regularly and write out a
regular atom style dump file and then set up the same input, but add
the suitable neigh_modify exclude command and then use rerun and write
out a dump file that also includes the forces. in this case atoms will
be moving as before, but the forces will be calculated only in the way
you are looking for.

axel.

Thanks Carlos. Your method is straight forward and useful. Have a nice day!

Jingchao

Incidentally, I have written a compute to do exactly what you want and probably more, it’s based on compute group/group, but produces per-atom data in addition to global data, and can consider the effects of multiple groups (i.e. groups B, C, D… on group A).

Hope you find this helpful,

Brad Ewers

compute_group_groups_atom.zip (6.62 KB)

Thanks Axel. I want to calculate the atom attributes “during” the MD. Your suggestion is very comprehensive and professional. Thanks for the help. Have a nice day!

Jingchao

Thanks Brad. You made a great contribution to all the LAMMPS uses. I will try your program for my problem. Have a nice day!

Jingchao

Hi Jingchao,

Just wondering if you consider the intro-molecular interactions like (angle,dihedral and improper) for your system.

I am not sure if the current methods are applicable to the situation: for example, the atoms belong to a dihedral interaction are assigned to two groups.

Thanks,

Lili Zhang