app_style style Q
app_style potts 100 app_style potts/neigh 20
These are on-lattice applications which evolve a Q-state Ising model or Potts model, where each lattice site has a spin value from 1 to Q. Sites flip their spin as the model evolves.
The Hamiltonian representing the energy of site I is as follows:
Hi = Sum_j delta_ij
where Sum_j is a sum over all the neighbor sites of site I and delta_ij is 0 if the spin of sites I and J are the same and 1 if they are different. The energy of the entire system is the sum of Hi over all sites.
These applications perform Glauber dynamics, meaning the spin is flipped on a single site. See app_style diffusion for an Ising model which performs Kawasaki dynamics, meaning the spins on two neighboring sites are swapped.
As explained on this page, these applications can be evolved by either a kinetic Monte Carlo (KMC) or rejection KMC (rKMC) algorithm. You must thus define a KMC solver or sweeping method to be used with the application via the solve_style or sweep commands.
For solution by a KMC algorithm, a site event is a spin flip and its probability is min[1,exp(-dE/kT)], where dE = Efinal - Einitial using the Hamiltonian defined above for the energy of the site, and T is the temperature of the system defined by the temperature command (which includes the Boltzmann constant k implicitly). The KMC algorithm does not allow spin flips known as "wild" flips, even at finite temperature. These are flips to values that are not equal to any neighbor site value.
For solution by a rKMC algorithm, the various styles use different rejection-based algorithms. For the potts style, a random spin from 1 to Q is chosen. For the potts/neigh style, a spin is chosen randomly from the values held by neighbor sites and a null-bin of a size which extends the possible events up to the maximum number of neighbors. For example, imagine a site has 12 neighbors and the 12 sites have 4 different spin values. Then each of the 4 neighbor spin values will be chosen with 1/12 probability and the null bin will be chosen with 8/12 probability. For the potts/neighonly style, the null bin is discarded, so in this case each of the 4 spin values will be chosen with 1/4 probability. In all the cases, dE = Efinal - Einitial is calculated, as is a uniform random number R between 0 and 1. The new state is accepted if R < min[1,exp(-dE/kT)], else it is rejected.
The rKMC algorithm for the potts style does allow spin flips known as "wild" flips. These are flips to values that are not equal to any neighbor site value. At temperature 0.0 these are effectively disallowed, since they will increase the energy of the system (except in the uninteresting case when the site already has a spin value not equal to any neighbor values), but at finite temperature they will have a non-zero probability of occurring.
The following additional commands are defined by these applications:
|temperature||set Monte Carlo temperature|