# Grand canonical Monte Carlo for an ising model

Hi!
I’m trying to run a grand canonical monte carlo simulation using an ising model. However, I cannot seem to find a way to flip the spins from -1 to 1 and vice versa. The options mccreate and mcdestroy cannot help in this case too. Any suggestions are highly appreciated.

Regards,
Mostafa

I’m afraid at the moment there isn’t a spin flip move for Monte Carlo as such. Since the spin is associated with a given species then it might be possible to achieve this via any move that changes one species to another, such as a swap or create/destroy. Otherwise it will have to be something to add to the wish list for future versions…

Thank you for your kind reply, Julian. It would be great to have the spin flip option in the future to model the ising model in a GC ensemble. The current implementation allows only for a canonical simulation.

Thank you for your consideration.

Hi Mostafa,
I’ve modified the latest version of GULP-6.0 to include a new Monte Carlo option, “mcspecies”, which allows two species to be swapped. This can be used to generate a spin flip by assigning different spins to the two species. There is also a new example, example78, that shows a simple set up for a 2-D triangular lattice that uses this to change the spins. Hope this helps with your problem.
Regards
Julian

1 Like

Dear Julian,

Thank you so much for this excellent addition! I will study this example carefully. My first impression is that this is still a Canonical ensemble where the number of particles is conserved (# up and # of down spins). However, I need to study carefully to see if there is away to do a grand canonical ensemble.

Truly thankful for your time and effort you put in this great piece of software!

Regards,
Mostafa

Dear Mostafa,
GCMC is already available via the gcmcspecies, mccreate, and mcdestroy options.
Regards,
Julian

Dear Julian,

Thank you for your reply. The problem with the mccreate is that it can insert a spin anywhere in the lattice even in between two mutually first nearest neighbor spins. For the Ising-like model one wants to start with a lattice (say square lattice), and end up with the exactly the same lattice at the end. Current GCMC does not allow this.

Best Regards,
Mostafa

Dear Mostafa,
With a bit of creative thinking you should be able to do what you want with the new feature in the code. If you have 3 species - 1 with up spin, 1 with down spin and 1 with no spin then you can have a lattice where a species swap will create, destroy or invert spin on a site.
Regards,
Julian

Thank you for the tip, Julian! I will certainly give it a try.

Best Regards,
Mostafa