Description Usage Arguments Value Author(s) Examples
View source: R/isingLibWrapper.R
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.
1 | isStep1D(ikBT, x, J, H, probSel)
|
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 |
A pair list, flip states (vec) and if step is accepted (accept).
Mehmet Suzen <mehmet.suzen@physics.org>
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
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.