• No results found

Geometry optimisations, molecular dynamics and free energy simulations

Chapter  2.   Theoretical background

2.3   Geometry optimisations, molecular dynamics and free energy simulations

Geometry  optimisations  on  a  0  K  Born-­‐Oppenheimer  PES  are  probably  the  most   common  way  of  using  quantum  chemical  methods  to  model  molecular  behaviour.  The   nuclear  motion  is  ignored  and  critical  points  on  the  surface  are  located  by  calculating   the  atomic  forces  of  the  nuclei  (differentiation  of  the  total  energy  with  respect  to   atomic  coordinates)  and  searching  for  chemically  relevant  critical  points  which  are   either  minima  or  1st  order  saddle  points.  The  0  K  potential  energy  difference  between  

critical  points  can  be  regarded  as  an  excellent  approximation  to  conformational   energies,  reaction  energies  and  transition  states  of  reactions,  obtainable  from   experiments.  Corrections  for  the  lack  of  nuclear  motion  can  be  obtained  by  solving   approximations  to  Eq.  10,  e.g.  the  harmonic  approximation,  which  results  in  zero-­‐ point  energy  corrections  and  vibrational  frequencies  which  when  combined  with   approximations  for  rotational  and  translational  motion  from  statistical  mechanics,   yields  corrections  so  that  temperature-­‐dependent  enthalpies,  entropies  and  free   energies  can  be  calculated.    

 

However,  there  are  situations  where  the  dynamic  behaviour  of  the  nuclei  should  be   accounted  for  from  the  beginning.  Molecular  dynamics  simulations  involve  solving   Newton’s  equations  of  motion  for  the  classical  nuclei.  

 

Newton’s  second  law  relates  the  force,  mass  and  acceleration  of  particles:  F=ma   The  nuclear  forces  (and  masses)  of  a  molecule  can  thus  be  related  to  velocities  and   changes  of  nuclear  positions  according  to:  

 

(30)   Solving  Eq.  30  enables  one  to  calculate  how  the  nuclear  positions  change  as  a  function   of  time.  Assuming  a  molecule  with  an  initial  position  vector  ri  containing  all  atomic  

coordinates,  the  position  vector  a  timestep  later  can  be  given  by  a  Taylor  expansion:2  

    (31)   or  equivalently:     (32)   Different  algorithms  have  been  developed  to  conveniently  estimate  the  position   vector  a  timestep  later.  One  is  the  Verlet  algorithm:49  

 

 

(33)    

(34)   The  Verlet  algorithm  is  correct  to  third  order  (the  third  term  of  the  Taylor  expansion   cancels  out  in  the  derivation  of  the  algorithm)  and  easily  allows  the  prediction  of  the   next  position  using  the  information  of  the  current  and  previous  positions  and  the   calculated  forces.  The  accuracy  of  the  algorithm  is  controlled  by  choosing  smaller  and   smaller  timesteps.2  

 

A  problem  with  the  Verlet  algorithm  is  that  velocities  are  not  part  of  the  equations,   creating  difficulties  in  using  the  algorithm  to  generate  ensembles  at  constant   temperature  as  temperature  is  usually  maintained  by  modifying  the  velocities  of   particles.  

In  the  leapfrog  algorithm,  however,  velocities  appear  explicitly:2  

 

 

(35)    

(36)   Here  the  velocity  and  position  updates  are  out  of  phase  by  half  a  time  step.  This  

nevertheless  leads  to  very  accurate  trajectories  and  is  accurate  to  third  order  as  the   Verlet  algorithm  but  is  numerically  more  stable.  The  leapfrog  method  was  used  in  the   molecular  dynamics  simulations  in  this  work.  

 

Any  computational  method  (from  quantum  mechanics  or  molecular  mechanics)     can  be  used  to  evaluate  the  forces  in  the  Verlet  and  leapfrog  algorithms  and  hence  the   time-­‐dependent  behaviour  of  molecular  systems  can  be  studied  under  the  

assumption  that  the  classical  behaviour  of  the  nuclei  is  an  accurate  enough  

representation  of  their  real  quantum  nature.  This  assumption  is  generally  valid,  with   the  lightest  nucleus,  hydrogen,  being  a  borderline  case.  

 

Molecular  dynamics  simulations  generate  trajectories  of  an  ensemble,  the  most   straightforward  one  to  calculate  being  the  NVE  ensemble  which  corresponds  to  the  

a= dv dt = d2r dt2 = F m =− dE dr 1 m ri+1 =ri+ dr dt(∆t) + 1 2 d2r dt2(∆t) 2+ 1 6 d3r dt3(∆t) 3+... ri+1=ri+vi(∆t) + 1 2ai(∆t) 2+1 6bi(∆t) 3+... ri+1 = (2ri−ri−1) +ai(∆t)2 ai = Fi mi = 1 mi dE dri ri+1 =ri+vi+1 2(∆t) vi+1 2 =vi− 1 2 +ai(∆t)

