CederGroupHub / smol

Statistical Mechanics on Lattices
https://cedergrouphub.github.io/smol/
Other
65 stars 14 forks source link

Note for using the Landau-Wang entropy #438

Open Jeff-oakley opened 1 year ago

Jeff-oakley commented 1 year ago

How is the Landau-Wang entropy compared with other ways of computing real entropy? Is there a paper or any benchmark test to be cited/checked?

kamronald commented 1 year ago

Hi Bin,

Sorry for the delay. I personally haven't used Wang-Landau yet, but from my understanding it should achieve nearly exact results, as long as the sampling is complete and converged. The original paper shows that it can reproduce nearly exact results for a simple Ising model https://doi.org/10.1119/1.1707017 W-L sampling has also been used in several CE studies on alloys, and the authors discuss the error minimization in this study https://doi.org/10.1016/j.cpc.2018.09.017 @lbluque may be able to comment better on W-L sampling, but I think he is traveling at the moment.

lbluque commented 1 year ago

Hello @Jeff-oakley :wave:

Apart from the original publications by Wang and Landau that @kamronald pointed out, I would also point you to the following work which deals directly with WL sampling of CEs of alloys:

https://journals.aps.org/pre/abstract/10.1103/PhysRevE.84.065702 https://iopscience.iop.org/article/10.1088/1361-648X/ab13d8 https://www.sciencedirect.com/science/article/abs/pii/S001046551830331X

The main metric to gauge the convergence of a WL simulation is the "modification factor", sometimes also called the "fill factor". Here you can access it using the "mod_factor" trace value as shown in this example notebook. Usually a modification factor < 10^-5 or -6 is considered converged for most applications.

qchempku2017 commented 1 year ago

How is the Landau-Wang entropy compared with other ways of computing real entropy? Is there a paper or any benchmark test to be cited/checked?

Hi Bin, @kamronald and @lbluque made excellent references and explanations. Personally, I feel the disadvantage of WL is that it is only a rough estimation of the partition function. The accuracy of estimation is highly dependent on the choice of energy bin size. It works well within mid-to-high temperature range, but does not work as well at lower temperatures when the energy levels near the ground state require a considerably smaller bin for the low temperature limit of free energy to be accurate enough. However, the decrease of energy bin can in turn cause an exponential increase in the histogram convergence time as more steps are required to sufficiently sample the whole histogram. Typically, it takes 10~100 times for a WL histogram to converge, even though WL has the appeal to obtain the entire partition function within a single equilibration run. Whether WL will be computationally more efficient compared to integrating over multiple regular MCMC largely depends on your system and the bin size you use.

Jeff-oakley commented 1 year ago

Thanks for the introduction folks! I will look into these references with some tests.

Jeff-oakley commented 1 year ago

Just to follow up on this thread. I tried to play with bin_size and watch convergence of modification factor. The bin_size is set as 2 (I suppose this is low enough) and simulate a well known Li-Co-O-F system. However, I got very strange features:

  1. The maximum entropy does not match ideal entropy.
  2. The order-disorder transition looks strange (it happens close to zero).

For such test, the modification factor is already converged into ~10^-8.

Did I do anything wrong. I put both the mson file and the jupyter notebook in attachments. It takes about 20-30min to run it and reproduce my results. [Uploading Test.zip…]()

qchempku2017 commented 1 year ago

@Jeff-oakley @lbluque If I remembered it correctly, bin_size=2 should be 2eV/atom, which could actually be quite large. I typically use 0.1 or even smaller bin size to properly sample the DOS.