TRExMC.jl

Documentation for TRExMC.

TRExMC.Models.Lattices.nearest_neighborsMethod
nearest_neighbors(::AbstractLattice, site)

Return the set of nearest_neighbors for a given site in the AbstractLattice.

Example

julia> latt = Lattices.CubicLattice2D(4, 4);

julia> Lattices.nearest_neighbors(latt, 1)
4-element view(::Matrix{Int32}, 1, :) with eltype Int32:
 13
  4
  2
  5
source
TRExMC.Models.Lattices.parametersMethod
parameters(::AbstractLattice)

Return the parameters used to define the AbstractLattice.

Example

julia> latt = Lattices.CubicLattice2D(4, 4);

julia> Lattices.parameters(latt)
TRExMC.Models.Lattices.CubicLattice2DParams(4, 4)
source
TRExMC.Models.Lattices.site_indexMethod
site_index(::AbstractLattice, indices::itr)

Calculate the flattened index from an iterable set of indices in an AbstractLattice.

Example

julia> latt = Lattices.CubicLattice2D(4, 4);

julia> Lattices.site_index(latt, (1, 2))
5
source
TRExMC.Models.Hamiltonians.AbstractDoFType
abstract type AbstractDoF end

Parent type for all degrees of freedom used in the simulations.

The required interface for all DoF types is the following:

  • DoF_location: Defines the in-memory identification for where the DoF is.
  • DoF_value: Defines what the value of the DoF is (its current state).
source
TRExMC.Models.Hamiltonians.AbstractHamiltonianType
abstract type AbstractHamiltonian end

Parent type for all Hamiltonians in the simulation.

The required interface that all Hamiltonians must satisfy are specified by the following functions:

  • DoF: the AbstractDoF stored at a given memory location
  • energy: total energy of the Hamiltonian
  • DoF_energy: energy associated with a single AbstractDoF
source
TRExMC.Models.Observables.AbstractObservablesType
abstract type AbstractObservables end

Parent type for all observables.

Required Interface

The following methods must be implemented for all subtypes:

* [`measure!`](@ref): how one should take measurements of a system for a given system configuration.
source
TRExMC.Models.Observables.@observablesMacro
@observables name symbol_funcs::AbstractDict
@observables name symbols funcs

Generate an AbstractObservables subtype with the given name whose fields will be denoted by the given symbols iterable. The measure! method will also be implemented with the supplied [funcs] iterable.

Alternatively one can supply a Dictionary of symbol-function pairs as a single argument.

Note

length(symbols) == length(funcs) by construction.

source
TRExMC.Simulations.monte_carlo_run!Method
monte_carlo_run!(models, algorithm, mcparams; kwargs...)

Main Monte Carlo function that performs a certain simulation algorithm on the systems defined by the given models. The parameters for the simulation are contained with mcparams.

Currently, the available keyword arguments (kwargs) are:

  • procedure::AbstractMCProcedure = MonteCarloSimulation(): defines the type of simulation to be run
  • verbose = false: whether to dump the progress for run during the simulation
source
TRExMC.Simulations.run_and_record!Method
run_and_record!(models, algorithm, mcparams; [kwargs...])

Monte Carlo simulation for a set of models to be simulated in parallel according to the specified algorithm with respect to the given parameters, mcparams.

Note

This is a wrapper around monte_carlo_run! with procedure = MonteCarloSimulation().

source
TRExMC.Simulations.thermalize!Method
thermalize(models, algorithm, mcparams; [kwargs...])

Thermalization process for a given set of models to be thermalized in parallel according to the specified algorithm with respect to the given parameters, mcparams.

Note

This is a wrapper around monte_carlo_run! with procedure = Thermalization().

source