betaFeedback

WorksPhysics and Astronomy

Conserved quantities and ensemble measure for Martyna–Tobias–Klein barostats with restricted cell degrees of freedom

Abstract

We derive the conserved energy-like quantity and ensemble measure for Martyna–Tobias–Klein (MTK) barostats in which only a restricted subset of the cell degrees of freedom are active. In the standard fully anisotropic MTK formulation, the number of barostat degrees of freedom is d2d^{2}, where dd is the spatial dimension. When only ncn_c axes of the cell matrix are allowed to fluctuate, the conserved energy-like quantity retains the same functional form but with d2d^{2} replaced by ncn_c in every term that counts barostat degrees of freedom. The derivation builds on the generalized Liouville framework for non-Hamiltonian systems and the existing MTK integration machinery. We verify that this quantity is exactly conserved, show that the resulting dynamics samples the isothermal–isobaric ensemble restricted to the submanifold of cell shapes in which inactive components are held fixed, and provide a complete Liouville-operator-based integration scheme for the masked MTK variant.

Introduction

The Martyna–Tobias–Klein (MTK) equations of motion [1] extend the Nosé–Hoover chain (NHC) thermostat [2, 3] to constant-pressure molecular dynamics by coupling the simulation cell to a barostat variable. When combined with a measure-preserving, time-reversible integrator derived from the Liouville-operator formalism [4], the MTK scheme provides a robust route to sampling the isothermal–isobaric (NPTNPT) ensemble.

In many practical applications, one does not wish to allow the full cell tensor to fluctuate. For example, slab geometries call for pressure control only along the surface normal (NPzTNP_zT ensemble), while uniaxial-stress simulations constrain the lateral dimensions. Codes such as LAMMPS [5] already support such restricted-axis ensembles, following the Shinoda formulation [6]. The original MTK paper [1] derives the conserved energy-like quantity for the isotropic and fully anisotropic (d2d^2 degrees of freedom) cases, but does not treat the intermediate case in which a subset of cell axes is active. To the best of my knowledge, no compact published derivation exists for the corresponding reduced-degree-of-freedom conserved energy-like quantity and ensemble measure.

Two restrictions apply to the present formulation. First, we address only diagonal cell-length fluctuations; the extension to off-diagonal tilt factors is left for future work. Second, each active cell axis must be orthogonal to all other axes (Sec. III), which excludes certain non-orthogonal cell shapes from partial barostatting. This orthogonality condition is automatically satisfied for orthorhombic cells. For a hexagonal cell, the unique six-fold axis is orthogonal to the basal plane and may be barostatted alone, but simultaneous control of both in-plane basis vectors requires reformulation in an orthohexagonal supercell because they are not orthogonal. A fully triclinic cell cannot satisfy the condition at all.

This short note fills the derivation gap identified above: we recall the generalized Liouville framework for non-Hamiltonian systems (Sec. II), derive the equations of motion, the conserved energy-like quantity, and the expected ensemble for the masked MTK barostat (Sec. III), and provide the Liouville-operator-based integration scheme for the masked variant (Appendix D). For completeness, Appendices A–C summarize the standard integration schemes—the NHC thermostat, the isotropic MTK barostat, and the fully anisotropic MTK barostat—on which Appendix D builds. Sec. II and Appendices A–C review established material from Refs. [1, 2, 3, 4]; the novel contributions of this note are contained in Sec. III and Appendix D.

The implementation of the masked MTK barostat in ASE [7] is available at ase.md.nose_hoover_chain.MaskedMTKNPT.

Non-Hamiltonian Systems

The MTK equations of motion are non-Hamiltonian: the thermostat and barostat couplings break the symplectic structure. Their statistical-mechanical validity rests on the generalized Liouville framework for non-Hamiltonian systems [3, 4, 8, 9], which we now summarize.

We consider a dynamical system

x˙=ξ(x)(1)\dot{\mathbf{x}} = \boldsymbol{\xi}(\mathbf{x}) \tag*{(1)}

for nn-dimensional phase-space variables x\mathbf{x}. We write an initial condition x0\mathbf{x}_0 and the corresponding trajectory xt:=x(x0,t)\mathbf{x}_t := \mathbf{x}(\mathbf{x}_0,t) at time tt. The Liouville operator

iL:=ξ(x)⋅∇x,(2)i\mathcal{L} := \boldsymbol{\xi}(\mathbf{x}) \cdot\nabla_{\mathbf{x}}, \tag*{(2)}

gives the formal solution xt=eiLtx0\mathbf{x}_t = e^{i\mathcal{L}t}\mathbf{x}_0. Factorizing eiLΔte^{i\mathcal{L}\Delta t} via symmetric Trotter splittings yields time-reversible, measure-preserving integrators [4].

The phase-space compressibility of the dynamical system is defined as

κ(x):=∇x⋅x˙=∑i=1n∂ξi(x)∂xi.(3)\kappa(\mathbf{x}) := \nabla_{\mathbf{x}} \cdot\dot{\mathbf{x}} = \sum_{i=1}^{n} \frac{\partial\xi_i(\mathbf{x})}{\partial x_i}. \tag*{(3)}

The phase-space volume elements dx0d\mathbf{x}_0 and dxtd\mathbf{x}_t are related by the phase-space compressibility as

dxt=exp⁡(∫0tκ(xs) ds)dx0.(4)d\mathbf{x}_t = \exp\left(\int_{0}^{t} \kappa(\mathbf{x}_s)\,ds\right)d\mathbf{x}_0. \tag*{(4)}

The measure e−w(t)dxte^{-w(t)}d\mathbf{x}_t is conserved along the trajectory, where w(t)w(t) is an indefinite time integral of κ(x)\kappa(\mathbf{x}) along the trajectory,

w(t):=∫tκ(xs) ds.(5)w(t) := \int^{t} \kappa(\mathbf{x}_s)\,ds. \tag*{(5)}

Note that we drop the dependence of w(t)w(t) on the initial condition x0\mathbf{x}_0 when it is clear from context.

We suppose that the system has mm independent conserved quantities Λk(x)\Lambda_k(\mathbf{x}) (k=1,…,mk=1,\ldots,m). For the initial condition x0\mathbf{x}_0, we write the values as Ck=Λk(xt)C_k = \Lambda_k(\mathbf{x}_t). The microcanonical partition function of this system with conserved quantities {Ck}\{C_k\} is defined as

Ω({Ck})=∫dx e−w(t)∏k=1mδ(Λk(x)−Ck).(6)\Omega(\{C_k\}) = \int d\mathbf{x}\,e^{-w(t)}\prod_{k=1}^{m}\delta(\Lambda_k(\mathbf{x})-C_k). \tag*{(6)}

Because the measure e−wdxe^{-w}d\mathbf{x} is conserved along the trajectory, we can sample the microcanonical distribution by running a single trajectory and accumulating time averages with the assumption of ergodicity.

Masked MTK barostat

Throughout this section, dd denotes the spatial dimension, NN the number of particles, and Nf=dNN_f=dN the number of physical degrees of freedom (in the absence of constraints). We write ri\mathbf{r}_i, pi\mathbf{p}_i, mim_i, and Fi\mathbf{F}_i for the position, momentum, mass, and force on particle ii, and h\mathbf{h} for the d×dd \times d cell matrix whose rows are the basis vectors.

We consider the case where only ncn_c of the dd cell axes are allowed to fluctuate, i.e. the barostat momentum pg\mathbf{p}_g is restricted to have at most ncn_c nonzero diagonal entries while the cell matrix h\mathbf{h} itself may have arbitrary shape. Label the first ncn_c axes as active and the remaining d−ncd-n_c axes as inactive, and let ek\mathbf{e}_k be the unit vector along the kk-th cartesian axis associated with the cell matrix h\mathbf{h}, not a fixed cartesian unit vector. We denote the length of the kk-th axis as λk\lambda_k,

h=(λ1e1T⋮λdedT).(7)\mathbf{h} = \begin{pmatrix} \lambda_1\mathbf{e}_1^{\mathsf{T}} \\ \vdots\\ \lambda_d\mathbf{e}_d^{\mathsf{T}} \end{pmatrix}. \tag*{(7)}

The masked barostat momentum is restricted to the subspace spanned by the active axes:

pg=∑c=1ncpcececT,(8)\mathbf{p}_g = \sum_{c=1}^{n_c} p_c\mathbf{e}_c\mathbf{e}_c^{\mathsf{T}}, \tag*{(8)}

where pcp_c is the scalar momentum conjugate to axis cc. We assume the active axes are orthogonal to all other axes,

ecTek=0,c=1,…,nc,k≠c.(9)\mathbf{e}_c^{\mathsf{T}}\mathbf{e}_k=0,\quad c=1,\ldots,n_c,\quad k\ne c. \tag*{(9)}

This condition is automatically satisfied for orthorhombic cells. For non-orthogonal cells it restricts which axes may be active: in a hexagonal cell the unique six-fold axis is orthogonal to the basal plane and may be barostatted alone, but activating both in-plane hexagonal basis vectors would violate orthogonality because they are not orthogonal; one must instead adopt an orthohexagonal supercell. A fully triclinic cell, in which no pair of axes is in general orthogonal, falls outside the scope of this formulation entirely.

Equations of motion

