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/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..a380a1f3c 100644 --- a/doc/source/changelog.rst +++ b/doc/source/changelog.rst @@ -52,6 +52,11 @@ 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``. + +* Fixed a dangling ``else`` statement that caused ``setAmberWater`` and + ``setGromacsWater`` to fail when using the TIP4P water model. + `2026.1.0 `__ - June 2026 -----------------------------------------------------------------------------------------