From d4f7e83a7208943dadf5b1389b64b2de62b71212 Mon Sep 17 00:00:00 2001 From: Matthew Date: Fri, 4 Oct 2024 15:14:23 +0100 Subject: [PATCH] Multiply out -1 to simplify expression --- src/sire/morph/_repex.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/sire/morph/_repex.py b/src/sire/morph/_repex.py index 6818022ba..d350a4870 100644 --- a/src/sire/morph/_repex.py +++ b/src/sire/morph/_repex.py @@ -103,10 +103,9 @@ def replica_exchange( pressure0 = ensemble0.pressure() pressure1 = ensemble1.pressure() - delta = -1.0 * ( - beta1 * (nrgs1[0] - nrgs1[1] + (pressure1 * (volume1 - volume0) * N_A)) - + beta0 * (nrgs0[1] - nrgs0[0] + (pressure0 * (volume0 - volume1) * N_A)) - ) + delta = beta1 * ( + nrgs1[1] - nrgs1[0] - (pressure1 * (volume1 - volume0) * N_A) + ) + beta0 * (nrgs0[0] - nrgs0[1] - (pressure0 * (volume0 - volume1) * N_A)) from math import exp