From f7d45ab8089903831f8c41efc49e865d502679b8 Mon Sep 17 00:00:00 2001 From: Alexander Spears <39826690+Alexsp32@users.noreply.github.com> Date: Mon, 4 Dec 2023 14:27:10 +0000 Subject: [PATCH] Attempted fix for #320 AdvancedMH or one of its dependencies may have updated a keyword from "initial_config" to "initial_params". This caused NQCD to not deliver initial positions to the sampling chain correctly. --- src/InitialConditions/ThermalMonteCarlo.jl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/InitialConditions/ThermalMonteCarlo.jl b/src/InitialConditions/ThermalMonteCarlo.jl index 00f837344..55b6a2810 100644 --- a/src/InitialConditions/ThermalMonteCarlo.jl +++ b/src/InitialConditions/ThermalMonteCarlo.jl @@ -27,7 +27,7 @@ using NQCDynamics: masses """ - run_advancedhmc_sampling(sim, r, steps, σ; move_ratio=0.0, internal_ratio=0.0) + run_advancedmh_sampling(sim, r, steps, σ; move_ratio=0.0, internal_ratio=0.0) Sample the configuration space for the simulation `sim` starting from `r`. @@ -47,7 +47,8 @@ function run_advancedmh_sampling( steps::Real, σ::Dict{Symbol,<:Real}; move_ratio=0.0, - internal_ratio=0.0 + internal_ratio=0.0, + kwargs... ) density = get_density_function(sim) @@ -60,7 +61,7 @@ function run_advancedmh_sampling( initial_config = reshape_input(sim, copy(r)) chain = AdvancedMH.sample(density_model, sampler, convert(Int, steps); - init_params=initial_config) + initial_params=initial_config, kwargs...) return reshape_output(sim, chain) end