The Ising Model in Python: Statistical Mechanics and Permanent Magnets

แชร์
ฝัง
  • เผยแพร่เมื่อ 12 พ.ย. 2024

ความคิดเห็น • 57

  • @MrPSolver
    @MrPSolver  2 ปีที่แล้ว +14

    Correction: In the function I used to originally get the energy of the lattice, I should have divided the return value by 2 to avoid double counting of pairs. This doesn't effect the dynamics of the system (since this only depends on change in energy), but it slightly changes the energy plot.

    • @laika4048
      @laika4048 2 ปีที่แล้ว

      why did you calculate the total energy of all the lattice? I think you should only calculate energy for one site i,j and then because ergodic theorem it would be equal to the energy of all the lattice. Or i am missing something?

    • @godwinosabutey2876
      @godwinosabutey2876 2 ปีที่แล้ว +1

      Thank you! Very nice work and good explanation there. The Numba and the codes work incredibly well and fast. I was wondering how higher order interactions, such as those involving three bodies as opposed to two, might be implemented in a similar manner. Any advice you can give me?

  • @muhammadhidayat1337
    @muhammadhidayat1337 3 ปีที่แล้ว +8

    I'm currently in undergraduate trying to understand what ising model is, and suddenly found this video. Thank you so much!

  • @charltonwake6813
    @charltonwake6813 3 ปีที่แล้ว +6

    "Did this in undergrad without numba"'; gave me flashbacks when I had to do Ising Models in undergrad, taking my side panels off and setting up 2 desk fans to blow into my pc in fear of it over heating. God bless numba!

  • @ganstabreakincity
    @ganstabreakincity 3 ปีที่แล้ว +20

    Here before this channel has million subscribers, give it some time. Pure knowledge, I wish I can learn and collaborate with you given the time. Appreciate your work.

  • @adwaitnaravane5285
    @adwaitnaravane5285 3 ปีที่แล้ว +25

    Stat mech is the most beautiful thing in Physics.

    • @ricomajestic
      @ricomajestic 8 หลายเดือนก่อน

      It really is!

  • @AlessandroAmbler
    @AlessandroAmbler 3 ปีที่แล้ว +5

    Really cool vids man! Stumbled across one of your reddit posts and thought I reconised your face haha, subbed!

    • @MrPSolver
      @MrPSolver  3 ปีที่แล้ว +2

      Hahaha cheers dude 😂

  • @peabrane8067
    @peabrane8067 2 ปีที่แล้ว +2

    Wow that convolve operation to get the energy is so smart. I never thought of that
    Would probably gave me a 10x speedup for my PhD....

  • @estebanrodriguez3922
    @estebanrodriguez3922 3 ปีที่แล้ว +9

    This is outstanding great quality content. I've always wanted to make similar videos on youtube but PhD and academia are just too frantic! Keep it up!

  • @randomstuff9960
    @randomstuff9960 ปีที่แล้ว

    Why doesn't this have more views and likes? That was simply amazing!

  • @JonathonRiddell
    @JonathonRiddell 3 ปีที่แล้ว +3

    Great video! Numba seems super powerful, my code in undergrad for this similarly took forever to complete :).

  • @corneldevilliers461
    @corneldevilliers461 3 ปีที่แล้ว +1

    Clear and straightforward, excellent resource for the topic

  • @adityadhardwivedi634
    @adityadhardwivedi634 ปีที่แล้ว

    Glad I got internship in the very first summer at my Institute under condensed matter professor just because of curiosity of phase transition that occurs in matter. I'll get to learn many things, thanks for this video, man!

  • @deltascience7252
    @deltascience7252 3 ปีที่แล้ว +3

    dude I saw this on reddit and you're so underrated, i'll ask my friends to subscribe to you

  • @CarlosRoberto-vb9gi
    @CarlosRoberto-vb9gi 3 ปีที่แล้ว +1

    Finally I understand the meaning of the Ising model. Thanks for this great video.

  • @AJ-et3vf
    @AJ-et3vf 3 ปีที่แล้ว

    Awesome! Love your videos! This channel is seriously underrated and needs more views :) very quality and enjoyable videos.

  • @ayabongandlungwana4407
    @ayabongandlungwana4407 3 ปีที่แล้ว +1

    Wow this video has helped me to complete my assignment, although I'm using C to simulate the results. It gave me an idea about the how results should look like and better understand for the whole Ising model.. Thank you bro

  • @markushaysnielsen4885
    @markushaysnielsen4885 3 ปีที่แล้ว +3

    There’s that njit :-) Amazing video!

  • @westmoreland5889
    @westmoreland5889 3 ปีที่แล้ว +4

    waiting for your sympy video...

  • @chisomdim2031
    @chisomdim2031 3 ปีที่แล้ว

    Whao,
    You just saved a life! Thanks man!
    This is so on point👌

  • @NGBigfield
    @NGBigfield 2 ปีที่แล้ว

    You are an absolute genius!

  • @md.tohidulislam7041
    @md.tohidulislam7041 2 ปีที่แล้ว

    Thank you so very much. It saved a lot of time. I do appreciate your knowledge.

  • @benburdick9834
    @benburdick9834 3 ปีที่แล้ว +2

    These are some great videos! I would love to see your process of putting the notebooks together.

  • @GabrielleduVent
    @GabrielleduVent 2 ปีที่แล้ว

    Thanks for uploading this video! I'm a python newbie who needs to run Ising models and this clarified quite a few things. Few questions:
    1. For the total initial energy, if I am using a very specific energy equation, do I need to change it from convolution to something else? My set up is that it starts with all down or up spins.
    2. Since my setup is starting with 100% down or upspin, how would that affect the probability equation (2nd line after #3/4. change state...)?
    3. How would I change the probability function to incorporate my energy equation?
    Thanks in advance!

  • @godwinosabutey2876
    @godwinosabutey2876 2 ปีที่แล้ว +1

    Thank you! Very nice work and good explanation there. The Numba and the codes work incredibly well and fast. I was wondering how higher order interactions, such as those involving three bodies as opposed to two, might be implemented in a similar manner. Any advice you can give me? @Mr. P Solver

  • @ahxmeds
    @ahxmeds 3 ปีที่แล้ว

    Great content. You are too good, Luke.

    • @MrPSolver
      @MrPSolver  3 ปีที่แล้ว

      Thank you Shadab!

  • @joyzhong7279
    @joyzhong7279 2 ปีที่แล้ว

    Thank you so much for the content!

  • @TheAbdel
    @TheAbdel 2 ปีที่แล้ว

    Amazing work. Bravo !

  • @henryouang
    @henryouang 2 ปีที่แล้ว

    This was really great. Thanks!

  • @drissboutat6430
    @drissboutat6430 2 ปีที่แล้ว

    You're amazing 👏 a lot of thanks for this video

  • @aaronthomas6434
    @aaronthomas6434 2 ปีที่แล้ว

    Great Video! Helping me so much for my assignment! One question, for the full Hamiltonian where you would include the external energy contribution i.e the external field multiplied by the sum over all spins, would you simply add this into the get energy function or amend it somehow within the metropolis algorithm? Kepp up the brilliant work!

  • @physicsguy9774
    @physicsguy9774 2 ปีที่แล้ว

    amazing work mate! are you a physicist?

  • @lasinar9090
    @lasinar9090 11 หลายเดือนก่อน

    Nice work…❤

  • @quornnugget7799
    @quornnugget7799 9 หลายเดือนก่อน

    Does the energy calculation allow for periodic boundary conditions on our lattice?

  • @thomsday
    @thomsday 2 ปีที่แล้ว

    that cuttings :D

  • @anuranbhunia
    @anuranbhunia ปีที่แล้ว

    How do I view the final spin array bitmap after the Metropolis algorithm has worked upon it?

  • @حيدرالعبيدي-ج4د
    @حيدرالعبيدي-ج4د 3 ปีที่แล้ว +1

    Hello..I am a PhD student in physics from Iraq..I hope you can help me find codes in the Python program to study the Fe(phen) molecule to investigation of the spin crossover phenomenon by monte carlo (ising model 2D)..with many thanks to you

  • @cscsquad1902
    @cscsquad1902 2 ปีที่แล้ว

    okay how do you apply it to a real system? for example, we want to study magnetic behavior of some ferromagnetic metal (ie cobalt) which has a hcp structure. In that case, you would need the exact positions of the spins. Do you have any idea?

  • @homa_ghaiedi2626
    @homa_ghaiedi2626 ปีที่แล้ว

    How would you introduce the presence of an external magnetic field to this code?

  • @sadaf6295
    @sadaf6295 3 ปีที่แล้ว

    Hey .. How to make code in python for.. Spin correlation function for Heisenberg spin Hamiltonian.. ??
    I am new to python.. Please give me some your suggestion

  • @J-rb9dx
    @J-rb9dx ปีที่แล้ว

    Hello! Is there any way to display the new ising model with the updated spins?

  • @sadaf6295
    @sadaf6295 3 ปีที่แล้ว

    Hey.. Can you make video on Heisenberg spin hamiltonian in python like yo find eigen value and eigen vectors and what happens when N change..
    M a total Biggener in python.. But i have write a program..
    Please help me..

  • @muditgaur9736
    @muditgaur9736 10 หลายเดือนก่อน

    Can u do the same for Classical XY model

  • @clf400
    @clf400 2 ปีที่แล้ว

    Your mic is clipping. I recommend lowering the gain during recording because it sounds bad

  • @raa9558
    @raa9558 ปีที่แล้ว

    Ab
    So
    Lu
    Te
    Ly
    Brilliant

  • @sagarpatel3043
    @sagarpatel3043 2 ปีที่แล้ว

    I do not understand. Why positive spin sample and negative spin sample are separated in the starting? If +1 means spin-up and -1 means spin-down one sample is enough. Forgive my lack of intelligence.

  • @mB-mp6io
    @mB-mp6io 2 ปีที่แล้ว

    where the code disappear

  • @kasraburiaey7862
    @kasraburiaey7862 2 ปีที่แล้ว

    Is the code complete?

  • @prikarsartam
    @prikarsartam 2 ปีที่แล้ว

    I get trouble with the "plt.style.use(['science','notebook', 'grid'])" part, would you kindly provide solution?

  • @Eta_Carinae__
    @Eta_Carinae__ ปีที่แล้ว

    Hi! I tried more or less the same thing, except the way I noised the lattice is by randomly flipping every cell per timestep according to a bernoulli trial with the chance of success standing in for the chance to flip (I use numpy.random.binomial, and just set the no. trials to 1). Is there a reason why you flip one cell per timestep instead of a random number? Cheers!

  • @banditadas3420
    @banditadas3420 2 ปีที่แล้ว

    plt.style.use(['science', 'notebook','grid']) isnt working for me , its showing lot of error with OSError: 'science' not found in the style library and input is not a valid URL or path; see `style.available` for list of available styles