Skip to content

Commit

Permalink
Make bin_size a required parameter for Histogram
Browse files Browse the repository at this point in the history
  • Loading branch information
kbarros committed Aug 30, 2024
1 parent ef91b92 commit 6c75840
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/extra/Advanced_MC/PT_WHAM_ising2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ measure_interval = 10
exch_interval = 5

# Energy histograms for each PT replica
E_hists = [Sunny.Histogram() for _ in 1:PT.n_replicas]
E_hists = [Sunny.Histogram(bin_size=1.0) for _ in 1:PT.n_replicas]

# Initial equilibration
Sunny.step_ensemble!(PT, n_therm, exch_interval)
Expand Down
2 changes: 1 addition & 1 deletion src/MonteCarlo/BinnedArray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Base.@kwdef mutable struct BinnedArray{K, V}
max_key::K = 0

# binning resolution for keys
bin_size::Float64 = 1.0
bin_size::Float64
end

# copy constructor
Expand Down

0 comments on commit 6c75840

Please sign in to comment.