isPerform1D {isingLenzMC}R Documentation

Perform metropolis MC on 1D Ising model

Description

Given a vector of flip sites, 1s or -1s, representing up and down spins respectively, and an other flip sites, perform Metropolis Monte Carlo applying periodic boundary conditions, i.e., cyclic. This function calls the C function 'isPerform1D'.

Usage

  isPerform1D(ikBT, x, J, H, nstep, ensembleM, probSel)

Arguments

ikBT

1/kB*T (Boltzmann factor)

x

1D Spin sites on the lattice.

J

Interaction strength

H

External field

nstep

Number of MC steps requested

ensembleM

Value of the theoretical magnetization (could be thermodynamic limit value)

probSel

Which transition probability to use. 1 for Metropolis 2 for Glauber

Value

Returns a pair list containing values for omegaM, Fluctuating metric vector for Magnetisation (length of naccept), naccept, number of MC steps accepted and nreject, number of MC steps rejected and times as accepted time steps. Times corresponds to times where flips occur, this is so-called transition times ('metropolis time' or 'single flip time') to judge the timings between two accepted steps.

Author(s)

Mehmet Suzen <mehmet.suzen@physics.org>

Examples

  n        <- 10 # 10 spin sites
  mySites  <- genConfig1D(n) # Generate sites
  output   <- isPerform1D(1.0, mySites, 1.0, 0.0, 10, 0.5, 1) # Metropolis
  output   <- isPerform1D(1.0, mySites, 1.0, 0.0, 10, 0.5, 2) # Glauber

[Package isingLenzMC version 0.2.5 Index]