Multi-Ensemble Markov Models and TRAM. Fabian Paul 21-Feb-2018

Similar documents
Advanced sampling. fluids of strongly orientation-dependent interactions (e.g., dipoles, hydrogen bonds)

Free energy simulations

arxiv: v2 [stat.ml] 22 Jan 2017

Replica exchange methodology. John Karanicolas June 2003

Lecture 14: Advanced Conformational Sampling

Application of the Markov State Model to Molecular Dynamics of Biological Molecules. Speaker: Xun Sang-Ni Supervisor: Prof. Wu Dr.

Computing free energy: Thermodynamic perturbation and beyond

Energy Landscapes and Accelerated Molecular- Dynamical Techniques for the Study of Protein Folding

Monte Carlo. Lecture 15 4/9/18. Harvard SEAS AP 275 Atomistic Modeling of Materials Boris Kozinsky

Alchemical free energy calculations in OpenMM

Computing free energy: Replica exchange

Modeling the Free Energy Landscape for Janus Particle Self-Assembly in the Gas Phase. Andy Long Kridsanaphong Limtragool

Exploring the energy landscape

Characterizing Structural Transitions of Membrane Transport Proteins at Atomic Detail Mahmoud Moradi

Biomolecular modeling. Theoretical Chemistry, TU Braunschweig (Dated: December 10, 2010)

Sampling the free energy surfaces of collective variables

Multicanonical parallel tempering

Monte Carlo (MC) Simulation Methods. Elisa Fadda

MD Thermodynamics. Lecture 12 3/26/18. Harvard SEAS AP 275 Atomistic Modeling of Materials Boris Kozinsky

Biology Chemistry & Physics of Biomolecules. Examination #1. Proteins Module. September 29, Answer Key

Parametric Models. Dr. Shuang LIANG. School of Software Engineering TongJi University Fall, 2012

The Monte Carlo Algorithm

Multiple time step Monte Carlo

3.320: Lecture 19 (4/14/05) Free Energies and physical Coarse-graining. ,T) + < σ > dµ

Basics of Statistical Mechanics

Random Walks A&T and F&S 3.1.2

Phase Equilibria and Molecular Solutions Jan G. Korvink and Evgenii Rudnyi IMTEK Albert Ludwig University Freiburg, Germany

Overview of Weighted Ensemble Simulation: Path-sampling, Steady States, Equilibrium Daniel M. Zuckerman, Oregon Health & Science University

ICCP Project 2 - Advanced Monte Carlo Methods Choose one of the three options below

Bayesian reconstruction of free energy profiles from umbrella samples

Physics 403. Segev BenZvi. Numerical Methods, Maximum Likelihood, and Least Squares. Department of Physics and Astronomy University of Rochester

Limitations of temperature replica exchange (T-REMD) for protein folding simulations

Free energy calculations and the potential of mean force

Lecture V: Multicanonical Simulations.

Free energy, electrostatics, and the hydrophobic effect

Generalized Ensembles: Multicanonical Simulations

Free energy calculations using molecular dynamics simulations. Anna Johansson

Learning Sequence Motif Models Using Expectation Maximization (EM) and Gibbs Sampling

w REXAMD: A Hamiltonian Replica Exchange Approach to Improve Free Energy Calculations for Systems with Kinetically Trapped Conformations

Finding slow modes and accessing very long timescales in molecular dynamics. Frank Noé (FU Berlin)

The Potential Energy Surface (PES) Preamble to the Basic Force Field Chem 4021/8021 Video II.i

André Schleife Department of Materials Science and Engineering

Advanced Monte Carlo Methods Problems

A new combination of replica exchange Monte Carlo and histogram analysis for protein folding and thermodynamics

Molecular dynamics simulation. CS/CME/BioE/Biophys/BMI 279 Oct. 5 and 10, 2017 Ron Dror

Computational Studies of the Photoreceptor Rhodopsin. Scott E. Feller Wabash College

Lecture 8: Computer Simulations of Generalized Ensembles

