From 9c84c07591f0a2cd012a5e302b27fa084aeb9251 Mon Sep 17 00:00:00 2001 From: henrik-dahl-pinholt <107730383+henrik-dahl-pinholt@users.noreply.github.com> Date: Fri, 3 Feb 2023 15:35:34 -0500 Subject: [PATCH] Fixed spherical well --- polychrom/forces.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/polychrom/forces.py b/polychrom/forces.py index 932a036..1f8fcf0 100644 --- a/polychrom/forces.py +++ b/polychrom/forces.py @@ -850,7 +850,7 @@ def spherical_well(sim_object, particles, r, center=[0, 0, 0], width=1, depth=1, """ force = openmm.CustomExternalForce( - "step(1+d) * step(1-d) * SPHWELLdepth * (1 - cos(3.1415926536*d)) / 2;" + "step(1+d) * step(1-d) * SPHWELLdepth * (1 + cos(3.1415926536*d)) / 2;" "d = (sqrt((x-SPHWELLx)^2 + (y-SPHWELLy)^2 + (z-SPHWELLz)^2) - SPHWELLradius) / SPHWELLwidth" )