Open Access This article is
- freely available
Computation 2018, 6(1), 11; doi:10.3390/computation6010011
Holonomic Constraints: A Case for Statistical Mechanics of Non-Hamiltonian Systems
Institute for Applied Mathematics “Mauro Picone” (IAC), CNR, Via dei Taurini 19, 00185 Rome, Italy
University of Rome “La Sapienza”, P.le Aldo Moro 5, 00185 Rome, Italy
University College Dublin (UCD), Belfield, Dublin 4, Ireland
Dipartimento di Scienze Fisiche, Informatiche e Matematiche, University of Modena and Reggio Emilia, Via Campi 213/A , 41125 Modena, Italy
Author to whom correspondence should be addressed.
Received: 8 January 2018 / Accepted: 25 January 2018 / Published: 1 February 2018
A dynamical system submitted to holonomic constraints is Hamiltonian only if considered in the reduced phase space of its generalized coordinates and momenta, which need to be defined ad hoc in each particular case. However, specially in molecular simulations, where the number of degrees of freedom is exceedingly high, the representation in generalized coordinates is completely unsuitable, although conceptually unavoidable, to provide a rigorous description of its evolution and statistical properties. In this paper, we first review the state of the art of the numerical approach that defines the way to conserve exactly the constraint conditions (by an algorithm universally known as SHAKE) and permits integrating the equations of motion directly in the phase space of the natural Cartesian coordinates and momenta of the system. We then discuss in detail SHAKE numerical implementations in the notable cases of Verlet and velocity-Verlet algorithms. After discussing in the same framework how constraints modify the properties of the equilibrium ensemble, we show how, at the price of moving to a dynamical system no more (directly) Hamiltonian, it is possible to provide a direct interpretation of the dynamical system and so derive its Statistical Mechanics both at equilibrium and in non-equilibrium conditions. To achieve that, we generalize the statistical treatment to systems no longer conserving the phase space volume (equivalently, we introduce a non-Euclidean invariant measure in phase space) and derive a generalized Liouville equation describing the ensemble even out of equilibrium. As a result, we can extend the response theory of Kubo (linear and nonlinear) to systems subjected to constraints.
Keywords:holonomic constraints; non-Hamiltonian dynamics; SHAKE
The dynamical and statistical behavior of a mechanical system of many degrees of freedom subjected to holonomic constraints presents specific features that seem worth presenting and discussing in a unified framework. A mechanical Hamiltonian system is a system whose evolution is derivable from a standard Hamiltonianwhereis the kinetic energy expressed in Cartesian coordinates as a Euclidean quadratic form of the momentaand is a function of the Cartesian coordinatesN is the number of point particles in the system, and we have put ourselves in dimension 3. The space of the coordinates is called configuration space, while the phase space gives the space of the mechanical states of the system. To say that the system is subjected to f holonomic constraints is equivalent to saying that the motion has to evolve on a -dimensional configuration space, which results from imposing f geometrical conditions at all times. These constraints can connect all the coordinates of the configuration space, in which case we call them global (Blue Moon [1,2]), or connect disjoint subgroups of the coordinates, which is, for example, the way in which molecular systems can sometimes be described , or else can be the conditions for orthonormality of single electron orbitals, as in the Car–Parrinello approach to ab initio molecular dynamics .
Global constraints can be used to bring the system in situations normally difficult to visit. In these cases, the constraints can act as a kind of Maxwell daemon. In the solution of the classical Statistical Mechanics of dynamical systems, the constraints confront two major problems. As we have seen before, the constraints are an essential ingredient in the definition of the dynamical system, therefore any acceptable algorithm introduced to solve the dynamics of such a system cannot propagate any error, as otherwise the statistical behavior of the ensemble in the presence of the constraints cannot be properly formulated. This last problem in principle is automatically solved for Hamiltonian systems by using generalized coordinates. However, especially for systems with many degrees of freedom, generalized coordinates are completely intractable, and one should be able to formulate properly the problem by using Cartesian coordinates in a standard way. As we will see, a family of algorithms avoiding the propagation of the errors have been introduced [3,5], while the proper formulation of the statistical ensemble is straightforward for the equilibrium case  but requires some more work for non-equilibrium, where the missing ingredient is the correct Liouville equation to use . To get the proper Liouville equation one has to abandon the traditional Hamiltonian description, in which one had the constraint forces by using a Lagrange multiplier, and go straight to the non-Hamiltonian behavior of the equations of motion of the system in which the constraint forces are explicitly (analytically) solved. For this non-Hamiltonian equations the Euclidean nature of phase space is no more an invariant, therefore one has to find an invariant, non-Euclidean, measure to be associated with the phase space so that the statistical behavior of the system can be properly described by generalizing the Liouville equation . As we will see, the non-equilibrium response of our constrained system to external perturbations can be derived directly , while the best known results of linear response theory, the so-called fluctuation-dissipation theorem, can be derived but requires some extra work . The advised reader should be warned that in this review we have excluded the treatment of non-holonomic constraints, a very large family difficult to unify and in any event requiring special treatments .
In Section 2, we summarize the formalism needed to describe a system with constraints. In Section 3, we write down the general (SHAKE) equations to be solved to derive whatever family of numerical algorithms and briefly describe the two best known formulations: the one, adopted with the Verlet algorithm, usually referred to as Shake , not to be confused with the reference to the general equation to be solved, and the one modified to work with the velocity-Verlet algorithm, usually referred to as Rattle . To these two, we will briefly add a more recent alternative devised to give a parallel implementation of SHAKE . In Section 4, we derive the equilibrium ensemble of Hamiltonian systems subjected to holonomic constraints . Section 5 presents an effective approach to compute conditional averages by the use of holonomic constraints (Blue Moon) [1,2,14,15]. The possibility to compute conditional averages can be used in conjunction with non-equilibrium molecular dynamics techniques [16,17,18,19,20] to compute rate constants, hydrodynamical phenomena and, in general, relaxations from large fluctuations statistically produced by introducing suitable constraints. In Section 6, we formulate the non-Hamiltonian equations of motion for a constrained system, we derive from them an invariant measure for the phase space, the correct generalized Liouville equation and, again, as a way to see how all that works, the expressions for the equilibrium ensembles. Then, we start from the generalized Liouville equation to give a rigorous expression for the response to external perturbations of a constrained system  and we prove with some rigorous arguments that also the classical results of linear response theory can be shown to hold . The paper is concluded by a short outlook in which we try to assess the state of the art in the treatment of the computational classical Statistical Mechanics for systems subjected to holonomic constraints.
2. Dynamics with Holonomic Constraints
Given the Lagrangian of a dynamical system with N particles in dimension 3, subjected to f holonomic constraintsthe equations of motion (Lagrange equation of I type) arewhere the are the unknown Lagrangian multipliers to be determined by imposing that
Note that the multipliers together with all their derivatives of any order can be determined by taking successive time derivatives of the expressions . In particular,are evident conditions to be satisfied since holonomic constraints do not perform any mechanical work and therefore permitted velocities and constrained forces have to be orthogonal. Moreover,
Substituting in Equation (9) the equations of motion, Equation (6), and solving the resulting linear system for the s, we getwhere
The expressions resulting from introducing Equation (10) in Equation (6) could possibly provide fully explicit, no longer Hamiltonian, dynamics. For the moment, we will not be interested in such formulation because any approximate algorithm that make use of Equation (10) will necessarily propagate the errors in the constraint relations, Equation (5), with dramatic consequences on the stability of the model. Further derivatives with respect to time of the s will provide linear relationships for the higher order derivatives of the s, which could be needed in higher order algorithms.
By taking the standard Legendre transform on the Lagrangian ,the same dynamics can be straightforwardly formulated in Hamiltonian terms,involving the same treatment for the constraint forces. In the following, it will be useful for theoretical purposes to consider an equivalent representation of the Hamiltonian expressed in terms of
- the f constraint relationships , and
- the remaining generalized coordinates .
This change of coordinates is a point transformation of the configuration space and therefore generates a canonical transformation . With this change of variables, the Lagrangian of our system generates the Lagrangian in the new coordinates given by
Sometimes, it is useful to call collectively the variable . From the Lagrangian , we getandwhere the kinetic term is nowandis the metric matrix associated with the new variables. Note that it is almost immediate to find for the inverse matrix the explicit expression
There is an intimate connection between the matrix , the Jacobian matrix and the Jacobian determinant of the point transformation. Introducing the mass tensor for by means of the Kronecker delta, one can rewrite in Equation (19) and, of course, its determinant , as
In this representation, the constrained motion is generated by the Lagrangian in the -dimensional space
Note, however, that these equations are no longer in normal form.
The Hamiltonian formulation helps us to get back to an evolution expressed in normal form. Given thatwe have
To proceed, it is useful to write the matrices and in block formwherewith already defined in Equation (11), to derive a number of results, which we will use in the following. In particular, note that the block matrices defined above are not independent from each other. A first set of useful relations can be derived by expanding the expressions for the identity
Another useful relation is the one that, in a different language, is known as Fixman’s Theorem . It relates the determinants of the matrices and
By putting Equation (33) together with Equation (21), we obtain for the determinant of the block matrix , the interesting expressionthat will be useful later on.
Going back to the constraint relations, the conditions can now be written asgiving the non-zero values of the conjugated momenta when the constraints are imposed,where and are implicitly defined in Equation (38). In these conditions, the Hamiltonian of the constrained motion can be evaluated explicitly on the hypersurface to obtainwhere we first used to go from Equation (40) to Equation (41) and, then, from Equation (41) to Equation (42), we have used the relations from Equation (32), and . The Hamiltonian generates the equations of motion in the dimensional space in normal form
3. SHAKE, Integrating the Equations of Motion
The numerical integration of the equations of motion (6) requires discretizing the time and to provide a suitable algorithm of given precision. Generally, for evident reasons, one avoids the use of algorithms requiring more than the computation at each step of the forces avoiding successive derivatives, e.g., , etc. For illustrative purposes, we will limit ourselves to write down the integration of the Lagrangian equations of motion using the Verlet algorithm and of the Hamiltonian equations using the velocity-Verlet algorithm.
3.1. Verlet Algorithm
The celebrated (1967) Verlet algorithm is easily obtained by writing down and summing up the forward and backward Taylor expansions of each coordinate truncated to the fourth order. Calling x a generic variable in the configuration space set (and ), it readswhere t is the running time and h is the integration step resulting from time discretization. The velocity with this algorithm is computed by subtracting the same forward and backward Taylor expansions. We get, with one timestep of delay,where we have written explicitly the error of order for further use. Notice that the velocities, which carry a larger error, do not enter in the computation of the trajectory, which remains precise to the order three, and, as it has been shown, has many other remarkable features that can be summarized by saying that this algorithm is simplectic [22,23]. In presence of holonomic constraints, the acceleration of any coordinate x can be decomposed in the two contributions, coming from the interaction potential of the model and the constraint force, where is a set of parameters to be determined, so that
Substituting Equation (47) in the algorithm Equation (45), we havewhere , the provisional value of the coordinate at time , is the position the coordinate would take in the absence of constraints. Now, and this is the essential conceptual content of the whole family of SHAKE algorithms, we determine the set of the parameters by imposing and solving the set of algebraic equations
Since we have f values and f constraint relationships, the system of algebraic, generally not linear, equations is well posed. The values of the s solving these equations are in general different from the values of the obtainable from Equations (10). However, the difference cannot be of greater order than the one involved in the algorithmic error. Therefore, the values of the coordinates at time will entail an error equivalent to the one produced by the blind application of the Verlet algorithm. However, now, the constraint relationships will be satisfied exactly at every timestep and the dynamics of the system will not disrupt the model.
Many different ways have been proposed to solve the system of Equations (46), see e.g., [13,24,25,26,27]. The original, and still commonly used, goes back to Berendsen , who called it, again, Shake. It proceeds by satisfying one constraint at a time, iterating constraint relationship by constraint relationship until convergence. The technical details have been worked out, apart from the original paper, more pedagogically in . Leimkuhler  has demonstrated that the resulting numerical procedure maintains the time reversal invariance and the simplectic character of the algorithm. In the referred to, original, implementation, the algorithm is inherently serial and cannot be easily parallelized. Practical parallelizations are either approximate or the algorithms are specifically tailored to the problems at hand. An interesting general parallel solution has been worked out by Weinbach and Elber . They take advantage of the fact that the essential step in solving the SHAKE equationcan be recast as the solution of a sparse linear problem of the type with the vector of unknowns. Constructing a suitable positive definite matrix, they solve the SHAKE equation using (parallel) conjugate gradient minimization of the quadratic form in place of the standard iterative process (inherently serial).
3.2. Velocity-Verlet Algorithm
The Verlet algorithm can be easily recast in an algebraically equivalent form that, when applied in the correct order, produces both the positions and the velocities at the same time. Using the same symbols, let us first rewrite Equation (45) by replacing with its value extracted from Equation (46)where we have written explicitly for further use the expression for the error , to be normally rejected, in order to obtain the first equation of the velocity-Verlet algorithm, which expresses the position x at timewith an error of order , here retained in its explicit form. Next, we write the velocity from Verlet (46) taken at time and eliminate the position using, again, Verlet (45) taken to go from time to time ,where we made again use of Verlet (45) to expand one of the two contributions. Regrouping terms and simplifying, we can writewhere we got rid of the fractionusing Verlet (46). Finally, by expanding with Taylor the third derivative term at time , , we observe that the two terms cancel each other leaving a term in . Finally, we arrive at the second equation of the velocity-Verlet algorithmwhich expresses the velocity at time , again with an error of order .
Substituting Equation (47) into Equation (52), we have, analogously to the previous section,where , the provisional value of the coordinate at time , is the position that the coordinate would take in the absence of constraints using Equation (52), and is the constraint force and the parameters are determined by imposing and solving the set of equations
Again, we have an algebraic system with f constraint relationships and f unknown values . The problem is well posed and the solution can be retrieved exactly along the same lines as before, by using the iterative Shake algorithm. Of course, we will have a different set of parameters, , but the new positions will satisfy the constraints (5) exactly at the time . To calculate the new velocities, the above procedure must be repeated by substituting Equation (47) in Equation (59), now at time ,where andthe provisional velocity at time , i.e., the value the velocity would take in the absence of constraints at time . Note that, at this stage, the and, therefore, the constraint force at time t are already computed and therefore included in , while one needs to determine the yet unknown parameters by imposing and solving the set of equations
Once more, we have an algebraic system with f constraint relationships, , and f unknown values, . The problem is well posed and the solution can be retrieved by an iterative Shake-like procedure, i.e., proceeding by satisfying one constraint relation at a time. The whole procedure of imposing constraints within the velocity-Verlet scheme is known by a different name, the Rattle algorithm , although it is indeed nothing else than the same SHAKE procedure applied twice, once for positions and once for velocities, to two different sets of equations. The main difference with the original Shake algorithm  lies in the fact that the velocities calculated using Equation (62) are at each time exactly tangent to the constraint hypersurface , while the velocities calculated, usually, simply using Equation (46) in the original Shake algorithm are tangent only within the algorithm accuracy (). This extra precision does not come for free, but at the cost of doubling the effort in calculating the unknown parameters. As long as the velocities in the Verlet algorithm do not enter directly into the numerical integration of the positions, such difference can be safely ignored; however, if desired, nothing would impede applying Shake in the same spirit, and with similar costs, to correct the velocities from Equation (46).
4. Equilibrium Statistical Mechanics in the Hamiltonian Formulation
The expression of the statistical equilibrium ensemble in Cartesian coordinates of a system subjected to holonomic constraints is not smooth but singular since the probability density defined in a -dimensional phase space is associated with a mechanical system whose motion takes place in a -dimensional subspace, i.e., the intersection of the hypersurfaces and .
On the contrary, it is immediate to write down the (microcanonical) probability density in the reduced phase space of the generalized coordinates using the Hamiltonian in Equation (42).
Let be a dynamical variable defined using Cartesian coordinates and the equivalent variable expressed using generalized coordinates, restricted to the constrained hypersurface. The familiar microcanonical average in generalized coordinates readswhere
We will now transform it into the equivalent integral in Cartesian coordinates by making use of the canonical transformation that connect the “generalized” phase space variables introduced in Section 2 to the “Cartesian” phase space variables . We first remark that, on the phase space hypersurface, one haswhere, for the product of the first f delta functions, we have used the shortcut notation , and, equivalently, for the last term .
A more convenient expression for this product of delta functions can be derived by nothing that by multiplying Equation (37) by , one obtains:
Finally, using the facts that the Jacobian associated with a canonical transformation generated by a point transformation in the coordinates preserves the phase space volume, i.e., , and Equation (42), we can write for the microcanonical average (65)where now,with the modulus of the determinant of the matrix . From Equation (69), it follows directly the expression for the probability density in the microcanonical equilibrium ensemble in Cartesian coordinatesand similar for other equilibrium ensembles. In particular for the Canonical ensemble, where classically momenta and coordinates are explicitly independent, the probability density will result in being
For theoretical purposes, as we will see in the following, it is very useful to write the ensemble in terms of the marginal configurational probability density and the conditional probability density of the momenta :where
Explicitly, can be computed by first integrating out the delta functions for in Equation (75), which amounts, after a change of variables, to the substitutions , and then by executing the Gaussian integrals involved in the canonical ensemble. Assuming that the standard result of the integration of a unidimensional Gaussian integral is known,and, for a multidimensional Gaussian integral, diagonalizing the quadratic form and using the invariance of the determinant under unitary transformations, one derives immediately for the integral that, in n dimensions,
Focusing on the numerator in Equation (75), making a change of variables in the integral by using , one has
To obtain Equation (79), we have proceeded as follows. First, we substitute the kinetic Hamiltonian term in the exponential with its “unconstrained” expression in Equation (40) and integrate over using Equation (42). Now, we perform the remaining multidimensional Gaussian integral over the remaining momenta by using Equation (77) and use Equation (36) to arrive at the result in Equation (79). Following the same procedure for the denominator and simplifying the constants in Equation (79), we finally gets for the normalized marginal probability density
Equation (80) tells us that the marginal probability density in configuration space, in the presence of constraints, is not simply but contains the biasing term coming from the limitations in momentum space induced by the constraints.
The conditional probability density in momentum space is given bywhere to get the first equality we referred to Equation (80); for the next step, the result implicit in Equation (79); and, finally, then Equation (83). The configuration dependent factor in Equation (83) indicates that, when there are constraints, positions and momenta are no longer independent. In particular, the distribution of momenta becomes no more simply Maxwellian.
5. Rare Events and Blue Moon Ensemble
In the statistical mechanical treatment of macroscopic phenomena, one is interested in computing the properties of interest by identifying suitable observables, i.e., function of phase space, , although here, and for a while, we will focus on observables depending only on the configuration space and obtaining their macroscopic counterpart by taking an ensemble average (to be definite, let us choose to work with the canonical ensemble) of it,
More generally, given one observable, it can be instructive to compute the marginal probability density associated with it in the ensemble
Macroscopically speaking, this probability density has a profound meaning since it can be associated, via the definition of the (Landau) free energyto the reversible work needed to bring the physical system from a reference state to the value . This fact can be easily seen by taking the derivative with respect to of Equation (86)In the same spirit of Section 2, we introduce the canonical transformation from the Cartesian coordinates to the generalized coordinates , where with the set suitably chosen. Now, using that , integrating by parts, we arrive atwhere is the Hamiltonian expressed in the generalized coordinates, see Equation (17). In generalized coordinates, the kinetic term in the Hamiltonian (see Equation (18)) gives a non-zero contribution to the derivative, which is nothing but a geometrical correction that ultimately involves (see Appendix A) the Jacobian of the coordinate transformation,
From Equation (90), we see that the derivative of is a conditional average, at a given value of the observable, of the generalized force acting on the system, i.e., typically a thermodynamic force. The evaluation of this expression as given in Equation (90) requires constructing explicitly the set of generalized coordinate , something usually very cumbersome, and needs an ad hoc derivation in each particular case. As a matter of fact, it is possible to circumvent this technical difficulty  and derive expressions directly in terms of the function and its derivatives with respect to the Cartesian coordinates . The “work” associated with this force is what we identify with reversible work. By thermodynamic integration, we can get the reversible work relative to a reference state and by exponentiation the probability density associated with the random variable .
In standard conditions, when is a unimodal random variable, the sampling of its probability density is an easy matter that can be computed directly in any straightforward Monte Carlo or Molecular Dynamics simulation by simply recording the histogram of visited values. Things become less evident when the probability distribution of the random variable is not only multimodal, but the regions in between the maxima are characterized by very low probabilities so that whatever simulation gets stuck in one of the highly probable regions and, physically speaking, we are in the presence of a metastability. When this is the case, a brute force sampling of the histogram is no longer possible and one has to find, by cunning, alternative ways to proceed. As we will see in the following, the concept of conditioned or constrained probability will take us out of the difficulty.
To see that, we consider the condition as the constraintand we compare the conditional probabilitywith Equation (80) for the marginal probability density in the presence of the constraint . We findi.e., a way to sample the conditional probability of given by unbiasing a constrained probability density. Now, even regions of the configurational space associated with very low probabilities can be efficiently sampled and the metastability problem is taken out. In particular as a kind of corollary to Equation (93), we have for any configurational observable ,with the rhs that, at variance with its left counterpart, can be efficiently sampled even for values of corresponding to metastabilities.
The next problem arises when we need to take conditional averages for observables depending on the whole phase space, i.e., and . This case, apparently not so common, is instead general if one considers conditional dynamic properties (time correlation functions) even of configurational properties. Indeed, as it is immediately evident, is nothing else than a function of the initial condition parametrically dependent on the time t. Therefore, to be able to sample an unbiased conditional ensemble, with , we need to have unbiased . We know that the momenta in the constrained ensemble, Equation (83), are irreversibly biased and thus unusable. However, we can unbias the configurations taken along a constrained trajectory and associate with them momenta sampled from an unbiased probability distribution. Knowing that, in the original ensemble, positions and momenta are independent and moreover the distribution of momenta is just a product of Maxwellians, we can easily get such a samplefrom which directly a computable expression for a time correlation function at givenwhere the time evolution now has to be intended to be fully unconstrained. The ensemble so constructed is the Blue Moon Ensemble and the problem of this particular metastability is now solved. In particular, if we are interested in the calculation of an unconditioned time correlation function in a system where a brute force calculation (due to metastability) is not possible, we can compute it by thermodynamic integration using the predetermined marginal probability of , . We get
To simplify the algebra and the notation, we have developed our argument only in the case of one scalar condition, . The generalization to a vectorial condition is straightforward but cumbersome, and it can also be found explicitly derived in the literature . The case in which the mechanical system contains constraints other than the ones representing physical conditions, typically molecular constraints, is formally more involved but conceptually identical. The interested reader can find all needed details in Ciccotti et al. .
6. Liouville Equation in the Presence of Constraints
The careful reader will have noticed at this point that we have properly solved the dynamics of a Hamiltonian system subjected to holonomic constraints and also formulated, in the Cartesian space, its statistical behavior at equilibrium. Instead, we have been unable to formulate in general the Statistical Mechanics of the system, including the evolution of the non equilibrium ensemble. The reason is that we miss the Liouville equation for this family of dynamical systems. We will see in the following that a generalized Liouville equation, always in the Cartesian reference description, can be derived at the price of abandoning the formulation of the dynamical evolution of the system by Lagrange multipliers and deriving, instead, the statistical behavior of a many-body, non-Hamiltonian system still satisfying the (assumed) conditions needed to justify a statistical treatment (e.g., chaotic behavior of the constituents, etc.). In these conditions, we will be able
- to get a correct generalized Liouville equation;
- to find the results already obtained for the equilibrium ensemble;
A general, non-Hamiltonian, dynamical autonomous system is defined, in the set of variables , bywith the single component not derivable as . The first and most important difference with a Hamiltonian system, especially in view of the derivation of the statistical properties of such a system, is that the phase space volume can be no more an invariant of the motion. If that happens, the standard approach of Statistical Mechanics is doomed to fail. However, it is easy to see that an invariant measure for the systems given in Equation (98) is easily found. Indeed, nowwhere is the solution of Equation (98), the initial condition and the determinant of the Jacobian matrix of the time-generated change of variables. In Appendix B, it is shown thatwhere , the divergence of the flow in phase space , is known as the phase space compressibility of the dynamical system, and we have introduced the shorthand notation for the gradient with respect to coordinates at time t. The solution of Equation (100) with the initial condition iswhere is the primitive function associated with the indefinite time integral of which exists with certainty given that . Substituting this results in Equation (99), we findi.e., the conservation in time of the measure . The factor , let us call it , is the metric factor associated with the coordinate transformation . It tells us that the statistical space of the variables is no more Euclidean but has a non trivial metric structure. Remembering that the statistical ensemble is described by a probability density we have for the normalization condition,from which we get and, therefore, the continuity equationwhich represents the new, valid form for the Liouville equation for our more general dynamical systems. The solutions of Equation (104) will give us the evolution in the time of the ensemble associated with our non-Hamiltonian systems in non-equilibrium conditions while their stationary, asymptotic solutions can represent the equilibrium ensemble. We will now proceed in two steps, in order to derive the consequences of this more general approach to Statistical Mechanics. First, we will discuss how to obtain, in these conditions, not just a stationary solution but the correct equilibrium ensemble corresponding to the microcanonical ensemble of the standard case and show, just for illustration, how by this procedure we can re-derive the equilibrium ensemble for systems subjected to holonomic constraints. Then, second, using the general form of the solution of Equation (104), we will show the validity of the response approach developed by Onsager and Kubo (at least) for the Hamiltonian case.
6.1. Generalized Distribution Function
Assuming that the system (98) possesses conserved quantities ,the space sampled by its trajectories will be the subspace intersection of the hypersurfaces , where the values are determined by the initial conditions. The “microcanonical” distribution function generated in these conditions is
The solution (106) satisfies Equation (104) since its total time derivative is evidently zero and, moreover, is microcanonical since all accessible configurations are equiprobable. Other solutions exist, for example products of delta functions for subsets of the full set of conservation laws, but they do not correspond to physical ensembles since they will represent hypersurfaces containing states that will never be visited. In other words, physical ensembles cannot be obtained by using only the solutions of the Liouville equation (104). To satisfy the stationary Liouville equation is a necessary but not sufficient condition. From the previous observations, it is possible to derive the rules to be followed to construct the proper equilibrium ensemble and the correct invariant measure.
- Construct the distribution function by Equation (106) using all the independent conservation laws implicit in the equations of motion;
- Eliminate from the statistical space all variables that result uncoupled to the bulk of the system or driven by it. By driven, we mean variables
A (not so) typical example could be that of particles of zero mass interacting with the system only via the holonomic constraints defining their own values (see Appendix C).
- whose evolution follows that of the other variables without influencing those ones and
- that do not appear in the phase space expression of any of the conserved quantities .
- Once the essential, reduced, set of variables, let us call them , has been selected, calculate the phase space compressibility of the reduced dynamical system
The results arewhere, via the normalization factor, is implicitly defined the new partition function
We now turn, for illustrative purposes, to apply the formalism just developed to an originally Hamiltonian dynamical system subjected to holonomic constraints. As we have seen before, the non-Hamiltonian equations of motion are obtained inserting directly Equation (10) into Equation (14). The result is
Now, are conservation laws to be added to the Hamiltonian. The compressibility factor is (easily) computed asgivingfrom which we recover the ensemble already derived, Equation (73).
6.2. Response Theory
We address now the central question of dynamical non-equilibrium Statistical Mechanics for systems subjected to holonomic constraints: how to get statistical averages when the evolution of the system is no more stationary be it due to time-dependent perturbations or to the study of relaxation processes . These problems are already solved in the Hamiltonian case (even with non-Hamiltonian perturbations but conserving the phase space volume [19,31,32,33,34,35]); here, we extend that solution to our present case. Let us start from the simpler case of the study of relaxation. Here, we have the system prepared in a non-equilibrium condition and we intend to study the macroscopic relaxation of an observable:where is the invariant measure already derived and is the ensemble at time t obtained by evolving with the generalized Liouville Equation (104) the initial non-stationary ensemble . Let us define the Liouville operatorIt follows immediately thatwith formal solution
As for the evolution of the ensemble, we can start from the Liouville equation (104)from which we can (easily) find, by using the fact that and the identity , thati.e.,or else, once again,
Moreover, as in the standard case
By remembering that we are working with an invariant measure, we find, again,a relation easy to implement in molecular dynamics simulation of a relaxation process if we can prepare a sample of the non-equilibrium initial ensemble .
Let us now move to the case in which we are interested to compute the response of the system to an external time-independent field. The equations of motion becomewith derivable () or not from a Hamiltonian perturbation term (). In any event, to simplify the formalism (and on the basis of what is usually done in transport studies ), let us assume that , i.e., that the perturbation satisfies the incompressibility condition. This condition guarantees that, even in the presence of the perturbation, the non-zero compressibility arises only from the constraints and it is given by Equation (114). The Liouville operator is now time-dependentandwhere is the time-ordering operator. However, in spite of this more daring complexity, again the probability density evolves with the operatorso that, again,is the initial condition an equilibrium distribution or a general one, in any event a relation easy to implement in molecular dynamics simulations. Equation (132) is valid in general both in the linear response regime and beyond it. In the case of small perturbations, it is possible to show, after some algebra, that, in the presence of constraints, the classical linear response result of Green  and Kubo  is recovered and holds without any alteration from the uncostrained case .
The dynamics and Statistical Mechanics of a many-body system subjected to holonomic constraints have been discussed both following, as for the equilibrium case, the classical historical Lagrange (Hamilton) approach, using Lagrangian multipliers, and, more generally, from the newer perspective, encompassing also non-equilibrium, of non-Hamiltonian flows in phase space. One section has been dedicated to review in depth the most relevant numerical implementations, while, for the sake of readability, the reader has been addressed to the relevant literature for the technically most involved cases. A quite peculiar application, the zero-mass particle case, has been discussed to show how constraints can be creatively used to extend the description of the system opening a different, efficient, way of incorporating, for example, new features in force field models. Let us, finally, remark that developing the statistical theory of dynamical systems subjected to holonomic constraints permits to cover both equilibrium and non-equilibrium simulations of molecular systems but also to explore the domain of rare events, including the computing of complex free energy landscapes, the probing of the dynamics of rare events and even performing non-equilibrium hydrodynamical simulations by properly sampling initial conditions assigning the proper weight to the ensemble of non-equilibrium trajectories that gives the correct (linear and nonlinear) response.
It gives us great pleasure to acknowledge the importance of the lifelong collaboration on these themes with Jean-Paul Ryckaert, Ray Kapral, Michiel Sprik, Glenn Martyna, Mark Tuckerman, Eric Vanden-Eijnden and Carsten Hartmann. This work was partially supported by grant MIUR PRIN-2012NNRKAF_004.
The authors contributed equally to this work.
Conflicts of Interest
The authors declare no conflict of interest.
To evaluate the thermodynamic force in Equation (90), we need to separately address the contributions from the kinetic and the potential terms in the Hamiltonian ,
We enclose for self-consistency of our text a straightforward demonstration of Equation (100). If the coordinate system is changed from coordinate to the coordinates from the time evolution transformation, the volume element in the n-dimensional space changes accordingly to the formulawhere is the Jacobian, i.e., the determinant of the Jacobian matrix
A simple linear algebra result, based on the invariance of determinants and traces with respect to unitary transformations, such as diagonalization, states that, for a given square matrix , with its diagonal form, the determinant can be expressed using , the trace of the logarithm of the matrix itself:
Applying Equation (A8) to the matrix , one obtains for the Jacobian the formula
Equation (A9) can be derived with respect to time t to obtain for J the equation of motion
The derivatives of the elements of the Jacobian matrix can be expressed in terms of the velocity field , where we have used Equation (98) to remind readers that the “velocities” can be expressed as functions of the coordinates and, therefore, by exchanging the order of derivation,
The axis of a diatomic molecule cannot provide a reference frame (a comoving frame) attached to the molecule. However, adding to the molecule a third point of mass zero not collinear with the physical molecule, we can get the comoving frame we were looking for. We show below that this extra variable is driven and doesn’t alter the dynamics and Statistical Mechanics of our system . In order to create a rigid triatomic molecule, i.e., a rigid triangle, one needs to specify three so-called “bond” constraints for the square distances between each pair of atomswhere is the three-dimensional atomic coordinate of atom i with an is the (rigid) distance between atoms i and j. Bond constraints are easy to deal with since, as , the constraint force is parallel to the bond, and the equations of motion arewhere is the total force acting on atom i. Assuming is the index of the virtual particle and , one immediately has thatimplying and , as the two non-zero bond vectors and are, by definition, not collinear. By taking the limit for of Equation (A16) after dividing it by one has that, although the total force acting of is zero, the accelerationdoes not need to vanish, and the equations of motion can be rewritten as
One can notice that, as expected, the motion of the two “real” atoms is not affected by the addition of the virtual one and the dynamics of the third virtual atom simply follows the motion of the first two, “driven” by the constraints. Noting, moreover, that the new variable doesn’t enter in any of the conservation laws of the system, we can conclude safely that also the statistical behavior of the system is not altered by the presence of the extra particle. Equations (A19) can be integrated numerically using SHAKE with the Verlet algorithm described in Section 3.
Another, possibly more interesting, case can arise with a force-field model containing extra-centers of force, whose positions do not coincide with the atomic positions but follow adiabatically the motion of the atoms, taking positions that satisfy the condition of zero force on them. The dynamics of these extra zero-mass points are again inherently driven by that of the material points and so does not intervene in the statistical behavior of the material system.
- Carter, E.; Ciccotti, G.; Hynes, J.T.; Kapral, R. Constrained reaction coordinate dynamics for the simulation of rare events. Chem. Phys. Lett. 1989, 156, 472–477. [Google Scholar] [CrossRef]
- Ciccotti, G.; Kapral, R.; Vanden-Eijnden, E. Blue Moon sampling, vectorial reaction coordinates, and unbiased constrained dynamics. ChemPhysChem 2005, 6, 1809–1814. [Google Scholar] [CrossRef] [PubMed]
- Ryckaert, J.P.; Ciccotti, G.; Berendsen, H.J. Numerical integration of the Cartesian equations of motion of a system with constraints: molecular dynamics of n-alkanes. J. Comput. Phys. 1977, 23, 327–341. [Google Scholar] [CrossRef]
- Car, R.; Parrinello, M. Unified approach for molecular dynamics and density-functional theory. Phys. Rev. Lett. 1985, 55, 2471–2474. [Google Scholar] [CrossRef] [PubMed]
- Ciccotti, G.; Ferrario, M. Constrained and nonequilibrium molecular dynamics. In Classical and Quantum Dynamics in Condensed Phase Simulations; World Scientific: Singapore, 1998; pp. 157–177. [Google Scholar]
- Ryckaert, J.P.; Ciccotti, G. Introduction of Andersen’s demon in the molecular dynamics of systems with constraints. J. Chem. Phys. 1983, 78, 7368–7374. [Google Scholar] [CrossRef]
- Tuckerman, M.E.; Liu, Y.; Ciccotti, G.; Martyna, G.J. Non-Hamiltonian molecular dynamics: Generalizing Hamiltonian phase space principles to non-Hamiltonian systems. J. Chem. Phys. 2001, 115, 1678–1702. [Google Scholar] [CrossRef]
- Ciccotti, G.; Kapral, R.; Sergi, A. Non-equilibrium molecular dynamics. In Handbook of Materials Modeling; Yip, S., Ed.; Springer: Berlin, Germany, 2005; pp. 745–761. [Google Scholar]
- Hartmann, C.; Schütte, C.; Ciccotti, G. Communications: On the linear response of mechanical systems with constraints. J. Chem. Phys. 2010, 132, 111103. [Google Scholar] [CrossRef] [PubMed]
- Goldstein, H.; Poole, C.P.; Safko, J.L. Classical Mechanics, 3rd Edition ed; Addison-Wesley: Boston, MA, USA, 2000. [Google Scholar]
- Ciccotti, G.; Ryckaert, J. Molecular dynamics simulation of rigid molecules. Comput. Phys. Rep. 1986, 4, 346–392. [Google Scholar]
- Andersen, H.C. Rattle: A “velocity” version of the shake algorithm for molecular dynamics calculations. J. Comput. Phys. 1983, 52, 24–34. [Google Scholar] [CrossRef]
- Weinbach, Y.; Elber, R. Revisiting and parallelizing SHAKE. J. Comput. Phys. 2005, 209, 193–206. [Google Scholar] [CrossRef]
- Ciccotti, G.; Ferrario, M.; Hynes, J.T.; Kapral, R. Molecular dynamics simulation of ion association reactions in a polar solvent. J. Chim. Phys. 1988, 85, 925–929. [Google Scholar] [CrossRef]
- Sprik, M.; Ciccotti, G. Free energy from constrained molecular dynamics. J. Chem. Phys. 1998, 109, 7737–7744. [Google Scholar] [CrossRef]
- Orlandini, S.; Meloni, S.; Ciccotti, G. Hydrodynamics from Statistical Mechanics: Combined dynamical-NEMD and conditional sampling to relax an interface between two immiscible liquids. Phys. Chem. Chem. Phys. 2011, 13, 13177–13181. [Google Scholar] [CrossRef] [PubMed]
- Cottone, G.; Lattanzi, G.; Ciccotti, G.; Elber, R. Multiphoton absorption of myoglobin–nitric oxide complex: Relaxation by D-NEMD of a stationary state. J. Phys. Chem. B 2012, 116, 3397–3410. [Google Scholar] [CrossRef] [PubMed]
- Pourali, M.; Meloni, S.; Magaletti, F.; Maghari, A.; Casciola, C.M.; Ciccotti, G. Relaxation of a steep density gradient in a simple fluid: Comparison between atomistic and continuum modeling. J. Chem. Phys. 2014, 141, 154107. [Google Scholar] [CrossRef] [PubMed]
- Ciccotti, G.; Ferrario, M. Dynamical non-equilibrium molecular dynamics. Entropy 2014, 16, 233–257. [Google Scholar] [CrossRef]
- Ciccotti, G.; Bonella, S.; Ferrario, M.; Pierleoni, C. Probabilistic derivation of spatiotemporal correlation functions in the hydrodynamic limit. J. Phys. Chem. B 2016, 120, 1996–2000. [Google Scholar] [CrossRef] [PubMed]
- Fixman, M. Classical Statistical Mechanics of constraints: A theorem and application to polymers. Proc. Nat. Acad. Sci. USA 1974, 71, 3050–3053. [Google Scholar] [CrossRef] [PubMed]
- Hairer, E.; Lubich, C.; Wanner, G. Geometric numerical integration illustrated by the Störmer–Verlet method. Acta Numer. 2003, 12, 399–450. [Google Scholar] [CrossRef]
- Hairer, E.; Wanner, G.; Lubich, C. Geometric Numerical Integration. Structure-Preserving Algorithms for Ordinary Differential Equations; Springer: Berlin, Germany, 2006. [Google Scholar]
- Hess, B.; Bekker, H.; Berendsen, H.J.C.; Fraaije, J.G.E.M. LINCS: A linear constraint solver for molecular simulations. J. Comput. Chem. 1997, 18, 1463–1472. [Google Scholar] [CrossRef]
- Kräutler, V.; van Gunsteren, W.F.; Hünenberger, P.H. A fast SHAKE algorithm to solve distance constraint equations for small molecules in molecular dynamics simulations. J. Comput. Chem. 2001, 22, 501–508. [Google Scholar] [CrossRef]
- Gonnet, P. P-SHAKE: A quadratically convergent SHAKE in O(n2). J. Comput. Phys. 2007, 220, 740–750. [Google Scholar] [CrossRef]
- Gonnet, P.; Walther, J.H.; Koumoutsakos, P. θ-SHAKE: An extension to SHAKE for the explicit treatment of angular constraints. Comput. Phys. Commun. 2009, 180, 360–364. [Google Scholar] [CrossRef]
- Leimkuhler, B.; Reich, S. Symplectic integration of constrained Hamiltonian systems. Math. Comput. 1994, 63, 589–605. [Google Scholar] [CrossRef]
- Sergi, A.; Ciccotti, G.; Falconi, M.; Desideri, A.; Ferrario, M. Effective binding force calculation in a dimeric protein by molecular dynamics simulation. J. Chem. Phys. 2002, 116, 6329–6338. [Google Scholar] [CrossRef]
- Kubo, R. Statistical-Mechanical theory of irreversible processes. I. General theory and simple applications to magnetic and conduction problems. J. Phys. Soc. Japan 1957, 12, 570–586. [Google Scholar] [CrossRef]
- Ciccotti, G.; Jacucci, G. Direct computation of dynamical response by molecular dynamics: The mobility of a charged Lennard-Jones particle. Phys. Rev. Lett. 1975, 35, 789–792. [Google Scholar] [CrossRef]
- Ciccotti, G.; Jacucci, G.; McDonald, I.R. “Thought-experiments” by molecular dynamics. J. Stat. Phys. 1979, 21, 1–22. [Google Scholar] [CrossRef]
- Ciccotti, G.; Ferrario, M. Non-equilibrium by molecular dynamics: A dynamical approach. Mol. Simul. 2016, 42, 1385–1400. [Google Scholar] [CrossRef]
- Ferrario, M.; Bonella, S.; Ciccotti, G. On the establishment of thermal diffusion in binary Lennard-Jones liquids. Eur. Phys. J. Spec. Top. 2016, 225, 1629–1642. [Google Scholar] [CrossRef]
- Bonella, S.; Ferrario, M.; Ciccotti, G. Thermal diffusion in binary mixtures: Transient behavior and transport coefficients from equilibrium and nonequilibrium molecular dynamics. Langmuir 2017, 33, 11281–11290. [Google Scholar] [CrossRef] [PubMed]
- Evans, D.J.; Morriss, G. Statistical Mechanics of Nonequilibrium Liquids; Cambridge University Press: Cambridge, UK, 2008. [Google Scholar]
- Green, M.S. Markoff random processes and the Statistical Mechanics of time-dependent phenomena. J. Chem. Phys. 1952, 20, 1281–1295. [Google Scholar] [CrossRef]
- Ryckaert, J.P.; Bellemans, A.; Ciccotti, G. The rotation-translation coupling in diatomic molecules. Mol. Phys. 1981, 44, 979–996. [Google Scholar] [CrossRef]
© 2018 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).