Neural Networks for Machine Learning. Lecture 11a Hopfield Nets

Can a continuum solvent model reproduce the free energy landscape of a β-hairpin folding in water?

Computer simulation methods (1) Dr. Vania Calandrini

Understanding Molecular Simulation 2009 Monte Carlo and Molecular Dynamics in different ensembles. Srikanth Sastry

CSC 2541: Bayesian Methods for Machine Learning

Markov Chain Monte Carlo Simulations and Their Statistical Analysis An Overview

17 : Markov Chain Monte Carlo

Introduction to Bayesian Statistics and Markov Chain Monte Carlo Estimation. EPSY 905: Multivariate Analysis Spring 2016 Lecture #10: April 6, 2016

Lecture 4: Types of errors. Bayesian regression models. Logistic regression

Chapter 3: Maximum-Likelihood & Bayesian Parameter Estimation (part 1)

A Bayesian Approach to Phylogenetics

Classical Monte-Carlo simulations

Coarse Graining in Conformational Space. Feliks Nüske and Cecilia Clementi Rice University Sep 14, 2017

Choosing weights for simulated tempering

3.320 Lecture 23 (5/3/05)

Gaussian discriminant analysis Naive Bayes

Markov Chain Monte Carlo Method

Undirected Graphical Models

Molecular Interactions F14NMI. Lecture 4: worked answers to practice questions

FIRST PASSAGE TIMES AND RELAXATION TIMES OF UNFOLDED PROTEINS AND THE FUNNEL MODEL OF PROTEIN FOLDING

Optimized statistical ensembles for slowly equilibrating classical and quantum systems

Convergence of replica exchange molecular dynamics

Gibbs Sampling Methods for Multiple Sequence Alignment

Mathematical Structures of Statistical Mechanics: from equilibrium to nonequilibrium and beyond Hao Ge

Machine Learning Lecture 7

Using Spectral Clustering to Sample Molecular States and Pathways

Probabilistic modeling. The slides are closely adapted from Subhransu Maji s slides

Free energy calculations

MS&E 226: Small Data. Lecture 11: Maximum likelihood (v2) Ramesh Johari

UNIVERSITY OF OSLO FACULTY OF MATHEMATICS AND NATURAL SCIENCES

Design and Implementation of Speech Recognition Systems

Supplementary Figures:

STA 4273H: Statistical Machine Learning

Sequence labeling. Taking collective a set of interrelated instances x 1,, x T and jointly labeling them

Some Accelerated/Enhanced Sampling Techniques

Equilibrium Molecular Thermodynamics from Kirkwood Sampling

Data Analysis I. Dr Martin Hendry, Dept of Physics and Astronomy University of Glasgow, UK. 10 lectures, beginning October 2006

6.730 Physics for Solid State Applications

Markov State Modeling of Binding and Conformational Changes of Proteins

Computational Physics (6810): Session 13

Density Functional Theory: from theory to Applications


(# = %(& )(* +,(- Closed system, well-defined energy (or e.g. E± E/2): Microcanonical ensemble

Equilibrium Molecular Thermodynamics from Kirkwood Sampling

Supporting Information. RNA hairpin

Bayesian Classifiers and Probability Estimation. Vassilis Athitsos CSE 4308/5360: Artificial Intelligence I University of Texas at Arlington

Thermodynamics. Entropy and its Applications. Lecture 11. NC State University

Free energy recovery in single molecule experiments

Effective stochastic dynamics on a protein folding energy landscape

Statistical learning. Chapter 20, Sections 1 4 1

Multicanonical methods

UC Berkeley. Chem 130A. Spring nd Exam. March 10, 2004 Instructor: John Kuriyan

Why study protein dynamics?

Transcription:

Multi-Ensemble Markov Models and TRAM Fabian Paul 21-Feb-2018

Outline Free energies Simulation types Boltzmann reweighting Umbrella sampling multi-temperature simulation accelerated MD Analysis methods Weighted Histogram Analysis method + its problems Multi Ensemble Markov Models and discrete TRAM

Free energy: definition and use By free energies we mean : A) " # $ times the logarithm of probabilities of different conformational states within one thermodynamic ensemble >(bound) = C DEFGH (6)% &'3(4) d6 % &'3(4) d6 B) " # $ times the log of ratios of partition functions from different thermodynamic ensembles % &' ( ) ( *' (,) ) (,) = /(0) / (1) = % &'(()3(()(4) d6 % &'(,) 3 (,) (4) d6 Uses: calculating entropy 7 = 9) 9: ;,= or relative binding / solvation free energy C DEFGH = 1 C DEFGH = 0

