spirit-code / spirit

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

Queries Regarding SPIRIT Monte Carlo #623

Closed Sayan611 closed 1 year ago

Sayan611 commented 1 year ago

Dear Developers, This is regarding some queries and clarification for the Monte Carlo (MC) method used in SPIRIT. I have the following queries,

1) In the mc.py file I do not understand the functionality of  "n_thermalisation", "n_decorrelation", and "n_samples" tags. It seems that "n_thermalisation"  and "n_samples" tags are related to the number of iterations of MC, but then does it take the "mc_n_iterations" value from the input.cfg file mentioned in mc.py?

2) The "n_temperatures", "T_start", and "T_end"  in the mc.py file mean the annealing process, which starts from "T_end" and reaches "T_start" in the "n_temperatures" steps. Am I correct?

3) How do I modify mc.py to use an initial spin configuration chain from a previously saved file as the starting spin configuration for MC and save the final spin configuration after the MC has finished? Like the one I do by loading the spin configuration chain, starting the MC, and saving the spin configuration chain when MC is completed in GUI. 

I would be very much grateful if you kindly help me in these matters. Thank you.

Regards Sayan Banik

GPMueller commented 1 year ago

Dear @Sayan611, please check our paper about Spirit. There's a section on Monte Carlo and Fig. 4 mentions the thermalisation performed at each temperature step. It's an important component of proper Monte Carlo simulations.

Performing correct Monte Carlo simulations can be a bit tricky. I believe you'll need to understand the scripts you're using to a degree, where the meaning of n_temperatures etc. should be clear to you from the Python code. Please use the provided scripts only as a starting point, not as a fully finished setup.

Regarding your third question, see the docs and

https://github.com/spirit-code/spirit/blob/14ed7782bd23f4828bf23ab8136ae31a21037bb3/ui-python/gneb.py#L32-L36


A final note: while I don't know the scope or goals of your project, I want to note that if your goal is to do thorough and correct simulations it might be a good idea to read up on the available literature a bit. The papers we referenced should be a decent starting point, but I'll give some suggestions:

Sayan611 commented 1 year ago

Dear @GPMueller thank you very much for your help. I will surely go through the references you mentioned.