AbstractLiveSets

Functions

FreeBird.AbstractLiveSetsModule
AbstractLiveSets

Module for defining the livesets, which are collections of walkers that are used in the sampling schemes.

source
FreeBird.AbstractLiveSets.GuptaAtomWalkersType
struct GuptaAtomWalkers <: AtomWalkers

The 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, where C is the number of components.
  • potential::Union{GuptaParameters, CompositeParameterSets{C, GuptaParameters}}: The Gupta potential parameters. See GuptaParameters for more details.
source
FreeBird.AbstractLiveSets.LJAtomWalkersType
struct LJAtomWalkers <: AtomWalkers

The 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, where C is the number of components.
  • potential::AbstractPotential: The Lennard-Jones potential parameters. See AbstractPotential.

Constructor

  • LJAtomWalkers(walkers::Vector{AtomWalker{C}}, pot::AbstractPotential; assign_energy=true): Constructs a new LJAtomWalkers object with the given walkers and Lennard-Jones potential parameters. If assign_energy=true, the energy of each walker is assigned using the Lennard-Jones potential.
source
FreeBird.AbstractLiveSets.LJSurfaceWalkersType
struct LJSurfaceWalkers <: AtomWalkers

The 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, where C is the number of components.
  • pot::Union{LJParameters, CompositeParameterSets{CP, LJParameters}}: The Lennard-Jones potential parameters.
  • surface::AtomWalker{CS}: An atom walker representing the surface, where CS is 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 LJSurfaceWalkers object with the given walkers, Lennard-Jones potential parameters, and a single surface walker. If assign_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 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).

source
FreeBird.AbstractLiveSets.LJSurfaceWalkersMethod
LJSurfaceWalkers(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, where C is the number of components.
  • pot::Union{LJParameters, CompositeParameterSets{CP, LJParameters}}: The Lennard-Jones potential parameters.
  • surface::AtomWalker{CS}: An atom walker representing the surface, where CS is the number of components of the surface.
  • assign_energy_parallel::Symbol: The method to use for parallel energy assignment. Can be :threads or :distributed.

Returns

  • LJSurfaceWalkers: A new LJSurfaceWalkers object with the assigned energy.
source
FreeBird.AbstractLiveSets.LatticeGasWalkersType
struct LatticeGasWalkers <: LatticeWalkers

The 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 new LatticeGasWalkers object with the given walkers and Hamiltonian. If assign_energy is true, the energy of each walker is assigned using the provided Hamiltonian. The optional perturb_energy parameter can be used to add a small perturbation to the assigned energy.
source
FreeBird.AbstractLiveSets.assign_energy!Method
assign_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.
source
FreeBird.AbstractLiveSets.assign_energy!Method
assign_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.
source
FreeBird.AbstractLiveSets.assign_energy!Method
assign_energy!(walker::Vector{AtomWalker{C}}, pot::AbstractPotential) where C

Assigns 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, where C is 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.
source
FreeBird.AbstractLiveSets.assign_energy!Method
assign_energy!(walkers::Vector{AtomWalker{C}}, pot::Union{LJParameters, CompositeParameterSets{C, LJParameters}}; assign_energy=true, const_frozen_part=true) where C

Assigns 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, where C is 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.
source
FreeBird.AbstractLiveSets.assign_energy!Method
assign_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.
source
FreeBird.AbstractLiveSets.assign_frozen_energy!Method
assign_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.
source