Boltzmann reweighting / importance sampling Some systems have an interesting but improbable state or states that are separated by a high barrier. How can we investigate such states?! (&) biased Expectation values in ensemble (0) are computed as: ' (#) = ) ' % * +,-. / 0,1 (.) d% 1 5 6 '(% 7 ) 7 8! (#) physical where 9 7 ; (#) 9 ' (#) = ) ' % * +,- < / 0,1 (<) * +,-. / 0,1 (.) d% * +,- < / 0,1 (<) & 8 6 7 8 '(% 7 )* +,-. / 0,- < (/)0,1. +,1 < % where 9 7 ; (&) 9! # % = the unbiased or the physical energy! & % = the biased energy &! =>?@ % =! & %! # % = the bias energy

Boltzmann reweighting / importance sampling! " # = the unbiased or the physical energy! $ # = the biased energy $! %&'( # =! $ #! " # = the bias energy What is the optimal bias? For a low-dimensional system, it would be efficient to sample from a flat energy landscape:! ($) # = 0 Allows good sampling of the minima and the barrier. ($)! %&'((#) =! (") (#)

Importance sampling in high dimensions Sampling uniformly is not possible in high dimensional space like the conformational space.

Importance sampling in high dimensions Introduce an order parameter that connects the relevant minima in the energy landscape. order parameter or reaction coordinate

Importance sampling in high dimensions Sample uniformly along the order parameter.! " % & "(() " +,-.(/) d( 1 2 3 log! " order parameter or reaction coordinate

Importance sampling in high dimensions The ideal bias energy would be! " # log ' ( (minus the potential of mean force) Problem: computing ' ( requires sampling from the unbiased distribution! ' ( +, ((.) ( 1 234(5) d. 7 8 # log ' ( order parameter or reaction coordinate

Umbrella sampling The ideal bias energy would be * >? log, C Problem: computing, C requires sampling from the unbiased distribution! Instead of simulating with the ideal bias * > D log, C, we select a suboptimal but flexible form of the bias. umbrella sampling Use E different bias potentials that jointly allow uniform sampling. biased potentials bias potentials probability distributions (*) (*)! " # +! %&'((#)!%&'((#),%&'(-. # 0 12[4 5 (<) 6 74 89:; (6)]

Multi temperature simulation Multi-temperature simulations is another way of approximately producing a flat biased distribution. biased potentials bias potentials probability distributions! (#)! (%) &(') (! (#) )! (%)! (%) & (') (() * +,-./0 ( 2 )!(#) 3 (%) 4 Idea has to taken with a grain of salt: order parameter and the minima that it connects are assumed to stay the same for all temperatures.

A bit of notation Introduce dimension-less bias! " # % " & " # % ( & ( # by picking the ensemble 0 as the reference ensemble. Assume that the energies in the reference ensemble are shifted, such that its Boltzmann distribution is normalized % (() + (() = 0. Introduce the log partition function. (") = % (") + (") Then the reweighting factors become / 01 2 3 2 4 51 6 3 6 4 51 2 7 2 01 6 7 6 = / 08 2 59 (2)

WHAM Weighted Histogram Analysis Method The MD simulation gives us realizations or samples. How do we find probabilities? p A 9 Discretize the order parameter into a number of bins. For every individual bin, we can do Boltzmann reweighting between ensembles.! " ($) = ' ( )*+[-. / (()] 1 (/) 2 ($) = "! " exp[ 8 $ (9)] where we have assumed that bias energy is constant over each bin. But how to we find! "? ($) ($) Optimize likelihood: : ;<=> (! " ) = $ "! @ (/) ( " (see next slide)

Maximum likelihood estimation Start from basic definition of conditional probability:!" data, model =!" data model!" model =!" model data!"(data) max 23456? posterior!" model data =!"(data model) 01(23456) 01(4787) Because we don t know better:!" model = 9:;<= Compute: likelihood L max!"(data model) 23456? prior

Likelihood for WHAM (+) Likelihood:! >?@A = +, # 8 (:) 9, Example: set of samples 1,2,3,3,2 form simulation with umbrella 1 FG 1,2,3,3,2 = # $ $ # H $ # I $ # I $ # H $ = # $ $ $ # H $ H # I $ H All simulations and all samples are statistically independent. Inserting the Boltzmann reweighting relation into! >?@A gives:!(# $,, # ' ) = * * +, #, exp[ 2 + (3)] 6 # 6 exp[ 2 + (7)] 8 9 (:) with the data ;, (+), exp[ 2 + (3)] and the model parameters #,. Note: can make bins so small s. t. they contain only one <. 3 <.

WHAM workflow Bin definitions and counts 7 % ($) bias potential values, $ (8) probabilistic model:! = # # $ % & % exp[, $ (.)] 2 & 2 exp[, $ (3)] optimize model parameters & 4 5 (6) stationary probabilities (thermodynamics)

Computing the bias energies A closer look on the anatomy of! " ($):! " & ($) & in general multiple simulation runs (independent trajectories) value of the bias energy of a conformation for every conformation evaluated in all ensembles not only in the ensemble in which $ was generated This is 3-D data structure. Since the trajectories might have different lengths this is a jagged/ragged array and not a tensor. In PyEmma it s a list of 2-D numpy arrays: btrajs = [ np.array([[0.0,...], [1.2,...]]), np.array([[0.0,...], [4.2,...]]),... ]

Computing the bias energies Example: Umbrella sampling All temperatures are the same! (#) =! = 1/( ) * = 1/(0.00198 kcal/mol K 300 8) The bias is a quadratic function of an order parameter 9 : ; # : = 1 2 = # (#) 9(:) 9?@AB@C with the spring constants = # (#) and rest positions 9?@AB@C. D

Computing the bias energies Working with saved (pre-computed) order parameters:

NOT computing the bias energies order parameter trajectories

Pyemma example

Combining free energy calculations with MSMs: Multi Ensemble Markov Models

Problems of Umbrella sampling: slow orthogonal degrees of freedom p(x) Remember the WHAM likelihood:! "#$% = ' ' ( ) (() * - (/). ) Second product means that samples are drawn from the equilibrium distribution * ) (().

Problems of Umbrella sampling: slow orthogonal degrees of freedom p(x) In the energy landscape above, motion along! " can be highly autocorrelated. So the assumption of independent samples may be wrong. systematic error Since we know that MSMs can be used to compute free energies reliably form correlated data, can t we just somehow build an MSM along! "?

MEMM Multi Ensemble Markov Model! "# $ (')! '' (')! '+ (')! +' (.)! '' (')! '' (.)! '+ (.)! +' (/)! '' (.)! '' (/)! '+ (/)! +' (/)! '' index k = number of the Umbrella potential = number of temperature in multi-temperature simulations indices i,j = number of the discrete Markov state, i.e. bin number along % & or any other sensible state discretization 2 2 example: (2) Ensemble 2 π 1 Ensemble 1 (1) π 1 (2) T 12 (2) T 21 (1) T 12 (1) T 21 π π (2) 2 (1) 2

MEMM Multi Ensemble Markov Model : "; $ How the individual MSMs in the MEMM are coupled together? - Part 1 of the answer: Boltzmann reweighting of stationary distributions (like in WHAM)! " ($) = ' ( )*+[-. / (()] 1 (/) 2 ($) = "! " exp[ 8 $ (9)] - Part 2 of the answer:! " ($) is the stationary distribution of :"; ($). We even require a stronger condition that < ($) is reversible with respect to = ($).! " ($) :"; ($) =!; ($) :;" ($) (2) π 1 (1) π 1 (2) T 12 (2) T 21 (1) T 12 (1) T 21 π π (2) 2 (1) 2 reversibility = detailed balance Pr(@(A + C) = 9 DEF @(A) = G) = Pr(@(A + C) = G DEF @(A) = 9)

(d)tram (discrete) Transition-based Reweighting Analysis Method How is the MEMM estimated? Reminder - estimation of MEMs: ) Likelihood for an MSM:! "#" = & *+ ' ( &' Consider example trajectory (1 2 2 1 2) Pr 1 2 2 1 2 = Pr 1 ( 23 ( 33 ( 32 ( 23 ( 22 5 ( 23 3 ( 33 2 ( 32 2 = ( 22 ) 66 ( 23 ) 67 ( 33 ) 77 ( 32 ) 76 3 = 8 &92 3 8 '92 ( &' ) *+

(d)tram (discrete) Transition-based Reweighting Analysis Method How is the MEMM estimated? Basically an MEMM is just a collection of MSMs. Inserting gives:! "#"" (% &,, % ) ) =,! "." (% - )! "#"" =,,, Maximize! "#"" under the constraints: - / 0 - - 1 2 (5) 34 /0 6 / (-) 1/0 (-) = 60 (-) 10/ (-) 0 1 /0 (-) = 1 6 / (-) = 9 3 :;<[>? 5 (/)] 4 9 4 :;<[>? 5 (0)] 1 /0 (-) 0

(d)tram: workflow Markov states and transition counts 8 %& ($) bias potential values 4 $ (9) probabilistic model:! = # # # $ % & $ ' ( (,) )* %&. % exp[ 4 $ (5)] ' %& ($) =.& exp[ 4 $ (7)] ' &% ($) Optimize model parameters. and '. stationary probabilities (thermodynamics). % kinetic probabilities (rates) ' %& ($)

Advantages of using (d)tram Better estimation of free energies along the unbiased orthogonal degrees of freedom. There is no initial equilibration transient where the simulation have to relax to global equilibrium. Smaller de-correlation time (simulation time until one gets a new uncorrelated frame). More efficient usage of the data.

Advantages of using (d)tram rare event state 2 state 1! "# is a small number, hard to simulate.! #" can be estimated easily from direct simulation. $ %! %& = $ &! &% If we know! #" and $ # /$ ", we don t have to simulate the uphill 1 2 transition.

Real-world applications

Application 1: Trypsin-Benzamidine

Application 2: PMI-Mdm2

Further reading Wu, Mey, Rosta, Noé: Statistically optimal analysis of state-discretized trajectory data from multiple thermodynamic states, J. Chem. Phys. 141, 214106 (2014) Wu, Paul, Wehmeyer, Noé: Multiensemble Markov models of molecular thermodynamics and kinetics, PNAS 113, E3221 E3230 (2016) Paul et al. Protein-peptide association kinetics beyond the seconds timescale from atomistic simulations Nat. Commun., 8, 1095 (2017)

TRAM: strategies for enhanced sampling of kinetics Model system:

TRAM: strategies for enhanced sampling of kinetics!" MFPT

What is valid input data for TRAM?

Overlap in (d)tram Jo et al, J. Phys. Chem. B 120 8733 (2016) Rosta et al, J. Comput. Chem. 30, 1634 (2009)

Overlap in (d)tram Jo et al, J. Phys. Chem. B 120 8733 (2016) Rosta et al, J. Comput. Chem. 30, 1634 (2009)

Overlap of biased distributions Biased distributions have to overlap! Diagnostics: - - ; < = - - ; > (=) exp[ E; < (=)] exp[ E; > (=)] Post-hoc replica exchange: How many exchanges would have been accepted if the simulation had been carried out with replica exchange between ensembles? How does this number compare to the number of simulated samples? score = ' + ) 1 ' ) + 6 789 /, 6 789 1 0 + min 1, 1 6 789 / 0 6 789 1,,. / 0. 1 error of the free energies estimated by (M)BAR (equation from [1]). Alternative way to relate the overlap of distributions to the number of samples. [1] Shirts and Chodera, Statistically optimal analysis of samples from multiple equilibrium states, J. Chem. Phys. 129, 124105 (2008) =

What is replica exchange? D (7) E (7) : D (3) E (3) : sample from generalized ensemble : e*+(-) / (-) (0 1 ) e*+(5)/(5)(06) e*+(8)/(8)(08)! " #, " %,, " ' = 2 (3) 2 (7) 2 (9) accept exchanges with Metropolis criterion! :;;<=> = min 1, e*+(5) / (5) (0 C ) e *+(C) / (C) (0 5 ) e *+(5) / (5) (0 5 ) e *+(C) / (C) (0 C ) with labels updated after an accepted exchange. Fukunishi and Watanabe, J. Chem. Phys. 116, 9058 (2002)

Overlap in (d)tram ensembles enough local overlap between biased probability distributions reversible transitions between Markov states Markov states Much of this is based on empirical evidence from numerical examples.

summary We have introduced the TRAM method which combines Boltzmann reweighting and Markov state models. It replace the histogram-based analysis methods with transition-based methods. TRAM allows to combine free-energy calculation (for which we have many tools) with direct MD simulation of the downhill processes (which are easy) to obtain an optimal estimate of the full unbiased kinetics.

Further reading Wu, Mey, Rosta, Noé: Statistically optimal analysis of state-discretized trajectory data from multiple thermodynamic states, J. Chem. Phys. 141 214106 (2014) Wu, Paul, Wehmeyer, Noé: Multiensemble Markov models of molecular thermodynamics and kinetics, PNAS E3221 E3230 (2016)

TRAM: Boltzmann reweighting % & = ( % # ) & # d# 1 -. %(# / ) / 0 importance sampling % & = ( % # ) 1 # )& # ) 1 # d#!(#)! 2! ; in chemistry 0 2 0. / %(# / ) )& # / ) 1 # / ) & # = 3 456 748 6 (9)! : #

TRAM: combining normal MD with biased MD Markov states and transition counts bias potential values probabilistic model:! = # $,&,' ' ( ) *+, $& # # '. 0, 1 23, (.) 6 7 ' 8 9(.) 8 $ ' ( $& ' = 8 & ' ( &$ ' optimize model parameters ( and 6 (and z[6]) stationary probabilities (thermodynamics) kinetic probabilities (rates)

WHAM derivation ()) ()) log $ = & * ' log -' ',) (1) ()). = & * ' log / 0 / (1) ',) 3. 3 0 3 ()) ()) ()) = & * ' log -' 4 ' & * ' log & ',) ',) 6-6 4 6 ()) ()) ()) = & * ' log -' 4 ' & * ()) ()) log & - 6 4 6 ',) ) 6 7$ (1) 9 = : (1) 7-8 &). : 0 0 (1) 9 : & 1 1 0 : = 0 1 : ) 3. 3 0 3 < & 9 (1). : = & : ) ) - 8 = * 8 ) 9 1 0 : 1 3. 3 0 3 1 9 1 0 : 1 3. 3 0 3 1

(d)tram: solution update equations:! " #$% = (*) (,* + (" 4 0 (2) 51 (2) 2 2 / 01 3/10.,( (2) (2) (2) (2) 4 60 0 5 341 61 1 5 0 transition matrix: 7 " *,#$% = 7 " (*) 8 ( + "( * + + (" * : ( (*)!( : " (*)!" 7 ( (*) + :( (*)!( 7 " (*) + * * (*) (*) "( + + (" : (!( ; "( = (*) (*) (*) (*) : "!" 7 ( + :(!( 7 "