Hi all,
I’m trying to calculate the average force on an atom due to portion of its interaction with atoms along z-direction that are at a distance of ‘h’ and beyond, i.e. the interaction due to (rc - h) interactions in z-direction. What I can think of now, is to define two groups:
-
“group 1”: The group of atoms that I’m after finding the force on them. This group should be dynamic and is based on a block region with a small enough width to satisfy spatial resolution while wide enough also to include a descent number of atoms for a more reliable average.
-
“group 2”: This includes all the atoms at a distance >= h from the center of the block region of “group 1”. This is also a dynamic group assigned to that region.
Then using “compute 1 group1 group/group group2” I could get all the force on group1 atoms due to group 2 while dividing by the instantaneous number of atoms in “group 1” to get an average force on each atom. Then averaging over simulation time to obtain an average value of the force on an atom due to its (rc - h) portion of its interaction in z-direction.
However, profiling for a wide range of h that is 0<= h <= rc and with region with fine width would require defining so many regions. Also if “group 1” is taken to be, let’s say, near the top edge of a periodic box, then I can’t define a region for “group 2” as it’ll fall out of the original box (image id =0) while region command is only applicable to a box in wrapped coordinate, so I don’t know how to handle that.
I would highly appreciate it you could share your experience in this regard and help me if there are better ways to handle this case.
Cheers,
Kasra.