Ensembles

NQCDynamics.EnsemblesModule
Ensembles

This module provides the main function run_dynamics. This serves to run multiple trajectories for a given simulation type, sampling from an initial distribution.

source
NQCDynamics.Ensembles.EnsembleSaverType
EnsembleSaver{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.

source
NQCDynamics.Ensembles.run_dynamicsMethod
run_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 signature f(sol, i) that takes the DifferentialEquations solution and returns the desired output quantity.
  • selection should be an AbstractVector containing the indices to sample from the distribution. By default, nothing leads to random sampling.
  • reduction defines how the data is reduced across trajectories. Options are AppendReduction(), MeanReduction(), SumReduction and FileReduction(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 DifferentialEquations solve`.
source