Clock Spins

Spins 2 components restricted to take some value: S=(cos(2.PI.q/Nq),sin(2.PI.q/Nq))
q={0,...,Nq-1}
Energy=S.hlocal
P(x)= e-Energy/T
       = e-S.h

The Alias Walker (AW) algorithm re-arrange the 3 probabilities into 3 boxes (0), (1) and (2), of equal weight with 2 possibilities in each. It is not difficult to choose one of the box with a random number and an (int) command and choose the correct possibility with an if condition.

Download the Alias Walker Hasting restricted (AWHd) Algorithm:
The best method is the Alias Walker Hasting restricted AWHd. it consits to calculate by the walker algorithm a new state DIFFERENT of the present one (Heat Bath method). Then accept the new configuration with Hasting method.
1.  To use the Alias Walker Hasting restricted (AWHd) you must have :
2.  AND you must have the tables in the file "Clock_walker_Hasting.res". You must create this file using create_Clock_walker_Hasting.c


Download the Alias Walker (AW) Algorithm:
A little less good than the previous one.
1.  To use the Alias Walker Hasting restricted (AWHd) you must have :
2.  AND you must have the tables in the file "Clock_walker.res". You must create this file using create_Clock_walker.c

Download the Article:

Probabilities and Performances :
  • Figure: comparison of the time consumption to simulate a two dimensional three state (q=3) ferromagnetic Clock spins on a square lattice for various algorithms (Metropolis,Me, Restricted metropolis, Med, Direct Heat Bath, DHB, Restricted Direct Heat Bath, DHBd, Walter Algorithm, WA, Restricted Walter Algorithm Hasting, WAHd ). We note that the DHB and WA are equivalent. Only the time consumption changes. DHBd and WAHd are also equivalent.
    The two critical temperatures are shown by the squares
    The Restricted Walter Algorithm Hasting, WAHd, is the fastest at the critical temperature.
    More...

Algorithms in C