Skip to content
This repository has been archived by the owner on Dec 6, 2017. It is now read-only.

Latest commit

 

History

History
68 lines (44 loc) · 2.13 KB

index.rst

File metadata and controls

68 lines (44 loc) · 2.13 KB

Simulations

The simulation module contains types representing algorithms. The main type is the Simulation <type-simulation> type, which is parametrized by a Propagator <type-propagator>. This propagator will determine which kind of simulation we are running: Molecular Dynamics <type-MolecularDynamics>; Monte-Carlo; energy minimization; etc.

Note

Only molecular dynamic is implemented in for now, but at least Monte-Carlo and energetic optimization should follow.

molecular-dynamics compute output

Propagator

The Propagator type is responsible for generating new frames <type-frame> in the simulated universe <type-universe>. If you want to help adding a new propagator to , please signal yourself in the Gihtub issues list.

Simulation type

In , 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 <type-Propagator> which type is given by the propagator symbol. The args are passed to the propagator constructor.

If propagator takes one of the :MD, :md and :moleculardynamics values, a MolecularDynamics <type-MolecularDynamics> propagator is created.

The main function to run the simulation is the propagate! function.

propagate!(simulation, universe, nsteps)

Propagate an universe for nsteps steps, using the simulation 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