From f7f30dd22fddf42892874b293e723eab4538202b Mon Sep 17 00:00:00 2001 From: Lester Hedges Date: Mon, 24 Aug 2026 10:04:15 +0100 Subject: [PATCH 1/2] Fix "double - Complex" subtraction operator. [closes #457] --- corelib/src/libs/SireMaths/complex.cpp | 2 +- doc/source/changelog.rst | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/corelib/src/libs/SireMaths/complex.cpp b/corelib/src/libs/SireMaths/complex.cpp index ac24dbdfa..9701a81b4 100644 --- a/corelib/src/libs/SireMaths/complex.cpp +++ b/corelib/src/libs/SireMaths/complex.cpp @@ -396,7 +396,7 @@ namespace SireMaths /** Subtraction */ Complex operator-(double x, const Complex &z) { - return z - x; + return Complex(x) - z; } /** Multiplication */ diff --git a/doc/source/changelog.rst b/doc/source/changelog.rst index b01fafe49..e1e8a4952 100644 --- a/doc/source/changelog.rst +++ b/doc/source/changelog.rst @@ -52,6 +52,8 @@ organisation on `GitHub `__. propagate several independent trajectories by swapping the energy trajectory and simulation clock between blocks. +* Fixed the ``double - Complex`` subtraction operator in ``SireMaths::Complex``. + `2026.1.0 `__ - June 2026 ----------------------------------------------------------------------------------------- From 168c1ba83d837c11b089b89f5de0bd08fbe8fffe Mon Sep 17 00:00:00 2001 From: Lester Hedges Date: Mon, 24 Aug 2026 11:40:34 +0100 Subject: [PATCH 2/2] Fix dangling else in setAmberWater/setGromacsWater. [closes #462] --- corelib/src/libs/SireIO/biosimspace.cpp | 4 ++-- doc/source/changelog.rst | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/corelib/src/libs/SireIO/biosimspace.cpp b/corelib/src/libs/SireIO/biosimspace.cpp index fa293afac..9f7dcbb18 100644 --- a/corelib/src/libs/SireIO/biosimspace.cpp +++ b/corelib/src/libs/SireIO/biosimspace.cpp @@ -466,7 +466,7 @@ namespace SireIO } // OPC - if (model == "OPC") + else if (model == "OPC") { double a = 0.1477224; @@ -592,7 +592,7 @@ namespace SireIO } // OPC - if (model == "OPC") + else if (model == "OPC") { double a = 0.1477224; diff --git a/doc/source/changelog.rst b/doc/source/changelog.rst index e1e8a4952..a380a1f3c 100644 --- a/doc/source/changelog.rst +++ b/doc/source/changelog.rst @@ -54,6 +54,9 @@ organisation on `GitHub `__. * Fixed the ``double - Complex`` subtraction operator in ``SireMaths::Complex``. +* Fixed a dangling ``else`` statement that caused ``setAmberWater`` and + ``setGromacsWater`` to fail when using the TIP4P water model. + `2026.1.0 `__ - June 2026 -----------------------------------------------------------------------------------------