Download Moldy User's Manual
Transcript
Chapter 2 Algorithms and Equations This chapter describes the implementation of the molecular dynamics technique as used in Moldy. It is not intended as an introduction to MD simulations, and does assume some familiarity with the basic concepts of microscopic models and simulations thereof. The book by Allen and Tildesley[2] is a very good introductory text, covering both the theory and the practicalities and is highly recommended. It also contains comprehensive references to the scientific literature of microscopic computer simulation. Moldy is designed to simulate a common class of models of atomic or molecular systems. The assumptions are: that the system is an assembly of rigid molecules, atoms or ions; that the forces of interaction are derived from continuous potential functions acting between (usually atomic) sites on each molecule; that the dynamics are governed by the classical Newton-Euler equations of motion. A major aim of Moldy has been to allow the most general of models within that class and to impose as few restrictions as possible. In particular arbitrary mixtures of different molecules are allowed and several popular forms of potential functions are catered for. 2.1 The Equations of Motion If we denote the force exerted by atom α of molecule i on atom β of molecule j by f iα jβ 1 then the total force acting on molecule i is F i = ∑ ∑ ∑ f iα jβ (2.1) j and the torque is given by β α N i = ∑(rr iα − Ri ) × f iα (2.2) α where R i = 1/Mi ∑α miα r iα is the centre of mass of molecule i. The motion is governed by the Newton-Euler equations Ri = F i Mi R̈ (2.3) ωi − ω i × I i · ω i = N i I i · ω̇ (2.4) where ω i is the angular velocity of the molecule, I i = ∑α miα (p2iα 1 − p iα p iα ) is the inertia tensor and p iα = r iα − R i is the atomic site co-ordinate relative to the molecular centre of mass. The orientations of the molecules are represented by quaternions as has now become common practice. They are preferred over Euler angles for two reasons. Firstly they lead to equations of motion which are free of singularities[13] which means that no special-case code is required. This leads to much improved numerical stability of the simulation[14]. Secondly, molecular symmetry operations and combinations of rotations are elegantly expressed in terms of a simple quaternion algebra[14, 42]. A quaternion is an ordered number quartet which obeys the algebra given by Pawley[40]. The multiplication rule in that reference may be restated as a matrix product treating each quaternion as a 4-vector. If p ≡ (p0 , p1 , p2 , p3 ) and 1 A comment on notation is appropriate here. In this chapter, site quantities are denoted by lowercase letters, molecular quantities by uppercase, sites are indexed by greek letters and molecules by roman. A missing index denotes a sum over the corresponding sites or molecules so that, for example r iα jβ is a site-site vector and F i j the molecule-molecule force. 2