From 24c79c1917c74e36e3f7cb5cce1ce24f66ef3a68 Mon Sep 17 00:00:00 2001 From: Harry Stroud <75842225+hjstroud@users.noreply.github.com> Date: Tue, 17 Mar 2026 10:12:23 +0100 Subject: [PATCH 1/2] Add documentation to reflect the changes in the mass-weighted force generally applied to the COM of a group of atoms, and the associated energy --- source/concepts/applications.rst | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/source/concepts/applications.rst b/source/concepts/applications.rst index e3c2a66..8f54d3a 100644 --- a/source/concepts/applications.rst +++ b/source/concepts/applications.rst @@ -732,18 +732,19 @@ compute :math:`\mathbf{F}_{\text{COM}}`, the force at the center of mass of the target particles. The force is then distributed among the particles; the method of force distribution depends on whether the interaction is mass weighted of not. If if it mass weighted, then the -force :math:`\mathbf{F}_i` applied to the particle :math:`i` is :math:`\mathbf{F}_i = s \cdot m_i -\frac{\mathbf{F}_{\text{COM}}}{N}` with :math:`s` a scaling factor set by the user, -:math:`m_i` the mass of particle :math:`i`, and :math:`N` the number of target -particles for the interaction. If the interaction is not mass weighted, then -:math:`\mathbf{F}_i = s \cdot \frac{\mathbf{F}_{\text{COM}}}{N}`. Finally, :math:`|\mathbf{F}_i|` can be -capped to a maximum value specified by the user to avoid applying too large -forces. +force :math:`\mathbf{F}_i` applied to the particle :math:`i` is :math:`\mathbf{F}_i = s \cdot +\big( \frac{m_i}{M} \big) \mathbf{F}_{\text{COM}}` with :math:`s` a scaling factor set by the user, +:math:`m_i` the mass of particle :math:`i`, :math:`M = \sum_{j=1}^{N} m_{j}` the total mass of the +group of target particles and :math:`N` the number of target particles for the interaction. +If the interaction is not mass weighted, then +:math:`\mathbf{F}_i = s \cdot \big( \frac{1}{N} \big) \mathbf{F}_{\text{COM}}`. +Finally, :math:`|\mathbf{F}_i|` can be capped to a maximum value specified by the user to avoid +applying too large forces. Each interaction type also defines the equation for the potential energy associated -with the user interaction :math:`E_{\text{COM}}`. For mass weighted interaction, the -energy for the interaction is :math:`E = \frac{E_{\text{COM}}}{N}\sum_{i=0}^{N}m_i`. -For non mass weighted, :math:`E = E_{\text{COM}}`. +with the user interaction :math:`E_{\text{COM}}`. For both the mass weighted and non-mass weighted +interactions, the energy for the interaction is :math:`E = s \cdot E_{\text{COM}}`, scaled by the +same user-defined scaling factor applied to the force. ---- From 5653e9f80c34f358d000e8984987b52c1631c7e7 Mon Sep 17 00:00:00 2001 From: Harry Stroud <75842225+hjstroud@users.noreply.github.com> Date: Mon, 23 Mar 2026 12:00:17 +0100 Subject: [PATCH 2/2] Add section to documentation to specify what happens in the case of particles with zero mass --- source/concepts/applications.rst | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/source/concepts/applications.rst b/source/concepts/applications.rst index 8f54d3a..64b6446 100644 --- a/source/concepts/applications.rst +++ b/source/concepts/applications.rst @@ -735,12 +735,21 @@ the interaction is mass weighted of not. If if it mass weighted, then the force :math:`\mathbf{F}_i` applied to the particle :math:`i` is :math:`\mathbf{F}_i = s \cdot \big( \frac{m_i}{M} \big) \mathbf{F}_{\text{COM}}` with :math:`s` a scaling factor set by the user, :math:`m_i` the mass of particle :math:`i`, :math:`M = \sum_{j=1}^{N} m_{j}` the total mass of the -group of target particles and :math:`N` the number of target particles for the interaction. -If the interaction is not mass weighted, then +group of target particles and :math:`N` the number of target particles for the interaction with non-zero +masses (see below). If the interaction is not mass weighted, then :math:`\mathbf{F}_i = s \cdot \big( \frac{1}{N} \big) \mathbf{F}_{\text{COM}}`. Finally, :math:`|\mathbf{F}_i|` can be capped to a maximum value specified by the user to avoid applying too large forces. +.. note:: + + Forces are not applied to any particle with zero mass, :math:`m_i=0`. This means that if the target + group contains particles with zero mass, the COM force is only distributed across the particles + with non-zero mass, regardless of whether or not the interactions are mass weighted, and the number + of particles across which the force is distributed :math:`N` counts only particles with non-zero + mass. In the case of an interaction targeting only particles with zero mass, no interaction force + is applied to the system (:math:`F_{i} = 0`). + Each interaction type also defines the equation for the potential energy associated with the user interaction :math:`E_{\text{COM}}`. For both the mass weighted and non-mass weighted interactions, the energy for the interaction is :math:`E = s \cdot E_{\text{COM}}`, scaled by the