AbstractLiveSets
Functions
FreeBird.AbstractLiveSets — ModuleAbstractLiveSetsModule for defining the livesets, which are collections of walkers that are used in the sampling schemes.
FreeBird.AbstractLiveSets.GuptaAtomWalkers — Typestruct GuptaAtomWalkers <: AtomWalkersThe GuptaAtomWalkers struct represents a collection of atom walkers that interact with each other using the Gupta potential.
Fields
walkers::Vector{AtomWalker{C}}: A vector of atom walkers, whereCis the number of components.potential::Union{GuptaParameters, CompositeParameterSets{C, GuptaParameters}}: The Gupta potential parameters. SeeGuptaParametersfor more details.
FreeBird.AbstractLiveSets.LJAtomWalkers — Typestruct LJAtomWalkers <: AtomWalkersThe LJAtomWalkers struct represents a collection of atom walkers that interact with each other using the Lennard-Jones potential.
Fields
walkers::Vector{AtomWalker{C}}: A vector of atom walkers, whereCis the number of components.potential::AbstractPotential: The Lennard-Jones potential parameters. SeeAbstractPotential.
Constructor
LJAtomWalkers(walkers::Vector{AtomWalker{C}}, pot::AbstractPotential; assign_energy=true): Constructs a newLJAtomWalkersobject with the given walkers and Lennard-Jones potential parameters. Ifassign_energy=true, the energy of each walker is assigned using the Lennard-Jones potential.
FreeBird.AbstractLiveSets.LJSurfaceWalkers — Typestruct LJSurfaceWalkers <: AtomWalkersThe LJSurfaceWalkers struct represents a collection of atom walkers interacting through a Lennard-Jones potential, with the presence of an external surface object wrapped in an AtomWalker.
Fields
walkers::Vector{AtomWalker{C}}: A vector of atom walkers, whereCis the number of components.pot::Union{LJParameters, CompositeParameterSets{CP, LJParameters}}: The Lennard-Jones potential parameters.surface::AtomWalker{CS}: An atom walker representing the surface, whereCSis the number of components of the surface.
Constructor
LJSurfaceWalkers(walkers::Vector{AtomWalker{C}}, pot::Union{LJParameters, CompositeParameterSets{CP, LJParameters}}, surface::AtomWalker{CS}; assign_energy=true)Constructs a new
LJSurfaceWalkersobject with the given walkers, Lennard-Jones potential parameters, and a single surface walker. Ifassign_energy=true, the energy of each walker is assigned using the Lennard-Jones potential and the surface.`LJSurfaceWalkers(walkers::Vector{AtomWalker{C}}, pot::Union{LJParameters, CompositeParameterSets{CP, LJParameters}}, surface::AtomWalker{CS}, assignenergyparallel::Symbol, ) where {C, CP, CS}
Constructs a new
LJSurfaceWalkersobject with the given walkers, Lennard-Jones potential parameters, and a single surface walker. Theassign_energy_parallelargument determines whether to assign energy in parallel using threads (:threads) or distributed processes (:distributed).
FreeBird.AbstractLiveSets.LJSurfaceWalkers — MethodLJSurfaceWalkers(walkers::Vector{AtomWalker{C}},
pot::Union{LJParameters, CompositeParameterSets{CP, LJParameters}},
surface::AtomWalker{CS},
assign_energy_parallel::Symbol,
) where {C, CP, CS}Constructs a new LJSurfaceWalkers object with the given walkers, Lennard-Jones potential parameters, and a single surface walker. The assign_energy_parallel argument determines whether to assign energy in parallel using threads (:threads) or distributed processes (:distributed).
Arguments
walkers::Vector{AtomWalker{C}}: A vector of atom walkers, whereCis the number of components.pot::Union{LJParameters, CompositeParameterSets{CP, LJParameters}}: The Lennard-Jones potential parameters.surface::AtomWalker{CS}: An atom walker representing the surface, whereCSis the number of components of the surface.assign_energy_parallel::Symbol: The method to use for parallel energy assignment. Can be:threadsor:distributed.
Returns
LJSurfaceWalkers: A newLJSurfaceWalkersobject with the assigned energy.
FreeBird.AbstractLiveSets.LatticeGasWalkers — Typestruct LatticeGasWalkers <: LatticeWalkersThe LatticeGasWalkers struct represents a collection of lattice walkers for a lattice gas system. It is a subtype of LatticeWalkers.
Fields
walkers::Vector{LatticeWalker{C}}: A vector of lattice walkers.hamiltonian::LatticeGasHamiltonian: The lattice gas Hamiltonian associated with the walkers.
Constructors
LatticeGasWalkers(walkers::Vector{LatticeWalker{C}}, hamiltonian::LatticeGasHamiltonian; assign_energy=true, perturb_energy::Float64=0.0): Constructs a newLatticeGasWalkersobject with the given walkers and Hamiltonian. Ifassign_energyistrue, the energy of each walker is assigned using the provided Hamiltonian. The optionalperturb_energyparameter can be used to add a small perturbation to the assigned energy.
FreeBird.AbstractLiveSets.assign_energy! — Methodassign_energy!(walker::AtomWalker, pot::AbstractPotential, surface::AtomWalker)Assigns the energy to the given walker using the an AbstractPotential pot with an external surface.
Arguments
walker::AtomWalker: The walker object to assign the energy to.pot::AbstractPotential: The potential parameters.surface::AtomWalker: The surface walker object to consider in the energy calculation.
Returns
walker::AtomWalker: The walker object with the assigned energy.
FreeBird.AbstractLiveSets.assign_energy! — Methodassign_energy!(walker::AtomWalker, pot::AbstractPotential)Assigns the energy to the given walker using the an AbstractPotential pot.
Arguments
walker::AtomWalker: The walker object to assign the energy to.pot::AbstractPotential: The potential parameters.
Returns
walker::AtomWalker: The walker object with the assigned energy.
FreeBird.AbstractLiveSets.assign_energy! — Methodassign_energy!(walker::Vector{AtomWalker{C}}, pot::AbstractPotential) where CAssigns the energy to each walker in walker using an AbstractPotential pot.
Arguments
walker::Vector{AtomWalker{C}}: A vector of walker objects to assign the energy to, whereCis the number of components.pot::AbstractPotential: The abstract potential to use for energy assignment.
Returns
walker::Vector{AtomWalker{C}}: The vector of walker objects with the assigned energy.
FreeBird.AbstractLiveSets.assign_energy! — Methodassign_energy!(walkers::Vector{AtomWalker{C}}, pot::Union{LJParameters, CompositeParameterSets{C, LJParameters}}; assign_energy=true, const_frozen_part=true) where CAssigns the energy to each walker in walkers using the a single-component or multi-component Lennard-Jones potential pot. If const_frozen_part=true, the frozen part of the energy is calculated only once for the first walker and assigned to all walkers. If assign_energy=true, the energy is assigned to each walker.
Arguments
walkers::Vector{AtomWalker{C}}: A vector of walker objects to assign the energy to, whereCis the number of components.pot::Union{LJParameters, CompositeParameterSets{C, LJParameters}}: The potential parameters.assign_energy::Bool=true: Whether to assign the energy to each walker.const_frozen_part::Bool=true: Whether to calculate the frozen part of the energy only once for the first walker and assign it to all walkers.
Returns
walkers::Vector{AtomWalker{C}}: The vector of walker objects with the assigned energy.
FreeBird.AbstractLiveSets.assign_energy! — Methodassign_energy!(walker::LatticeWalker{C}, hamiltonian::LatticeGasHamiltonian; perturb_energy::Float64=0.0)Assigns energy to the given walker based on the hamiltonian. If perturb_energy is non-zero, a small random perturbation is added to the energy.
Arguments
walker::LatticeWalker{C}: The walker to assign energy to.hamiltonian::LatticeGasHamiltonian: The Hamiltonian used to calculate the energy.perturb_energy::Float64=0.0: The amount of random perturbation to add to the energy.
Returns
walker::LatticeWalker{C}: The walker with the assigned energy.
FreeBird.AbstractLiveSets.assign_frozen_energy! — Methodassign_frozen_energy!(walker::AtomWalker, pot::AbstractPotential)Assigns the frozen energy to the given walker using the an AbstractPotential pot.
Arguments
walker::AtomWalker: The walker object to assign the energy to.pot::AbstractPotential: The potential parameters.
Returns
walker::AtomWalker: The walker object with the assigned energy.