Simulations¶
The simulation module contains types representing algorithms. The main type is the Simulation type, which is parametrized by a Propagator. This propagator will determine which kind of simulation we are running: Molecular Dynamics; Monte-Carlo; energy minimization; etc.
Note
Only molecular dynamic is implemented in Jumos for now, but at least Monte-Carlo and energetic optimization should follow.
Propagator¶
The Propagator
type is responsible for generating new frames
in the simulated universe. If you want to help adding a new
propagator to Jumos, please signal yourself in the Gihtub issues list.
Simulation
type¶
In Jumos, simulations are first-class citizen, i.e. objects bound to variables. The following constructors should be used to create a new simulation:
-
Simulation
(propagator::Propagator)¶ Create a simulation with the specified
propagator
.
-
Simulation
(propagator::Symbol, args...) Create a simulation with a propagator which type is given by the
propagator
symbol. Theargs
are passed to the propagator constructor.If
propagator
takes one of the:MD
,:md
and:moleculardynamics
values, a MolecularDynamics propagator is created.
The main function to run the simulation is the propagate!()
function.
-
propagate!
(simulation, universe, nsteps)¶ Propagate an
universe
fornsteps
steps, using thesimulation
method. Usage example:julia> sim = Simulation(:MD, 1.0) julia> universe # This should be an universe, either read from a file or built by hand julia> propagate!(sim, universe, 4000) # Run the MD simulation for 4000 steps