Skip to main content
. Author manuscript; available in PMC: 2018 Apr 30.
Published in final edited form as: Annu Rep Comput Chem. 2017 Aug 10;13:231–278. doi: 10.1016/bs.arcc.2017.06.005
GaMD {
 For i = 1, …, ntcmd // run short initial conventional molecular dynamics
  Calculate Vmax, Vmin, Vavg, sigmaV
 End
 Calc_E_k0(iE,sigma0,Vmax,Vmin,Vavg,sigmaV)
 For i = 1, …, nteb // Equilibrate the system after adding boost potential
  deltaV = 0.5*k0*(E-V)**2/(Vmax-Vmin)
  V = V + deltaV
  Update Vmax, Vmin, Vavg, sigmaV
  Calc_E_k0(iE,sigma0,Vmax,Vmin,Vavg,sigmaV)
 End
 For i = 1, …, nstlim // run production simulation
  deltaV = 0.5*k0*(E-V)**2/(Vmax-Vmin)
  V = V + deltaV
 End
}
Subroutine Calc_E_k0(iE,sigma0,Vmax,Vmin,Vavg,sigmaV) {
 if iE = 1 :
  E = Vmax
  k0′ = (sigma0/sigmaV) * (Vmax-Vmin)/(Vmax-Vavg)
  k0 = min(1.0, k0′)
 else if iE = 2 :
  k0″ = (1-sigma0/sigmaV) * (Vmax-Vmin)/(Vavg-Vmin)
  if 0 < k0” <= 1 :
   k0 = k0”
  else
   k0 = 1.0
  end
  E = Vmin + (Vmax-Vmin)/k0
 end
}