Monte Carlo Method, Metropolis Algorithm, Magnetization, Phase transition, Order and Disorder, Ising Model, Lars Onsager Here is the link to the codes; www.dropbox.co...
Sir, nice explanation video and it is great that you provided the codes! Thank you. I went through the code (the first one so far) and to be honest, I had a hard time figuring out what the condition (line11) in metropolis_1 does and how the compound of "p" is taken there :) I have finally figured it out and realized that I didn't notice "+3" at the end of the condition. If I may humbly suggest (only for the sake of your future teaching), I think it would be helpful to say more about what the condition does (that it calculates the energy of surrounding spins, and how the probability from "p" is taken).
@@aashukumargautam7242 It is my great pleasure to help an IIT student. On my side, I have no problem. Please make sure that it fits to the policies of your institution and/or expectations of your supervisors.
Thanks for watching! Here is the line; if (r(n) < p(((a(rn(n,1),r0(n,2)) + a(rp(n,1),r0(n,2)) + a(r0(n,1),rn(n,2)) + a(r0(n,1),rp(n,2)))*a(r0(n,1),r0(n,2))/2 + 3)))
@@seyjah What are the difference between your three metropolis files? and I have hard time understanding this line of code (r(n) < p(((a(rn(n,1),r0(n,2)) + a(rp(n,1),r0(n,2)) + a(r0(n,1), rn(n,2)) + a(r0(n,1),rp(n,2)))*a(r0(n,1),r0(n,2))/2 + 3))) a(r0(n,1),r0(n,2)) = -a(r0(n,1),r0(n,2)); % flip the spin
@@mjl7810 What are the difference between your three metropolis files? v1: temperature is kept constant. v2: we just watch the system behavior while temperature is changed. v3: magnetization is calculated for each temperature and compared with exact result. In the mentioned line we multiply the central spin with the sum of its four spins. Possible values we can get are -4, -2, 0, 2 and 4. Upon flipping the central spin we get, respectively, energy changes of -8J, -4J, 0, 4J and 8J. This correspond to acceptance probabilities 1, 1, 1, exp(-4J/kbT) and exp(-8J/kbT), respectively. These are values of p. To get the correct index you need to divide by 2 and add 3 which takes -4, -2, 0, 2 and 4 to 1, 2, 3, 4 and 5.
That is very good job, I am a Ph.D student in physics from Iraq. I hope you can help me to find codes in (Python or Matlab) to study the Fe(phen) molecule by monte carlo ising model 2D for ferromagnetism, to determine the spin crossover phenomenon , with my thanks to you.
@@seyjah Thank you for your reply, sir. My problem is that I did not find a message or thesis that would help me in my project (Investigation of Spin crossover phenomenon for Fe2+ based complexes).