Closed Luthaf closed 9 years ago
More thought about this point: we can define the Simulation
type as follow
type Simulation{T<:Propagator}
propagator::Propagator
interactions :: Interactions
controls :: Vector{BaseControl}
checks :: Vector{BaseCheck}
computes :: Vector{BaseCompute}
outputs :: Vector{BaseOutput}
# Data
topology :: Topology
cell :: UnitCell
frame :: Frame
masses :: Vector{Float64}
# all other data to be shared
data :: Dict{Symbol, Any}
end
And then have
type MolecularDynamic <: Propagator
forces_computer :: BaseForcesComputer
integrator :: BaseIntegrator
forces :: Array3D{Float64}
end
type Metadynamic <: Propagator
md :: MolecularDynamic
gaussians::Array{Float64, 1}
# other parameters
end
type Replay <: Propagator
reader :: Reader
end
type MonteCarlo <: Propagator
moves::Array{Move, 1}
energy_computer::energy
end
# And so on
Done in 1e696ac28154640d4432b7ebd64f099ec1a16b23
It would be great to have a Propagator type, with the following subtypes :