1984, A Molecular Dynamics Method for Simulations in the Canonical Ensemblet by SHUICHI NOSE

Embed Size (px)

Citation preview

  • 7/30/2019 1984, A Molecular Dynamics Method for Simulations in the Canonical Ensemblet by SHUICHI NOSE

    1/14

    MOLECULARPHYSICS,1984, VOL. 52, No. 2, 255-268

    A m o l e c u l a r d y n a m i c s m e t h o d fo r s i m u l a t i o n s i n t h ec a n o n i c a l e n s e m b l e tby S H U I C H I N O S I ~

    Division of Chemistry, National Research Council Canada,Ottawa, Ontario, Canada KIA 0R6(Received 3 October 1983 ; accepted 28 November 1983)

    A molecular dynamics simulation method which can generate configura-tions belonging to the canonical (T, V, N) ensemble or the constanttemperature constant pressure (T, P, N) ensemble, is proposed. Thephysical system of interest consists of N particles (f degrees of freedom), towhich an external, macroscopic variable and its conjugate momentum areadded. This device allows the total energy of the physical system tofluctuate. The equilibrium distribution of the energy coincides with thecanonical distribution both in momentum and in coordinate space. Themethod is tested for an atomic fluid (At) and works well.

    1. INTRODUCTIONThe molecular dynamics (MD) method has become an important techniquefor the study of fluids and solids. In the standard M D method, the newtonianequations of motion of the particles in a fixed MD cell of volume V are solved

    numerically. Th e total energy E is conserved, and thus the ensemble generatedby the simulation is the microcanonical or (E, V, N) ensemble.

    With the MD method, not only the static quantities but also the dynamicquantities can be obtained. Thi s is one advantage over the Mont e Carlo (MC)method. However, a disadvantage of the MD met hod is that the conditions ofthe simulations are not the same as those normally encountered in experiments(constant temperature, constant pressure or (T, P, N) conditions).

    In this regard, Andersen's introduc tion of the constant pressure MD methodrepr esented a significant breakthrough [1]. In his modified MD method, thevolume becomes a variable and is allowed to fluctuate. Th e average volume isdetermined by the balance between the internal pressure and the externally setpressure P~x. Th e enthalpy of the system is approximately conserved, so thismethod generates the constant enthalpy, constant pressure (H, P, N) ensemble.Parrinello and Rahman subsequently extended the method to allow for changesof the M D cell shape [2, 3 ]. Th e usefulness of this latter method has been demon-strated by numerous applications to structu ral changes in the solid state [2-7].To perform MD simulations at constant temperature, one can simply keepthe kinetic energy constant by scaling the velocities at each time step and thisapproach is now widely empl oyed [8, 9]. However , there seems to be norigorous proof that the latter approach produc es configurations belonging to thecanonical ensemble.

    t Issued as N.R.C.C. No. 23045.$ Present address : Department of Physics, Faculty of Science and Technology, KeioUniversity, 3-14-1 Hiyoshi, Kohoku-ku, Yokohama 223, Japan.M . P . 1

  • 7/30/2019 1984, A Molecular Dynamics Method for Simulations in the Canonical Ensemblet by SHUICHI NOSE

    2/14

    256 Shfiichi Nos~Hoover et al . proposed a constraint method in which an additional velocity

    dependent term is added to the forces to keep the total kinetic energy constant[10]. Their method produces the canonical distribution for the potential energyterm. The fluctuations of the kinetic energy are suppressed.A method for constant temperature MD simulations was also proposed byAndersen [1]. This is effectively a hybr id of MD and MC methods since thevelocities of the particles are changed stochastically to produce the Boltzmanndistribution. It also lacks a well defined conserved quanti ty. Tanaka et a l .applied Andersen's method to a Lennard-Jones system and also to a watersystem [11]. Th ey found that if the probability of the stochastic Collisionexceeds a certain value, the d iffusion coefficient decreases appreciably. Toprevent the decrease of the diffusion coefficient and at the same time to maintainthe temperature constant, it seems to be necessary to select the collisionprobability in a certain range.

    In the present article, a new molecular dynamics method at constant tempera-ture is proposed. By introduc tion of an additional degree of freedom s, the totalenergy of the physical system is allowed to fluctuate . A special choice of thepotential for the variable s guarantees that the averages of static quantities in thismethod are equal to those in the canonical ensemble. This method is purelydynamical. In the extended system of the particles and the coordinate s, thetotal hamiltonian is conserved and all the equations of motion are solved withoutintroduc ing any stochastic process.

    The formula tion of the method is presented in w 2. As an example, anapplication to a system of argon atoms is given in w 3. If the present me thod iscombined with the constant pressure MD method, then simulations at conditionsof a constant temperature and constant pressure are also possible. The formu-lation for the (T, P , N ) ensemble is given in the Appendix.

    2. A CANONICAL ENSEMBLE MOLECULAR DYNAMICS METHOD2 . 1 . E q u a t i o n s o f m o t io n

    We formulate the system which produces configurations following thecanonical distribution. We limit the discussion to the case of atoms, but theextension to molecular systems is straightforward. First, consider a physicalsystem ; N particles with coordinates rl, r 2 . . . , r v in a fixed volume V, andpotential energy ~(r). An additional degree of freedom s is introduced, whichacts as an external system. The interaction between the physical system and sis expressed via the scaling of the velocities of the particles,

    v~: = si" , (2.1)and v~ is considered as the real velocity of particle i. We can interpret this as anexchange of heat between the Fhysical system and the external system (heatreservoir).

    We associate a potential energy (f+ 1 ) k T e q ins with the variable s, where [is the number of degrees of freedom in the physical system, k Boltzmann'sconstant , and Toq the externally set temperature value. As we shall see, this@oice of potential energy ensures that canonical ensemble averages are recovered.

  • 7/30/2019 1984, A Molecular Dynamics Method for Simulations in the Canonical Ensemblet by SHUICHI NOSE

    3/14

    C a n o n ic a l e n se m b le M D m e th o d 2 5 7T h e l a g r a n g i a n o f t h e e x t e n d e d s y s t e m o f p a r t ic l e s a n d s i s t h u s p o s t u l a t e d t o b e

    s ~ i m i 3 " Q i~-(I+l)kTo,~lns.~- s r~ 2 - r + ( 2 . 2 )T h e k i n e t i c e n e r g y t e r m , 8 9 2 i s i n t r o d u c e d i n o r d e r to b e a b le t o c o n s t r u c t ad y n a m i c e q u a t i o n f o r s. T h e p a r a m e t e r Q h as t h e d i m e n s i o n s o f e n e r g y 9 ( ti m e ) 2a n d d e t e r m i n e s t h e t i m e sc al e o f t h e t e m p e r a t u r e f l u c t u a ti o n . T h e e q u a t i o n s ofm o t i o n f o r r a n d s a r e d e r i v e d f r o m t h e l a g r a n g i a n e q u a t i o n

    = ~ A 'w h e r e A s t a n d s f o r o n e o f t h e v a r i a b le s m e n t i o n e d a b o v e .

    T h e e q u a t i o n s f o r th e p a r t i c le s a r ed ~ rd -- t ( m ~ s ~ ~ ' ~ ) = ~ r i '

    o r

    T h e e q u a t i o n f o r s i s

    ( 2 . 4 )

    1 ~ r 2 ii ~ = f 'i . ( 2 . 5 )m i s 2 ~ r $

    Q k = ~ m i s i .i 2 - ( [+ 1 ) k T e q ( 2 . 6 )i $

    I f w e d e n o t e t h e a v er a ge i n t h e e x t e n d e d s y s t e m b y ( . . . ) , t h e r e la t io n( ~ i m is 2 f 'i ~ ) I ! 59 s = ( f + l ) h T e q (2 .7 )

    i s o b t a i n e d f r o m ( 2 . 6 ) b e c a u s e t h e t i m e a v e r a g e o f a t i m e d e r i v a t i v e ( e . g . Q + ' )v a n i s h e s . T h i s s u g g e s t s t h a t t h e a v e ra g e of t h e k i n e ti c e n e r g y c o i n c i d e s w i t h t h ee x t e r n a l l y s e t t e m p e r a t u r e T e q.T h e m o m e n t a a re g iv e n b y

    p i = , , . = m is i" (2 .8 )(7 r ia n d

    p , = - -~ - = Q i . (2 .9 )T h e c o n s e r v e d q u a n t i t i e s i n t h i s e x t e n d e d s y s t e m a r e t h e h a m i l t o n i a n

    P f l + r 1 ) k T e q I n s , ( 2 . 1 0 )t h e to t al m o m e n t u m

    P = ~ i p i = ~ i ( m , d 2 i ') , ( 2 . 1 1 )a n d t h e to t al a n g u la r m o m e n t u m

    M = ~ ., r i x p i = ~ . r , ( m , s2 f 'i ) . ( 2 . 1 2 )12

  • 7/30/2019 1984, A Molecular Dynamics Method for Simulations in the Canonical Ensemblet by SHUICHI NOSE

    4/14

    2 5 8 S h f i i c h i N o s ~2 .2 . P r o o [ o f t h e e q u iv a l e n c e o f t h e p r e s e n t m e t h o d a n d t h e c a n o n i c a l

    e n s e m b l eN o w w e p r o v e t h a t t h e e q u a t i o n s o f m o t i o n d e r i v e d f r o m ( 2 . 2 ) p r o d u c e

    c o n f i g u r a t io n s i n t h e c a n o n ic a l e n s e m b l e a t t e m p e r a t u r e T e q. O u r e x t e n d e ds y s t e m p r o d u c e s a m i c r o c a n o n i c a l e n s e m b l e o f ( f + 1) d e g r e e of f r e e d o m . T h ep a r t i t i o n f u n c t i o n o f t h i s e n s e m b l e i s d e f i n e d b yZ _ 1 ( P ~ . P s ~ . )- ~ l d psI d s l d p l dr ~ ~ 2 - - ~ + r . ( 2 . 1 3 )H e r e , ~ (x ) d e n o t e s t h e D i ra c ~ f u n c t i o n , a n d t h e s h o r t e n e d f o r m s d p =d p l d p 2 . . . d p N , d r = d r I d r 2 . . . d r N a r e u s e d .T h e m o m e n t u m P i is t r an s f o rm e d a s

    P J = p ' ~ , ( 2 . 1 4 )$a n d t h e v o l u m e e l e m e n t b e c o m e s d p = s ! d p ' ( [ is t h e n u m b e r o f d e g r e e s o ff r e e d o m in t h e p h ys i ca l s y s te m ) . T h e r e i s n o u p p e r l i m i t i n m o m e n t u m s p a ce ,s o w e c a n c h a n g e t h e o r d e r o f i n t e g r a t i o n o f d p ' a n d d s ;

    Z = -~.v. l d p s l d p ' I d r l d s st 3 ~" P2--~i~ ~ ( r ) + 2---Q+ ( l + l ) k T eq l n s - E.m i

    U s i n g t h e e q u i v a l e n c e r e l a t i o n f o r ~ fu n c t i o n ~ ( g ( s )) = ~ ( s - s o ) / g ' ( s ) , w h e r es o is t h e z e r o o f g ( s ) = 0 , a n d t h e s h o r t e n e d f o r mt 2oUf(p , r) = 2 P ~ / 2 m i + ri

    w e g e t1 , , + 1 ( [ ( o z z t O ( p , r ) + ( p s 2 / 2 Q ) _ E ) l ~Z = i . l d P I d p ' I d r ld s ( t + l ) k T e , - e x p (}--~ i ) - ~ e q . ] 1

    1 1 [ ( p 2 ) / ]- q + l ) k r e ~ N t l d P s l d p ' I d r e x p - a ~ ( p ' , r ) + ~ Q Q - E k r ~ .T h e i n t e g r a t i o n w i t h r e s p e c t t o p ~ c a n b e c a r r ie d o u t i m m e d i a t e l y , s o w e g e t

    t h e f i n a l r e s u l t1(2 e)1,Z = ( [ + I ) \ k T e J e x p ( E / k T e q ) Z e . ( 2 . 1 5 )

    Z e is t h e p a r t i t i o n f u n c t i o n o f t h e c a n o n i c a l e n s e m b l eZ ~ = 1 1 d P ' I d r e x p [ - 34~(p , r ) / h T ~ q ] . ( 2 . 1 6 )

    T h e a v e r a g e o f s o m e s t a ti c q u a n t i t y w h i c h i s a n a r b i t r a ry f u n c t i o n o f p J s a n dr~ i n t h e e x t e n d e d s y s t e m i s e x a c t ly t h e s a m e a s t h a t i n t h e c a n o n i c a l e n s e m b l e ,< A (-P s , ) > = < A ( p ' , r ) ) o , ( 2 . 1 7 )

    w h e r e ( . . . ) e m e a n s t h e a v e ra g e i n t h e ca n o n i c al e n s e m b l e .

  • 7/30/2019 1984, A Molecular Dynamics Method for Simulations in the Canonical Ensemblet by SHUICHI NOSE

    5/14

    Canon ica l ensemb le M D me thod 2 5 9T h e a b o v e r e s u l t i s d e r i v e d f r o m t h e a s s u m p t i o n t h a t t h e o n l y c o n s e r v e dq u a n t i t y i s t h e t o t a l h a m i l t o n i a n Y F1. I n fa c t, t h e s y s t e m h a s o t h e r c o n s e r v e dq u a n t i t ie s : t ot al m o m e n t u m a n d a n g u la r m o m e n t u m . T h e s e d e vi at e b y a n

    o r d e r O ( 1 / N ) f r o m t h e c a n o n i c a l e n s e m b l e a ve r a ge s . A s im i l a r r e s u l t w a sa l re a d y p o i n t e d o u t b y H o o v e r a n d A l d e r f o r t h e m i c r o c a n o n i c a l e n s e m b l e [ 12 ].T h e c o r r e c t i o n f o r t o t a l m o m e n t u m c o n s e r v a t i o n i n t h i s m e t h o d c a n b ea c h i e v e d b y u s i n g f - 3 i n p la c e o f f i n t h e d e f i n i t io n o f b o t h t h e l a g r a n g i a n a n dt h e i n s t a n t a n e o u s t e m p e r a t u r e .2 .3 . So m e average quant i t ies in the canonica l ensemble M D m ethod

    I f t h e i n s t a n t a n e o u s t e m p e r a t u r e T is d e f in e d a sp 2 f k T ,~i 2mis- 2 - 2

    t h e a v e r a g e a n d t h e f l u c t u a t i o n o f T a re , r e s p e c t iv e l y< T > = < T > o = T ~q

    a n d( 2 . 1 8 )

    < ( I ' - T ~q )2 > = < ( T - T e q ) 2 > c = T eq z 2 ( 2 .1 9 ), [ "T h e f o r m u l a f o r th e h e a t c a p a c i t y c v is d e r i v e d f r o m t h e f l u c t u a t i o n o f t h e t o t a le n e r g y

    , r~ P i 2E T = . ~ , ~ + r ;

    i Lmis

    c--2 1 [ ~ ( k T ( , q ) e < r 1 6 2c~ - N k T~qe k Teq 2 ~ q Nf h- - F2 N N k T ~q 2 ( 2 . 2 0 )

    W e c a n a l s o o b t a i n a v e r a g e s o f q u a n t i t i e s d e p e n d i n g o n s ,I @ ~ I alp ' I d r B ( p ' , r ) I d s . s + 1 + "

    [~(P"r)+(P~2/2Q)-E])(f+I)kT~q

    -[#f(p''r)+(p~e/2Q)-(f+l)kTeq ] ] )m E f + 1 ~ 1 / 2= e x p [ i f + i) -k T c q ] ( [ ~ - l + m ]

    x B ( p ' , . ) e x p q + 1 ) k To A / o " (2 .2 1)

  • 7/30/2019 1984, A Molecular Dynamics Method for Simulations in the Canonical Ensemblet by SHUICHI NOSE

    6/14

    2 6 0 S h f i i c h i N o s 6S o m e s p e c i a l c a s e o f ( 2 . 2 1 ) a r e

    m E( s ~ ) = e x p [ ( [ + l ~ _ T e q ] \ V i - - ~ m ,( +1 ) (1+1)1~x @ x p [ - - - m r ,1 + 1 " k T e q ] ) c ( 2 . 2 2 )( : \ = l P ' : \ = l l \ f + l k r eo .m isa / \ m i s / \ ' / I

    T h i s l a st e q u a t i o n i s i d e n t i c a l t o ( 2 .7 ) .T h e f l u c t u a t i o n o f s i s

    ( e x p { - [ 2/( I + 1)](r (e x p { - [1 / ( l + 1 ) ] (, ;b /k Te q)} )2F o r l a r g e f , ( 2 . 2 3 ) t e n d s t o ( ( s - < s > ? \ = 5 5 ] / 12 k

    . ( 2 .23 )

    ( 2 . 2 4 )

    2 .4 . A n interpretation of the variable sT o o b t a i n t h e d y n a m i c a l q u a n t i t i e s , t h e v a r i a b l e s c a n b e i n t e r p r e t e d a s as c a l in g f a c t o r f o r t h e t im e s te p A t i n t h e s i m u l a t i o n s . T h e r e a l t i m e s t e p A t 'i s o b t a i n e d b y t h e r e l a t i o nAtA t ' - . ( 2 . 25 )$

    T h e l e n g t h o f e a c h t i m e s t e p A t' is n o w u n e q u a l .E q u a t i o n ( 2 .2 5 ) is d e d u c e d a s f o ll ow s . I n s i m u l t a n e o u s l y t r a n s f o r m i n gs '=s /a , a n d t '= t /a b y a c o n s t a n t a , t h e c o o r d i n a t e s a n d t h e i r t i m e d e r i v a t i v e sc h a n g e a sr ' = r , f " = a F , F ' = a 2F . . . . .p ' = p / a , t ' = t / a , ( 2 . 2 6 )s '=s /a , ~ '= ~ , # '=ag , ... ;

    t h e h a m i l to n i a n ~ 1 is in v a r ia n t e x c e p t f or a c o n s t a n t te r md C ' t = ~ 1 - - ( f + 1 ) kT e q I n a . ( 2 .2 7 )

    S o o n l y t h e r a t i o t / s=t ' / s ' h a s a n y r e a l m e a n i n g , a n d i n t h e c a s e o f s ' = 1 , t h eh a m i l t o n i a n r e c o v e rs it s n o r m a l , u n s c a l e d f o r m . T h e t i m e i n t h is c a se isc o n s i d e r e d t o c o r r e s p o n d t o t h e r e al t i m e . T h e v e l o c i ty i n ( 2 .1 ) i s r e - e x p r e s s e da s

    d r i d r i

  • 7/30/2019 1984, A Molecular Dynamics Method for Simulations in the Canonical Ensemblet by SHUICHI NOSE

    7/14

    C a n o n i c a l e n se m b le M D m e t h o d 261T h e l e n g th o f t h e t im e s t e p is u n e q u a l i n t h e c a n o n ic a l e n s e m b l e M D m e t h o d .

    F o r c a l c u l a t io n o f t i m e d e p e n d e n t q u a n t i ti e s , i t is c o n v e n i e n t t o s a m p l e a t in t e r v a lst h a t a r e i n t e g e r m u l t i p l e s o f a u n i t ti m e s t e p . T h i s c a n b e d o n e v e r y e a si ly b yi n t e r p o l a t i o n . A t eq u i l i b r i u m , t h e f l u c t u a t i o n o f s i s o f o r d e r N -11 2 ( s ee 2 .2 4 ) ) ,s o i n p r ac t i ce , t h e d i f f e r en ces in t h e l en g t h s o f i n d i v i d u a l t i m e s t ep s can s o m e-t i m e s b e i g n o r e d . A n a v e r a g e d re a l t i m e c a n b e o b t a i n e d b y m u l t ip l y i n g th es i m u l a t i o n t i m e w i t h ( s - l ) .

    T h e d e ta i le d n a t u r e o f t h e d y n a m i c s d e p e n d s u p o n t h e v a l u e of Q c h o s e n .H o w e v e r , s o m e d y n a m i c q u a n t i t ie s ( e s p e c ia l ly , o n e b o d y q u a n t i ti e s ) o f t h e s y s t e mar e , w e b e l iev e , l e ss s en s i t i v e t o th e v a l u e o f Q . I f t h i s i s t h e ca s e , w e can g e ti n f o r m a t i o n o n b o t h s t a t i c a n d d y n a m i c q u a n t i t i e s .

    T h e f r e q u e n c y o f t h e s o s c i ll a ti o n c a n b e e s t i m a t e d f r o m ( 2 .5 ) ,Q ~ = S " p i 2 ( f + 1 ) k T e qmi$ 3 $

    W e a s s u m e t h e s y s t e m i s i n e q u i l i b r i u m , a n d s f l u c t u a t e s a r o u n d t h e a v e r a g e dv a l u e < s ) , s = ( s ) + ~s. T h e n t h e a b o v e e q u a t i o n c a n b e s im p l i fi e d a s

    Q ( ~ ) = f h T ~ q ( ( s ) 2 ~ ) 2 f h T e q\ s3 = (s )2 68. (2 .2 8)T h i s is t h e e q u a t i o n f o r a h a r m o n i c o s c il la t o r, w i t h f r e q u e n c y

    [ 2 f h T ~ q ~ l I~ .w = ~, Q - - - ~ j ( 2. 29 )T h e p e r i o d o f t h e o s c i l la t io n i s

    ( Q < s ) 2 1 2t 0 = - - = 2 w ( 2 . 3 0 )o ~ \ 2 f k r ~ q /A t y p i ca l v a l u e o f Q f o r a 1 0 8 p a r t i c l e s y s t em, a t T e q = 1 5 0 K an d f o r t 0 = 1 p si s 20 (kJ m ol -X) (ps ) 2.

    T h e t r a n s f o r m a t i o n ( 2 .2 6 ) c a n b e u s e d t o c h a n g e t h e le n g t h o f t i m e s t e p .W i t h o u t t h i s C o n tr ol , t h e r e a l t i m e s t e p in t h e s i m u l a t io n s m a y b e c o m e to o s m a l lo r t o o l ar g e . F o r a s ma l l t i me s t ep , t h e ca l cu l a t i o n is i n e f f i c i en t ; f o r a l a r g eo n e , t h e p r e c i s io n o f t h e c a l c u l a ti o n c a n n o t b e m a i n t a in e d .

    3. AN APPLICATIONT h e c a n o n ic a l e n s e m b l e M D m e t h o d w a s t e s t e d o n a s y s t e m o f 108 a rg o n

    a t o m s ( m a s s 3 9 . 9 g t o o l - l ) , i n t e r a c t in g w i t h a L e n n a r d - J o n e s 1 2 - 6 p o t e n t ia l(E = 1 .03 9 k J mo 1-1 , a = 3 .4 4 6 A ) w h i ch w as t r u n c a t e d a t 8 -5 A . T h e M D ce l lw a s a c u b e o f e d g e l e n g t h 1 7 .5 A ( o r v o l u m e 2 9 . 8 8 c m 3 m o 1 - 1) a n d a s u s u a l, t h ep e r i o d ic b o u n d a r y c o n d i t i o n w a s a d o p t e d . A 5 t h o r d e r p r e d i c t o r - c o r r e c t o ra l g o r i th m w a s e m p l o y e d f o r i n t e g r a ti o n o f t h e e q u a t i o n s o f m o t i o n . A t i m e s te pA t = 2 . 5 x 1 0 .2 5 s w as u s ed , ex c ep t f o r t h e r u n s w i t h Q = 1 0 0 ( k J mo l - 1 ) ( p s ) 2 f o rw h i c h A t = 5 . 0 x 1 0 - i s s . E a c h r u n c o n s i s t e d o f t h e c a l c u l a ti o n o f 2 5 0 0 t i m es t e p s , t h e f i r s t 5 0 0 s t e p s b e i n g d i s c a r d e d f r o m t h e a v e r a g i n g .

    I n a l l ap p l i ca t i o n s , d i f f e r en ces i n t h e l en g t h o f i n d i v i d u a l t i me s t ep s w e r ei g n o r e d a n d t h e r e a l t i m e w a s c a l c u la t e d b y m u l t i p l y i n g t h e t i m e o f s i m u l a t i o nb y t h e f a c t o r < s - l> .

  • 7/30/2019 1984, A Molecular Dynamics Method for Simulations in the Canonical Ensemblet by SHUICHI NOSE

    8/14

    2 6 2 S h f i i c h i N o s 6

    79

    io oo ~rII

    o ~

    9

    ~J

    7

    ~L

    ~ J

    1 1 1 1 1 1 1 1 1

  • 7/30/2019 1984, A Molecular Dynamics Method for Simulations in the Canonical Ensemblet by SHUICHI NOSE

    9/14

    Canonical ensemble M D method 263The simulations were carried out by the following scheme. First, starting

    from an initial configuration (f.c.c. structure) a standard MD run (No. 1) wascarried out at about 150 K. This was followed by a constant temperaturesimulation at Teq=100 K (No. 2). Then, the temperature was reset toTeq = 150 K (No. 3) and finally the effects of using different Q values 1, 10, and100 (kJ mol-1)(ps) 2 were compared at 100 K and 150 K (No. 4 9). Th e resultsare listed in the table. The deviationsof the tempera ture from Teq are less than1 K. Th e runs with Q= 1 show especially good agreement. The averages ofthe potential energy and pressure give almost the same results for differentvalues. The run No. 9 clearly did not reach equilibrium because the tempera-ture fluctua tion is too large. The sudden increase in the value of ~ at thebeginning of the run gave a huge amount of kinetic energy to the variable s,which could not relax to equi librium in the 2500 timesteps.

    250I200 1 . . . . . . . . . . . .LL

    t~lO0 . . . . . . . . . . . . .

    Q = l.O (kJ /m ol )( ps) 2

    501250 2500 3750 5000 6250 7500s t e p

    Figure 1. Evolution of the tempera ture. The f irst 1250 steps shown (1250-2500 step)are carr ied out with the standard MD meth od. At step 2500, the simulation ischang ed to the constant tempe ratu re meth od with Teq = 100 K. At step 5000, Teqis changed to 150 K.

    Figure 1 shows the evolution of the instantaneous temperature through thefirst 3 runs. In the constant tempera ture method, the temperature reachesTeq quickly and fluctuates around this value. The approximate formula for thefluctuation of temperature in the microcanonical ensemble [13, 14].

    ( (3 T)2 )E ,V ,X= Teq2~--~ 1 - (3.1)(c,~, heat capacity) shows that the temperature fluctuations in the canonicalensemble are larger than those in the microcanonical ensemble. We can readilyrecognize this in figure 1. The values of A T = ( ( ( 3 T ) 2 ) ) 1/~, 8-3 K at 100 Kand 12.4 K at 150 K are comparable with those given by (2.19), 7.9 K at 100 Kand 11.8 K at 150 K. As expected, the value of A T , and the heat capacitywhich is calculated from AT and the fluctuation of the potential energy, are lessaccurate than the energy or pressure results.

  • 7/30/2019 1984, A Molecular Dynamics Method for Simulations in the Canonical Ensemblet by SHUICHI NOSE

    10/14

    2 6 4 S h f i i c h i N o s ~

    1 4 0

    1 2 0

    1 0 0

    8 0

    Q = 1.o ( k # ~ o 0 ( p , ) ~

    6 0

    1 2 0 ]

    1 0 0 , ~ , ~ ,q : t o o . o ( k 'J / m o O ( p s )

    , , % / % , ~ 6t. . . . . . . . ~ ' ~ ' , . L ~i~ = , !

    / , ' w ~ ,6 0 . . . . . . . . . . . . . '~ . . . . . . . . . .

    606 0 0 1 6 0 0 2 4 0 0 s t p e 3 2 0 0 4 0 0 0

    F i g u r e 2. C o m p a r i s o n o f t h e t e m p e r a t u r e f l u c t u a t i o n s i n r u n s w i t h d i f f e re n t Q v a l u e s at1 0 0 K . A b o v e : Q = 1 ( kJ m o l - : ) ( p s ) 2, B e l o w : Q = 1 0 0 ( kJ m o l - : ) ( p s ) 2. T h et o t a l r e a l t i m e i s a b o u t 7 p s .

    2 0

    15

    dxo I 0v

    Iv

    V5

    0 0

    /

    . / ~.~/

    . . . . . ~/ . . , ~ . . . . . . . . . .. ~ 1 7 6 /. . . . ~ 1 7 6~ . . . . ~ 1 7 6 . ~ j. ~ 1 7 6 1 7 6 1 7 6 1 7 6 1 7 6 1 7 6.~

    I t [ I2 4 6 8

    t i p s I0

    F i g u r e 3 . C o m p a r i s o n o f t h e m e a n s q u a r e d i s p l a c e m e n t s f o r d i f f er e n t Q v a l u e s at 1 5 0 K .S o l i d - l i n e Q = 1 , d a s h e d l in e Q = 1 0, a n d d o t t e d l in e Q = 1 0 0 (k J m o l - : ) ( p s ) 2.

  • 7/30/2019 1984, A Molecular Dynamics Method for Simulations in the Canonical Ensemblet by SHUICHI NOSE

    11/14

    Canonica l ensemble M D method 265The comparison of temperature fluctuations in the run with Q = 1 and

    100 (kJ mol-1)(ps) ~ is given in figure 2. With Q = I , the time scale of thefluctuation of s and that of the temperature are ah'nost the same. On the otherhand, with ~= 100, the temperature fluctuation can be decomposed into twocomponent s : the intrinsic temperature fluctuation of the physical system and aslow modulation due to fluctuation in s.

    Th e time periods of fluctuations in s are t o = 0.34 ps for ~ = 1 and t o = 2.99 psfor Q=10 0. The estimates given by (2.30) are to=0.38 ps for Q = I andt o=3"8 ps for Q= 100.As a check on some dynamic quantity, the diffusion coefficient D wascalculated from the mean square displacement.

    D= lim ([r i(t) -ri (0)[ 2) (3.2)t ~ o 6t

    The plot of the time evolution of the mean square displacement for different Qvalues is given in figure 3. All values for D for a given temperature seem toagree reasonably well. Even run No. 9 gives almost the same result as theother T e q = 150 K runs, in spite of the large deviation from a straight line.

    4. CONCLUSIONAn MD method for constant temperature simulations has been presented.

    One can see from the derivation in w2 that different kinds of constant tempera-ture simulation methods can be constructed by changing the functional form ofthe potential for the variable s. However, the equilibrium distribution functionthus obtained is related to the inverse function of the potential for s, so that anyother choice but a logarithmic form, results in an ensemble different from thecanonical one. Therefore, a constant temperature method does not alwaysimply that the calculation samples from the canonical ensemble.

    The present me thod gives static quantities in the canonical ensemble. Ifw e employ the interpretation that s is a scaling factor of time and that the realunit time At' is related to the simulation unit time At by At'= At~s , calculationof dynamical quantit ies also seems to be possible. Of course, we have rigorouslyproved nothing concerning with the dynamic quantities, but it will be worthtrying to determine under what conditions can one obtain the dynamicalquantities reasonably well.

    Main features of the present method are(1) The extended system of the particles and the variable s conserves the total

    hamiltonian. Thi s gives a powerful error checking method in the processof programming and a useful precision control method in the simulations[ 7 ] .(2) Since the present method employs a similar technique as the constant

    pressure MD method, it can readily be extended to the constant tempera-ture constant pressure ensemble.(3) Th e scaling of the velocities can be in terpreted as a scaling of the time

    variable. At the same time, the constant pressure MD metho d isderived by scaling the coordinates. The extension of the MD me thod

  • 7/30/2019 1984, A Molecular Dynamics Method for Simulations in the Canonical Ensemblet by SHUICHI NOSE

    12/14

    2 6 6 S h f i i ch i N o s 6t o e n s e m b l e s o t h e r t h a n t h e m i c r o c a n o n i c a l e n s e m b l e is f o r m u l a t e d i n au n i f i ed f a s h i o n .

    ( 4) T h i s m e t h o d g i v e s t h e ri g o r o u s c a n o n ic a l d is t r i b u t i o n b o t h in m o m e n t u ma n d i n c o o r d i n a t e s p a c e .

    I f a s t r u c t u r a l c h a n g e o c c u r s d u r i n g t h e s i m u l a t io n , t h e t e m p e r a t u r e n e c e s -s a ri ly c h a n ge s a n d t h e s ta n d a r d M D m e t h o d c a n n o t p r o d u c e t h e d a ta a t t h er e q u i r e d e x te r n a l c o n d i t i o n s . T h e c o n s t a n t t e m p e r a t u r e m e t h o d , e s p e c i a ll y t h e( T , P , N ) e n s e m b l e m e t h o d g i v e n in th e A p p e n d i x , w i ll b e p a r t ic u l a r l y u s e f u l int h i s s i t u a t i o n .

    D u r i n g t h e p r e p a r a ti o n o f t h e p r e s e n t p ap e r , o t h e r c o n s ta n t t e m p e r a t u r e M Dm e t h o d s w e r e p r o p o s e d b y E v a n s [ 1 5] , b y E v a n s a n d M o r r i ss [1 6] , a n d b y H a i l ea n d G u p t a [ 1 7] . T h e p r e s e n t m e t h o d i s t h e o n l y o n e w h i c h g i v es t h e r i g o r o u sc a n o ni ca l d is t r ib u t i o n b o t h in m o m e n t u m a n d i n c o o r d i n a te s p ac e . T h ec o m p a r i s o n w i t h o t h e r m e t h o d s w ill b e p r e s e n t e d i n a f o r t h c o m i n g p a p e r .

    T h e a u t h o r th a n k s M i k e K l ei n , I a n M c D o n a l d , B a r t d e R a e d t, R a y S o m o r j ai ,an d M i ch i e l S p r i k f o r t h e i r i n t e r e s t an d h e l p f u l d i s cu s s i o n s .

    APPENDIXF o r m u l a t i o n [ o r th e c o n s t a n t t e m p e r a t u r e c o n s t a n t p r e s s ur e ( T , P , N )

    ensembleT h e c o n s t a n t t e m p e r a t u r e M D m e t h o d i s r e a di ly e x t e n d e d to t h e (T , P , N )

    e n s e m b l e .I n t h is A p p e n d i x , w e u s e t h e f o r m u l a t i o n f o r u n i f o r m d i la t io n b y A n d e r s e n[ 1] , b u t t h e e x t e n s i o n t o t h e g e n e r a l i z e d f o r m o f t h e c o n s t a n t p r e s s u r e s i m u l a t i o nm e t h o d b y P a r r in e l l o a n d R a h m a n c a n b e d o n e i n a s i m i la r w a y [2 , 3 , 7 ] .

    I n t h e c a s e o f t h e ( T , P , N ) e n s e m b l e , t h e M D c e ll is c o n s i d e r e d t o b e a c u b eo f ed g e l en g t h V li3 , t h e co o r d i n a t e r~ b e i n g ex p r e s s e d a s

    r i = V ll3 xi , (A 1 )w h e r e x i is a sc a l e d c o o r d i n a t e a n d t h e v a l u e s o f i ts c o m p o n e n t s a r e l im i t e d t o t h er an g e o f 0 t o 1 . T h e v e l o c i t y i s a l s o ex p r e s s e d b y a s ca l ed f o r m

    ~,: = V 113 i i. ( A 2 )T h e l a g r a n g i a n i s

    m ' s 2 V Z l 3 " q~(V a,3 ) + 7 g2 s + W f l 2 - P e x V . ( A 3 )= ~ --~ x i ~ - - ( f + l ) k T e q l nP o x is t h e e x t e r n a l ly s e t p r e s s u r e . T h e k i n e t ic e n e r g y t e r m f o r t h e v o l u m e is8 9 T h e e q u a t i o n s o f m o t i o n a r e

    d (m is 2 V2 !3 X i ) - ~C~ V lla f--~-~ ( A 4 )d t ~ x i ~r~or

  • 7/30/2019 1984, A Molecular Dynamics Method for Simulations in the Canonical Ensemblet by SHUICHI NOSE

    13/14

    Canonical ensemble M D method 267

    a n dQs= E misV2j3~ ti2 - (f + 1______))T~q ( A 6 )S

    (A 7)W i t h t h e m o m e n t a

    P i = m iss V2/3x~: , pv= WV, a n d P s = Q i ,t h e h a m i l t o n i a n b e c o m e s

    p v 2~2= ~i 2m,zsi~V2/a ~-(~ (V1 /ax)+P s 2 + (t+ l ) h T e q l n s + 2 - W . ( A S )T h e p a r t i ti o n f u n c t i o n o f t h i s s y s t e m is

    Z - 1- -~v . S d p sS ds ~ d p v ~ d V ~ d p ~ d x ( ~a f f 2 - E ) ( a 9 )B y s ca l i n g p an d x a s p/sVa/a= p ' , V 1/a x = r , w e g et

    Z _ 1- ~ I dp~ dp ~ I d V I d p' I d r I a s s ~ ( ~ - e )F o l l o w i n g t h e s te p s in w2 , o n e d e r i v e s t h e r e s u l t

    [ E ] 1 ~ d V ~ d p ' ~ d r( (2 7 r)2 QW )l /2 ex p ~ ~ . lZ - ( I + 1 )9 p , 2+ P ~ x V ) /k T ~ q ]

    - ( f + 1 ) ( (2 rr )2QW)a/2 exp Z T pN. ( a 1 0 )Z T px is t h e p a r t i ti o n f u n c t i o n o f t h e ( T , P , N ) e n s e m b l e . T h e a v e r a g e s o fs t a t i c q u a n t i t i e s w h i c h a r e f u n c t i o n s o f p ' , r , V a r e t h e s a m e a s t h o s e i n t h e( T , P , N ) e n s e m b l e :

    s ~ ' x , V = ( A ( p ' , r , V ) ) T p N. (A 11)

    REFERENCES[1] ANDERSEN, H . C., 19 80 , f t. chem . Phy s. , 72, 2384.[2] PARmNELLO,M ., an d RAHMAN, A., 1980, Phys . Rev . Le t t ., 45, 1196.[3] PARRINELLO,M ., a nd RAHMAN, A., 1981 ,ff. appl . Phys. , 52, 7182.[4] PARRINELLO,M ., RAHMAN,A., and VASHZSHTA,P. , 1983, Phys . Rev . Le t t . , 50, 1073.[5] Nos~, S., and KLEIN, M . L. , 1983, Phys . Rev . Le t t . , 50, 1207.[6] Nos~ , S . , and KLEIN, M . L . , 1983, f t. chem. Phys . , 78, 6928.[7] Nos~, S., and KLEIN, M. L . , 1983, Molec. Phys. , 50, 1055.[8] WOODCOCK, L . V ., 19 71 , Chem. Phys. Let t . , 10, 257.[9] ABRAHAM, F. F., KOCH , S. W ., an d DESAI, R. C., 1982, Phys . Rev . Le t t . , 49, 923.[10] HOOVER,W . G., LADD, A. J. C., a nd MORAN, B., 19 82, Phys . Rev . Le t t . , 48, 1818.[11 ] TANAKA, H ., NAKANISHI, K ., an d WATANABE, N ., 19 83 , J . chem. Phys . , 78, 2626.

  • 7/30/2019 1984, A Molecular Dynamics Method for Simulations in the Canonical Ensemblet by SHUICHI NOSE

    14/14

    2 6 8 S h f i i c h i N o s 6[12] HOOVER, W . G ., an d ALDER, B. J. , 1967,f t . chem. Phys., 46, 686.[13] LEBOWZTZ, . L ., PERCtSS, J. K ., an d VERLET, L ., 19 67 ,Phys . Rev . , 153, 250.[14] CHgUNG , P. S. Y ., 1977 , Molec. Phys. , 33, 519.[15] EVANS, D . J. , 198 3,f t . chem. Phys., 78, 3297.[16] EVANS, D . J . , an d MORRZSS, G . P., 1983, Chem. Phys . , 77, 63.[17] HAZLE,J. M . , an d GUPTA, S. , 1983,J . chem. Phys . , 79, 3067.