calculate the mass center of a droplet in vapor system

Dear Lammps users,

I would like to calculate the forces near the contact line of a water droplet on a surface. To do this, the center of the mass of the droplet would need to be placed at the center. I used the compute com and fix recenter commands. Although the results from “compute com” shows that the center mass of the oxygen is at the origin, the droplet is still drifted a bit from the origin. Because the system is a droplet in vapor system
in a periodic simulation box (only a few molecules will be presented in the vapor phase), the positions of vapor molecules will affect the final results. I just want to determine or fix the mass center of the droplet, not the whole water molecules. Do you have any susgestions? Thank you


Hi, there is a “fix recenter” command to hold the center of mass of a group fixed during a simulation.

Would that work for your force analysis?