To make the masked formulation explicit, we first write the physical Hamiltonian and instantaneous internal stress tensor:

H(r,p):=∑i=1Npi22mi+U(r),(10)\mathcal{H}(\mathbf{r},\mathbf{p}):=\sum_{i=1}^{N}\frac{p_i^2}{2m_i}+U(\mathbf{r}), \tag*{(10)}
Pint=1det⁡h∑i=1N[pipiTmi+FiriT],(11)\mathbf{P}^{\mathrm{int}}=\frac{1}{\det h}\sum_{i=1}^{N}\left[\frac{\mathbf{p}_i\mathbf{p}_i^{\mathsf{T}}}{m_i}+\mathbf{F}_i\mathbf{r}_i^{\mathsf{T}}\right], \tag*{(11)}

where we assume the potential energy UU depends only on the particle positions r\mathbf{r} and not on the cell h\mathbf{h}. The thermostat chain variables are (ηj,pηj)(\eta_j,p_{\eta_j}) and the barostat chain variables are (ξj,pξj)(\xi_j,p_{\xi_j}) for j=1,…,Mj=1,\ldots,M. Their driving forces are

G1:=∑i=1Npi2mi−NfkT,(12)G_1:=\sum_{i=1}^{N}\frac{p_i^2}{m_i}-N_fkT, \tag*{(12)}
Gj:=pηj−12Qj−1−kT(j=2,…,M),(13)G_j:=\frac{p_{\eta_{j-1}}^2}{Q_{j-1}}-kT\quad(j=2,\ldots,M), \tag*{(13)}
G1′:=∑c=1ncpc2Wg−nckT,(14)G'_1:=\sum_{c=1}^{n_c}\frac{p_c^2}{W_g}-n_ckT, \tag*{(14)}
Gj′:=pξj−12Qj−1′−kT(j=2,…,M).(15)G'_j:=\frac{p_{\xi_{j-1}}^2}{Q'_{j-1}}-kT\quad(j=2,\ldots,M). \tag*{(15)}

The thermostat and barostat mass parameters are [1, 2, 3]

Q1=NfkTτ2,(16)Q_1=N_fkT\tau^2, \tag*{(16)}
Qj=kTτ2(j=2,…,M),(17)Q_j=kT\tau^2\quad(j=2,\ldots,M), \tag*{(17)}
Q1′=nckTτ2,(18)Q'_1=n_ckT\tau^2, \tag*{(18)}
Qj′=kTτ2(j=2,…,M),(19)Q'_j=kT\tau^2\quad(j=2,\ldots,M), \tag*{(19)}
Wg=Nf+ddkTτ2,(20)W_g=\frac{N_f+d}{d}kT\tau^2, \tag*{(20)}

where τ\tau is the characteristic thermostat/barostat time scale and Q1′Q'_1 replaces d2d^2 with ncn_c to match the reduced barostat degrees of freedom. The barostat mass WgW_g retains its fully anisotropic form rather than being re-derived for the restricted case; this is a pragmatic choice that preserves compatibility with existing implementations. The masked MTK equations of motion are then

r˙i=pimi+pgWgri,(21)\dot{\mathbf{r}}_i=\frac{\mathbf{p}_i}{m_i}+\frac{\mathbf{p}_g}{W_g}\mathbf{r}_i, \tag*{(21)}
p˙i=Fi−(pg+Tr⁡[pg]NfI)piWg−pη1Q1pi,(22)\dot{\mathbf{p}}_i=\mathbf{F}_i-\left(\mathbf{p}_g+\frac{\operatorname{Tr}[\mathbf{p}_g]}{N_f}\mathbf{I}\right)\frac{\mathbf{p}_i}{W_g}-\frac{p_{\eta_1}}{Q_1}\mathbf{p}_i, \tag*{(22)}
h˙=hpgWg,(23)\dot{\mathbf{h}}=\frac{\mathbf{h}\mathbf{p}_g}{W_g}, \tag*{(23)}
p˙c=det⁡[h]⋅ecT(Pint−PI)ec+1Nf∑i=1Npi2mi−pξ1Q1′pc(c=1,…,nc),(24)\dot{p}_c=\det[\mathbf{h}]\cdot\mathbf{e}_c^{\mathsf{T}}(\mathbf{P}^{\mathrm{int}}-P\mathbf{I})\mathbf{e}_c+\frac{1}{N_f}\sum_{i=1}^{N}\frac{p_i^2}{m_i}-\frac{p_{\xi_1}}{Q'_1}p_c\quad(c=1,\ldots,n_c), \tag*{(24)}

and the thermostat/barostat NHC chains obey

η˙j=pηjQj(j=1,…,M),(25)\dot{\eta}_j = \frac{p_{\eta_j}}{Q_j} \qquad(j=1,\ldots,M), \tag*{(25)}
p˙ηj=Gj−pηj+1Qj+1pηj(j=1,…,M−1),(26)\dot{p}_{\eta_j}=G_j-\frac{p_{\eta_{j+1}}}{Q_{j+1}}p_{\eta_j} \qquad(j=1,\ldots,M-1), \tag*{(26)}
p˙ηM=GM,(27)\dot{p}_{\eta_M}=G_M, \tag*{(27)}
ξ˙j=pξjQj′(j=1,…,M),(28)\dot{\xi}_j = \frac{p_{\xi_j}}{Q'_j} \qquad(j=1,\ldots,M), \tag*{(28)}
p˙ξj=Gj′−pξj+1Qj+1′pξj(j=1,…,M−1),(29)\dot{p}_{\xi_j}=G'_j-\frac{p_{\xi_{j+1}}}{Q'_{j+1}}p_{\xi_j} \qquad(j=1,\ldots,M-1), \tag*{(29)}
p˙ξM=GM′.(30)\dot{p}_{\xi_M}=G'_M. \tag*{(30)}

Here PP is the target pressure, I\mathbf{I} is the d×dd \times d identity matrix, and only the ncn_c active cell components fluctuate. The orthogonality condition Eq. (9) ensures that ecT(Pint−PI)ec\mathbf{e}_c^{\mathsf{T}}(\mathbf{P}^{\mathrm{int}}-P\mathbf{I})\mathbf{e}_c extracts a single diagonal element of the stress tensor, giving a well-defined scalar pressure along axis cc.

Although we write as if h\mathbf{h} is fully anisotropic in Eq. (14), the masked form of pg\mathbf{p}_g ensures that only the ncn_c active cell lengths fluctuate,

λ˙c=λcpcWg(c=1,…,nc).(31)\dot{\lambda}_c=\frac{\lambda_c p_c}{W_g}\qquad(c=1,\ldots,n_c). \tag*{(31)}

Conserved energy-like quantity

The conserved energy-like quantity for the masked MTK barostat is

H′:=H(r,p)+∑c=1ncpc22Wg+Pdet⁡[h]+∑j=1M(pηj22Qj+pξj22Qj′)+NfkTη1+nckTξ1+kT(ηc+ξc),(32)H' := \mathcal{H}(\mathbf{r},\mathbf{p})+\sum_{c=1}^{n_c}\frac{p_c^2}{2W_g}+P\det[\mathbf{h}]+\sum_{j=1}^{M}\left(\frac{p_{\eta_j}^2}{2Q_j}+\frac{p_{\xi_j}^2}{2Q'_j}\right)+N_fkT\eta_1+n_ckT\xi_1+kT(\eta_c+\xi_c), \tag*{(32)}

where ηc:=∑j=2Mηj\eta_c:=\sum_{j=2}^{M}\eta_j and ξc:=∑j=2Mξj\xi_c:=\sum_{j=2}^{M}\xi_j. Comparing with the fully anisotropic conserved energy-like quantity [Eq. (C2)], the only structural differences are:

  1. The barostat kinetic energy sums over the ncn_c active components pcp_c instead of the full d×dd \times d matrix pg\mathbf{p}_g.

  1. The coupling to the first barostat chain variable is nckTξ1n_ckT\xi_1 instead of d2kTξ1d^2kT\xi_1.

We now verify that H˙′=0\dot{H}'=0 by computing the time derivative and using the equations of motion.

(I) Physical Hamiltonian, barostat kinetic energy, and PVPV term. Using Fi=−∂U/∂riF_i=-\partial U/\partial r_i and the stress tensor identity [Eq. (11)], the time derivative of the physical Hamiltonian is

H˙=−Tr⁡[pg]NfWg∑i=1Npi2mi−pη1Q1∑i=1Npi2mi−det⁡[h]WgTr⁡[pgPint],(33)\dot{\mathcal{H}}=-\frac{\operatorname{Tr}[\mathbf{p}_g]}{N_fW_g}\sum_{i=1}^{N}\frac{p_i^2}{m_i}-\frac{p_{\eta_1}}{Q_1}\sum_{i=1}^{N}\frac{p_i^2}{m_i}-\frac{\det[\mathbf{h}]}{W_g}\operatorname{Tr}[\mathbf{p}_g\mathbf{P}^{\mathrm{int}}], \tag*{(33)}

where we use pgT=pg\mathbf{p}_g^{\mathsf{T}}=\mathbf{p}_g.

The barostat kinetic energy evolves as

