Measuring the total force by a group of particles on each of two fixed particles

Hello LAMMPS community,

I am working on a system composed of two large LJ particles (monomers) in a sea of small LJ particles (crowders). My goal is to fix the two monomers at a center-to-center distance of d along the z-axis, with their center of mass (COM) at the origin. Then, I aim to calculate the net force exerted by the crowders on each monomer separately for a range of d values. Ultimately, my objective is to find the attractive depletion potential (or potential of mean force) between two monomers induced by the crowders as a function of d.

To achieve this, I used the following strategy:

Fixing Monomers: I applied fix spring/self to each monomer separately to maintain their positions.

Calculating Forces: I used compute group/group to measure the net pair energy/force between each monomer and the crowders. However, I suspect that the results from this command might not align with my goal of accurately measuring the net force exerted by crowders on each monomer. I would appreciate any clarification or suggestions on this point.

Thermodynamic Output: I logged the computed forces and energies using a custom thermo_style.

I would appreciate any advice on the correctness and efficiency of this approach. I am aware of the fix colvars option for similar computations but chose this method to use the equation:

\vec{F} = \frac{1}{2} \left\langle \sum_{i=1}^{N_c} \vec{d}.(\vec{f}_{1i} - \vec{f}_{2i}) \right\rangle,

where N_c is the number of crowders (see Large attractive depletion interactions and Constrained molecular dynamics).

Please find the attached input script (compatible with LAMMPS version 29 Aug 2024).

Thank you in advance for your help!

Best regards,

Amir
input_test.lmp (3.9 KB)

What if I say it is correct, but then it turns out I am wrong? Or the other way around?

1 Like

That’s right! :sweat_smile: :grin:

I guess the only way to see whether it works or not is to run a few simulations.

That is why it is called “The Scientific Method”.

1 Like