DiagMC
Diagrammatic Monte Carlo simulation of a 2-level spin system in a magnetic field
Loading...
Searching...
No Matches
Classes | Functions
simulation.h File Reference

Header file of the MCMC algorithm function, and of the SingleRunResults class that stores the results. More...

#include <diagmc/diagram.h>
#include <ostream>
#include <chrono>
Include dependency graph for simulation.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  SingleRunResults
 Container class to store all the simulation parameters, and the results of a run. It provides methods to print the results on standard output, and also to produce a formatted single-line output, e.g. for writing to file. More...
 

Functions

SingleRunResults run_simulation (double beta, double initial_s0, double H, double GAMMA, unsigned long long int N_total_steps, unsigned long long int N_thermalization_steps, unsigned long long int update_choice_seed=std::chrono::system_clock::now().time_since_epoch().count(), unsigned long long int diagram_seed=std::chrono::system_clock::now().time_since_epoch().count())
 Runs the Markov Chain Diagrammatic Monte Carlo algorithm for the 2-level spin sistem, with the given parameters, returning the results statistics. More...
 

Detailed Description

Header file of the MCMC algorithm function, and of the SingleRunResults class that stores the results.

Author
Enrico Pedretti
Date
2023-09-03

Definition in file simulation.h.

Function Documentation

◆ run_simulation()

SingleRunResults run_simulation ( double  beta,
double  initial_s0,
double  H,
double  GAMMA,
unsigned long long int  N_total_steps,
unsigned long long int  N_thermalization_steps,
unsigned long long int  update_choice_seed = std::chrono::system_clock::now().time_since_epoch().count(),
unsigned long long int  diagram_seed = std::chrono::system_clock::now().time_since_epoch().count() 
)

Runs the Markov Chain Diagrammatic Monte Carlo algorithm for the 2-level spin sistem, with the given parameters, returning the results statistics.

Parameters
betaLength of the diagram (here representing 1/T). Must be > 0.
initial_s0Spin of the 0-th segment of the diagram [0—t1] at the beginning of the simulation. Must be +1 or -1
HValue of the longitudinal component of magnetic field
GAMMAValue of the transversal component of magnetic field. Must be != 0.
N_total_stepsTotal number of steps of the MCMC algorithm
N_thermalization_stepsNumber of initial steps for which statistics is not collected
update_choice_seed(optional) Seed for the Mersenne-Twister random number generator to choose WHICH update to attempt.
diagram_seed(optional) Seed for the diagram, used INSIDE the updates
Returns
SingleRunResults