Theory¶
Absolute free energy¶
The classical Helmholtz configurational free energy \(A\) of a system at temperature \(T\) and volume \(V\) is related to its configurational partition function \(Q\) via:
with \({\bf x}\) representing coordinates of all atoms. For simplicity, from now on we will be using unitless energy \({\cal U}\equiv \beta U\) and free energy \({\cal A}\equiv \beta A\) (and their derivatives; e.g., force), where \(\beta = 1/k_{\rm B}T\).
Free energy derivatives¶
Derivative of free energy w.r.t external perturbation or distortion (e.g., temperature or volume) is related to material properties. For example, average energy \(U\) and pressure \(P\) are given by
(using \(\partial_{\nu}\) to represent the derivative operator \(\equiv\frac{\partial}{\partial \nu}\)). To get general expression of free energy derivative, we will use the vector \({\bf \lambda}\) to represent all perturbations of interest; e.g., \(\lambda=\left(\beta, V\right)\). The unitless free energy \({\cal A}\) at some \(\lambda\) is then given by
and its first and second derivatives are given by
To get \(Q\left(\lambda\right)\) derivatives, we need to recognize that, in general, the integration boundary \(\Omega\) is a function of \(\lambda\),
where \({\bf y}\) represents the new coordinates that span the general phase space \(\Omega\left(\lambda\right)\), at some general \(\lambda\). However, we can use the change of variables technique to carry out the integration over some \(\lambda\)-independent phase-space boundary (we will use \(\Omega(\lambda)=V\)) and use the Jacobian determinant \(J\) to transform from the \(\bf x\) configurations (which span \(V\)) to the mapped coordinates \(\bf y({\bf x},\lambda)\), using \({\rm d}{\bf y} = J {\rm d}{\bf x}\)
now, \(Q\) can be written as a function of the “normal” (current) coordinates \(\bf x\)
where we define a modified potential \({\cal U'} \equiv {\cal U} - \ln{J}\), which accounts for the mapping. Now, the \(Q\) derivatives can be easily evaluated
where we used the \({\rm D}_{\nu}\) operator on some function \(f({\bf y}({\bf x},\lambda),\lambda)\) to represent the total (Lagrangian or material) derivative (i.e., \({\rm D}_{\nu} f = \partial_{\nu} f + \left(\partial_{\nu} {\bf y}\right) \cdot \nabla f\)). Accordingly, the derivatives of \({\cal A}\) are simply given by
where \({\rm Cov}\left(X,Y\right)\equiv \left<XY\right> - \left<X\right> \left<Y\right>\) is the covariance between the stochastic variables \(X\) and \(Y\). We are left with evaluating derivatives of \({\cal U'}\), which are related to \(U\) derivatives via \({\rm D}_{\nu} {\cal U'} = {\rm D}_{\nu} {\cal U} - {\rm D}_{\nu} J \; {\rm and} \; {\rm D}_{\mu\nu} {\cal U'} = {\rm D}_{\mu\nu} {\cal U} - {\rm D}_{\mu\nu} J\).
- Evaluation of energy derivatives
First, \(\cal U\) derivatives can be directly evaluated using the relation between the total (Lagrangian) and partial (Eulerian) derivatives:
where \({\cal F}\equiv -\nabla {\cal U}=-\beta \nabla U\) is the force vector on all atoms and \({\dot {\bf x}}^{\nu}\equiv \partial_{\nu} {\bf y}\) represents the mapping “velocity” of the external perturbation \(\nu\). Applying this operator twice, we get the second derivative
where \({\Phi}\equiv \nabla \nabla {\cal U} = \beta \nabla \nabla {\cal U}\;\) is the force constant matrix and \({\ddot {\bf x}}^{\mu\nu} \equiv \partial_{\mu} {\dot {\bf x}}^{\nu}\) is the \(\mu\nu\) “acceleration”, or the rate of change of \({\dot {\bf x}}^{\nu}\) w.r.t. \(\mu\) (note that \(\;{\ddot {\bf x}}^{\mu\nu} \neq {\ddot {\bf x}}^{\nu\mu}\)).
- Evaluation of Jacobian derivatives
Now, in order to get \({\rm D}_{\nu}J\), we need to do two steps. First, perform differentiation of the phase space volume, using (again) the change of variables technique
Second,use the Reynolds transport theorem along with the divergence theorem in our multidimensional space
Applying this theorem to our case of interest (i.e., \(f=1\); hence, \(\partial_{\nu}f=0\)), we get
where we used the change of variables in the last term on the right-hand side. Now, equating both derivatives we directly get an expression for \({\rm D}_{\nu}J\)
Repeating the same process with another derivative w.r.t. \(\mu\), we directly get
Since we are interested in evaluating the derivatives at \({\bf y}={\bf x}\), then \(J=1\); hence \({\rm D}_{\nu}J = \nabla \cdot {\dot {\bf x}}^{\nu}\) and \({\rm D}_{\mu\nu}J = \nabla \cdot \left(\partial_{\mu}{\dot {\bf x}}^{\nu}\right) + {\dot {\bf x}}^{\mu}\cdot \nabla\left(\nabla\cdot{\dot {\bf x}}^{\nu}\right)\).
Mapping velocity¶
Since \(Q\) is a function only of \(\lambda\), average free energy derivatives do not depend on how \({\bf x}\) get mapped into the \({\bf y}\) coordinates; or, in other words, they do not depend on the mapping velocity \({\dot {\bf x}}^{\nu}\). However, the fluctuations (or uncertainty) in these averages do depend on the mapping. Therefore, for the purposes of molecular simulation measurements we need to choose \({\dot {\bf x}^{\nu}}\) that reduces the stochastic uncertainty as much as possible.
To develop such a mapping we need to recognize that free energy derivatives are given as ensemble averages over \({\rm D}_{\nu} {\cal U'}\) (and its derivative, \({\rm D}_{\mu\nu} {\cal U'}\)). Therefore, a perfect mapping is such that \({\rm D}_{\nu} {\cal U'}\) is independent on coordinates \(\bf x\); hence
Using the above energy and Jacobian derivatives, we get
Solving this equation yields the unique mapping that yields no fluctuations; however, there are two problems. First of all, \(\partial_{\nu}{\cal A}\) is the very quantity that we need to measure. Second, since \({\dot {\bf x}}^{\nu}\) is a multidimensional vector (\(3N\) for the case of atomic systems) we have under-determined system as we only have one equation to solve.
The first problem is solved using the fact that \({\dot {\bf x}}^{\nu}\) does not affect average estimates; hence, it can be derived from another (known) system that approximates \({\mathcal A}\), which we will call reference.
where \(\partial_{\nu}{\cal A}^{\rm ref}\) is a reference-dependent constant (function only of \(\lambda\)), named \(c\). Because the reference only approximates \({\mathcal A}\), the \({\dot {\bf x}}^{\nu}\) obtained from this formula will not yield a zero-fluctuation average; however, if the reference is a good approximation, we can expect substantially smaller fluctuations in the average.
To address the second problem, we will assert that each degree of freedom (dof) is mapped with the same amount (scaling); so
where small symbols represent an intensive quantities (e.g., \(u\equiv U/{\rm dof}\)), and \(x\) is one of the coordinates of \({\bf x}\). For a given \(\lambda\), this is a standard first-order differential equation, with the unknown being the velocity of mapping \({\dot x}(x,\lambda)\). For simplicity, we will drop the \(\lambda\) dependency from all terms, hence
where \(g(x)\) is a known function once a reference system is chosen. The solution of this equation is given by
where \(I(x) \equiv \int f(x)^{\rm ref} {\rm d}x\). The integration constant can be evaluated by requiring the mapping to have some value at some coordinate \(x\).