Why is the DOS from Wang-Landau's algoritm non-flat?

  • Thread starter wbwb
  • Start date
  • Tags
    Dos
In summary, the conversation discusses the Wang-Landau algorithm and its purpose in calculating the density of states. The algorithm involves updating a histogram and entropy at each level until the histogram becomes flat, indicating that the density of states is being accurately estimated. However, there is some confusion about what exactly constitutes "flatness" in this context. It is clarified that the algorithm aims for "sufficient statistics" rather than a constant function, and that this is indicated by the visit counts histogram becoming flat. It is also mentioned that there are two histograms being tracked, one for the density of states and one for visit counts, and that the latter is the one used to determine when the algorithm should terminate.
  • #1
wbwb
4
0
Hi,

I'm trying to understand(implement) Wang-Landau's algorithm to calculate the DOS. There are zillions of seemingly identical descriptions on the net, which I thought are straightforward to type into a machine - but when reading the papers(codes) I don't get the main point, i.e. for me it seems as if the procedure should not generate anything else than just a flat DOS independent of the model under consideration.

If I understand correctly, then, at level 'l', and independent of acceptance or rejection, after each update attempt, the algorithm will increment both, the histogram h(E) by 1 and the entropy ln(g(E)) by ln(f)_l, at identical E, where E is either the accepted (new) energy or the old energy (after rejection) ... until h(E) is 'sufficiently' flat. Then one nullifies h(E), sets ln(f)_{l+1} = ln(f)_l/2, and starts the preceding all over again ... until ln(f)_l is 'sufficiently' close to zero. (There is a proper way of how to reject/accept, but I don't see how that is of relevance for my problem.)

So, if h(E)_l is the number of entries in each bin of the histogram at level 'l', then
ln(g(E))_l = h(E)_1*ln(f) + h(E)_2*ln(2)/2 + ... + h(E)_l*ln(f)/l
and since the stopping criterion at each level k is that h(E)_k is flat i.e. independent of E, so must be ln(g(E))_l.
In turn the DOS g(E) will be 'as flat as the histogram'.

What I am getting wrong here?

Thx. for your comments.
wbwb
 
Physics news on Phys.org
  • #2
Ok., I got it.
Maybe I should have thought about the algorithm a little more by myself, and not so much looked at some of the codes one can find on the net. (By now I think some of them are just plain wrong.)
I know, it is bad style to answer your own questions ... but anyway, if someone shows up here having similar issues:

The 'flatness' criterion in the Wang-Landau algorithm means something totally different then a 'function h(E)' which has zero slope to some relative numerical error - even if that error is never strictly set to '0'. That was my complete misunderstanding of the method. Actually one can convince oneself by playing Gedanken-experiments with toy models, that in some steady state of the code at level 'l' the histogram must not be 'roughly' constant as a function of 'E'. In fact, forcing such a situation will most likely put you in rare configurations (if at all) in which the DOS will most likely be wrong.

The way, in which the algorithm (i.m.h.o.) is meant to work implies that 'flatness' simply means 'sufficient statistics' for the histogram. This is a rather vague criterion. E.g. one could check this by testing how well the law of large numbers is satisfied separately for each entry of the histogram at each energy 'E', but probably there are many more ways to do that.

In conclusion, it this wording of the histogram being 'flat' which can be really confusing to newbies of the method: it does not mean flatness as a function of 'E', but rather when one considers h(E,ts), where 'ts' is some measure of the simulation time, then these should be more or less flat as functions of 'ts' for each 'E'.

wbwb
 
Last edited:
  • #3
Not sure if that helps, but I have the feeling you are missing this point: In WL sampling you have two histograms: d(E) keeps track of the density of states in the respective energies. Then, there is a second histogram c(E) which counts how often the respective energies have been visited during the sampling run. If d(E) roughly represents the real density of states, all bins are, on average, visited equally often. Hence, the counting histogram c(E) becomes flat. Conversely, if c(E) becomes flat, you assume that your estimate d(E) is somewhat good/acceptable.

Bottom line: There are two histograms that are being tracked: The estimate for the density of states and the visit counts. It is the visit counts that are requested to become flat for the algorithm (or an iteration of it) to terminate, not the density of states. The criterion you suggested, looking after d(E) to become effectively stationary, should also work. But it sounds a bit harder to quantify.
 
  • Like
Likes IreneFerri

Related to Why is the DOS from Wang-Landau's algoritm non-flat?

1. Why is it important for the DOS from Wang-Landau's algorithm to be flat?

The DOS (Density of States) from Wang-Landau's algorithm needs to be flat in order to accurately sample the phase space of a system. This ensures that all energy states are equally sampled, allowing for a more comprehensive understanding of the system's behavior.

2. What causes the DOS from Wang-Landau's algorithm to be non-flat?

The non-flatness of the DOS from Wang-Landau's algorithm can be caused by several factors, including insufficient sampling of energy states, improper choice of the modification factor, or non-ergodicity of the system.

3. How does the modification factor impact the flatness of the DOS from Wang-Landau's algorithm?

The modification factor, which determines the rate at which the DOS is updated, can greatly affect the flatness of the DOS. If the factor is too high, the DOS may become oversampled, leading to a non-flat result. On the other hand, if the factor is too low, the DOS may not be adequately sampled, also resulting in a non-flat DOS.

4. Can the non-flatness of the DOS from Wang-Landau's algorithm be corrected?

Yes, the non-flatness of the DOS can be corrected by adjusting the modification factor, increasing the number of Monte Carlo steps, or implementing multiple histogram reweighting. However, the correction process can be time-consuming and may require multiple iterations.

5. Are there any applications where a non-flat DOS from Wang-Landau's algorithm is acceptable?

In some cases, a non-flat DOS from Wang-Landau's algorithm may still be acceptable, as long as it accurately represents the energy landscape of the system. This is often the case for systems with multiple energy barriers or complex energy landscapes. However, a flat DOS is generally preferred for more accurate and comprehensive results.

Similar threads

  • Atomic and Condensed Matter
Replies
3
Views
949
  • Atomic and Condensed Matter
Replies
8
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
2K
  • Beyond the Standard Models
Replies
1
Views
2K
Replies
1
Views
1K
  • Math Proof Training and Practice
2
Replies
62
Views
8K
  • General Math
4
Replies
125
Views
17K
  • General Math
Replies
7
Views
2K
  • Mechanics
2
Replies
35
Views
27K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
Back
Top