C 53 olecular Siulation Lecture Histogra Reweighting ethods David. Kofke Departent of Cheical ngineering SUNY uffalo kofke@eng.buffalo.edu
Histogra Reweighting ethod to cobine results taken at different state conditions icrocanonical enseble ( V,, N) = icro states Canonical enseble N N π ( r, p ) = e Probability of a icrostate Q β e π( ; β) =( ) Probability of an energy Q ( β ) Nuber of icrostates having this energy Probability of each icrostate The big idea: Cobine siulation data at different teperatures to iprove quality of all data via their utual relation to ()
Consider three energy levels In-class Proble. = = = ln = =.3 = ln = = 6.9 = ln What are Q, distribution of states and <> at β =? 3
In-class Proble. 4 Consider three energy levels What are Q, distribution of states and <> at β =? Q = e + e + e ln ln ln = e + e + e = +.+. = π e = = =.83 Q e π = = =.833 Q π = = = ln = =.3 = ln = = 6.9 = ln e = = =.83 Q = π =.83 i +.833.3 +.83 6.9 =.49 i
In-class Proble. 5 Consider three energy levels What are Q, distribution of states and <> at β =? Q = e + e + e ln ln ln = e + e + e = +.+. = nd at β = 3? 3ln 3ln 3ln Q = e + e + e = +.+ =. 3 π e = = =.83 Q e π = = =.833 Q π = = = ln = =.3 = ln = = 6.9 = ln e = = =.83 Q π = =.9. π = =.9.. π = =.. = π =.83 +.833.3 +.83 6.9 =.49 =.9 +.9.3 +. 6.9 =. i i
6 Histogra Reweighting pproach Knowledge of () can be used to obtain averages at any teperature β β β 3 () Siulations at different teperatures probe different parts of () ut siulations at each teperature provides inforation over a range of values of () Cobine siulation data taken at different teperatures to obtain better inforation for each teperature
In-class Proble. Consider siulation data fro a syste having three energy levels = saples taken at β =.5 i ties observed in level i What is ()? = 4 = = ln = 46 =.3 = ln = 5 = 9. = ln 7
In-class Proble. Consider siulation data fro a syste having three energy levels = saples taken at β =.5 i ties observed in level i What is ()? e Reinder π ( ) =( ) Q ( β ) = 4 = = ln = 46 =.3 = ln = 5 = 9. = ln 8
In-class Proble. Consider siulation data fro a syste having three energy levels = saples taken at β =.5 i ties observed in level i What is ()? Hint ( ) π ( ) = e Q( β ) = 4 = = ln = 46 =.3 = ln = 5 = 9. = ln Can get only relative values! 9
In-class Proble. Consider siulation data fro a syste having three energy levels = saples taken at β =.5 i ties observed in level i What is ()?.5 = = = + βu.5 e Q.46 Q 4.6Q.5 = = = + βu e Q.4 Q.4Q + βu = = = e Q.5 Q 5Q = 4 = = ln = 46 =.3 = ln = 5 = 9. = ln Q Q( β =.5)
In-class Proble 3. Consider siulation data fro a syste having three energy levels = saples taken at β =.5 i ties observed in level i What is ()?.5.4.4 = = = + βu.5 e Q.46 Q 4.6Q.5.5 5 = = = + βu e Q Q Q = = = + βu e Q Q Q Here s soe ore data, taken at β = what is ()? = 4 = = ln = 46 =.3 = ln = 5 = 9. = ln Q Q( β =.5) = 5 = 48 =
In-class Proble 3. Consider siulation data fro a syste having three energy levels = saples taken at β =.5 i ties observed in level i What is ()?.5.4.4 = = = + βu.5 e Q.46 Q 4.6Q.5.5 5 = = = + βu e Q Q Q = = = + βu e Q Q Q Here s soe ore data, taken at β = what is ()? =.5 Q =.5Q =.48 Q = 48Q =. Q = Q = 4 = = ln = 46 =.3 = ln = 5 = 9. = ln Q Q( β =.5) = 5 = 48 = Q Q( β =.)
3 Reconciling the Data We have two data sets =.4Q = 4.6Q = 5Q =.5Q = 48Q = Q Questions of interest what is the ratio Q /Q? (which then gives us Δ) what is the best value of /, /? what is the average energy at β =? In-class Proble 4 ake an attept to answer these questions
In-class Proble 4. We have two data sets 4 =.4Q = 4.6Q = 5Q =.5Q = 48Q = Q What is the ratio Q /Q? (which then gives us Δ) Consider values fro each energy level What is the best value of /, /? Consider values fro each teperature What to do?.4q 4.6Q 5Q = = =.5Q 48Q Q Q.5 Q 48 Q Q.4 Q 4.6 Q 5 = =.5 = =.4 = = 4 4.6Q 5Q β = = = = =.5 5 5.4Q.4Q 48Q Q β = = = = = 96 4.5Q.5Q
5 ccounting for Data Quality Reeber the nuber of saples that went into each value =.4Q = 4.6Q = 5Q = 4 = 46 = 5 =.5Q We expect the -state data to be good for levels and while the -state data are good for levels and Write each as an average of all values, weighted by quality of result est est est w, w, = + = 48Q = Q = ( β ) ( ) U, βu, = w e Q + w e Q = 5 = 48 e π ( ) =( ) Q ( β )
6 Histogra Variance stiate confidence in each siulation result =.4Q = 4.6Q = 5Q = 4 = 46 = 5 ssue each histogra follows a Poisson distribution probability P to observe any given instance of distribution P[{ }] =! i πi π π π P[{ 3,, 3}] =! 3 the variance for each bin is i i! =.5Q = 48Q = Q = 3!!! = 5 = 48 pi Instance σ = i = πi i u u u3
7 Variance in stiate of Forula for estiate of est Variance β = + est β,, we Q we Q β β = we Q + we Q σ σ σ,, β ( π, ) ( π, ) β = we Q + we Q β e β e = we Q we Q Q + Q β β = + w e Q w e Q e π ( ) =( ) Q ( β )
Optiizing Weights 8 Variance β β σ = + est iniize with respect to weight, subject to noralization In-class Proble 5 Do it! w e Q w e Q
Optiizing Weights 9 Variance iniize with respect to weight, subject to noralization Lagrange ultiplier in σ quation for each weight is Rearrange β β σ = + est w e Q w e Q est λ ( wa ) a e w a = λ Q a a a a a Q w e β = λ a e π ( ) =( ) i Q ( β ) Noralize w a = a e a / Qa e e + Q Q
Optial stiate Collect results est w a = β = +,, we Q we Q a e a / Qa e e + Q Q β Cobine e e e e Q Q Q e Q e Q Q est = + +, β β, e e = + + Q Q,,
Forula for Calculating est e e Q Q,, = + + In-class Proble 6 explain why this forula cannot yet be used
Forula for Calculating We do not know the Q partition functions a One equation for each ach equation depends on all Requires iterative solution est e e Q Q,, = + + β β β Q = e + e + e a a a est,, + + + + e e e e e e e e = + +
In-class Proble 7 3 Write the equations for each using the exaple values est,, + + + + e e e e e e e e = + + β =.5 β = = 4 = 46 = 5 = 5 = 48 = = = ln =.3 = ln = 9. = ln = =
In-class Proble 7 4 Write the equations for each using the exaple values est,, + + + + β =.5 β = = 4 = 46 = 5 Solution = 5 = 48 = = = ln =.3 = ln = 9. = ln [ 4 5] est = + + +. +. +. +. [ 46 48] est.. = + + +. +. +. +. [ 5 ] est.. = + + +. +. +. +. e e e e e e e e = + + = 94.7 = 943. = =
In-class Proble 7. 5 Solution (?) Copare = 94.7 = 943..5 5 5.4Q.4Q xact solution 4.6Q 5Q β = = = = = 48Q Q β = = = = = 96 4.5Q.5Q β =.5 = 4 = 46 = 5 β = = 5 = 48 = = = Free energy difference Q Q +. +. = = 9.74 +. +. Design value =
6 xtensions of Technique ethod is usually used in ultidiensional for Useful to apply to grand-canonical enseble Ξ= N βµ N N N r p 3N h N! = ( UV,, Ne ) N e d d e U βµ N Can then be used to relate siulation data at different teperature and cheical potential any other variations are possible e