[<< wikibooks] Molecular Simulation/Langevin dynamics
Langevin dynamics is used to describe the acceleration of a particle in a liquid. 

  
    
      
        
          
            
              d
              v
            
            
              d
              t
            
          
        
        =
        −
        ϵ
        v
        (
        t
        )
        +
        A
        (
        t
        )
      
    
    {\displaystyle {\frac {dv}{dt}}=-\epsilon v(t)+A(t)}
   1 The term 
  
    
      
        −
        ϵ
        v
        (
        t
        )
      
    
    {\displaystyle -\epsilon v(t)}
   term corresponds to the drag force divided by mass, m, of the particle. The drag force of the system is based on weak, long ranged intermolecular forces between atoms or molecules. This drag force is created by the liquid surrounding a particle. The drag force is based on the frictional constant of the system, 
  
    
      
        γ
      
    
    {\displaystyle \gamma }
  , and the velocity of the particle, v. 
  
    
      
        ϵ
      
    
    {\displaystyle \epsilon }
   is 
  
    
      
        
          
            γ
            m
          
        
      
    
    {\displaystyle {\frac {\gamma }{m}}}
  . The frictional constant is proportional to the viscosity of the surrounding liquid, and the radius of the particle found from Stokes' Law.The term 
  
    
      
        A
        (
        t
        )
      
    
    {\displaystyle A(t)}
   represents the random force. The random force of the system is based on short, strong Pauli repulsion between atoms or molecules. The random force in the liquid is experienced as a result of the collisions of a molecule with the surrounding liquid. This force changes rapidly with time, and changes much faster than it's velocity in denser liquids.


