molecular dynamics lecture 3 - ergodic.org.ukbl/data/slides/wias/l3.pdf · example 4: active matter...
Post on 09-Sep-2020
2 Views
Preview:
TRANSCRIPT
Molecular Dynamics Lecture 3
motivation - biology, data sciencenonequilibrium examples
thermostatscontrol of nonequilibrium systems
Adaptive Brownian dynamics
Ben Leimkuhler
Spring School, WIAS, Berlin 2017
Examples of nonequilibrium problems
Example 1: Sheared Polymer Meltspolymer brush melt
Chains of “dpd particles” to model the polymers.
In a typical approach, periodic boundary conditions are replaced by Lees-Edwards (sliding) BCs
(alternatives also lead to nongradient perturbations)
Problem - extract e.g. shearviscosity of polymer systemfrom simulation.
similar: blood flow under shear
Example 2: Thermal Conductivity
T1 T2
1. Apply two different temperatures
2. Estimate heat conduction from Fourier’s Law
Example 3: Brownian Dynamics
x = �µrU(x) +p2D⌘(t)
Suppose the noise enters via some process (e.g. as part of a hybrid model, error, etc.) and we do not know D.
Or perhaps it changes with time…
Can we automatically parameterize BD?
Example 4: Active Matter
Vicsek Model (1995)
✓i(t+�t) = h✓jikxi�xjk<� + ⌘i
xi(t+�t) = xi + v�t(cos ✓i, sin ✓i)
a simple model for ‘flocking’ and ‘swarming’ behavior in animals
Also a model for “emergence”
low particle density, high noise amplitude -> disordered high density, low noise -> ordered phase.
How to control/parameterize the steady states?
An SDE system for Flocking
In order to apply kinetic theory, the following alternative flocking model was developed*
*Self-Propelled Particles with Soft-Core Interactions: Patterns, Stability, and Collapse M. R. D’Orsogna, Y. L. Chuang, A. L. Bertozzi, and L. S. Chayes, PRL, 2006
conservative forceThe “active” component…a governor
states described as ring-like, ring clumping, ball states…
xi = vi
vi = (↵� �|vi|2)vi �rU(x1,x2, . . . ,xN )
“continuous Vicsek”
Example 5: QM/MM ModellingLetif Mones, Andrew Jones, Andreas W. Götz, Teodoro Laino, Ross C. Walker, Ben Leimkuhler, Gábor Csányi, Noam Bernstein, J. Comput. Chem., 2013
• QM +MM regions, adaptively adjusted • “Buffered force-mixing” • implementation in CP2K and Amber
Problem: Force Mismatch at the Boundary between QM/MM regionsleads to differential heating
Example 6: Noisy Gradients
Posterior probability density (from Bayes’ Theorem):
p(q|X) / exp(�U(q)), U(q) = �log p(X|q)� log p(q)
Understand choice of parameters q given observations X
Use Maximum Likelihood Estimate/“Subsampling”:
N << Nlog p(X|q) ⇡ N
˜
N
NX
i=1
log p(xi|q)
X = {x1, x2, . . . xN}
p(X|q)p(q) = p(q|X)model prior
Simplest Approach
What to do about the force error?
Thermostats
Thermostat Methods
The key idea in tackling many nonequilibrium problems is to design thermostat schemes that provide total or partial control of the statistical equilibrium state.
We interpret the term ‘thermostat’ in the widest possible sense - it is a method to constrain a distribution, an observable or a set of observables in simulation.
Langevin dynamics is a thermostat which modifies a Hamiltonian system to preserve the corresponding canonical distribution.
GovernorsRecall the concept of a governor as a mechanism which regulates the output of a steam engine to maintain a certain range of velocities
We already saw a mathematical version of this in the flocking model
Where I learned about Nosé Dynamics
Sir Henry Peter Francis Swinnerton-Dyer, 16th Baronet KBE FRSNumber Theorist, Student of Littlewood, Polya and Sylvester PrizeholderVice-Chancellor of Cambridge University 1973-83
Seminar, Cambridge University 1997: Nosé Dynamics
q = p
p = �rU(q)� ⇠p
⇠ = p2 � kT
Nosé-Hoover
Therefore NH preserves an extended Gibbs distribution
Problems with the Gibbs Governor
It’s not the Gibbs Governor. This is:
Undergraduate research project of Josiah Willard Gibbs
It doesn’t actually work. (not ergodic)
µ = 2µ = 1
µ = 1/2 µ = 4All Wrong!
Nosé-Hoover Dynamics for Harmonic Oscillator
Stochastic version: Nosé-Hoover-Langevin dynamics
‘Histograms’
matches theoretical behavior
q = p
p = �rU(q)� ⇠p
⇠ = p2 � kT � �⇠ + �⌘(t) scalar OU process
Ergodicity of NHL
NHL is clearly compatible with an extended Gibbs distribution meaning that
L†NHL[⇢�e
��⇠2/2] = 0
We can also prove it is geometrically ergodic by using similar theory to that developed for Langevin dynamics.
[L., Noorizadeh, Theil 2009]
It is also a “gentle thermostat” and can be used to calculate autocorrelation functions/diffusion constants, etc.
“Gentle” property of NH/NHLWe can show that NHL is a “gentle” thermostat: dynamical properties are mildly perturbed for a given rate of convergence of kinetic energy. [L., Noorizadeh and Penrose, J. Stat. Phys., 2011]
Similar (but less smooth) for “Stochastic Velocity Rescaling” of G. Bussi, D. Donadio and M. Parinello
0.1 0.004
Langevin NHL
VAF ErrorVAF Error
Autocorrelation functions (LJ System)
Temperature gradientsand NEMD simulation using Nosé-Hoover
[NONEQUILIBRIUM MOLECULAR DYNAMICS METHODS FOR LATTICE HEAT CONDUCTION CALCULATIONS Junichiro Shiomi, Ann. Rev. Heat Transfer, 2014]
Theoretical Methods for Calculating the Lattice Thermal Conductivity of Minerals, Reviews in Mineralogy & Geochemistry Vol. 71 pp. 253-269, 2010
Adaptive Thermostatsfor Noisy Gradients
GradientSystem
Noise Perturbation
Negative Feedback
Control
Adaptive Thermostats
Use negative feedback loop control to stabilize the system againstforce perturbation (even unknown)
Jones & L., J. Chem. Phys., 2011
Assume
and also, for simplicity,
Like discretizing a stochastic differential equation with an added variance in the Wiener increment…
The Adaptive Property
Applying Nosé-Hoover Dynamics to a system which is driven by white noise restores the canonical distribution.
Adaptive (Automatic) Langevin
Shift in auxiliary variable by
Jones & L. 2011
SGNHT
2014 NIPS
Dear Bob….
A victim of google!
Adaptive Langevin Thermostat
noise due to force error
additional driving noise
boxed term must be taken as a unit
ergodicity by Hörmander, etc.
L. & Shang, SIAM J. Sci Comp. 2016
Discretization
�2F = �2�t
Numerical Analysis
large thermal mass limit
BADODAB
Under strong driving
superconvergenceRole of thermal mass
Simulations - clean gradient
f: logistic function
data e.g. voting intention
covariates e.g. age, income, …
posterior parameter distribution
Bayesian Logistic Regression
Gaussian prior
Our Method
revenge of the nerd
MNIST Binary Classification 7 or 9Logistic Regression with 100 parameters
Shang, Zhu, Leimkuhler, Storkey, NIPS, 2015 CCAdL (covariance controlled adaptive Langevin)
Adaptive First Order Dynamics
A natural question is whether we can find an adaptive thermostat for 1st order dynamics. That is, can we choose a noise strength and automatically adjust the mobility in BD to give a prescribed target temperature?
This is non-obvious since we no longer have access to the kinetic energy as a measure of the temperature of the system.
The trick is to use a “configurational temperature”to control the system, e.g.
��1 = �hkF k2ihr · F i F = �rU
L., Sachs and Danos 2017
dx
dt= ⇠F (x) + ⌘(t),
d⇠
dt= ��1
⇥kF k2 � ��1r · F
⇤
a. this actually works b. you need to know the conservative force to make use of it, so it is not so useful for e.g. noisy gradients c. It is possible to simplify the control law, but important to ensure a nonvanishing divergence d. It cannot be combined with NHL-like stochastic perturbation and convergence is potentially slow.
Adaptive First Order Dynamics
Adaptive Noise Thermostatting
Side question: suppose we actually know the mobility… can we automatically parameterize the stochastic perturbation in order to give canonical sampling for a target temperature?
And the answer is…Yes! dx
dt= F (x) +
p2�|⇣|⌘(t),
d⇣
dt= �⇣
⇥kF k2 � ��1r · F
⇤� �⇣ +
p2���1⌘(t)
a. This actually works b. You need to know the conservative force c. Need nonvanishing divergence d. [conjecture] geometrically ergodic
L., Sachs and Danos 2017
-4 -2 0 2 4x
0
0.2
0.4
0.6
0.8
1
-4 -2 0 2 4x
0
0.2
0.4
0.6
0.8
1
-4 -2 0 2 4x
0
0.2
0.4
0.6
0.8
1
Adaptive Noise Thermostattingfor an equilibrium (double well) model
2x105 steps 4x105 steps 106 steps
xn+1 = xn + hF (xn) +p
2hm⇣ |⇣n|Rn,
Z = ⇣n exp���h
⇥kF (xn+1)k2 � �
�1r · F (xn+1)⇤�
,
⇣n+1 = cZ +
q(1� c
2)/m⇣Sn,
Pairwise Adaptive Thermostats
Dissipative Particle Dynamics
• Similar to thermostatted MD: Newton’s equations +…
• Simplified potential energy functions, often ad-hoc but sometimes derived by systematic coarse-graining of MD
• Always involves a thermostat.
• Variants: DPD-e, QDPD, tDPD,cDPD, aDPF, sDPD, mDPD, eDPD…
Dissipative Particle Dynamics
[1] P. Hoogerbrugge and J. Koelman. Simulating microscopic hydrodynamic phenomenawith dissipative particle dynamics. Europhysics Letters, 19(3):155, 1992.[2] P. Espanol and P. Warren. Statistical mechanics of dissipative particle dynamics.Europhysics Letters, 30(4):191, 1995.
Fluctuation-dissipation:
Momentum-conserving Langevin dynamics
Ergodicity: System has a unique smooth distribution which is a universal attractor. For an ergodic system, memory of initial conditions is eventually lost, and any path can be used to calculate averages.
Open Question: Is DPD ergodic? Only proof is for a 1D system with high particle density (Shardlow and Yan)
More general answer: Probably not!
Simulation study of Pastorino et al 2007: Appears to contradict ergodicity in case of soft DPD potentials and reduced interactions.
Ergodicity of Dissipative Particle Dynamics
DPD alternatives
Lowe-Andersen: Allows control of the Schmidtnumber = ratio of kinematic viscosity to diffusion constant
Momenta are updated according to conservative forces.
Subsequently, each pair is (with fixed probability) updated with an added random kick.
Peters: All particles perform a random step after conservative updating, with collision coefficient chosen to mimic the Lowe-Andersen collision rate.
Nosé-Hoover-Lowe-Andersen: Ad-hoc & does not reproduce the canonical ensemble.
OBAB (Shardlow)
Others: DPD-Trotter = A(B+O)A (Coveney et al)
Also Lowe-Anderson, NHLA, …
Integrators for DPD
Nose-Hoover-Like (+ “gentle noise”)
Pairwise NHL A gentle momentum-conserving thermostat
PNHL L. & Shang, JCP, 2015
kinetic energy control
A method or DPD at low friction or for NEMD with momentum conservation.
Splittings for PNHL
PNHL-S = ABCDODCBA
PNHL-N = ABCDODCAB not symmetric!
due to lack of symmetry, this method requires TWO force evaluations per timestep, instead of one.
All the schemes are convergent, giving the same RDFat small stepsize.
As the stepsize is increased, significant differencesappear among the different methods
500 DPD particles
1. Configurational Temperature (after Rugh 1989)
2. Velocity Autocorrelation Functions (averaged dynamics)
What to measure?
PNHL-N exhibits 2nd order convergence, but it is a non-symmetric method!
Observed 2nd Order Convergence for PNHL-N
2nd Order Convergence
Due to cancellations, PNHL-N leads to:
Invariant distribution:
For large , the aux variable plays no role.
2nd Order Convergence
Reduce the perturbation equation using the projection operator
Allowing to show:
Proposition: PNHL-N is 2nd order accurate for all observables of the form
PNHL Summary
Candidate method for NEMD (momentum conservation)
Useful in the low-friction DPD regime
Not suitable for high friction (i.e. typical DPD uses), nor for applications like sheared polymer melts
“Adaptive variant of DPD”
PAdL L. & Shang, JCP 2016
Adaptively parameterizes DPD, i.e. selects the right value of so that the fluctuation-dissipation relation is satisfied
Idea: apply this for non-equilibrium DPD simulation, viewing non-equilibrium forces as continual perturbation of conservative ones.
Pairwise Adaptive Langevin
Splitting for PAdL
PAdL-S = ABODOBA
Better than alternative orderings….
PAdLmimics
DPD VAFs
low friction
high friction
NEMD (Shear Flow)Kremer-Grest Melts: joint with Xiaocheng Shang and Martin Kröger
Lees-Edwards Boundary Conditions
Shear rates between 0.01 and 1 (above this bonds break)
Possible Application: e.g. Shear Banding simulation
M = 20 chains of length N = 30, density = 0.84. box size = 8.939 (unentangled).
CT Autocorrelation
DPD exhibits very slow convergence of ConfigurationalTemperature compared to Langevin or PAdL
Langevin PAdL
PAdL, like DPD, is essentially independent of friction
Orientational relaxation
Sheared (Nonequilibrium MD) Simulations
Irving-Kirkwood Stress Tensor
Applying adaptive thermostats to active matter
In this section a mathematical model will be described. This model will be a simplification and an idealization, and consequently a falsification. It is to be hoped that the features retained for discussion are those of greatest importance in the present state of knowledge.
Alan TuringThe Chemical Basis of Morphogenesis, 1953
Limitations of Flocking Models
• Models such as that of D’Orsogna et al and a related model of Cucker and Smale (2007) are deterministic. This makes it difficult to talk intelligently about temperature or to prove anything about steady states.
The model of Vicsek is discrete and stochastic. Carillo et al (2009) added a stochastic term to the model of D’Orsogna et al.
• A more fundamental problem is that even in the case of the stochastic model of Carillo, the states and transitions of order parameters are difficult to control and the convergence to equilibrium is often very slow.
Direct Kinetic Controls
Vicsek models combine two concepts:
(1) the reliance on consensus or ‘group velocity’
(2) clumping tendencies
Our approach: build these controls directly into the model.
In this way we may drive the system rapidly into different states. Goal: more direct and immediate control of the state of the system, rapid equilibriation.
Features of our model
Customizable pair potential '(r) = crepr�4 � cattr
�2
Confinement potential 'c(r) = cconf
r�12
Optional Vicsek term (vi) = (a� b|vi|2)vi
Consensus thermostat
Peculiar thermostat
Tk, µk, �k
Cutoff
T?, µ?, �?
�
Two great features of MATLAB
1. It gives you ample time to think about what you are doing between runs. Good for actually understanding what is you are about.
2. It forces you to think about efficiency issues at an early stage, rather than sweeping them under the carpet, since even for small systems it is sooooo sloooow
r = v
mv = FC(r)� ⇣kKk(r)v � ⇣?K?(r)v
d⇣k = µ�1k
hvTKk(r)v � Tr(Kk)�
�1k
idt� �k⇣kdt+
q2�k�
�1k µ�1
k dWk
d⇣? = µ�1?
⇥vTK?(r)v � Tr(K?)�
�1?
⇤dt� �?⇣?dt+
q2�?�
�1? µ�1
? dW?
KE? =1
2
X
i
X
j2N�(i)
|vi � vj |2
KEk =1
2vTKk(r)v
=1
2
X
i
1
1 + " |N�(i)|vi ·
0
@vi + "X
j2N�(i)
vj
1
A
consensus KE
peculiar KE
N�(i) = {j|krj � rik �}
Adaptive Thermostat for flocking
-4 -2
-4
-2
0
2
4
420
sample configuration interaction graph
sparsity: 414/2500 nonzeros
Neighbor lists… Sparse matrices… CMEX interface…
Metastable States
In most simulations using the continuous Vicsek dynamics, one observes one of two phenomena
a. equipartition b. collapse
however, some very interesting situations arise where an intermediate state persists for ‘a long time’ prior to collapse…
Using the thermostat we can dial in such a metastable state and maintain it indefinitely.
Metastable state
dual thermostats
Movies
SummaryThe story so far…
Adaptive thermostats allow automatic parameterization of stochastic models.
This improves multiscale models and corrects for model mismatch/noisy gradients
In nonequilibrium applications, adaptive thermostats controls complex order parameters, and observables, even far from equilibrium, and may be used to steer a system towards a target NESS.
Finally there is so much to do that we have only scratched the surface in ergodic properties, numerical method development and in understanding the detailed properties.
top related