Skip to content

Commit

Permalink
Merge pull request #68 from open2c/henrik-dahl-pinholt-spherical-well…
Browse files Browse the repository at this point in the history
…-depth

Fixed sign discrepancy in spherical_well
  • Loading branch information
kannandeepti committed Aug 21, 2023
2 parents 8052c59 + c077253 commit bd67395
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion polychrom/forces.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down

0 comments on commit bd67395

Please sign in to comment.