From 25e6c271ba407ceb377b99d1138ac8d28958f320 Mon Sep 17 00:00:00 2001 From: Lester Hedges Date: Tue, 25 Nov 2025 11:55:18 +0000 Subject: [PATCH 1/3] Use "0" for null EMLE interpolation force expression. [closes #383] --- doc/source/changelog.rst | 2 ++ src/sire/qm/_emle.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/source/changelog.rst b/doc/source/changelog.rst index 3884c60f5..d22882751 100644 --- a/doc/source/changelog.rst +++ b/doc/source/changelog.rst @@ -17,6 +17,8 @@ organisation on `GitHub `__. * Please add an item to this CHANGELOG for any new features or bug fixes when creating a PR. +* Use `"0"` for null EMLE interpolation force since `""` causes issues on some platforms. + `2025.3.0 `__ - November 2025 --------------------------------------------------------------------------------------------- diff --git a/src/sire/qm/_emle.py b/src/sire/qm/_emle.py index 05020ddab..7e6b0eec6 100644 --- a/src/sire/qm/_emle.py +++ b/src/sire/qm/_emle.py @@ -45,7 +45,7 @@ def get_forces(self): # Create a null CustomBondForce to add the EMLE interpolation # parameter. - interpolation_force = _CustomBondForce("") + interpolation_force = _CustomBondForce("0") interpolation_force.addGlobalParameter("lambda_emle", 1.0) # Return the forces. @@ -94,7 +94,7 @@ def get_forces(self): # Create a null CustomBondForce to add the EMLE interpolation # parameter. - interpolation_force = _CustomBondForce("") + interpolation_force = _CustomBondForce("0") interpolation_force.addGlobalParameter("lambda_emle", 1.0) # Return the forces. From 73005d27c327e9e7f6e1a9e4caae505f51f72ba4 Mon Sep 17 00:00:00 2001 From: Lester Hedges Date: Tue, 25 Nov 2025 13:13:54 +0000 Subject: [PATCH 2/3] Fix delta parameter in soft-core Coulomb term. [closes #385] --- doc/source/changelog.rst | 4 +++- doc/source/tutorial/part07/03_ghosts.rst | 4 ++-- wrapper/Convert/SireOpenMM/sire_to_openmm_system.cpp | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/doc/source/changelog.rst b/doc/source/changelog.rst index d22882751..1897e07de 100644 --- a/doc/source/changelog.rst +++ b/doc/source/changelog.rst @@ -17,7 +17,9 @@ organisation on `GitHub `__. * Please add an item to this CHANGELOG for any new features or bug fixes when creating a PR. -* Use `"0"` for null EMLE interpolation force since `""` causes issues on some platforms. +* Use ``"0"`` for null EMLE interpolation force since ``""`` causes issues on some platforms. + +* Fix ``delta`` parameter in soft-core Coulomb potential. `2025.3.0 `__ - November 2025 --------------------------------------------------------------------------------------------- diff --git a/doc/source/tutorial/part07/03_ghosts.rst b/doc/source/tutorial/part07/03_ghosts.rst index ba24b459b..2fafe665e 100644 --- a/doc/source/tutorial/part07/03_ghosts.rst +++ b/doc/source/tutorial/part07/03_ghosts.rst @@ -68,7 +68,7 @@ It is based on the following electrostatic and Lennard-Jones potentials: .. math:: - V_{\text{elec}}(r) = q_i q_j \left[ \frac{(1 - \alpha)^n}{\sqrt{r^2 + \delta_\text{coulomb}^2}} - \frac{\kappa}{r} \right] + V_{\text{elec}}(r) = q_i q_j \left[ \frac{(1 - \alpha)^n}{\sqrt{r^2 + \delta_\text{coulomb}}} - \frac{\kappa}{r} \right] V_{\text{LJ}}(r) = 4\epsilon \left[ \frac{\sigma^{12}}{(\delta_\text{LJ} \sigma + r^2)^6} - \frac{\sigma^6}{(\delta_\text{LJ} \sigma + r^2)^3} \right] @@ -76,7 +76,7 @@ where .. math:: - \delta_\text{coulomb} = \alpha \times \text{shift_coulomb} + \delta_\text{coulomb} = \alpha \times \text{shift_coulomb}^2 \delta_\text{LJ} = \alpha \times \text{shift_LJ} diff --git a/wrapper/Convert/SireOpenMM/sire_to_openmm_system.cpp b/wrapper/Convert/SireOpenMM/sire_to_openmm_system.cpp index 23c75b7f2..6bad0ce88 100644 --- a/wrapper/Convert/SireOpenMM/sire_to_openmm_system.cpp +++ b/wrapper/Convert/SireOpenMM/sire_to_openmm_system.cpp @@ -1420,7 +1420,7 @@ OpenMMMetaData SireOpenMM::sire_to_openmm_system(OpenMM::System &system, // kJ mol-1 given the units of charge (|e|) and distance (nm) // clj_expression = QString("coul_nrg+lj_nrg;" - "coul_nrg=138.9354558466661*q1*q2*(((%1)/sqrt((%2*max_alpha*max_alpha)+r_safe^2))-(max_kappa/r_safe));" + "coul_nrg=138.9354558466661*q1*q2*(((%1)/sqrt((%2*max_alpha)+r_safe^2))-(max_kappa/r_safe));" "lj_nrg=two_sqrt_epsilon1*two_sqrt_epsilon2*sig6*(sig6-1);" "sig6=(sigma^6)/(%3*sigma^6 + r_safe^6);" "r_safe=max(r, 0.001);" @@ -1458,7 +1458,7 @@ OpenMMMetaData SireOpenMM::sire_to_openmm_system(OpenMM::System &system, // kJ mol-1 given the units of charge (|e|) and distance (nm) // clj_expression = QString("coul_nrg+lj_nrg;" - "coul_nrg=138.9354558466661*q1*q2*(((%1)/sqrt((%2*max_alpha*max_alpha)+r_safe^2))-(max_kappa/r_safe));" + "coul_nrg=138.9354558466661*q1*q2*(((%1)/sqrt((%2*max_alpha)+r_safe^2))-(max_kappa/r_safe));" "lj_nrg=two_sqrt_epsilon1*two_sqrt_epsilon2*sig6*(sig6-1);" "sig6=(sigma^6)/(((sigma*delta) + r_safe^2)^3);" "delta=%3*max_alpha;" From 8fb9dc8195fdb7cd2d71d29efbcafe58988f7dd0 Mon Sep 17 00:00:00 2001 From: Lester Hedges Date: Wed, 26 Nov 2025 09:04:44 +0000 Subject: [PATCH 3/3] Fix delta parameter in ghost_14ff. [ci skip] --- wrapper/Convert/SireOpenMM/sire_to_openmm_system.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wrapper/Convert/SireOpenMM/sire_to_openmm_system.cpp b/wrapper/Convert/SireOpenMM/sire_to_openmm_system.cpp index 6bad0ce88..95275dbac 100644 --- a/wrapper/Convert/SireOpenMM/sire_to_openmm_system.cpp +++ b/wrapper/Convert/SireOpenMM/sire_to_openmm_system.cpp @@ -1359,7 +1359,7 @@ OpenMMMetaData SireOpenMM::sire_to_openmm_system(OpenMM::System &system, { nb14_expression = QString( "coul_nrg+lj_nrg;" - "coul_nrg=138.9354558466661*q*(((%1)/sqrt((%2*alpha*alpha)+r_safe^2))-(kappa/r_safe));" + "coul_nrg=138.9354558466661*q*(((%1)/sqrt((%2*alpha)+r_safe^2))-(kappa/r_safe));" "lj_nrg=four_epsilon*sig6*(sig6-1);" "sig6=(sigma^6)/(%3*sigma^6 + r_safe^6);" "r_safe=max(r, 0.001);") @@ -1372,7 +1372,7 @@ OpenMMMetaData SireOpenMM::sire_to_openmm_system(OpenMM::System &system, { nb14_expression = QString( "coul_nrg+lj_nrg;" - "coul_nrg=138.9354558466661*q*(((%1)/sqrt((%2*alpha*alpha)+r_safe^2))-(kappa/r_safe));" + "coul_nrg=138.9354558466661*q*(((%1)/sqrt((%2*alpha)+r_safe^2))-(kappa/r_safe));" "lj_nrg=four_epsilon*sig6*(sig6-1);" "sig6=(sigma^6)/(((sigma*delta) + r_safe^2)^3);" "r_safe=max(r, 0.001);"