Skip to content

Commit

Permalink
small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
lmiq committed Sep 30, 2024
1 parent a0f34e2 commit 93f1a35
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ ForwardDiff = "0.10"
NativeFileDialog = "0.2.1"
PDBTools = "1.5.1"
Packmol_jll = "20"
Parameters = "0.12"
Random = "1.9"
SPGBox = "0.5, 0.6, 0.7"
StaticArrays = "1"
Expand Down
8 changes: 4 additions & 4 deletions src/constraints/boxes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ weight_default[:box] = 5.0
#
function orthogonal_wall(::Type{Inside}, center, side, weight, x)
xc = x - center
if xc > side / 2 || xc < -side / 2
return weight * (xc - side / 2)^2
else
if -side / 2 < xc < side / 2
return zero(x)
else
return weight * (xc - side / 2)^2
end
end

function orthogonal_wall(::Type{Outside}, center, side, weight, x)
xc = x - center
if xc < side / 2 && xc > -side / 2
if -side / 2 < xc < side / 2
return weight * (xc - side / 2)^2
else
return zero(x)
Expand Down

0 comments on commit 93f1a35

Please sign in to comment.