ReadSave

ParallelTemperingMonteCarlo.ReadSave.build_statesMethod
build_states(mc_params::MCParams, ensemble::AbstractEnsemble, temp::TempGrid, potential::AbstractPotential)

For use initialising states and outputs when NOT restarting, but beginning from files. Builds empty Output struct named results and a vector of mc_states using either: one configuration stored in config.data OR a series of configurations stored in config.i. NB if config.i doesn't exist the default will be config.1. In this way states can be initialised with different starting configurations.

source
ParallelTemperingMonteCarlo.ReadSave.checkpointMethod
checkpoint(index::Int, mc_states::MCStateVector, results::Output, ensemble::AbstractEnsemble, rdfsave::Bool)
checkpoint(index::Int, mc_states::MCStateVector, results::Output, ensemble::NPT, rdfsave::Bool)

Function to save relevant information about the current state of the system at step index. Saves the configurations in each mc_state save_configs as well as the histograms stored in results. Optionally stores the volume histograms if using the NPT ensemble and the radial distribution functions if desired.

source
ParallelTemperingMonteCarlo.ReadSave.checkpoint_configMethod
checkpoint_config(savefile::SaveFile, state::MCState{T, N, BC, Ptype, Etype}) where {T, N, BC <: SphericalBC, Ptype, Etype}
checkpoint_config(savefile::SaveFile, state::MCState{T, N, BC, Ptype, Etype}) where {T, N, BC <: CubicBC, Ptype, Etype}
checkpoint_config(savefile::SaveFile, state::MCState{T, N, BC, Ptype, Etype}) where {T, N, BC <: RhombicBC, Ptype, Etype}

Function writes a single config in the standard xyz format. N atoms, the comment line contains the boundary condition information (implemented for Spherical BC and both types of Periodic BC) as well as max_displ information determining the stepsize used at the current step of the monte carlo simulation. The comment row is followed by 1 as a placeholder for the atom type to be implemented in future and the positions x,y,z in order.

source
ParallelTemperingMonteCarlo.ReadSave.rebuild_statesMethod
rebuild_states(n_traj::Int, ensemble::AbstractEnsemble, temps::TempGrid, potential::AbstractPotential)

Function to rebuild the MCStates vector and results struct from checkpoint information. The ensemble temps and potential along with n_traj are reconstructed elsewhere, but required to accurately recreate the states.

source
ParallelTemperingMonteCarlo.ReadSave.save_initMethod
save_init(potential,ensemble,params,temp)

Function to write all static parameters into a single parameters file. If a params file does not exist, it is created in ./checkpoint as params.data. This contains the mc_params ensemble and potential data.

source
ParallelTemperingMonteCarlo.ReadSave.writeensembleMethod
writeensemble(savefile::SaveFile, ensemble::NVT)
writeensemble(savefile::SaveFile, ensemble::NPT)
writeensemble(savefile::SaveFile, ensemble::NNVT)

Function to write the ensemble data into a savefile including the move types. First method is for the NVT ensemble which does not include volume changes, second method is NPT ensemble and does inclue volume moves.

source
ParallelTemperingMonteCarlo.ReadSave.writeparamsMethod
writeparams(savefile,params,temp)

Function to write the mc_params and temp data into a savefile. These are static parameters that define how the simulation is to proceed such as the number of cycles, trajectories and the temperatures to be covered.

source
ParallelTemperingMonteCarlo.ReadSave.writepotentialMethod
writepotential(savefile::SaveFile, potential::Ptype) where Ptype <: AbstractDimerPotential
writepotential(savefile::SaveFile, potential::Ptype) where Ptype <: AbstractDimerPotentialB
writepotential(savefile::SaveFile, potential::Ptype) where Ptype <: EmbeddedAtomPotential
writepotential(savefile::SaveFile, potential::Ptype) where Ptype <: AbstractMachineLearningPotential

Function to write potential surface information into savefile. implemented methods are the Embedded Atom Model, Extended Lennard-Jones and ELJ in Magnetic Field. This does not work for machine learning potentials.

source