== Velocity of the Particle ==
(1) is a first order linear differential equation and can be solved formally to give (2).

  
    
      
        v
        (
        t
        )
        =
        
          v
          
            0
          
        
        
          e
          
            −
            ϵ
            t
          
        
        +
        
          e
          
            −
            ϵ
            t
          
        
        
          ∫
          
            1
          
          
            3
          
        
        
          e
          
            ϵ
            
              t
              
                
                  
                  ′
                
              
            
          
        
        A
        (
        
          t
          
            
              
              ′
            
          
        
        )
        d
        
          t
          
            
              
              ′
            
          
        
      
    
    {\displaystyle v(t)=v_{0}e^{-\epsilon t}+e^{-\epsilon t}\int \limits _{1}^{3}e^{\epsilon t^{'}}A(t^{'})dt^{'}}
   2 The ensemble average of velocity is ,

  
    
      
        ⟨
        v
        (
        t
        )
        ⟩
        =
        
          v
          
            0
          
        
        
          e
          
            −
            ϵ
            t
          
        
      
    
    {\displaystyle \langle v(t)\rangle =v_{0}e^{-\epsilon t}}
  This is because the acceleration of the particle is due to a random force, and so the average acceleration will be 0 (i.e., 
  
    
      
        ⟨
        A
        (
        t
        )
        ⟩
        =
        0
      
    
    {\displaystyle \langle A(t)\rangle =0}
  ).
At short time intervals (
  
    
      
        t
        ⟶
        0
      
    
    {\displaystyle t\longrightarrow 0}
   ), the average velocity becomes, 

  
    
      
        ⟨
        v
        (
        t
        )
        ⟩
        =
        
          v
          
            0
          
        
        
          e
          
            −
            ϵ
            0
          
        
        =
        
          v
          
            0
          
        
      
    
    {\displaystyle \langle v(t)\rangle =v_{0}e^{-\epsilon 0}=v_{0}}
  At long time intervals ( 
  
    
      
        t
        ⟶
        ∞
      
    
    {\displaystyle t\longrightarrow \infty }
   ), the average velocity becomes,

  
    
      
        ⟨
        v
        (
        t
        )
        ⟩
        =
        
          v
          
            0
          
        
        
          e
          
            −
            ϵ
            ∞
          
        
        =
        0
      
    
    {\displaystyle \langle v(t)\rangle =v_{0}e^{-\epsilon \infty }=0}
  


== Displacement of the Particle ==
The Langevin Equation is used to express the rate of change of a particle's velocity. This in turn can be used to calculate the diffusion as diffusion depends on the velocity of a particle in a liquid. The Langevin equation can be used to sample the canonical ensembles of states. By integrating the velocity from time 0 to time t, the displacement of a particle can be found.

  
    
      
        r
        (
        t
        )
        −
        r
        (
        0
        )
        =
        
          ∫
          
            0
          
          
            t
          
        
        v
        (
        
          t
          
            
              
              ″
            
          
        
        )
        d
        
          t
          
            
              
              ″
            
          
        
      
    
    {\displaystyle r(t)-r(0)=\int \limits _{0}^{t}v(t^{''})dt^{''}}
    3Substituting the definition for velocity from (2) into (3),and integrating by parts gives

  
    
      
        r
        (
        t
        )
        −
        r
        (
        0
        )
        =
        
          
            1
            ϵ
          
        
        
          ∫
          
            0
          
          
            t
          
        
        [
        1
        −
        
          e
          
            ϵ
            (
            
              t
              
                
                  
                  ′
                
              
            
            −
            t
            )
          
        
        ]
        A
        (
        
          t
          
            
              
              ′
            
          
        
        )
        d
        
          t
          
            
              
              ′
            
          
        
        +
        
          v
          
            0
          
        
        
          
            
              1
              −
              
                e
                
                  −
                  ϵ
                  t
                
              
            
            ϵ
          
        
      
    
    {\displaystyle r(t)-r(0)={\frac {1}{\epsilon }}\int \limits _{0}^{t}[1-e^{\epsilon (t^{'}-t)}]A(t^{'})dt^{'}+v_{0}{\frac {1-e^{-\epsilon t}}{\epsilon }}}
   4Squaring both sides of (4) and taking the ensemble average gives 

  
    
      
        ⟨
        
          |
        
        r
        (
        t
        )
        −
        r
        (
        0
        )
        
          
            |
          
          
            2
          
        
        ⟩
        =
        
          
            
              
                v
                
                  0
                
                
                  2
                
              
              (
              1
              −
              
                e
                
                  −
                  ϵ
                  t
                
              
              
                )
                
                  2
                
              
            
            
              ϵ
              
                2
              
            
          
        
        +
        
          
            
              3
              
                k
                
                  B
                
              
              T
            
            
              m
              
                ϵ
                
                  2
                
              
            
          
        
        (
        2
        ϵ
        t
        −
        3
        +
        4
        
          e
          
            −
            ϵ
            t
          
        
        −
        
          e
          
            −
            2
            ϵ
            t
          
        
        )
      
    
    {\displaystyle \langle |r(t)-r(0)|^{2}\rangle ={\frac {v_{0}^{2}(1-e^{-\epsilon t})^{2}}{\epsilon ^{2}}}+{\frac {3k_{B}T}{m\epsilon ^{2}}}(2\epsilon t-3+4e^{-\epsilon t}-e^{-2\epsilon t})}
   5 The derivation is as follows, 

  
    
      
        ⟨
        
          |
        
        r
        (
        t
        )
        −
        r
        (
        0
        )
        
          
            |
          
          
            2
          
        
        ⟩
        =
        
          
            
              
                v
                
                  0
                
                
                  2
                
              
              (
              1
              −
              
                e
                
                  −
                  ϵ
                  t
                
              
              
                )
                
                  2
                
              
            
            
              ϵ
              
                2
              
            
          
        
        +
        
          
            1
            
              ϵ
              
                2
              
            
          
        
        
          ∫
          
            0
          
          
            t
          
        
        
          ∫
          
            0
          
          
            t
          
        
        [
        1
        −
        
          e
          
            −
            ϵ
            (
            t
            −
            
              t
              
                
                  
                  ′
                
              
            
            )
          
        
        
          ]
          
            2
          
        
        ⟨
        A
        (
        
          t
          
            
              
              ″
            
          
        
        )
        A
        (
        
          t
          
            
              
              ′
            
          
        
        )
        ⟩
        d
        
          t
          
            
              
              ″
            
          
        
        d
        
          t
          
            
              
              ′
            
          
        
      
    
    {\displaystyle \langle |r(t)-r(0)|^{2}\rangle ={\frac {v_{0}^{2}(1-e^{-\epsilon t})^{2}}{\epsilon ^{2}}}+{\frac {1}{\epsilon ^{2}}}\int \limits _{0}^{t}\int \limits _{0}^{t}[1-e^{-\epsilon (t-t^{'})}]^{2}\langle A(t^{''})A(t^{'})\rangle dt^{''}dt^{'}}
  
  
    
      
        ⟨
        A
        (
        
          t
          
            
              
              ″
            
          
        
        )
        A
        (
        
          t
          
            
              
              ′
            
          
        
        )
        ⟩
      
    
    {\displaystyle \langle A(t^{''})A(t^{'})\rangle }
   is a rapidly varying function of 
  
    
      
        
          |
          
            
              t
              
                
                  
                  ′
                
              
            
            −
            
              t
              
                
                  
                  ″
                
              
            
          
          |
        
      
    
    {\displaystyle \left|t^{'}-t^{''}\right|}
   only and it is non zero only when 
  
    
      
        
          |
          
            
              t
              
                
                  
                  ′
                
              
            
            −
            
              t
              
                
                  
                  ″
                
              
            
          
          |
        
      
    
    {\displaystyle \left|t^{'}-t^{''}\right|}
   is small. So 
  
    
      
        ⟨
        A
        (
        
          t
          
            
              
              ″
            
          
        
        )
        A
        (
        
          t
          
            
              
              ′
            
          
        
        )
        ⟩
      
    
    {\displaystyle \langle A(t^{''})A(t^{'})\rangle }
   can be re-written as 
  
    
      
        ϕ
        
          |
          
            
              t
              
                
                  
                  ′
                
              
            
            −
            
              t
              
                
                  
                  ″
                
              
            
          
          |
        
      
    
    {\displaystyle \phi \left|t^{'}-t^{''}\right|}
   . Let 
  
    
      
        
          t
          
            
              
              ′
            
          
        
        −
        
          t
          
            
              
              ″
            
          
        
        =
        y
      
    
    {\displaystyle t^{'}-t^{''}=y}
   and 
  
    
      
        t
        −
        
          t
          
            
              
              ′
            
          
        
        =
        x
      
    
    {\displaystyle t-t^{'}=x}
  , and the above equation becomes,

  
    
      
        ⟨
        
          |
        
        r
        (
        t
        )
        −
        r
        (
        0
        )
        
          
            |
          
          
            2
          
        
        ⟩
        =
        
          
            
              
                v
                
                  0
                
                
                  2
                
              
              (
              1
              −
              
                e
                
                  −
                  ϵ
                  t
                
              
              
                )
                
                  2
                
              
            
            
              ϵ
              
                2
              
            
          
        
        +
        
          
            1
            
              ϵ
              
                2
              
            
          
        
        
          
            2
            ϵ
          
        
        
          e
          
            −
            ϵ
            t
          
        
        −
        
          
            1
            
              ϵ
              
                2
              
            
          
        
        
          ∫
          
            0
          
          
            2
            t
          
        
        [
        1
        −
        
          e
          
            −
            ϵ
            x
          
        
        
          ]
          
            2
          
        
        d
        x
        
          ∫
          
            0
          
          
            ∞
          
        
        ϕ
        
          |
        
        y
        
          |
        
        d
        y
      
    
    {\displaystyle \langle |r(t)-r(0)|^{2}\rangle ={\frac {v_{0}^{2}(1-e^{-\epsilon t})^{2}}{\epsilon ^{2}}}+{\frac {1}{\epsilon ^{2}}}{\frac {2}{\epsilon }}e^{-\epsilon t}-{\frac {1}{\epsilon ^{2}}}\int \limits _{0}^{2t}[1-e^{-\epsilon x}]^{2}dx\int \limits _{0}^{\infty }\phi |y|dy}
  Let 
  
    
      
        
          ∫
          
            0
          
          
            ∞
          
        
        ϕ
        
          |
        
        y
        
          |
        
        d
        y
        =
        τ
      
    
    {\displaystyle \int \limits _{0}^{\infty }\phi |y|dy=\tau }
  , and simplify, the above equation becomes

  
    
      
        ⟨
        
          |
        
        r
        (
        t
        )
        −
        r
        (
        0
        )
        
          
            |
          
          
            2
          
        
        ⟩
        =
        
          
            
              
                v
                
                  0
                
                
                  2
                
              
              (
              1
              −
              
                e
                
                  −
                  ϵ
                  t
                
              
              
                )
                
                  2
                
              
            
            
              ϵ
              
                2
              
            
          
        
        +
        
          
            τ
            
              ϵ
              
                2
              
            
          
        
        (
        2
        ϵ
        t
        −
        3
        +
        4
        
          e
          
            −
            ϵ
            t
          
        
        −
        
          e
          
            −
            2
            ϵ
            t
          
        
        )
      
    
    {\displaystyle \langle |r(t)-r(0)|^{2}\rangle ={\frac {v_{0}^{2}(1-e^{-\epsilon t})^{2}}{\epsilon ^{2}}}+{\frac {\tau }{\epsilon ^{2}}}(2\epsilon t-3+4e^{-\epsilon t}-e^{-2\epsilon t})}
  Equipartition theory applies when 
  
    
      
        t
        ⟶
        ∞
      
    
    {\displaystyle t\longrightarrow \infty }
  , and so 
  
    
      
        τ
        =
        
          
            
              3
              
                k
                
                  B
                
              
              T
            
            m
          
        
      
    
    {\displaystyle \tau ={\frac {3k_{B}T}{m}}}
  , and the above equation becomes (5).At short time intervals (
  
    
      
        t
        ⟶
        0
      
    
    {\displaystyle t\longrightarrow 0}
  ) the part of the equation representing Brownian motion goes to zero ( ie. 
  
    
      
        
          
            
              3
              
                k
                
                  B
                
              
              T
            
            
              m
              
                ϵ
                
                  2
                
              
            
          
        
        (
        2
        ϵ
        t
        −
        3
        +
        4
        
          e
          
            −
            ϵ
            t
          
        
        −
        
          e
          
            −
            2
            ϵ
            t
          
        
        )
        =
        0
      
    
    {\displaystyle {\frac {3k_{B}T}{m\epsilon ^{2}}}(2\epsilon t-3+4e^{-\epsilon t}-e^{-2\epsilon t})=0}
    

  
    
      
        ⟨
        
          |
        
        r
        (
        t
        )
        −
        r
        (
        0
        )
        
          
            |
          
          
            2
          
        
        ⟩
        =
        
          
            
              
                v
                
                  0
                
                
                  2
                
              
              (
              1
              −
              
                e
                
                  −
                  ϵ
                  t
                
              
              
                )
                
                  2
                
              
            
            
              ϵ
              
                2
              
            
          
        
      
    
    {\displaystyle \langle |r(t)-r(0)|^{2}\rangle ={\frac {v_{0}^{2}(1-e^{-\epsilon t})^{2}}{\epsilon ^{2}}}}
  Let 
  
    
      
        
          e
          
            −
            ϵ
            t
          
        
        =
        1
        −
        ϵ
        t
      
    
    {\displaystyle e^{-\epsilon t}=1-\epsilon t}
  . Then, 

  
    
      
        ⟨
        
          |
        
        r
        (
        t
        )
        −
        r
        (
        0
        )
        
          
            |
          
          
            2
          
        
        ⟩
        =
        
          
            
              v
              
                0
              
              
                2
              
            
            
              ϵ
              
                2
              
            
          
        
        (
        1
        −
        1
        +
        ϵ
        t
        
          )
          
            2
          
        
      
    
    {\displaystyle \langle |r(t)-r(0)|^{2}\rangle ={\frac {v_{0}^{2}}{\epsilon ^{2}}}(1-1+\epsilon t)^{2}}
    6
  
    
      
        ⟨
        
          |
        
        r
        (
        t
        )
        −
        r
        (
        0
        )
        
          
            |
          
          
            2
          
        
        ⟩
        =
        
          v
          
            0
          
          
            2
          
        
        
          t
          
            2
          
        
      
    
    {\displaystyle \langle |r(t)-r(0)|^{2}\rangle =v_{0}^{2}t^{2}}
  This corresponds to ballistic motion of the particle. At short time scales, the effect of friction and collisions have not affected the movement of the particle.
At long time intervals (
  
    
      
        t
        ⟶
        ∞
      
    
    {\displaystyle t\longrightarrow \infty }
  ), the velocity of the particle goes to zero.

  
    
      
        ⟨
        
          |
        
        r
        (
        t
        )
        −
        r
        (
        0
        )
        
          
            |
          
          
            2
          
        
        ⟩
        =
        
          
            
              3
              
                k
                
                  B
                
              
              T
            
            
              m
              
                ϵ
                
                  2
                
              
            
          
        
        (
        2
        ϵ
        t
        −
        3
        +
        4
        
          e
          
            −
            ϵ
            t
          
        
        −
        
          e
          
            −
            2
            ϵ
            t
          
        
        )
      
    
    {\displaystyle \langle |r(t)-r(0)|^{2}\rangle ={\frac {3k_{B}T}{m\epsilon ^{2}}}(2\epsilon t-3+4e^{-\epsilon t}-e^{-2\epsilon t})}
  At large values of t 
  
    
      
        2
        ϵ
        t
        >>
        4
        
          e
          
            −
            ϵ
            t
          
        
        
          and
        
        −
        
          e
          
            −
            2
            ϵ
            t
          
        
      
    
    {\displaystyle 2\epsilon t>>4e^{-\epsilon t}{\text{and}}-e^{-2\epsilon t}}
   and so, 

  
    
      
        ⟨
        
          |
        
        r
        (
        t
        )
        −
        r
        (
        0
        )
        
          
            |
          
          
            2
          
        
        ⟩
        =
        
          
            
              3
              
                k
                
                  B
                
              
              T
            
            
              m
              
                ϵ
                
                  2
                
              
            
          
        
        (
        2
        ϵ
        t
        )
        =
        
          
            
              6
              
                k
                
                  B
                
              
              T
            
            
              m
              ϵ
            
          
        
        t
      
    
    {\displaystyle \langle |r(t)-r(0)|^{2}\rangle ={\frac {3k_{B}T}{m\epsilon ^{2}}}(2\epsilon t)={\frac {6k_{B}T}{m\epsilon }}t}
  The diffusion constant D, is equal to 
  
    
      
        
          
            
              
                k
                
                  B
                
              
              T
            
            
              m
              ϵ
            
          
        
      
    
    {\displaystyle {\frac {k_{B}T}{m\epsilon }}}
  .

  
    
      
        ⟨
        
          |
        
        r
        (
        t
        )
        −
        r
        (
        0
        )
        
          
            |
          
          
            2
          
        
        ⟩
        =
        6
        D
        t
      
    
    {\displaystyle \langle |r(t)-r(0)|^{2}\rangle =6Dt}
   7This corresponds to the particle undergoing a random walk.


== References ==