Ensembles
NQCDynamics.Ensembles — ModuleEnsemblesThis 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
outputeither a single function or a Tuple of functions with the signaturef(sol, i)that takes the DifferentialEquations solution and returns the desired output quantity.selectionshould be anAbstractVectorcontaining the indices to sample from thedistribution. By default,nothingleads to random sampling.reductiondefines how the data is reduced across trajectories. Options areAppendReduction(),MeanReduction(),SumReductionandFileReduction(filename).ensemble_algorithmis the algorithm from DifferentialEquations which determines which form of parallelism is used.algorithmis the algorithm used to integrate the equations of motion.trajectoriesis the number of trajectories to perform.savetimesaves the simulation time-steps, useful when usings with integrators with variable time-stepping.precompile_dynamicsruns a single step of the dynamics simulation in order to optimise the full run, exploits a strange issue with the Julia compiler.kwargs...any additional keywords are passed to DifferentialEquationssolve`.