diff --git a/doc/source/changelog.rst b/doc/source/changelog.rst index 3884c60f5..1897e07de 100644 --- a/doc/source/changelog.rst +++ b/doc/source/changelog.rst @@ -17,6 +17,10 @@ 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. + +* 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/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. diff --git a/wrapper/Convert/SireOpenMM/sire_to_openmm_system.cpp b/wrapper/Convert/SireOpenMM/sire_to_openmm_system.cpp index 23c75b7f2..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);" @@ -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;"