Ensembles
NQCDynamics.Ensembles
— ModuleEnsembles
This module provides the main function run_dynamics
. This serves to run multiple trajectories for a given simulation type, sampling from an initial distribution.
NQCDynamics.Ensembles.EnsembleSaver
— TypeEnsembleSaver{F<:Tuple}
Store a tuple of functions with the signature f(sol)
where sol
is a DiffEq solution object. EnsembleSaver
will evaluate each of these functions and return the result in a Dictionary
.
NQCDynamics.Ensembles.MeanReduction
— TypeAverage the outputs over all trajectories.
NQCDynamics.Ensembles.OrderedSelection
— TypeSelect the initial conditions from the distribution in order.
NQCDynamics.Ensembles.RandomSelection
— TypeObtain initial conditions by randomly sampling the distribution.
NQCDynamics.Ensembles.SumReduction
— TypeSum the outputs from each trajectory.
NQCDynamics.Ensembles.run_dynamics
— Methodrun_dynamics(sim::AbstractSimulation, tspan, distribution;
output,
selection::Union{Nothing,AbstractVector}=nothing,
reduction=AppendReduction(),
ensemble_algorithm=SciMLBase.EnsembleSerial(),
algorithm=DynamicsMethods.select_algorithm(sim),
trajectories=1,
kwargs...
)
Run trajectories for timespan tspan
sampling from distribution
.
Keywords
output
either a single function or a Tuple of functions with the signaturef(sol, i)
that takes the DifferentialEquations solution and returns the desired output quantity.selection
should be anAbstractVector
containing the indices to sample from thedistribution
. By default,nothing
leads to random sampling.reduction
defines how the data is reduced across trajectories. Options areAppendReduction()
,MeanReduction()
,SumReduction
andFileReduction(filename)
.ensemble_algorithm
is the algorithm from DifferentialEquations which determines which form of parallelism is used.algorithm
is the algorithm used to integrate the equations of motion.trajectories
is the number of trajectories to perform.kwargs...
any additional keywords are passed to DifferentialEquationssolve
`.