ddt∑c=1ncpc22Wg=det⁡[h]WgTr⁡[pgPint]−Pdet⁡[h]WgTr⁡[pg]+Tr⁡[pg]NfWg∑i=1Npi2mi−pξ1Q1′∑c=1ncpc2Wg.(34)\frac{d}{dt}\sum_{c=1}^{n_c}\frac{p_c^2}{2W_g}=\frac{\det[\mathbf{h}]}{W_g}\operatorname{Tr}[\mathbf{p}_g\mathbf{P}^{\mathrm{int}}]-\frac{P\det[\mathbf{h}]}{W_g}\operatorname{Tr}[\mathbf{p}_g]+\frac{\operatorname{Tr}[\mathbf{p}_g]}{N_fW_g}\sum_{i=1}^{N}\frac{p_i^2}{m_i}-\frac{p_{\xi_1}}{Q'_1}\sum_{c=1}^{n_c}\frac{p_c^2}{W_g}. \tag*{(34)}

The PVPV term gives

ddt(Pdet⁡[h])=Pdet⁡[h]Tr⁡[h−1h˙]=Pdet⁡[h]WgTr⁡[pg].(35)\frac{d}{dt}\left(P\det[\mathbf{h}]\right)=P\det[\mathbf{h}]\operatorname{Tr}[\mathbf{h}^{-1}\dot{\mathbf{h}}]=\frac{P\det[\mathbf{h}]}{W_g}\operatorname{Tr}[\mathbf{p}_g]. \tag*{(35)}

Summing Eqs. (33)–(35), all stress-tensor and PVPV terms cancel, leaving

H˙+ddt(∑c=1ncpc22Wg)+Pddtdet⁡[h]=−pη1Q1∑i=1Npi2mi−pξ1Q1′∑c=1ncpc2Wg.(36)\dot{\mathcal{H}}+\frac{d}{dt}\left(\sum_{c=1}^{n_c}\frac{p_c^2}{2W_g}\right)+P\frac{d}{dt}\det[\mathbf{h}]=-\frac{p_{\eta_1}}{Q_1}\sum_{i=1}^{N}\frac{p_i^2}{m_i}-\frac{p_{\xi_1}}{Q'_1}\sum_{c=1}^{n_c}\frac{p_c^2}{W_g}. \tag*{(36)}

(II) Thermostat chain. The time derivative of the thermostat chain terms in H′H' is

ddt[∑j=1Mpηj22Qj+NfkTη1+kTηc]=+pη1Q1∑i=1Npi2mi(37)\frac{d}{dt}\left[\sum_{j=1}^{M}\frac{p_{\eta_j}^{2}}{2Q_j}+N_fkT\eta_1+kT\eta_c\right]=+\frac{p_{\eta_1}}{Q_1}\sum_{i=1}^{N}\frac{p_i^2}{m_i} \tag*{(37)}

(III) Barostat chain. Similarly, the barostat chain contribution is

ddt[∑j=1Mpξj22Qj′+nckTξ1+kTξc]=+pξ1Q1′∑c=1ncpc2Wg(38)\frac{d}{dt}\left[\sum_{j=1}^{M}\frac{p_{\xi_j}^{2}}{2Q'_j}+n_ckT\xi_1+kT\xi_c\right]=+\frac{p_{\xi_1}}{Q'_1}\sum_{c=1}^{n_c}\frac{p_c^2}{W_g} \tag*{(38)}

Summing Eqs. (36)–(38), all terms cancel and H˙′=0\dot{H}'=0.

Phase-space compressibility and metric factor

The extended phase space comprises the variables x=({ri,pi},{λc},{pc},{ηj,pηj},{ξj,pξj})\boldsymbol{x}=(\{r_i,p_i\},\{\lambda_c\},\{p_c\},\{\eta_j,p_{\eta_j}\},\{\xi_j,p_{\xi_j}\}). We compute the compressibility κ=∇x⋅x˙\kappa=\nabla_x\cdot\dot{\boldsymbol{x}} by summing the diagonal contributions from each group of variables:

∑i=1N∑α=1d∂r˙iα∂riα=NTr⁡[pg]Wg,(39)\sum_{i=1}^{N}\sum_{\alpha=1}^{d}\frac{\partial\dot{r}_{i\alpha}}{\partial r_{i\alpha}}=\frac{N\operatorname{Tr}[p_g]}{W_g}, \tag*{(39)}
∑i=1N∑α=1d∂p˙iα∂piα=−(N+1)Tr⁡[pg]Wg−Nfpη1Q1,(40)\sum_{i=1}^{N}\sum_{\alpha=1}^{d}\frac{\partial\dot{p}_{i\alpha}}{\partial p_{i\alpha}}=-\frac{(N+1)\operatorname{Tr}[p_g]}{W_g}-N_f\frac{p_{\eta_1}}{Q_1}, \tag*{(40)}
∑c=1nc∂λ˙c∂λc=Tr⁡[pg]Wg,(41)\sum_{c=1}^{n_c}\frac{\partial\dot{\lambda}_c}{\partial\lambda_c}=\frac{\operatorname{Tr}[p_g]}{W_g}, \tag*{(41)}
∑c=1nc∂p˙c∂pc=−ncpξ1Q1′,(42)\sum_{c=1}^{n_c}\frac{\partial\dot{p}_c}{\partial p_c}=-n_c\frac{p_{\xi_1}}{Q'_1}, \tag*{(42)}

where Eq. (24b) uses Nf=dNN_f=dN. The NHC chains contribute

−∑j=2MpηjQj−∑j=2MpξjQj′.(43)-\sum_{j=2}^{M}\frac{p_{\eta_j}}{Q_j}-\sum_{j=2}^{M}\frac{p_{\xi_j}}{Q'_j}. \tag*{(43)}

Collecting all terms and using pηj/Qj=η˙jp_{\eta_j}/Q_j=\dot{\eta}_j, pξj/Qj′=ξ˙jp_{\xi_j}/Q'_j=\dot{\xi}_j:

κ=−ddt(Nfη1+ncξ1+ηc+ξc).(44)\kappa=-\frac{d}{dt}\left(N_f\eta_1+n_c\xi_1+\eta_c+\xi_c\right). \tag*{(44)}

Since κ=w˙\kappa=\dot{w}, the metric factor is

e−w=exp⁡(Nfη1+ncξ1+ηc+ξc).(45)e^{-w}=\exp\left(N_f\eta_1+n_c\xi_1+\eta_c+\xi_c\right). \tag*{(45)}

Geometrically, the masked barostat momentum pg\boldsymbol{p}_g [Eq. (8)] lives in the $n_c$-dimensional linear subspace spanned by $\{\boldsymbol{e}_c\boldsymbol{e}_c^{\mathsf{T}}\}$, so the first barostat-chain entropic term $(n_c\xi_1)$ and the metric factor [Eq. (27)] each count ncn_c degrees of freedom rather than the d2d^2 of the fully anisotropic case.

Isothermal–isobaric ensemble

The microcanonical partition function is

Ω(E′)=∫dx e−wδ(H′(x)−E′)(46)\Omega(E')=\int d\boldsymbol{x}\,e^{-w}\delta\left(H'(\boldsymbol{x})-E'\right) \tag*{(46)}
=1nckT(∏c=1nc2πkTWg)(∏j=1M2πkTQj)(∏j=1M2πkTQj′)∫drdpdλncdηMdξM−1exp⁡(−1kT(H(r,p)+Pdet⁡[h]−E′)).(47)=\frac{1}{n_ckT}\left(\prod_{c=1}^{n_c}\sqrt{2\pi kTW_g}\right)\left(\prod_{j=1}^{M}\sqrt{2\pi kTQ_j}\right)\left(\prod_{j=1}^{M}\sqrt{2\pi kTQ'_j}\right) \int d\boldsymbol{r}d\boldsymbol{p}d\boldsymbol{\lambda}^{n_c}d\boldsymbol{\eta}^{M}d\boldsymbol{\xi}^{M-1}\exp\left(-\frac{1}{kT}\left(H(\boldsymbol{r},\boldsymbol{p})+P\det[\boldsymbol{h}]-E'\right)\right). \tag*{(47)}

In passing from the first to the second line, the barostat momenta pcp_c (c=1,…,ncc = 1, \ldots, n_c), the thermostat momenta pηjp_{\eta_j}, and the thermostat positions ηj\eta_j (j≥2j \ge2), ξj\xi_j (j≥2j \ge2) are integrated out as Gaussian integrals, producing the square-root prefactors. The η1\eta_1 integral enforces the energy-shell constraint via δ(H′−E′)\delta(H' - E'), and because the conserved energy-like quantity H′H' [Eq. (32)] contains the term nckTξ1n_ckT\xi_1, integrating ξ1\xi_1 over the delta function yields the prefactor 1/(nckT)1/(n_ckT)—directly analogous to the 1/(d2kT)1/(d^2kT) factor in the fully anisotropic case. Only the ncn_c active cell lengths λc\lambda_c appear as dynamical variables in H′H'; the inactive cell lengths λk\lambda_k (k=nc+1,…,dk = n_c + 1, \ldots, d) satisfy λ˙k=0\dot{\lambda}_k = 0 and are absent from the conserved energy-like quantity, so they contribute no integration measure. These inactive axes are externally fixed parameters determined by the initial condition, not sampled variables; they enter det⁡[h]\det[h] only as constant multiplicative factors.

Because the prefactors are independent of the real dynamical variables rr, pp, and λc\lambda_c, the microcanonical partition function is proportional to the isothermal–isobaric partition function,

Ω(E′)∝∫dr dp dλncexp⁡(−1kT(H(r,p)+Pdet⁡[h]))=:Δ(N,P,T).(48)\Omega(E') \propto\int dr\,dp\,d\lambda^{n_c}\exp\left(-\frac{1}{kT}\left(\mathcal{H}(r,p)+P\det[h]\right)\right) =: \Delta(N,P,T). \tag*{(48)}

Thus, the masked MTK equations sample the isothermal–isobaric ensemble (N,P,T)(N,P,T) restricted to the submanifold in which the d−ncd-n_c inactive cell axes are held fixed.

Isothermal–isobaric ensemble without external forces

When there is no external field ∑i=1NFi=0\sum_{i=1}^{N}F_i=0, the total momentum P=∑i=1NpiP=\sum_{i=1}^{N}p_i obeys

P˙=−1WgpgP−(Tr⁡[pg]Wg+pη1Q1)P=−ddt(log⁡[h]+log⁡det⁡[h]Nf+η1I)P.(49)\begin{aligned} \dot{P}=-\frac{1}{W_g}p_gP-\left(\frac{\operatorname{Tr}[p_g]}{W_g}+\frac{p_{\eta_1}}{Q_1}\right)P \\ &=-\frac{d}{dt}\left(\log[h]+\frac{\log\det[h]}{N_f}+\eta_1I\right)P. \tag*{(49)} \end{aligned}

Thus, the additional momentum-like quantity

K(x):=hP(det⁡[h])1/Nfeη1(50)K(x):=hP(\det[h])^{1/N_f}e^{\eta_1} \tag*{(50)}

is also conserved. Because KK is a constant of motion, the trajectory is confined to a fixed-KK submanifold of the extended phase space. To ensure that the dynamics still samples the correct isothermal–isobaric ensemble under this additional constraint, we must verify that the microcanonical partition function Ω(E′,K′)\Omega(E',K') remains proportional to Δ(N,P,T)\Delta(N,P,T). We write the values as K′=K(x)K'=K(x).

When K′≠0K'\ne0, the microcanonical partition function is

Ω(E′,K′)=∫dx e−wδ(H′(x)−E′)δ(d)([hP](det⁡[h])1/Nfeη1−K′)=1nckT(∏c=1nc2πkTWg)(∏j=1M2πkTQj)(∏j=1M2πkTQj′)(51)\begin{aligned} \Omega(E',K')=\int dx\,e^{-w}\delta(H'(x)-E')\delta^{(d)}\left([hP](\det[h])^{1/N_f}e^{\eta_1}-K'\right) \\ &=\frac{1}{n_ckT}\left(\prod_{c=1}^{n_c}\sqrt{2\pi kTW_g}\right)\left(\prod_{j=1}^{M}\sqrt{2\pi kTQ_j}\right)\left(\prod_{j=1}^{M}\sqrt{2\pi kTQ'_j}\right) \tag*{(51)} \end{aligned}
×∫dr dp dλnc dηM dξM−1exp⁡(−1kT(H(r,p)+Pdet⁡[h]−E′))δ(d)(hP(det⁡[h])1/Nfeη1−K′).(52)\qquad\times\int dr\,dp\,d\lambda^{n_c}\,d\eta_M\,d\xi^{M-1}\exp\left(-\frac{1}{kT}\left(\mathcal{H}(r,p)+P\det[h]-E'\right)\right)\delta^{(d)}\left(hP(\det[h])^{1/N_f}e^{\eta_1}-K'\right). \tag*{(52)}

The first-to-second-line step performs the same Gaussian integrations as in the K′K'-unconstrained case: the barostat momenta pcp_c, thermostat momenta pηjp_{\eta_j}, pξjp_{\xi_j}, and the ξ1\xi_1 and η1\eta_1 integrals produce the square-root prefactors and 1/(nckT)1/(n_ckT), while the delta function δ(d)(K−K′)\delta^{(d)}(K-K') passes through unchanged because none of the integrated-out variables appear in KK. In the third line, the remaining thermostat positions ηj\eta_j (j≥2j\ge2) and ξj\xi_j (j≥2j\ge2) are absorbed into the proportionality constant, leaving the integration over dr dp dλnc dη1dr\,dp\,d\lambda^{n_c}\,d\eta_1 with the delta-function constraint on K′K'.

The η1\eta_1 integral is then evaluated against δ(d)(K(x)−K′)\delta^{(d)}(K(x)-K'); since KK depends on η1\eta_1 only through the overall factor eη1e^{\eta_1}, the substitution uα=Kα′e−η1u_\alpha=K'_\alpha e^{-\eta_1} produces the Jacobian 1/∏α∣Kα′∣1/\prod_\alpha|K'_\alpha| and eliminates η1\eta_1,

Ω(E′,K′)∝∫dr dp dλnc dη1exp⁡(−1kT(H(r,p)+Pdet⁡[h]))δ(d)(hP(det⁡[h])1/Nfeη1−K′)=1∏α∣Kα′∣∫dr dp dλncexp⁡(−1kT(H(r,p)+Pdet⁡[h]))\begin{aligned} \Omega(E',K')\propto\int dr\,dp\,d\lambda^{n_c}\,d\eta_1\exp\left(-\frac{1}{kT}\left(\mathcal{H}(r,p)+P\det[h]\right)\right)\delta^{(d)}\left(hP(\det[h])^{1/N_f}e^{\eta_1}-K'\right) \\ &=\frac{1}{\prod_\alpha|K'_\alpha|}\int dr\,dp\,d\lambda^{n_c}\exp\left(-\frac{1}{kT}\left(\mathcal{H}(r,p)+P\det[h]\right)\right) \end{aligned}
∝Δ(N,P,T).(53)\propto\Delta(N,P,T). \tag*{(53)}

This prefactor is independent of the remaining integration variables, so it factors out and the surviving integral is Δ(N,P,T)\Delta(N,P,T).

When K(x)=0K(\mathbf{x})=0, the total momentum P\mathbf{P} is always zero and the microcanonical partition function is

Ω(E′,K′)∝Ω(E′)∝Δ(N,P,T).(54)\Omega(E',K') \propto\Omega(E') \propto\Delta(N,P,T). \tag*{(54)}

Thus, in either case, the masked MTK equations sample the isothermal–isobaric ensemble (N,P,T)(N,P,T) restricted to the submanifold in which the inactive cell axes are held fixed.

Summary

We have derived the conserved energy-like quantity for MTK barostats with a restricted subset of ncn_c active cell degrees of freedom [Eq. (32)] and verified that it is exactly conserved (§ 0.3 B). Using the generalized Liouville framework, we computed the phase-space compressibility and metric factor for the restricted system [Eqs. (44)–(45)] and showed that the resulting dynamics samples the isothermal–isobaric ensemble restricted to the submanifold of cell shapes with inactive axes held fixed (§ 0.3 D). The key structural difference from the fully anisotropic case is that d2d^2 is replaced by ncn_c in every term that counts barostat degrees of freedom—the barostat NHC driving force, the NHC mass parameter, the conserved energy-like quantity, and the metric factor. This result provides a compact reference for verifying energy conservation and ensemble correctness in restricted-axis isobaric simulations. The orthogonality assumption on the active axes [Eq. (9)] limits the method to cell shapes where each active axis is perpendicular to all others; non-orthogonal active subspaces such as hexagonal in-plane pairs require an orthohexagonal redefinition, while fully triclinic cells are excluded altogether. We also provide a complete Liouville-operator-based integration scheme for the restricted MTK barostat (Appendix § 0.3.4), constructed from the same operator-splitting approach used for the isotropic and fully anisotropic cases summarized for completeness in Appendices B–C.

Acknowledgments

The author acknowledges the use of the AI-based writing tool ChatGPT (OpenAI, version 5.4) and Claude (Anthropic, version 4.6) for language polishing. The author takes full responsibility for the content of this manuscript.

Isothermal integrator with Nosé–Hoover chains

Equations of motion, conserved energy-like quantity, and conserved momentum-like quantity

Section III already includes the thermostat and barostat chains used in the masked MTK dynamics. This appendix isolates the standard Nosé–Hoover chain (NHC) thermostat, which is reused unchanged in both the masked and fully anisotropic formulations [2, 3].

r˙i=pimi(55)\dot{\mathbf{r}}_i = \frac{\mathbf{p}_i}{m_i} \tag*{(55)}
p˙i=Fi−pη1Q1pi(56)\dot{\mathbf{p}}_i = \mathbf{F}_i - \frac{p_{\eta_1}}{Q_1}\mathbf{p}_i \tag*{(56)}

together with the thermostat chain equations

η˙j=pηjQj(j=1,…,M)(57)\dot{\eta}_j = \frac{p_{\eta_j}}{Q_j}\quad(j=1,\ldots,M) \tag*{(57)}
p˙η1=∑i=1Npi2mi−NfkT−pη2Q2pη1(58)\dot{p}_{\eta_1} = \sum_{i=1}^{N}\frac{p_i^2}{m_i} - N_f kT - \frac{p_{\eta_2}}{Q_2}p_{\eta_1} \tag*{(58)}
p˙ηj=pηj−12Qj−1−kT−pηj+1Qj+1pηj(j=2,…,M−1)(59)\dot{p}_{\eta_j} = \frac{p_{\eta_{j-1}}^2}{Q_{j-1}} - kT - \frac{p_{\eta_{j+1}}}{Q_{j+1}}p_{\eta_j}\quad(j=2,\ldots,M-1) \tag*{(59)}
p˙ηM=pηM−12QM−1−kT(60)\dot{p}_{\eta_M} = \frac{p_{\eta_{M-1}}^2}{Q_{M-1}} - kT \tag*{(60)}

where MM is the chain length. The thermostat masses QjQ_j and time scale τ\tau are as defined in Eq. (13).

The NHC conserved energy-like quantity is

H′:=H(r,p)+∑j=1Mpηj22Qj+NfkTη1+kTηc,(61)H' := \mathcal{H}(\mathbf{r},\mathbf{p}) + \sum_{j=1}^{M} \frac{p_{\eta_j}^{2}}{2Q_j} + N_f kT\eta_1 + kT\eta_c, \tag*{(61)}

where ηc\eta_c is as defined after Eq. (32).

In the absence of external forces, the total momentum P=∑i=1Npi\mathbf{P} = \sum_{i=1}^{N} \mathbf{p}_i has the conserved momentum-like quantity

K(x):=Peη1.(62)K(\mathbf{x}) := \mathbf{P}e^{\eta_1}. \tag*{(62)}

The phase-space compressibility and metric factor are

κ=−ddt(Nfη1+ηc)(63)\kappa= -\frac{d}{dt}\left(N_f\eta_1+\eta_c\right) \tag*{(63)}
e−w=exp⁡(Nfη1+ηc).(64)e^{-w} = \exp\left(N_f\eta_1+\eta_c\right). \tag*{(64)}

Integration scheme based on Liouville operator factorization

The Liouville operator for the NHC thermostat is decomposed as

iL=iLNHC+iL1+iL2(65)i\mathcal{L} = i\mathcal{L}_{\mathrm{NHC}} + i\mathcal{L}_1 + i\mathcal{L}_2 \tag*{(65)}
iL1:=∑i=1Npimi⋅∂∂ri(66)i\mathcal{L}_1 := \sum_{i=1}^{N} \frac{\mathbf{p}_i}{m_i}\cdot\frac{\partial}{\partial\mathbf{r}_i} \tag*{(66)}
iL2:=∑i=1NFi⋅∂∂pi(67)i\mathcal{L}_2 := \sum_{i=1}^{N} \mathbf{F}_i\cdot\frac{\partial}{\partial\mathbf{p}_i} \tag*{(67)}
iLNHC:=−∑i=1Npη1Q1pi⋅∂∂pi+∑j=1MpηjQj∂∂ηj+∑j=1M−1(Gj−pηjpηj+1Qj+1)∂∂pηj+GM∂∂pηM,(68)i\mathcal{L}_{\mathrm{NHC}} := -\sum_{i=1}^{N}\frac{p_{\eta_1}}{Q_1}\mathbf{p}_i\cdot\frac{\partial}{\partial\mathbf{p}_i}+\sum_{j=1}^{M}\frac{p_{\eta_j}}{Q_j}\frac{\partial}{\partial\eta_j}+\sum_{j=1}^{M-1}\left(G_j-p_{\eta_j}\frac{p_{\eta_{j+1}}}{Q_{j+1}}\right)\frac{\partial}{\partial p_{\eta_j}}+G_M\frac{\partial}{\partial p_{\eta_M}}, \tag*{(68)}

with driving forces GjG_j as defined in Eq. (12).

The second-order Trotter factorization gives the propagator

eiLΔt=eiLNHCΔt2eiL2Δt2eiL1ΔteiL2Δt2eiLNHCΔt2+O(Δt3).(69)e^{i\mathcal{L}\Delta t}=e^{i\mathcal{L}_{\mathrm{NHC}}\frac{\Delta t}{2}}e^{i\mathcal{L}_2\frac{\Delta t}{2}}e^{i\mathcal{L}_1\Delta t}e^{i\mathcal{L}_2\frac{\Delta t}{2}}e^{i\mathcal{L}_{\mathrm{NHC}}\frac{\Delta t}{2}}+\mathcal{O}(\Delta t^3). \tag*{(69)}

The actions of eiL1Δte^{i\mathcal{L}_1\Delta t} and eiL2Δt2e^{i\mathcal{L}_2\frac{\Delta t}{2}} are

eiL1Δt(ripiηjpηj)=(ri+pimiΔtpiηjpηj)(70)e^{i\mathcal{L}_1\Delta t} \begin{pmatrix} \mathbf{r}_i\\ \mathbf{p}_i\\ \eta_j\\ p_{\eta_j} \end{pmatrix} = \begin{pmatrix} \mathbf{r}_i+\dfrac{\mathbf{p}_i}{m_i}\Delta t\\ \mathbf{p}_i\\ \eta_j\\ p_{\eta_j} \end{pmatrix} \tag*{(70)}
eiL2Δt2(ripiηjpηj)=(ripi+FiΔt2ηjpηj).(71)e^{i\mathcal{L}_2\frac{\Delta t}{2}} \begin{pmatrix} \mathbf{r}_i\\ \mathbf{p}_i\\ \eta_j\\ p_{\eta_j} \end{pmatrix} = \begin{pmatrix} \mathbf{r}_i\\ \mathbf{p}_i+\mathbf{F}_i\dfrac{\Delta t}{2}\\ \eta_j\\ p_{\eta_j} \end{pmatrix}. \tag*{(71)}

The NHC propagator is further decomposed via a Suzuki–Yoshida factorization [10]. Denoting nn sub-steps per half time step,

eiLNHCΔt2=(eiLNHCΔt2n)ne^{i\mathcal{L}_{\mathrm{NHC}}\frac{\Delta t}{2}}=\left(e^{i\mathcal{L}_{\mathrm{NHC}}\frac{\Delta t}{2n}}\right)^n
eiLNHCΔt2n=S4NHC(Δt2n)+O((Δtn)5)e^{i\mathcal{L}_{\mathrm{NHC}}\frac{\Delta t}{2n}}=S_4^{\mathrm{NHC}}\left(\frac{\Delta t}{2n}\right)+\mathcal{O}\left(\left(\frac{\Delta t}{n}\right)^5\right)
S4NHC(Δt2n):=∏α=13S2NHC(xαΔt2n),(72)S_4^{\mathrm{NHC}}\left(\frac{\Delta t}{2n}\right):=\prod_{\alpha=1}^{3}S_2^{\mathrm{NHC}}\left(x_\alpha\frac{\Delta t}{2n}\right), \tag*{(72)}

with the Suzuki–Yoshida weights xαx_{\alpha}. Writing δα:=xαΔt/(2n)\delta_{\alpha} := x_{\alpha}\Delta t/(2n), the second-order kernel is

S2NHC(δα):=exp⁡(δα2GM∂∂pηM)×∏j=M−11[exp⁡(−δα4pηj+1Qj+1pηj∂∂pηj)exp⁡(δα2Gj∂∂pηj)exp⁡(−δα4pηj+1Qj+1pηj∂∂pηj)]×∏i=1Nexp⁡(−δαpη1Q1pi⋅∂∂pi)×∏j=1Mexp⁡(δαpηjQj∂∂ηj)×∏j=1M−1[exp⁡(−δα4pηj+1Qj+1pηj∂∂pηj)exp⁡(δα2Gj∂∂pηj)exp⁡(−δα4pηj+1Qj+1pηj∂∂pηj)]×exp⁡(δα2GM∂∂pηM).(73)\begin{aligned} S_{2}^{\mathrm{NHC}}(\delta_{\alpha}) &:= \exp\left(\frac{\delta_{\alpha}}{2}G_{M}\frac{\partial}{\partial p_{\eta_{M}}}\right) \\ &\times\prod_{j=M-1}^{1}\left[\exp\left(-\frac{\delta_{\alpha}}{4}\frac{p_{\eta_{j+1}}}{Q_{j+1}}p_{\eta_j}\frac{\partial}{\partial p_{\eta_j}}\right)\exp\left(\frac{\delta_{\alpha}}{2}G_j\frac{\partial}{\partial p_{\eta_j}}\right)\exp\left(-\frac{\delta_{\alpha}}{4}\frac{p_{\eta_{j+1}}}{Q_{j+1}}p_{\eta_j}\frac{\partial}{\partial p_{\eta_j}}\right)\right] \\ &\times\prod_{i=1}^{N}\exp\left(-\delta_{\alpha}\frac{p_{\eta_1}}{Q_1}p_i\cdot\frac{\partial}{\partial p_i}\right) \\ &\times\prod_{j=1}^{M}\exp\left(\delta_{\alpha}\frac{p_{\eta_j}}{Q_j}\frac{\partial}{\partial\eta_j}\right) \\ &\times\prod_{j=1}^{M-1}\left[\exp\left(-\frac{\delta_{\alpha}}{4}\frac{p_{\eta_{j+1}}}{Q_{j+1}}p_{\eta_j}\frac{\partial}{\partial p_{\eta_j}}\right)\exp\left(\frac{\delta_{\alpha}}{2}G_j\frac{\partial}{\partial p_{\eta_j}}\right)\exp\left(-\frac{\delta_{\alpha}}{4}\frac{p_{\eta_{j+1}}}{Q_{j+1}}p_{\eta_j}\frac{\partial}{\partial p_{\eta_j}}\right)\right] \\ &\times\exp\left(\frac{\delta_{\alpha}}{2}G_M\frac{\partial}{\partial p_{\eta_M}}\right). \tag*{(73)} \end{aligned}

Here, we use the identity

exp⁡(cx∂∂x)f(x)=f(xec)(74)\exp\left(cx\frac{\partial}{\partial x}\right)f(x)=f\left(xe^c\right) \tag*{(74)}

to evaluate the actions of each exponential operator.

Isothermal–isobaric integrator with isotropic MTK barostat

Equations of motion, conserved energy-like quantity, and conserved momentum-like quantity

The MTK equations for isotropic volume fluctuations are [1, 3]

r˙i=pimi+pϵWri(75)\dot{r}_i=\frac{p_i}{m_i}+\frac{p_{\epsilon}}{W}r_i \tag*{(75)}
p˙i=Fi−(1+dNf)pϵWpi−pη1Q1pi(76)\dot{p}_i=F_i-\left(1+\frac{d}{N_f}\right)\frac{p_{\epsilon}}{W}p_i-\frac{p_{\eta_1}}{Q_1}p_i \tag*{(76)}
V˙=dVWpϵ(77)\dot{V}=\frac{dV}{W}p_{\epsilon} \tag*{(77)}
p˙ϵ=dV(Pint−P)+dNf∑i=1Npi2mi−pξ1Q1pϵ(78)\dot{p}_{\epsilon}=dV\left(P^{\mathrm{int}}-P\right)+\frac{d}{N_f}\sum_{i=1}^{N}\frac{p_i^2}{m_i}-\frac{p_{\xi_1}}{Q_1}p_{\epsilon} \tag*{(78)}

together with the same thermostat chain equations as in Eq. (A2) and barostat chain equations of the same form as Eq. (15), with driving forces

G1′:=pϵ2W−kT(79)G'_1:=\frac{p_{\epsilon}^{2}}{W}-kT \tag*{(79)}
Gj′:=pξj−12Qj−1′−kT(j=2,…,M).(80)G'_j:=\frac{p_{\xi_{j-1}}^{2}}{Q'_{j-1}}-kT\qquad(j=2,\ldots,M). \tag*{(80)}

Here PintP^{\mathrm{int}} denotes the isotropic part of the internal stress tensor, Pint:=1dTr⁡[Pint]P^{\mathrm{int}}:=\frac{1}{d}\operatorname{Tr}[P^{\mathrm{int}}]. The thermostat driving forces G1G_1, GjG_j and thermostat masses Q1Q_1, QjQ_j are the same as in Appendix A.

Reference [1] suggests W=(Nf+d)kTτ2W=(N_f+d)kT\tau^2 and Q1′=kTτ2Q'_1=kT\tau^2; the remaining barostat chain masses Qj′Q'_j (j≥2j\ge2) and time scale τ\tau are as in Eq. (13).

The conserved energy-like quantity of the isotropic MTK equations is

H′:=H(r,p)+pϵ22W+PV+∑j=1M(pηj22Qj+pξj22Qj′)+NfkTη1+kTξ1+kTηc+kTξc.(81)H' := \mathcal{H}(r,p)+\frac{p_{\epsilon}^{2}}{2W}+PV+\sum_{j=1}^{M}\left(\frac{p_{\eta_j}^{2}}{2Q_j}+\frac{p_{\xi_j}^{2}}{2Q'_j}\right)+N_fkT\eta_1+kT\xi_1+kT\eta_c+kT\xi_c. \tag*{(81)}

where ηc\eta_c and ξc\xi_c are as defined after Eq. (32).

In the absence of external forces (∑i=1NFi=0\sum_{i=1}^{N} \mathbf{F}_i=0), the total momentum P=∑i=1Npi\mathbf{P}=\sum_{i=1}^{N}\mathbf{p}_i has the conserved quantity

K:=Pexp⁡((1+dNf)ϵ+η1),(82)\mathbf{K}:=\mathbf{P}\exp\left(\left(1+\frac{d}{N_f}\right)\epsilon+\eta_1\right), \tag*{(82)}

where ϵ:=1dln⁡VV0\epsilon:=\frac{1}{d}\ln\frac{V}{V_0} with some reference volume V0V_0. The phase-space compressibility and metric factor are

κ=−ddt(Nfη1+ξ1+ηc+ξc)(83)\kappa=-\frac{d}{dt}\left(N_f\eta_1+\xi_1+\eta_c+\xi_c\right) \tag*{(83)}
e−w=exp⁡(Nfη1+ξ1+ηc+ξc).(84)e^{-w}=\exp\left(N_f\eta_1+\xi_1+\eta_c+\xi_c\right). \tag*{(84)}

Integration scheme based on Liouville operator factorization

The Liouville operator for the isotropic MTK equations is decomposed as

iL=iL1+iL2+iLϵ,1+iLϵ,2+iLNHC-baro+iLNHC-thermo,(85)iL=iL_1+iL_2+iL_{\epsilon,1}+iL_{\epsilon,2}+iL_{\mathrm{NHC\text{-}baro}}+iL_{\mathrm{NHC\text{-}thermo}}, \tag*{(85)}

where

iL1:=∑i=1N(pimi+pϵWri)⋅∂∂ri(86)iL_1:=\sum_{i=1}^{N}\left(\frac{\mathbf{p}_i}{m_i}+\frac{p_\epsilon}{W}\mathbf{r}_i\right)\cdot\frac{\partial}{\partial\mathbf{r}_i} \tag*{(86)}
iL2:=∑i=1N(Fi−(1+dNf)pϵWpi)⋅∂∂pi(87)iL_2:=\sum_{i=1}^{N}\left(\mathbf{F}_i-\left(1+\frac{d}{N_f}\right)\frac{p_\epsilon}{W}\mathbf{p}_i\right)\cdot\frac{\partial}{\partial\mathbf{p}_i} \tag*{(87)}
iLϵ,1:=pϵW∂∂ϵ(88)iL_{\epsilon,1}:=\frac{p_\epsilon}{W}\frac{\partial}{\partial\epsilon} \tag*{(88)}
iLϵ,2:=Gϵ∂∂pϵ(89)iL_{\epsilon,2}:=G_\epsilon\frac{\partial}{\partial p_\epsilon} \tag*{(89)}

with the barostat driving force

Gϵ:=dV(Pint−P)+dNf∑i=1Npi2mi.(90)G_\epsilon:=dV(P^{\mathrm{int}}-P)+\frac{d}{N_f}\sum_{i=1}^{N}\frac{p_i^2}{m_i}. \tag*{(90)}

The NHC-thermostat and NHC-barostat parts iLNHC-thermoiL_{\mathrm{NHC\text{-}thermo}} and iLNHC-baroiL_{\mathrm{NHC\text{-}baro}} have the same structure as in Eq. (A7), acting on the thermostat chain (ηj,pηj)(\eta_j,p_{\eta_j}) and barostat chain (ξj,pξj)(\xi_j,p_{\xi_j}) variables, respectively. For iLNHC-baroiL_{\mathrm{NHC\text{-}baro}}, the particle momentum pi\mathbf{p}_i in the drag term is replaced by the scalar barostat momentum pϵp_\epsilon:

iLNHC-baro:=pξ1Q1′pϵ∂∂pϵ+∑j=1MpξjQj′∂∂ξj+∑j=1M−1(Gj′−pξjpξj+1Qj+1′)∂∂pξj+GM′∂∂pξM.(91)iL_{\mathrm{NHC\text{-}baro}}:=\frac{p_{\xi_1}}{Q'_1}p_\epsilon\frac{\partial}{\partial p_\epsilon}+\sum_{j=1}^{M}\frac{p_{\xi_j}}{Q'_j}\frac{\partial}{\partial\xi_j}+\sum_{j=1}^{M-1}\left(G'_j-p_{\xi_j}\frac{p_{\xi_{j+1}}}{Q'_{j+1}}\right)\frac{\partial}{\partial p_{\xi_j}}+G'_M\frac{\partial}{\partial p_{\xi_M}}. \tag*{(91)}

The second-order Trotter factorization gives

eiLΔt=eiLNHC-baroΔt2eiLNHC-thermoΔt2eiLϵ,2Δt2eiLϵ,2Δt2eiLϵ,1ΔteiL1ΔteiLϵ,2Δt2eiLϵ,2Δt2eiLNHC-thermoΔt2eiLNHC-baroΔt2+O(Δt3).(92)e^{iL\Delta t}=e^{iL_{\mathrm{NHC\text{-}baro}}\frac{\Delta t}{2}}e^{iL_{\mathrm{NHC\text{-}thermo}}\frac{\Delta t}{2}}e^{iL_{\epsilon,2}\frac{\Delta t}{2}}e^{iL_{\epsilon,2}\frac{\Delta t}{2}}e^{iL_{\epsilon,1}\Delta t}e^{iL_1\Delta t}e^{iL_{\epsilon,2}\frac{\Delta t}{2}}e^{iL_{\epsilon,2}\frac{\Delta t}{2}}e^{iL_{\mathrm{NHC\text{-}thermo}}\frac{\Delta t}{2}}e^{iL_{\mathrm{NHC\text{-}baro}}\frac{\Delta t}{2}}+O(\Delta t^3). \tag*{(92)}

The actions of eiL1Δte^{iL_1\Delta t} and eiL2Δt2e^{iL_2\frac{\Delta t}{2}} are

eiL1Δtri=riepϵΔtW+Δtpimiexprel⁡(pϵΔtW),(93)e^{iL_1\Delta t}\mathbf{r}_i=\mathbf{r}_i e^{\frac{p_\epsilon\Delta t}{W}}+\Delta t\frac{\mathbf{p}_i}{m_i}\operatorname{exprel}\left(\frac{p_\epsilon\Delta t}{W}\right), \tag*{(93)}
eiL2Δt2pi=pie−κΔt2W+Δt2Fiexprel⁡(−κΔt2W),(94)e^{iL_2\frac{\Delta t}{2}}\mathbf{p}_i=\mathbf{p}_i e^{-\frac{\kappa\Delta t}{2W}}+\frac{\Delta t}{2}\mathbf{F}_i\operatorname{exprel}\left(-\frac{\kappa\Delta t}{2W}\right), \tag*{(94)}

where κ:=(1+d/Nf)pϵ\kappa:=(1+d/N_f)p_\epsilon and exprel⁡(x):=(ex−1)/x\operatorname{exprel}(x):=(e^x-1)/x.

Isothermal–isobaric integrator with fully anisotropic MTK barostat

Equations of motion, conserved energy-like quantity, and conserved momentum-like quantity

Relative to the masked system, the particle and cell equations are unchanged; only the barostat momentum is promoted from the diagonal masked form [Eq. (8)] to a full matrix variable. The MTK equations for fully anisotropic cell fluctuations are [1, 4]

r˙i=pimi+pgWgri(95)\dot{r}_i = \frac{p_i}{m_i} + \frac{p_g}{W_g}r_i \tag*{(95)}
p˙i=Fi−(pg+Tr⁡[pg]NfI)piWg−pη1Q1pi(96)\dot{p}_i = F_i - \left(p_g + \frac{\operatorname{Tr}[p_g]}{N_f}I\right)\frac{p_i}{W_g} - \frac{p_{\eta_1}}{Q_1}p_i \tag*{(96)}
h˙=hpgWg(97)\dot{h} = \frac{hp_g}{W_g} \tag*{(97)}
p˙g=det⁡[h](Pint−PI)+1Nf∑i=1Npi2miI−pξ1Q1′pg(98)\dot{p}_g = \det[h]\left(P^{\mathrm{int}}-PI\right) + \frac{1}{N_f}\sum_{i=1}^{N}\frac{p_i^2}{m_i}I - \frac{p_{\xi_1}}{Q'_1}p_g \tag*{(98)}

together with the same thermostat chain equations as in Eq. (A2) and the barostat chain equations obtained by replacing G1′G'_1 in Eq. (15) with the fully anisotropic driving force below. Here PP is the target pressure and II is the d×dd \times d identity matrix.

The thermostat driving forces G1G_1, GjG_j and thermostat masses Q1Q_1, QjQ_j are the same as in § 0.3 A and Appendix A. The anisotropic barostat differs only in the first driving force, G1′:=Tr⁡[pgTpg]/Wg−d2kTG'_1 := \operatorname{Tr}[p_g^{\mathsf{T}}p_g]/W_g-d^2kT; the remaining forces Gj′G'_j (j≥2j \ge2) are as in Eq. (12). The cell mass WgW_g and remaining chain masses Qj′Q'_j (j≥2j \ge2) are as in Eq. (13); the first barostat chain mass is Q1′=d2kTτ2Q'_1=d^2kT\tau^2, where d2d^2 counts the independent components of pgp_g.

The conserved energy-like quantity of the fully anisotropic MTK equations is [1, 4]

H′:=H(r,p)+Tr⁡[pgTpg]2Wg+Pdet⁡[h]+∑j=1M(pηj22Qj+pξj22Qj′)+NfkTη1+d2kTξ1+kTηc+kTξc.(99)H' := \mathcal{H}(r,p) + \frac{\operatorname{Tr}[p_g^{\mathsf{T}}p_g]}{2W_g} + P\det[h] + \sum_{j=1}^{M}\left(\frac{p_{\eta_j}^{2}}{2Q_j}+\frac{p_{\xi_j}^{2}}{2Q'_j}\right)+N_fkT\eta_1+d^2kT\xi_1+kT\eta_c+kT\xi_c. \tag*{(99)}

The term d2kTξ1d^2kT\xi_1 reflects that all d2d^2 components of pgp_g are coupled to the first barostat chain variable.

In the absence of external forces (∑i=1NFi=0\sum_{i=1}^{N}F_i=0), the total momentum P=∑i=1NpiP=\sum_{i=1}^{N}p_i has the conserved quantity

K:=hP(det⁡[h])1/Nfeη1.(100)K := hP\left(\det[h]\right)^{1/N_f}e^{\eta_1}. \tag*{(100)}

The phase-space compressibility and metric factor are

κ=−ddt(Nfη1+d2ξ1+ηc+ξc)(101)\kappa=-\frac{d}{dt}\left(N_f\eta_1+d^2\xi_1+\eta_c+\xi_c\right) \tag*{(101)}
e−w=exp⁡(Nfη1+d2ξ1+ηc+ξc).(102)e^{-w}=\exp\left(N_f\eta_1+d^2\xi_1+\eta_c+\xi_c\right). \tag*{(102)}

Integration scheme based on Liouville operator factorization

We outline the Liouville-operator-based integration scheme for the anisotropic and masked MTK equations, following Refs. [3, 4].

The Liouville operator for the full anisotropic MTK equations is decomposed as [4]

iL=iL1+iL2+iLg,1+iLg,2+iLNHC−baro+iLNHC−thermo,(103)i\mathcal{L}=i\mathcal{L}_1+i\mathcal{L}_2+i\mathcal{L}_{g,1}+i\mathcal{L}_{g,2}+i\mathcal{L}_{\mathrm{NHC-baro}}+i\mathcal{L}_{\mathrm{NHC-thermo}}, \tag*{(103)}

where

iL1:=∑i=1N(pimi+pgWgri)⋅∂∂ri(104)i\mathcal{L}_1 := \sum_{i=1}^{N} \left( \frac{\mathbf{p}_i}{m_i} + \frac{\mathbf{p}_g}{W_g}\mathbf{r}_i \right) \cdot\frac{\partial}{\partial\mathbf{r}_i} \tag*{(104)}
iL2:=∑i=1N(Fi−(pg+Tr⁡[pg]NfI)piWg)⋅∂∂pi(105)i\mathcal{L}_2 := \sum_{i=1}^{N} \left( \mathbf{F}_i - \left( \mathbf{p}_g + \frac{\operatorname{Tr}[\mathbf{p}_g]}{N_f}\mathbf{I} \right)\frac{\mathbf{p}_i}{W_g} \right) \cdot\frac{\partial}{\partial\mathbf{p}_i} \tag*{(105)}
iLg,1:=hpgWg:∂∂h(106)i\mathcal{L}_{g,1} := \frac{\mathbf{h}\mathbf{p}_g}{W_g} \mathbin{:} \frac{\partial}{\partial\mathbf{h}} \tag*{(106)}
iLg,2:=Gg:∂∂pg.(107)i\mathcal{L}_{g,2} := \mathbf{G}_g \mathbin{:} \frac{\partial}{\partial\mathbf{p}_g}. \tag*{(107)}

Here A:B\mathbf{A}:\mathbf{B} denotes the double contraction Tr⁡[ATB]\operatorname{Tr}[\mathbf{A}^{\mathsf{T}}\mathbf{B}] between matrices A\mathbf{A} and B\mathbf{B}. The barostat driving force matrix is

Gg:=det⁡[h](Pint−PI)+1Nf∑i=1Npi2miI.(108)\mathbf{G}_g := \det[\mathbf{h}]\left(\mathbf{P}^{\mathrm{int}}-P\mathbf{I}\right) + \frac{1}{N_f}\sum_{i=1}^{N}\frac{\mathbf{p}_i^2}{m_i}\mathbf{I}. \tag*{(108)}

The second-order Trotter factorization gives the propagator [4] (a fourth-order scheme can be constructed via the Suzuki–Yoshida decomposition [10])

eiLΔt=eiLNHC−baroΔt2eiLNHC−thermoΔt2eiLg,2Δt2eiL2Δt2eiLg,1ΔteiL1ΔteiL2Δt2eiLg,2Δt2eiLNHC−thermoΔt2eiLNHC−baroΔt2+O(Δt3).(109)e^{i\mathcal{L}\Delta t}=e^{i\mathcal{L}_{\mathrm{NHC-baro}}\frac{\Delta t}{2}}e^{i\mathcal{L}_{\mathrm{NHC-thermo}}\frac{\Delta t}{2}}e^{i\mathcal{L}_{g,2}\frac{\Delta t}{2}}e^{i\mathcal{L}_2\frac{\Delta t}{2}}e^{i\mathcal{L}_{g,1}\Delta t}e^{i\mathcal{L}_1\Delta t}e^{i\mathcal{L}_2\frac{\Delta t}{2}}e^{i\mathcal{L}_{g,2}\frac{\Delta t}{2}}e^{i\mathcal{L}_{\mathrm{NHC-thermo}}\frac{\Delta t}{2}}e^{i\mathcal{L}_{\mathrm{NHC-baro}}\frac{\Delta t}{2}}+\mathcal{O}(\Delta t^3). \tag*{(109)}

Since pg\mathbf{p}_g is a real symmetric matrix, it admits an eigendecomposition

pg=∑μ=1dρμuμuμT,U:=(u1,…,ud),(110)\mathbf{p}_g=\sum_{\mu=1}^{d}\rho_\mu\mathbf{u}_\mu\mathbf{u}_\mu^{\mathsf{T}},\qquad U:=(\mathbf{u}_1,\ldots,\mathbf{u}_d), \tag*{(110)}

with ρμ∈R\rho_\mu\in\mathbb{R} and uμTuν=δμν\mathbf{u}_\mu^{\mathsf{T}}\mathbf{u}_\nu=\delta_{\mu\nu}. Introducing scaled coordinates xi:=UTri\mathbf{x}_i:=U^{\mathsf{T}}\mathbf{r}_i and yi:=UTpi\mathbf{y}_i:=U^{\mathsf{T}}\mathbf{p}_i, the actions of eiL1Δte^{i\mathcal{L}_1\Delta t} and eiL2Δt2e^{i\mathcal{L}_2\frac{\Delta t}{2}} decouple along each eigenvector direction [4]:

eiL1Δtri=U(xiαeραΔtWg+Δt[UTpi]αmiexprel⁡(ραΔtWg))α=1,…,d(111)e^{i\mathcal{L}_1\Delta t}\mathbf{r}_i=U\left(x_{i\alpha}e^{\frac{\rho_\alpha\Delta t}{W_g}}+\Delta t\frac{[U^{\mathsf{T}}\mathbf{p}_i]_\alpha}{m_i}\operatorname{exprel}\left(\frac{\rho_\alpha\Delta t}{W_g}\right)\right)_{\alpha=1,\ldots,d} \tag*{(111)}
eiL2Δt2pi=U(yiαe−καΔt2Wg+Δt2[UTFi]αexprel⁡(−καΔt2Wg))α=1,…,d,(112)e^{i\mathcal{L}_2\frac{\Delta t}{2}}\mathbf{p}_i=U\left(y_{i\alpha}e^{-\frac{\kappa_\alpha\Delta t}{2W_g}}+\frac{\Delta t}{2}[U^{\mathsf{T}}\mathbf{F}_i]_\alpha\operatorname{exprel}\left(-\frac{\kappa_\alpha\Delta t}{2W_g}\right)\right)_{\alpha=1,\ldots,d}, \tag*{(112)}

where κα:=ρα+Tr⁡[pg]/Nf\kappa_\alpha:=\rho_\alpha+\operatorname{Tr}[\mathbf{p}_g]/N_f.

Isothermal–isobaric integrator with masked MTK barostat

For the masked case with ncn_c active axes, the Liouville operator splitting Eq. (103) and the Trotter factorization Eq. (109) remain unchanged. The only modification is to iLg,2i\mathcal{L}_{g,2}, which now sums only over active axes:

iLg,2:=∑c=1ncGc∂∂pc,(113)i\mathcal{L}_{g,2}:=\sum_{c=1}^{n_c}G_c\frac{\partial}{\partial p_c}, \tag*{(113)}

with the per-axis driving force

Gc:=det⁡[h]⋅ecT(Pint−PI)ec+1Nf∑i=1Npi2mi.(114)G_c:=\det[\mathbf{h}]\cdot\mathbf{e}_c^{\mathsf{T}}\left(\mathbf{P}^{\mathrm{int}}-P\mathbf{I}\right)\mathbf{e}_c+\frac{1}{N_f}\sum_{i=1}^{N}\frac{p_i^2}{m_i}. \tag*{(114)}

Since each barostat momentum pcp_c is a scalar, the NHC-barostat operator iLNHC−baroi\mathcal{L}_{\mathrm{NHC-baro}} acts on each active axis independently. Its explicit form is analogous to the isotropic case Eq. (91), with pϵp_\epsilon replaced by the sum over active momenta:

iLNHC−baro:=−pξ1Q1∑c=1ncpc∂∂pc+∑j=1MpξjQj∂∂ξj+∑j=1M−1(Gj′−pξjpξj+1Qj+1)∂∂pξj+GM′∂∂pξM,(115)i\mathcal{L}_{\mathrm{NHC-baro}}:=-\frac{p_{\xi_1}}{Q_1}\sum_{c=1}^{n_c}p_c\frac{\partial}{\partial p_c}+\sum_{j=1}^{M}\frac{p_{\xi_j}}{Q_j}\frac{\partial}{\partial\xi_j}+\sum_{j=1}^{M-1}\left(G'_j-p_{\xi_j}\frac{p_{\xi_{j+1}}}{Q_{j+1}}\right)\frac{\partial}{\partial p_{\xi_j}}+G'_M\frac{\partial}{\partial p_{\xi_M}}, \tag*{(115)}

with driving forces Gj′G'_j, as defined in Eq. (12).

The masked pg\mathbf{p}_g [Eq. (8)] is already diagonal in the ec\mathbf{e}_c basis with entries ρc=pc\rho_c = p_c on active axes and ρc=0\rho_c = 0 on inactive axes, so that U=IU = I. The actions of eiL1Δte^{i\mathcal{L}_1\Delta t} and eiL2Δt2e^{i\mathcal{L}_2\frac{\Delta t}{2}} [Eqs. (C11a)–(C11b)] therefore apply directly without requiring a coordinate transformation.

References

References

  1. [1]G. J. Martyna, D. J. Tobias, and M. L. Klein, Constant pressure molecular dynamics algorithms, J. Chem. Phys. 101, 4177 (1994).DOI
  2. [2]G. J. Martyna, M. L. Klein, and M. J. Tuckerman, Nosé–Hoover chains: The canonical ensemble via continuous dynamics, J. Chem. Phys. 97, 2635 (1992).DOI
  3. [3]M. E. Tuckerman, Statistical Mechanics: Theory and Molecular Simulation, 2nd ed. (Oxford University Press, 2010).
  4. [4]M. E. Tuckerman, J. Alejandre, R. López-Rendón, A. L. Jochim, and G. J. Martyna, A Liouville-operator derived measure-preserving integrator for molecular dynamics simulations in the isothermal-isobaric ensemble, J. Phys. A: Math. Gen. 39, 5629 (2006).DOI
  5. [5]A. P. Thompson, H. M. Aktulga, R. Berger, D. S. Bolintineanu, W. M. Brown, P. S. Crozier, P. J. in ’t Veld, A. Kohlmeyer, S. G. Moore, T. D. Nguyen, R. Shan, M. J. Stevens, J. Tranchida, C. Trott, and S. J. Plimpton, LAMMPS – a flexible simulation tool for particle-based materials modeling at the atomic, meso, and continuum scales, Comput. Phys. Commun. 271, 108171 (2022).DOI
  6. [6]W. Shinoda, M. Shiga, and M. Mikami, Rapid estimation of elastic constants by molecular dynamics simulation under constant stress, Phys. Rev. B 69, 134103 (2004).DOI
  7. [7]A. H. Larsen, J. J. Mortensen, J. Blomqvist, I. E. Castelli, R. Christensen, M. Dulak, J. Friis, M. N. Groves, B. Hammer, C. Hargus, E. D. Hermes, P. C. Jennings, P. B. Jensen, J. Kermode, J. R. Kitchin, E. L. Kolsbjerg, J. Kubal, K. Kaasbjerg, S. Lysgaard, J. B. Maronsson, T. Maxson, T. Olsen, L. Pastewka, A. Peterson, C. Rostgaard, J. Schiøtz, O. Schütt, M. Strange, K. S. Thygesen, T. Vegge, L. Vilhelmsen, M. Walter, Z. Zeng, and K. W. Jacobsen, The atomic simulation environment—a python library for working with atoms, J. Phys.: Condens. Matter 29, 273002 (2017).DOI
  8. [8]M. E. Tuckerman, C. J. Mundy, and G. J. Martyna, On the classical statistical mechanics of non-hamiltonian systems, Europhys. Lett. 45, 149 (1999).DOI
  9. [9]M. E. Tuckerman, Y. Liu, G. Ciccotti, and G. J. Martyna, Non-hamiltonian molecular dynamics: Generalizing hamiltonian phase space principles to non-hamiltonian systems, J. Chem. Phys. 115, 1678 (2001).DOI
  10. [10]H. Yoshida, Construction of higher order symplectic integrators, Phys. Lett. A 150, 262 (1990).

Paper details

vlnc:W_8h5kacys
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 2

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Physics and Astronomy

ChatGPT (OpenAI, version 5.4), Claude (Anthropic, version 4.6)

View statement
Looking for related papers…
Contents