From 3d3ce0d5feb1eedbc627198f43395169a2d587bb Mon Sep 17 00:00:00 2001 From: Sikorski Date: Thu, 24 Oct 2024 17:11:12 +0200 Subject: [PATCH] fix serialization of OpenMMSimulation --- src/simulators/openmm.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/simulators/openmm.jl b/src/simulators/openmm.jl index 49d3b27..88bd48a 100644 --- a/src/simulators/openmm.jl +++ b/src/simulators/openmm.jl @@ -392,7 +392,7 @@ struct OpenMMSimulationSerialized bias end -JLD2.writeas(::Type{OpenMMSimulation}) = OpenMMSimulationSerialized +JLD2.writeas(::Type{T}) where {T<:OpenMMSimulation} = OpenMMSimulationSerialized Base.convert(::Type{OpenMMSimulationSerialized}, sim::OpenMMSimulation) = OpenMMSimulationSerialized(steps(sim), sim.constructor, sim.bias)