spirit-code / spirit

Atomistic Spin Simulation Framework
http://spirit-code.github.io
MIT License
117 stars 52 forks source link

Problem in acceptance ratio #620

Closed Sayan611 closed 2 years ago

Sayan611 commented 2 years ago

Dear Spirit developers, I was performing Monte Carlo with the input file attached below. Here I am facing a problem. The acceptance ratio gradually decreases with the number of iterations, giving the wrong result. I have set the target acceptance ratio to 0.6, but it did not reach that value with iterations. I have also attached the Log file. I will be grateful if you kindly help me in this matter. Thank you.

Regards Sayan Banik Spirit_files.zip

MSallermann commented 2 years ago

Hi,

at a first glance it seems like you are running the MC simulation at 0K.

For an MC simulation at finite temperatures, energy increasing spin moves are accepted with a probability that increases with temperature. If that temperature is 0K however, any move that increases the energy is rejected. So in that way the MC algorithm at 0K, acts as a probabilistic energy minimization.

As you approach a local minimum, the acceptance ratio will always tend towards zero at 0K. This becomes clear if you consider that exactly at the local minimum any infinitesimal move will increase the energy (as per the definition of a local minimum) and will thus be rejected. The way Spirit normally tries to increase the acceptance ratio is to reduce the sampling cone angle (in your Log the angle starts out at 30 deg and ends up at 0.2 deg). Usually it is a valid strategy but near a local minimum at 0K this will obviously not help.

I assume you want to find the ground state of your system. To do so it would be better to start with MC at higher temperatures and gradually decrease the temperature until you get close to 0K. This way you should get near the ground state. Sadly, it is not exactly trivial to figure out what gradually means in this context. It requires some fiddling with the start temperature, the number of temperature steps and the number of MC iterations at each temperature step. Then you can follow up the MC calculation with a direct energy minimization, which will bring you to the exact ground state.

Sayan611 commented 2 years ago

Thank you. I got it.