isStep1D: Carry one step Metropolis Monte Carlo on 1D ising model

Description Usage Arguments Value Author(s) Examples

View source: R/isingLibWrapper.R

Description

Given a vector of flip sites, 1s or -1s, representing up and down spins respectively and the usual thermodynamic parameters ikBt, J and H. Perform 1 step metropolis Monte Carlo, applying periodic boundary conditions, i.e., cyclic. This function calls the C function 'isStep1D'. Importance sampling is applied.

Usage

1
  isStep1D(ikBT, x, J, H, probSel)

Arguments

ikBT

1/kB*T (Boltzmann factor)

x

1D Spin sites on the lattice.

J

Interaction strength

H

External field

probSel

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

Value

A pair list, flip states (vec) and if step is accepted (accept).

Author(s)

Mehmet Suzen <mehmet.suzen@physics.org>

Examples

1
2
3
4
5
  n             <- 10 # 10 spin sites
  mySites       <- genConfig1D(n) # Generate sites
  # only short-range part
  isStep1D(1.0, mySites, 1.0, 0.0, 1) # Metropolis
  isStep1D(1.0, mySites, 1.0, 0.0, 2) # Glauber

isingLenzMC documentation built on May 2, 2019, 2:31 p.m.