
PHYSICAL REVIEW E 75 , 046701 ͑2007 ͒ Fast algorithm to calculate density of states R. E. Belardinelli and V. D. Pereyra * Departamento de Física, Laboratorio de Ciencias de Superficie, Universidad Nacional de San Luis, CONICET, Chacabuco 917, 5700 San Luis, Argentina ͑Received 13 June 2006; revised manuscript received 6 February 2007; published 5 April 2007 ͒ An algorithm to calculate the density of states, based on the well-known Wang-Landau method, is intro- duced. Independent random walks are performed in different restricted ranges of energy, and the resultant density of states is modified by a function of time, F͑t͒ϰt−1 , for large time. As a consequence, the calculated −1/2 density of state, gm͑E,t͒, approaches asymptotically the exact value gex ͑E͒ as ϰt , avoiding the saturation of the error. It is also shown that the growth of the interface of the energy histogram belongs to the random deposition universality class. DOI: 10.1103/PhysRevE.75.046701 PACS number ͑s͒: 02.70.Rr, 64.60.Cn, 05.50. ϩq I. INTRODUCTION ͓24 –31 ͔ and studies of the efficiency and convergence of this algorithm ͓26 ,30 ͔. However, there are limitations of the The Wang-Landau WL algorithm 1 has been one of ͑ ͒ ͓ ͔ method which remain still unsolved, such as, for example, the most interesting and refreshing improvements in the the behavior of the tunneling time, which is a bound for the Monte Carlo MC simulation scheme in the last decade, ͑ ͒ performance of any flat-histogram algorithm, as is discussed applying to a broad spectrum of interesting problems in sta- in Ref. ͓30 ͔, where it is shown that it limits the convergence tistical physics and biophysics 1–9 . ͓ ͔ in the WL algorithm. Other important unanswered questions The method is based in an algorithm to calculate the den- related particularly with the WL method are as follows: ͑i͒ sity of states g E —i.e., the number of all possible states or ͑ ͒ ͑ How is the flatness of the histogram related to the accuracy? configurations for an energy level E of the system. In that ͒ ͑ii ͒ What is the relation between the modification factor and way, thermodynamic observables, including free energy over the error? ͑iii ͒ Is there some relation between the refinement a wide range of temperature, can be calculated with one parameter and the stopping condition that increases the effi- single simulation. ciency? ͑iv ͒ Is there any universality behavior related to this Instead, most conventional Monte Carlo algorithms such algorithm? In this paper an algorithm based in the Wang- as Metropolis importance sampling ͓10 ͔, Swendsen-Wang Landau method is introduced. The main goal of the proposed cluster flipping ͓11 ͔, etc. ͓12 ͔, generate a canonical distribu- algorithm is that the refinement parameter needs to be scaled g E e−E/kBT tion ͑ ͒ at a given temperature. Such distributions down as 1/ t. are so narrow that, with conventional Monte Carlo simula- The remainder of this paper is arranged as follows. In Sec. tions, multiple runs are required to determine thermody- II, the Wang-Landau algorithm and its dynamical behavior namic quantities over significant ranges of temperatures. are discussed. In Sec. III, the algorithm is introduced in de- It is important to note that the multicanonical ensemble tail and some applications are discussed. Finally, the conclu- method ͓13 –16 ͔ proposed by Berg et al. estimates also the sions are given in Sec. IV. density of states g͑E͒ first, then performs a random walk with a flat histogram in the desired region in the phase space. This method has been proven to be very efficient in studying II. WANG-LANDAU ALGORITHM first-order phase transitions where simple canonical simula- tions have difficulty in overcoming the tunneling barrier be- In the Wang-Landau algorithm ͑WL ͒, an initial energy tween coexisting phases at the transition temperature range of interest is identified, Emin ഛEഛEmax , and a random ͓13 ,16 –23 ͔. However, in multicanonical simulations, the walk is performed in this range. During the random walk, density of states need not necessarily be very accurate, as two histograms are updated: one for the density of states, long as the simulation generates a relatively flat histogram g͑E͒, which represents the current or running estimate, and and overcomes the tunneling barrier in energy space. This is one for visits to distinct energy states, H͑E͒. Before the because the subsequent reweighting ͓13 ,15 ͔ does not depend simulation begins H͑E͒ is set to zero and g͑E͒ is set to unity. on the accuracy of the density of states as long as the histo- The random walk is performed by choosing an initial state i gram can cover all important energy levels with sufficient in the energy range Emin ഛEഛEmax . Trial moves are then statistics. attempted and moves are accepted according to the transition Since Wang and Landau introduced the multiple-range probability random walk algorithm to calculate the density of states g͑E ͒ DOS , there have been numerous proposed improvements → i ͑ ͒ p͑Ei Ef͒ = min ͩ1, ͪ, ͑1͒ g͑Ef͒ where Ei ͑Ef͒ is the initial ͑final ͒ state, respectively, and * [email protected] and [email protected] → *Author to whom correspondence should be addressed. Electronic p͑Ei Ef͒ is the transition probability from the energy level address: [email protected] Ei to Ef. Whenever a trial move is accepted, a histogram 1539-3755/2007/75 ͑4͒/046701 ͑5͒ 046701-1 ©2007 The American Physical Society R. E. BELARDINELLI AND V. D. PEREYRA PHYSICAL REVIEW E 75 , 046701 ͑2007 ͒ entry corresponding to n is incremented according to H͑En͒ =H E +1 and g E =g E f, where f is an arbitrary con- ͑ n͒ ͑ n͒ ͑ n͒ <η vergence factor, which is generally initialized as e. If a move is rejected, the new configuration is discarded and the histo- gram entry corresponding to the old configuration is incre- mented according to H͑E0͒=H͑E0͒+1; at the same time, the <ε density of states is incremented according to g͑E0͒=g͑E0͒f. This process is repeated until the energy histogram becomes sufficiently flat. When that happens, the energy histogram is reset to zero and the convergence factor is decreased accord- ing to fk+1 =ͱfk, where fk is the convergence factor corre- sponding to stage k. The process is continued until f be- −8 comes sufficiently close to 1 ͓say, f Ͻexp ͑10 ͔͒ . ∆ In practice, the relation S͑E͒=log ͓g͑E͔͒ is generally used in order to fit all possible values of g͑E͒ into double- precision numbers. In order to understand the WL method and its limitations, 1 let us describe the time behavior of ͗H͑t͒͘ = N ͚EH͑E,t͒, ∆ where N is the number of states of different energies and H͑E,t͒ stands for the mean height of the histogram in E at time t ͑with t= j/N, where j is the number of trial moves attempted ͒ which is the MC time for the rest of the paper. Note that t is normalized to the entire range of energy, N, and FIG. 1. Dynamical behavior of ͑a͒ F, ͗⑀͑t͒͘ , ͗͑t͒͘ and ͑b͒ ͗ H͘, 2 ⌬H, ⌬H for the Ising model in a two-dimensional square lattice with not to the number of lattice sites, L . ͗H͘ The wide histogram is defined as ⌬H͑t͒=Hmax ͑t͒ L=8 using the Wang-Landau method. The quantities are obtained −Hmin ͑t͒, where Hmax ͑t͒ and Hmin ͑t͒ are the maximum and averaging over 256 independent samples. The flatness criterion was minimum values of H at time t, respectively. 95%. ⌬H Other quantities of interest are ͗H͘ , the function F =log ͓f͔, and the errors ⑀͑E,t͒ and ͑E,t͒, defined as soon as Hmin ജ0, ⌬H remains constant and consequently the ⌬H ⌬H −1 rate ͗H͘ begins to decrease inversely with time, ͗H͘ ϰt . log ͓gn͑E,t͔͒ ⑀͑E,t͒ = ͯ1 − ͯ ͑2͒ When this parameter fulfills the flatness criteria ͑i.e., 95%, log ͓gex ͑E͔͒ horizontal line in the figure ͒ and the Monte Carlo time is the and adequate tϾtc, then F is modified to a new value ͑Fk+1 =Fk /2 ͒, the histogram H͑E͒ is reset, and the errors ͗⑀͑t͒͘ and gn͑E,t͒ t are reduced, remaining constant until the parameter F ͑E,t͒ = ͯ1 − ͯ, ͑3͒ ͗ ͑ ͒͘ gex ͑E͒ is modified again. New reductions of F lead to lower values of ͗⑀͑t͒͘ and ͗͑t͒͘ and the error curves go down. where g ͑E,t͒ and g ͑E,t͒ are the experimental and the ex- n ex However, after a certain time both errors reach a satura- act values of the DOS ͓gn͑E,t͒ is normalized with respect to tion value. It turns out that ͗H͘, ⌬H, and ⌬H are also satu- the exact DOS at the ground state ͔. Then, the mean values ͗H͘ 1 1 rated. It seems that the saturation in the error is due to the are ͗⑀͑t͒͘ = ͚E⑀͑E,t͒ and ͗͑t͒͘ = ͚E͑E,t͒. ͑N−1 ͒ ͑N−1 ͒ fact that the parameter F is reduced in an inadequate way, The dynamics of the WL algorithm can be analyzed ob- every time that the histogram becomes flat. serving the behavior of these quantities, as shown in Figs. In the WL algorithm, any function F may be used for the 1͑a͒ and 1͑b͒, where ͗H͘, ⌬H, ⌬H , F, ͗⑀͑t͒͘ , and ͗͑t͒͘ are ͗H͘ modification factor, as long as it decreases monotonically to plotted as a function of MC time for the Ising model in a zero.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages5 Page
-
File Size-