particle  number,  volume  and  energy  being  constant  during  the  simulation.  As  the   energy  is  fixed,  although  kinetic  and  potential  energy  will  be  interconverted,  the   temperature  can  fluctuate  considerably  but  no  thermal  exchange  with  the  

environment  is  allowed  (in  fact  there  is  no  environment).  This  corresponds  well  to   the  experimental  situtation  of  a  molecule  in  a  vacuum.  In  condensed  phase  

experiments,  the  temperature  is  often  held  constant,  and  hence  the  corresponding   ensemble  to  use  in  simulations  is  usually  either  NVT  or  NPT  where  in  the  former  the   volume  and  temperature  are  constant,  while  in  the  latter  the  pressure  and  

temperature  are  constant.    

The  NVT  ensemble  (which  is  used  in  this  work)  is  also  called  the  canonical  ensemble.   In  order  to  make  the  temperature  constant,  the  simulated  system  is  usually  coupled   to  a  heat  bath,  or  thermostat.  The  Nosé-­‐Hoover  method50-­‐53  is  an  example  of  where  

the  thermostat  becomes  an  integral  part  of  the  molecular  system  as  an  artifical   dimensionless  particle  with  a  mass  and  velocity  is  introduced  and  equilibrates  with   the  system  and  exchanges  kinetic  energy  with  all  real  particles  of  the  system.  By   controlling  the  equations  of  motion  of  this  dimensionless  particle,  any  desired   temperature  can  be  set  while  preserving  all  the  features  of  the  Verlet/leapfrog   algorithm  and  the  NVT  ensemble.    

   

The  free  energy  is  the  thermodynamical  quantity  directly  related  to  the  equilibrium   constant  and  is  related  to  the  probability  that  a  system  will  be  in  a  particular  state.   The  ability  to  determine  free  energy  differences  from  molecular  dynamics  

simulations  is  highly  useful  as  they  can  then  be  directly  related  to  the   thermodynamical  data  from  experimental  measurements.  

 

The  Helmholtz  free  energy  of  a  system  in  the  NVT  ensemble  is  given  by:    

 

(37)   where  Q  is  the  partition  function  of  the  system  which  is  expressed  classically  as  a   double  integral  over  all  energy  states  which  are  functions  of  spatial  and  momentum   coordinates:1  

 

(38)   It  is  very  hard  to  determine  free  energy  differences  of  a  system  by  direct  calculation   of  free  energies  by  the  equations  above  due  to  the  large  number  of  degrees  of   freedom  that  need  to  be  sampled.  However,  useful  methods  to  calculate  free  energy   differences  from  molecular  dynamics  simulations  nevertheless  exist.  The  free  energy   perturbation  expression:  

 

 

(39)   allows  direct  calculation  of  the  free  energy  difference  between  state  a  and  state  b   where  all  the  ensemble  averaging  is  based  on  state  a.1  As  long  as  state  a  and  state  b  

are  sufficiently  similar  (i.e.  the  perturbation  is  small),  this  is  a  very  useful  

approximation.  It  can  additionally  be  expanded  so  that  the  free  energy  difference   between  a  and  b  is  calculated  by  dividing  up  the  path  connecting  a  and  b  into   intermediate  states,  calculating  the  energy  difference  between  each  intermediate   state  and  add  everything  up  in  the  end.  

A=−kBT lnQ

Q=

� �

e−E(p,r)/kBTdpdr

 

Another  very  useful  method  is  the  thermodynamic  integration  technique  where  the   free  energy  difference  can  be  determined  by  integration  of  the  ensemble  average  of   the  potential  energy  gradient  w.r.t.  fixed  values  of  the  reaction  coordinate.  For  certain   reaction  coordinates  this  becomes  equal  to  integrating  over  the  ensemble  average  of   the  force  of  the  constrained  reaction  coordinate:54,55  

 

 

(40)   A  reaction  coordinate  ξ,  connecting  the  two  states  is  thus  identified  and  constrained.   A  number  of  simulations  are  then  run,  constraining  different  values  of  the  reaction   coordinate  while  sampling  the  force  of  the  constraint  f(ξ).  Integrating  over  the   average  constrained  force  for  each  simulation  (the  more  simulations  the  better)   results  in  the  free  energy  difference  between  state  a  and  b.  In  this  work,  the  reaction   coordinate  will  be  a  geometric  variable  (although  it  can  be  any  variable  shared  by   state  a  and  b).