Heat Transport in Insulators from Ab Initio Green-Kubo Theory

  • Stefano BaroniEmail author
  • Riccardo Bertossa
  • Loris Ercole
  • Federico Grasselli
  • Aris Marcolongo
Living reference work entry


The Green-Kubo theory of thermal transport has long be considered incompatible with modern simulation methods based on electronic-structure theory, because it is based on such concepts as energy density and current, which are ill-defined at the quantum-mechanical level. Besides, experience with classical simulations indicates that the estimate of heat-transport coefficients requires analysing molecular trajectories that are more than one order of magnitude longer than deemed feasible using ab initio molecular dynamics. In this paper we report on recent theoretical advances that are allowing one to overcome these two obstacles. First, a general gauge invariance principle has been established, stating that thermal conductivity is insensitive to many details of the microscopic expression for the energy density and current from which it is derived, thus permitting to establish a rigorous expression for the energy flux from Density-Functional Theory, from which the conductivity can be computed in practice. Second, a novel data analysis method based on the statistical theory of time series has been proposed, which allows one to considerably reduce the simulation time required to achieve a target accuracy on the computed conductivity. These concepts are illustrated in detail, starting from a pedagogical introduction to the Green-Kubo theory of linear response and transport, and demonstrated with a few applications done with both classical and quantum-mechanical simulation methods.

Heat conduction in insulators is determined by the dynamics of the atomic nuclei, the electrons following adiabatically in their ground state: a regime that we will refer to as atomic or adiabatic heat transport. When a quasiparticle picture of the heat carriers (phonons) is adequate, a kinetic approach to heat conduction based on the Boltzmann transport equation (Peierls 1929) has been demonstrated (Broido et al. 2007) and successfully applied to crystalline insulators (Zhou et al. 2016), leveraging phonon frequencies and lifetimes from density-functional perturbation theory (Baroni et al. 1987, 2001; Giannozzi et al. 1991; Debernardi et al. 1995). As the temperature increases, anharmonic effects eventually make the quasiparticle picture break down well below melting (Turney et al. 2009), while the Boltzmann transport equation simply does not apply to glasses and liquids, where phonon dispersions are not even defined.

The simulation of thermal transport in glasses, liquids, and high-temperature crystalline solids thus requires the full deployment of the statistical mechanics of hydrodynamic fluctuations (Kadanoff and Martin 1963), started in the 1930s by Lars Onsager (1931a; 1931b) and culminated in the 1950s with the Green-Kubo (GK) theory of linear response (Green 1952, 1954; Kubo 1957; Kubo et al. 1957). According to this theory, the thermal conductivity, κ, can be expressed in terms of time correlations of the heat current, J, as: where the brackets indicate ensemble averages over trajectories, which are accessible in principle to molecular dynamics (MD) simulations. In spite of the beauty, rigor, and broad scope of the GK theory, its adoption in the ab initio simulation of heat transport has stumbled at two seemingly insurmountable hurdles: first and foremost, the heat current entering Eq. (1) is ill-defined at the atomic scale, thus allegedly thwarting its implementation from first principles; second but not less important, experience in classical simulations, where a definition of the heat current is readily available in terms of suitably defined atomic energies (Irving and Kirkwood 1950), indicates that taming its statistical fluctuations requires so long MD simulations, as to be unaffordable using ab initio (AI) MD (Car and Parrinello 1985; Marx and Hutter 2009). As a matter of fact, no AIMD simulations of adiabatic heat transport based on GK theory have appeared until the spurious nature of these hurdles was recently revealed by Marcolongo et al. (2016) and Ercole et al. (2016, 2017).

The first difficulty was overcome by revealing a general gauge invariance principle for thermal transport, stemming from the hydrodynamic nature of energy fluctuations (see below), which makes transport coefficients independent of the microscopic expression of the energy density and current that are to a large extent ill-defined (Marcolongo et al. 2016; Ercole et al. 2016). Building on this principle, an expression for the energy current was derived from density-functional theory (Hohenberg and Kohn 1964; Kohn and Sham 1965), which allows simulating heat transport within the GK formalism, using equilibrium AIMD. The second difficulty was addressed using advanced statistical methods for the spectral analysis of stationary time series, which provide an asymptotically unbiased and consistent estimate of the power spectrum of the energy current, meaning that both the bias and the statistical error of the estimated conductivity can be made arbitrarily and controllably small in the limit of long simulation time (Ercole et al. 2017). The combination of these theoretical and methodological innovations makes the ab initio simulation of heat transport feasible in principle and affordable in practice. In this chapter, we review the efforts that have led to these achievements, starting with a brief review of the relevant theoretical concepts and illustrate them with relevant benchmarks and an application to a realistic model of liquid water.

1 Green-Kubo Theory of Heat Transport

1.1 Hydrodynamic Variables

The macroscopic processes occurring in condensed matter are often described in terms of extensive variables. By definition, the value that such a variable assumes for a system is the sum of the values it has for each of its subsystems. This property allows one to express an extensive variable, A, as the integral of a suitably defined density, a(r), as:
$$ \displaystyle \begin{aligned} A[\Omega]=\int_\Omega a(\mathbf {r})d\mathbf {r}, {} \end{aligned} $$
where Ω is the system volume. Here and in the following boldfaces indicate 3D vectors and Greek subscripts label Cartesian components: u = {uα} = {u1, u2, u3}. When an extensive quantity is locally conserved, a current density, j(r, t), can be associated with its density in such a way that the two of them satisfy the continuity equation:
$$ \displaystyle \begin{aligned} \frac{\partial a(\mathbf {r},t)}{\partial t} = - \nabla\cdot\boldsymbol {j}(\mathbf {r},t), {} \end{aligned} $$
where ∇⋅j indicates partial differentiation and the middle dot a scalar product (a divergence in this case). In the following, the densities and current densities of conserved quantities will be called conserved densities and conserved currents for short. The space Fourier transform of Eq. (3) reads:
$$ \displaystyle \begin{aligned} \dot{\tilde a}(\mathbf {q},t) = - i\mathbf {q} \cdot \tilde {\boldsymbol {\jmath}} (\mathbf {q},t), {}\end{aligned} $$
where the overdot indicates a time derivative and the tilde a Fourier transform, so that the longer the wavelength, the slower is the dynamics of a conserved density. We conclude that for long-enough wavelengths, conserved densities are adiabatically decoupled from all the other (zillions of) fast atomic degrees of freedom. Note that in this chapter, we are using the concept of adiabatic decoupling in two distinct senses, depending on the context, to indicate the decoupling of electronic from nuclear degrees of freedom and that of hydrodynamic variables from fast atomic ones.

The long-wavelength Fourier components of conserved densities are called hydrodynamic variables. In macroscopically homogeneous systems, different wavelengths are decoupled from each other, while, as we have seen, the long wavelengths are adiabatically decoupled from all the other degrees of freedom. Let us suppose there are Q conserved extensive variables. In the case of a mono-atomic fluid, for instance, Q = 5, corresponding to mass (or particle number), energy, and the three components of the momentum. In order to simplify the notation, we set the value of the conserved quantities equal to zero, Ai = 0, so that their densities, ai(r), directly refer to the departure from equilibrium, and we indicate by ji(r, t) the corresponding currents. At equilibrium, all the conserved densities and currents vanish. Off equilibrium, it will be assumed that the wavelength and the time scale of the disturbances are so long that thermal equilibrium still holds locally. That is to say, a local temperature, pressure, and chemical potential can be defined, such that, when combined with the densities of extensive variable, they satisfy a local equation of state.

For small-enough deviations from equilibrium, the time derivatives of conserved densities are linear combinations of the densities themselves. In the frequency/wavevector domains, this condition can be expressed as
$$ \displaystyle \begin{aligned} -i\omega\tilde a^i(\mathbf {q},\omega) = \sum_j \tilde\Lambda^{ij}(\mathbf {q},\omega) \tilde a^j(\mathbf {q},\omega), {} \end{aligned} $$
where the tilde indicates now a space-time Fourier transform: \( \tilde a(\mathbf {q},\omega) = \int \mathrm {e}^{-i(\mathbf {q}\cdot \mathbf {r}-\omega t)} a(\mathbf {r},t)d\mathbf {r}dt \). By combining Eq. (5) with the time Fourier transform of Eq. (4), we obtain the so-called constitutive equations for the (longitudinal components of the) conserved currents:
$$ \displaystyle \begin{aligned} \tilde{\boldsymbol {\jmath}}^i(\mathbf {q},\omega)=i\frac{\mathbf {q}}{q^2} \sum_j\tilde \Lambda^{ij}(\mathbf {q},\omega)\tilde a^j(\mathbf {q},\omega). {} \end{aligned} $$
In isotropic media, the \( \tilde \Lambda \)s are spherically symmetric functions of q, whereas their value at q = 0 vanishes, because a nonvanishing value would imply a nonphysical long-range dependence of the currents on density fluctuations, in contrast with our assumption of local thermodynamic equilibrium. The long-wavelength low-frequency limit of the coupling constants can thus be assumed to be \( \tilde \Lambda ^{ij}(\mathbf {q},\omega) \sim q^2 \lambda ^{ij} \), so that the macroscopic (q = 0) stationary (ω = 0) components of the currents, \( {\mathbf {J}}^i = \frac {1}{\Omega} \int \boldsymbol j^i (\mathbf {r}) d\mathbf {r} \), are related to the corresponding components of the density gradients, \( {\mathbf {D}}^i=\frac {1}{\Omega}\int \nabla a^i(\mathbf {r})d\mathbf {r} \), through the equation:
$$ \displaystyle \begin{aligned} {\mathbf {J}}^i=\sum_j \lambda^{ij}{\mathbf {D}}^j. {} \end{aligned} $$
In the following, the macroscopic component of a current will be indicated as a flux.
Let \( x^i=\frac {\partial S}{\partial A^i} \) be the intensive variable conjugate to Ai, where S is the system’s entropy and \( \chi ^{ij} = \frac {1}{\Omega} \frac {\partial A^i}{\partial x^j} \) the corresponding susceptibility. For instance, when Ai is the energy of the system, the corresponding conjugate variable is the inverse temperature, xi = 1∕T, while, when Ai represents the number of particles of a given species, one has xi = −μiT, μi being the corresponding chemical potential. The hypothesis of local thermodynamic equilibrium allows defining local values of the intensive variables, and we define thermodynamic forces as their average gradients: \( {\mathbf {F}}^i= \frac {1}{\Omega} \int \nabla x^i(\mathbf {r})d\mathbf {r} \). The average density gradients are related to the thermodynamic forces through the susceptibility defined above, as:
$$ \displaystyle \begin{aligned} {\mathbf {D}}^i=\sum_j\chi^{ij}{\mathbf {F}}^j . \end{aligned} $$
By inserting this relation into Eq. (7), one gets:
$$ \displaystyle \begin{aligned} {\mathbf {J}}^i=\sum_j L^{ij} {\mathbf {F}}^j, {} \end{aligned} $$
where Lij =∑kλikχkj. Equation (9) expresses the linear relation between fluxes, the J’s, and thermodynamic affinities, the Fs, for which Onsager derived his celebrated reciprocity relations (Lji = Lij) from microscopic reversibility (Onsager 1931a,b; Casimir 1945). Note that, according to our definition, both the Js and the Fs in Eq. (9) do not depend on the size of the system.

1.2 Linear-Response Theory

In order to evaluate the Lij phenomenological coefficients appearing in Eq. (9), we consider a classical system of N interacting atoms described by the Hamiltonian
$$ \displaystyle \begin{aligned} H^\circ(\Gamma) = \sum_n\frac{1}{2M_n}({\mathbf {P}}_n)^2 + V({\mathbf {R}}_1,{\mathbf {R}}_2,\cdots {\mathbf {R}}_N), {} \end{aligned} $$
where Mn, Rn, and Pn are the masses, coordinates, and momenta of the n-th particle, Γ = {Rn, Pn} indicates the phase-space coordinates of the entire system, and V is a generic many-body potential. Let us now suppose that the system is subject to an external perturbation that can be described as a linear combination of the conserved densities, {ai(r; Γ)}, as:
$$ \displaystyle \begin{aligned} V^{\prime}(\Gamma,t) = \sum_i \int v^i(\mathbf {r},t) a^i(\mathbf {r};\Gamma) {d\mathbf {r},} {}\end{aligned} $$
where a(r; Γ) is a phase-space function whose ensemble average is the conserved density:
$$ \displaystyle \begin{aligned} \begin{aligned} a(\mathbf {r}) &= \langle a(\mathbf {r};\Gamma) \rangle \\ & = \int a(\mathbf {r};\Gamma) \mathcal {P}^\circ(\Gamma)d\Gamma, \end{aligned}\end{aligned} $$
\( \mathcal {P}^\circ (\Gamma) \propto \mathrm {e}^{-\frac {H^\circ (\Gamma)}{k_BT}} \) is the equilibrium distribution, kB the Boltzmann constant, and {vi(r, t)} are time-dependent fields that couple to the conserved densities and vanish at t = −, when the system is assumed to be in thermal equilibrium at some temperature T. Of course, conserved currents are also expected values of some phase-space functions, j(r) = 〈j(r;Γ)〉. The phase-space functions whose expected values are conserved densities/currents will be referred to as phase-space samples of the currents/densities. In the following, when the phase-space dependence of a conserved density/current is explicitly indicated, we will mean a phase-space sample; when it is not, a phase-space average will be implied. When a phase-space sample is evaluated along a dynamical trajectory, Γt, the sample function will depend on time and on the initial conditions of the trajectory. Averaging with respect to the initial conditions will result in a time-dependent expected value for the conserved densities (or currents):
$$ \displaystyle \begin{aligned} \begin{aligned} a(\mathbf {r},t) &= \langle a(\mathbf {r};\Gamma^{\prime}_t)\rangle_0 \\ &= \int a(\mathbf {r};\Gamma^{\prime}_t) \mathcal {P}^\circ(\Gamma_0) d\Gamma_0. \end{aligned} {} \end{aligned} $$
In Eq. (13), the notation \( \Gamma ^{\prime}_t \) denotes somewhat pedantically that the time evolution in phase space is driven by the perturbed Hamiltonian, H + V. If it were driven by H, evidently the value of a would be time-independent. In the following, the notation Γt will indicate an unperturbed time evolution. As an example, the phase-space sample of the particle density can be assumed to be n(r;Γ) =∑nδ(r −Rn), the corresponding current is j(r, Γ) =∑nδ(r −Rn)PnMn, and a local external potential is described by \( V^{\prime}(\varGamma ,t)=\sum _n v({\mathbf {R}}_n,t)=\int v^{\prime}(\mathbf {r},t) n(\mathbf {r};\varGamma) d \mathbf {r} \). Note that sample functions are not necessarily univocally defined. Different functions whose phase-space averages coincide in the long-wavelength limit sample the same hydrodynamical variable. More on this in Sect. 2.
According to Green (1954), Kubo (1957), and Kubo et al. (1957), the linear response of the i-th conserved current to the perturbation is:
$$ \displaystyle \begin{aligned} j_\alpha^i(\mathbf {r},t) & = \frac{1}{k_B T} \sum_j \int_{-\infty}^t dt^{\prime} \int d\mathbf {r}^{\prime} \Bigl \langle j_\alpha^i(\mathbf {r},\Gamma_t)\dot a^j(\mathbf {r}^{\prime},\Gamma_{t^{\prime}})\Bigr \rangle_0 v^j(\mathbf {r}^{\prime},t^{\prime}), \end{aligned} $$
$$ \displaystyle \begin{aligned} &= \frac{-1}{k_B T} \sum_{j,\beta} \int_{-\infty}^t dt^{\prime} \int d\mathbf {r}^{\prime} \Bigl \langle j_\alpha^i(\mathbf {r},\Gamma_t) \partial^{\prime}_\beta j_\beta^j(\mathbf {r}^{\prime},\Gamma_{t^{\prime}})\Bigr \rangle_0 v^j(\mathbf {r}^{\prime},t^{\prime}) \end{aligned} $$
$$ \displaystyle \begin{aligned} &= \frac{1}{k_B T} \sum_{j,\beta} \int_{-\infty}^t dt^{\prime} \int d\mathbf {r}^{\prime} \left \langle j_\alpha^i(\mathbf {r},\Gamma_{t}) j_\beta^j(\mathbf {r}^{\prime},\Gamma_{t^{\prime}})\right \rangle_0 \partial^{\prime}_\beta v^j(\mathbf {r}^{\prime},t^{\prime}). {} \end{aligned} $$
The second line follows from the first through the continuity equation, Eq. (3), while the third line follows after integrating by parts with respect to r. The notation \( \partial ^{\prime}_\beta =\frac {\partial}{\partial r^{\prime}_\beta} \) has been used.
By integrating Eq. (16) all over the space, and assuming space-time homogeneity as well as isotropy, one recovers Eq. (9) with:
$$ \displaystyle \begin{aligned} J^i_\alpha(\Gamma) &= \frac{1}{\Omega} \int j^i_\alpha(\mathbf {r},\Gamma) d\mathbf {r} {} \end{aligned} $$
$$ \displaystyle \begin{aligned} F^i_\alpha(\Gamma) &= \frac{1}{\Omega T} \int \partial_\alpha v^i(\mathbf {r},\Gamma) d\mathbf {r} {} \end{aligned} $$
$$ \displaystyle \begin{aligned} L^{ij}_{\alpha\beta} &= \frac{\Omega}{k_B} \int_0^\infty \left\langle J^i_\alpha(\Gamma_t) J^j_\beta(\Gamma_0)\right\rangle_0 dt. {} \end{aligned} $$
This completes the derivation of the Green-Kubo formula for transport coefficients, Eq. (1), from classical linear-response theory. Onsager’s reciprocity relations, Lij = Lji (Onsager 1931a,b), follow from Eq. (19) leveraging time-translational invariance, \( \langle J^i_\alpha (\Gamma _t) J^j_\beta (\Gamma _0) \rangle = \langle J^i_\alpha (\Gamma _0) J^j_\beta (\Gamma _{-t}) \rangle \), and micro-reversibility, \( \langle J^i_\alpha (\Gamma _t) J^j_\beta (\Gamma _0) \rangle = \langle J^i_\alpha (\Gamma _{-t}) J^j_\beta (\Gamma _0) \rangle \).

1.2.1 Einstein-Helfand Expression for Transport Coefficients and the Wiener-Khintchine Theorem

The celebrated Einstein’s relation between the mean-square displacement of a diffusing particle and its velocity autocorrelation function is easily generalized to an arbitrary stochastic process and has in fact been utilized by Helfand (1960) to provide an “Einstein-like” expression for transport coefficients.

Let Xt be a stationary stochastic process. One has:
$$ \displaystyle \begin{aligned} \frac{1}{\mathcal {T}} \left \langle \left | \int_0^{\mathcal {T}} X_t dt \right |{}^2 \right \rangle = 2 \int_0^{\mathcal {T}} \left \langle X_t X_0 \right \rangle dt -\frac{2}{\mathcal {T}} \int_0^{\mathcal {T}} \left \langle X_t X_0 \right \rangle t \,dt. {} \end{aligned} $$
In the large \( \mathcal {T} \) limit, the second term on the right-hand side of Eq. (20) can be neglected.

When the stochastic process is the velocity of a Brownian particle, Eq. (20) allows one to establish a relation between the diffusion constant of the particle, temperature, and the autocorrelation time of the velocity. When Xt is the heat flux of a macroscopic body, Eq. (20) allows one to estimate the thermal conductivity, as given by Eq. (1), from the asymptotic behavior of the “energy displacement” \( \mathcal {D}(\tau) = \int _0^\tau \mathbf {J}(\Gamma _t) dt \).

Equation (20) can be easily generalized to the finite-frequency regime, to get:
$$ \displaystyle \begin{aligned} \begin{aligned} S_{\mathcal {T}}(\omega) &= \frac{1}{\mathcal {T}} \left \langle \left | \int_0^{\mathcal {T}} X_t \mathrm {e}^{i\omega t}dt \right |{}^2 \right \rangle \\ &= 2\mathfrak{Re} \int_0^{\mathcal {T}} \left \langle X_t X_0 \right \rangle \mathrm {e}^{i\omega t}dt + \mathcal {O}(\mathcal {T}^{-1}). \end{aligned} {} \end{aligned} $$
This equation expresses the Wiener-Khintchine theorem (Wiener 1930; Khintchine 1934), which states that the expectation of the squared modulus of the Fourier transform of a stationary process is the Fourier transform of its time correlation function, which is usually referred to as the process power spectral density:
$$ \displaystyle \begin{aligned} S(\omega) = \int_{-\infty}^\infty \langle X_t X_0 \rangle \,\mathrm {e}^{i\omega t} dt, {} \end{aligned} $$
aka the power spectrum. In the following, the suffix \( \mathcal {T} \) will be neglected for simplicity and its value assumed to be sufficiently large as to be considered infinite. More generally, when several conserved currents interact with each other, one can define the cross-spectrum of the conserved fluxes as the Fourier transform of the cross-time correlation functions:
$$ \displaystyle \begin{aligned} \begin{aligned} S^{kl}(\omega) &= \int_{-\infty}^\infty \langle X^k_t X^l_0 \rangle \,\mathrm {e}^{i\omega t} dt, \\ &= \frac{1}{\mathcal {T}} \mathfrak{Re} \left\langle \int_0^{\mathcal {T}} X^k_t \mathrm {e}^{-i\omega t}dt \times \int_0^{\mathcal {T}} X^l_t \mathrm {e}^{i\omega t}dt \right\rangle + \mathcal {O}(\mathcal {T}^{-1}) \end{aligned} {} \end{aligned} $$
Eqs. (20) and (21) indicate that the transport coefficients we are after essentially are the zero-frequency value of the (cross-)power spectrum of the corresponding current(s), a fact that will be instrumental in our approach to data analysis, as explained in Sect. 4. Therefore, Eq. (19) can be cast into the form:
$$ \displaystyle \begin{aligned} L^{kl} =\frac{\Omega}{2 k_B} S^{kl}(\omega=0), {} \end{aligned} $$
where the Cartesian indices have been omitted for clarity.

1.3 Heat Transport

The above treatment allows one to compute the linear response of a system at thermal equilibrium to a generic mechanical perturbation. Heat transport is determined by temperature gradients that cannot be described by any mechanical perturbation. The concept of temperature distribution implies that the system is locally at thermal equilibrium over lengths and times large with respect to atomic distances and relaxation times. Temperature affects the physical properties of a system through the Boltzmann distribution function. When the temperature is not constant, T(r) = T +  ΔT(r) (| ΔT|≪ T), the effects of this inhomogeneity can be formally described by the distribution function:
$$ \displaystyle \begin{aligned} \mathcal {P}(\Gamma) & \propto \mathrm {e}^{-\int \frac{e(\mathbf {r};\Gamma)}{k_BT(\mathbf {r})}d\mathbf {r}}, \end{aligned} $$
$$ \displaystyle \begin{aligned} &= \mathrm {e}^{-\frac{H^\circ(\Gamma)+V^{\prime}(\Gamma)}{k_BT}}, \end{aligned} $$
where e(r; Γ) is an energy (Hamiltonian) density, such that \( \int e(\mathbf {r};\varGamma) d\mathbf {r}= H^\circ (\varGamma) \). Equation (11) becomes:
$$ \displaystyle \begin{aligned} V^{\prime}(\Gamma)=-\frac{1}{T}\int\Delta T(\mathbf {r})e(\mathbf {r};\Gamma) d\mathbf {r} + \mathcal {O}(\Delta T^2) . {} \end{aligned} $$
Equation (27) shows that the effects of temperature inhomogeneities can be mimicked by a mechanical perturbation coupled to the temperature distribution. From Eqs. (9) and (17), (18), and (19), we conclude that in a system where the only nontrivial conserved quantity is the energy, the heat (energy) flow is coupled to temperature gradients through the constitutive equation:
$$ \displaystyle \begin{aligned} {\mathbf {J}}^{\scriptscriptstyle E} = - \kappa \nabla T, {} \end{aligned} $$
where the thermal conductivity \( \kappa _{\alpha \beta}= L^{\scriptscriptstyle EE}_{\alpha \beta} / T^2 \) (see Eq. (9)) can be expressed by a Green-Kubo relation in terms of the fluctuations of the energy flux as:
$$ \displaystyle \begin{aligned} \kappa_{\alpha\beta} =\frac{\Omega}{k_B T^2} \int_0^\infty \left \langle J^{\scriptscriptstyle E}_\alpha(\Gamma_t) J^{\scriptscriptstyle E}_\beta(\Gamma_0) \right \rangle_0 dt, {} \end{aligned} $$
$$ \displaystyle \begin{aligned} {\mathbf {J}}^{\scriptscriptstyle E}(\Gamma) = \frac{1}{\Omega} \int \boldsymbol {j}^{\scriptscriptstyle E}(\mathbf {r};\Gamma) d\mathbf {r}. {} \end{aligned} $$
In order to obtain an explicit expression for the energy flux from a microscopic expression for the energy density, we multiply the continuity equation, Eq. (3), by r and integrate by parts to obtain:
$$ \displaystyle \begin{aligned} {\mathbf {J}}^{\scriptscriptstyle E}(\Gamma_t) &= \frac{1}{\Omega} \int \dot e(\mathbf {r};\varGamma_t) \,\mathbf {r}\, d\mathbf {r} {} \end{aligned} $$
$$ \displaystyle \begin{aligned} & = \frac{1}{\Omega} \int \left[ \sum_n \left(\frac{\partial e(\mathbf {r};\Gamma_t)}{\partial {\mathbf {R}}_n} \cdot {\mathbf {V}}_n + \frac{\partial e(\mathbf {r};\Gamma_t)}{\partial {\mathbf {P}}_n} \cdot {\mathbf {F}}_n \right) \right] \mathbf {r}\, d\mathbf {r}, {} \end{aligned} $$
where Fn is the force acting on the n-th atom and \( {\mathbf {V}}_n=\frac {{\mathbf {P}}_n}{M_n} \) its velocity.

The manipulations leading from the continuity equation, Eq. (3), to Eq. (32) deserve some further comments, as they imply neglecting a boundary term, \( {\mathbf {J}}_{\partial \Omega} = \frac {1}{\Omega} \int _{\partial \Omega} \left (\boldsymbol {j}(\mathbf {r}) \cdot \hat {\mathbf {n}} \right) \mathbf {r} \,d\mathbf {r} \) (where  Ω is the boundary of the integration volume and \( \hat {\mathbf {n}} \) the normal to it), which in general does not vanish in the thermodynamic limit and is ill-defined in periodic boundary conditions (PBC). The correct way of addressing this problem is to work with the Taylor expansion of the space Fourier transform of the continuity equation, Eq. (4), and to perform the thermodynamic limit at finite wavelength. The leading nonvanishing term in the Taylor expansion yields Eq. (31) without any boundary term in the way.

1.3.1 Energy Flux from Classical Force Fields

When atoms interact through a classical force field, V (R1, R2, ⋯RN), an energy density can be defined in terms of local atomic energies as:
$$ \displaystyle \begin{aligned} e(\mathbf {r},\Gamma) &= \sum_n \delta(\mathbf {r}-{\mathbf {R}}_n) e_n(\Gamma), {} \end{aligned} $$
$$ \displaystyle \begin{aligned} e_n(\Gamma) &= \frac{({\mathbf {P}}_n)^2}{2M_n} + v_n(\{\mathbf {R}\}), {} \end{aligned} $$
where the vns are a set of atomic potential energies whose sum is the total potential energy of the system, ∑nvn = V , with a short-range dependence on the coordinates of the other atoms. In the presence of long-range forces, this condition is effectively guaranteed by local charge neutrality, which we will assume throughout. By inserting Eq. (33) into Eq. (32), the energy flux can be cast into the form:
$$ \displaystyle \begin{aligned} {\mathbf {J}}^{\scriptscriptstyle E}(\Gamma) &= \frac{1}{\Omega} \left[ \sum_n {\mathbf {V}}_n e_n + \sum_n {\mathbf {R}}_n \left({\mathbf {F}}_n \cdot {\mathbf {V}}_n + \sum_m {\mathbf {V}}_m \cdot {\frac{\partial v_n}{\partial {\mathbf {R}}_m}} \right) \right]\\ &= \frac{1}{\Omega} \left[ \sum_n {\mathbf {V}}_n e_n + \sum_{n,m} ({\mathbf {R}}_n-{\mathbf {R}}_m) {\mathbf {F}}_{n m} \cdot {\mathbf {V}}_n \right], {} \end{aligned} $$
where \( {\mathbf {F}}_{n m} = - \frac {\partial v_m}{\partial {\mathbf {R}}_n} \) is the contribution of the m-th atom to the force acting on the n-th atom, ∑mFnm = Fn, and Fnm = −Fmn. When the interaction among atoms can be expressed in terms of two-body potentials, one has \( v_m=\frac {1}{2}\sum _n v({\mathbf {R}}_n- {\mathbf {R}}_m) \) and \( {\mathbf {F}}_{n m} = - \frac {1}{2} \nabla _{{\mathbf {R}}_n} v({\mathbf {R}}_n- {\mathbf {R}}_m) \). Here we implicitly assumed that the interaction energy is equally partitioned between atoms m and n. In Sect. 2, we shall see this is not the only possible choice, with far-reaching consequences on the theory of heat transport.

The first term on the right-hand side of Eq. (35) is often called convective and the second virial. We feel that the wording “convective” is somewhat misleading in this context, as the convective current, as well as its contribution to heat conductivity, may not vanish even in the absence of convection.

1.3.2 Multicomponent Fluids

In a multicomponent fluid, there is one conserved quantity (the particle number) per atomic species, plus the total energy and the three Cartesian components of the total momentum. The momentum densities are mass currents: the mass flux is therefore the total momentum, which vanishes in the center of mass reference frame. The transverse components of the momentum densities are decoupled from the other conserved densities (Foster 1975), while the longitudinal one can be assumed to coincide with the total momentum in the long-wavelength limit. Momentum conservation thus constrains the number of fluxes interacting with the energy flux in Eq. (9) to Q − 1, Q being the number of atomic species, so that the resulting dimension of the matrix of Onsager coefficients, L, is Q × Q. The heat flux is defined as the non-convective component of the energy flux, i.e., the value of the latter in the absence of mass transport, that is to say when all the particle fluxes vanish. It is unfortunate, but inevitable due to common usage, that this definition of non-convective flux clashes with a different definition given above while commenting Eq. (35). By imposing this condition in Eq. (9), with J1 ≡JE, and Jq (q = 2, …Q) being independent particle fluxes, the thermal conductivity, defined as the ratio of the heat flux over the temperature gradient, is given by:
$$ \displaystyle \begin{aligned} \kappa = \frac{1}{T^2 \,(L^{-1})^{{\scriptscriptstyle 1}{\scriptscriptstyle 1}}}. {} \end{aligned} $$
This expression can be proved to be invariant under any non-singular linear transformation of the independent particle fluxes. For instance, in the case of a two-component liquid, energy and particle currents are coupled as in:
$$ \displaystyle \begin{aligned} \begin{aligned} {\mathbf {J}}^{\scriptscriptstyle E} &= L^{{\scriptscriptstyle E}{\scriptscriptstyle E}}\, \nabla \left (\frac{1}{T} \right) + L^{{\scriptscriptstyle E}{\scriptscriptstyle Q}} \, \nabla \left (\frac{\mu}{T} \right), \\ {\mathbf {J}}^{{\scriptscriptstyle Q}} &= L^{{\scriptscriptstyle E}{\scriptscriptstyle Q}} \, \nabla \left (\frac{1}{T} \right) + L^{{\scriptscriptstyle Q}{\scriptscriptstyle Q}} \, \nabla \left (\frac{\mu}{T} \right), \end{aligned}{} \end{aligned} $$
where JQ is the particle current of one of the two species (say, the second) and μ the corresponding chemical potential (Sindzingre and Gillan 1990). By imposing that the particle current vanishes, the resulting thermal conductivity is:
$$ \displaystyle \begin{aligned} \kappa=\frac{1}{T^2} \left(L^{{\scriptscriptstyle E}{\scriptscriptstyle E}} - \frac{(L^{{\scriptscriptstyle E}{\scriptscriptstyle Q}})^2}{L^{{\scriptscriptstyle Q}{\scriptscriptstyle Q}}} \right). {} \end{aligned} $$

2 Gauge Invariance of Heat Transport Coefficients

It is often implicitly assumed that the well-definiteness of thermal transport coefficients would stem from the uniqueness of the decomposition of the system’s total energy into localized, atomic, contributions. This assumption is manifestly incorrect, as any decomposition leading to the same value for the total energy as Eq. (34) should be considered as legitimate. The difficulty of partitioning a system’s energy into subsystems’ contributions is illustrated in Fig. 1, which depicts a system made of two interacting subsystems. When defining the energy of each of the two subsystems, an arbitrary decision has to be made as to how the interaction energy is partitioned. In the case depicted in Fig. 1, for instance, the energy of each of the two subsystems can be defined as \( \mathcal {E}(\Omega _i) = E(\Omega _i) + \frac {1}{2}(1\pm \lambda)W_{12} \), where Ei) are the energies of the two isolated subsystems, W12 their interaction energy, and λ an arbitrary constant. In the thermodynamic limit, when all the subsystems’ energies are much larger than the interaction between any pairs of them, the value of the λ constant is irrelevant. When it comes to defining energy densities (i.e., energies of infinitesimal portions of a system) or atomic energies, instead, the magnitude of the interaction between different subsystems is comparable to their energies, which become therefore intrinsically ill-defined.
Fig. 1

The energy of an isolated system is the sum of the energies of its subsystems (as defined when they are isolated as well) plus the interaction among them, W12, whose magnitude scales as the area of the interface, depicted in red. When defining the energies of individual subsystems, \( \mathcal {E} \), W12 has to be arbitrarily partitioned among them

Let us consider a mono-atomic fluid interacting through pair potentials, v(|Rn −Rm|), and define the atomic energies as (Marcolongo 2014; Ercole et al. 2016):
$$ \displaystyle \begin{aligned} e_{{\scriptscriptstyle \gamma},n}(\Gamma) = \frac{1}{2M_n}({\mathbf {P}}_{n})^{2} + \frac{1}{2}\sum_{m\ne n} v(|{\mathbf {R}}_{n}-{\mathbf {R}}_{m}|) (1+\gamma_{nm}), {} \end{aligned} $$
where γnm = −γmn is any antisymmetric matrix. As the interatomic potential appearing in Eq. (39) is symmetric with respect to the atomic indices, it is clear that the sum of all the atomic energies does not depend on γ, thus making any choice of γ equally permissible. This trivial observation has deep consequences on the theory of thermal fluctuations and transport, because the value of the macroscopic energy flux, instead, depends explicitly on γ, thus making one fear that the resulting transport coefficients would depend on γ as well. Using the same manipulations that lead from Eqs. (33) and (34) to Eq. (35), for any choice of the γ matrix in Eq. (39), a corresponding expression for the macroscopic energy flux can be found, reading (Marcolongo 2014; Ercole et al. 2016):
$$ \displaystyle \begin{aligned} {\mathbf {J}}_{{\scriptscriptstyle \gamma}}^{\scriptscriptstyle E}={\mathbf {J}}^{\scriptscriptstyle E}+ \frac{1}{2 \Omega}\sum_{n,m\ne n}\gamma_{nm} \Bigl (v_{nm} {\mathbf {V}}_{n} + \bigl ({\mathbf {V}}_{n}\cdot \nabla_{{\mathbf {R}}_n} v_{nm} \bigr) ({\mathbf {R}}_{n}-{\mathbf {R}}_{m}) \Bigr), {} \end{aligned} $$
where vnm = v(|Rn −Rm|).
As a specific example, Ercole et al. (2016) ran MD simulations for a Lennard-Jones monoatomic fluid described by the interatomic potential \( v(r)=\epsilon \left [ \left (\frac {\sigma}{r}\right)^{12} - \left (\frac {\sigma}{r}\right)^{6}\right ] \) at temperature \( T=1.86 \frac {\epsilon}{k_B} \) and density ρ = 0.925σ−3. In Fig. 2a, we display the resulting macroscopic energy-flux autocorrelation function corresponding to different choices of the γ matrix in Eqs. (39) and (40). Figure 2a clearly shows that the \( \langle {\mathbf {J}}^{\scriptscriptstyle E}_{\gamma}(t) \cdot {\mathbf {J}}^{\scriptscriptstyle E}_{\gamma}(0) \rangle \) correlation functions dramatically depend on the γ matrices in Eqs. (39) and (40). Notwithstanding, the integrals of all these time correlation functions tend to the same limit at large integration times, as shown in Fig. 2b.
Fig. 2

(a) Time correlation functions of the modified macroscopic energy flux of a Lennard-Jones fluid, at the conditions described in the text, as defined in Eq. (40), for different definitions of the γ matrix. The “0” line refers to the standard definition (γ = 0), whereas the labels “1” and “2” correspond to two other (arbitrary) definitions of γ as described in Ercole et al. (2016). (b) Integral of the time correlation functions displayed in Fig. 2a, multiplied by the prefactor appearing in the GK relation, Eq. (29), as a function of the upper limit of integration. The barely visible shaded area surrounding each line is an indication of the error bars, as estimated by standard block analysis. Units are Lennard-Jones units (M = σ = ε = 1)

In order to get insight into this remarkable invariance property, let us inspect the difference between the generalized flux in Eq. (40) and the standard expression of Eq. (35):
$$ \displaystyle \begin{aligned} \Delta{\mathbf {J}}^{\scriptscriptstyle E}_{{\scriptscriptstyle \gamma}} ={\mathbf {J}}^{\scriptscriptstyle E}_{{\scriptscriptstyle \gamma}}-{\mathbf {J}}^{\scriptscriptstyle E} =\frac{\mathrm {d}}{\mathrm {dt}}\frac{1}{4 \Omega} \sum_{n,m\ne n} \gamma_{nm} \, v(|{\mathbf {R}}_{n}-{\mathbf {R}}_{m}|) ({\mathbf {R}}_{n}-{\mathbf {R}}_{m}). {} \end{aligned} $$
We see that the two different expressions for the macroscopic energy flux differ by a total time derivative of a bounded phase-space vector function. In the following, we show that this is a consequence of energy conservation and extensivity and a sufficient condition for the corresponding thermal conductivities to coincide.
The very possibility of defining an energy current density, from which the energy fluxes of Eqs. (35) and (40) ultimately depend, stems from energy extensivity. The considerations illustrated in Fig. 1 indicate that any two densities, e′(r, t) and e(r, t), whose integrals over a macroscopic volume differ by a quantity that scales as the volume boundary, should be considered as equivalent. This equivalence can be expressed by the condition that two equivalent densities differ by the divergence of a (bounded) vector field:
$$ \displaystyle \begin{aligned} e^{\prime}(\mathbf {r},t)=e(\mathbf {r},t) - \nabla\cdot \boldsymbol {p}(\mathbf {r},t). {} \end{aligned} $$
In a sense, two equivalent energy densities can be thought of as different gauges of the same scalar field. Energy is also conserved: because of this, for any given gauge of the energy density, e(r, t), an energy current density can be defined, j(r, t), so as to satisfy the continuity equation, Eq. (3). By combining Eqs. (42) and (3), we see that energy current densities and macroscopic fluxes transform under a gauge transformation as:
$$ \displaystyle \begin{aligned} \boldsymbol {j}^{\prime}(\mathbf {r},t) & = \boldsymbol {j}(\mathbf {r},t) + \dot{\boldsymbol {p}}(\mathbf {r},t), {} \end{aligned} $$
$$ \displaystyle \begin{aligned} \mathbf {J}^{\prime}(t) & = \mathbf {J}(t) + \dot{\mathbf {P}}(t), {} \end{aligned} $$
where \( \mathbf {P}(t)=\frac {1}{\Omega} \int \boldsymbol {p}(\mathbf {r},t)d\mathbf {r} \). We conclude that the macroscopic energy fluxes in two different energy gauges differ by the total time derivative of a bounded phase-space vector function.
We now show that the energy fluxes of the same system in two different energy gauges, e and e′, differing by a bounded total time derivative, as in Eq. (44), result in the same heat conductivity, as given by the Green-Kubo formula, Eq. (29). More generally, the Onsager coefficients coupling two fluxes, J1 and J2, do not depend on the gauge of either one of them. In fact, let \( \left ({\mathbf {J}}^1\right)^{\prime} = {\mathbf {J}}^1 + \dot {\mathbf {P}} \); one has:
$$ \displaystyle \begin{aligned} \begin{aligned} \left (L^{11} \right)^{\prime} &= \frac{\Omega}{2 k_B}\int_{-\infty}^{+\infty} \left \langle \left ({\mathbf {J}}_1(t)+\dot{\mathbf {P}}(t) \right) \cdot \left ({\mathbf {J}}_1(0)+\dot{\mathbf {P}}(0)\right) \right \rangle dt \\ &= L^{11} + \frac{\Omega}{2 k_B} \left[ \left . \left \langle \mathbf {P}(t) \cdot \dot{\mathbf {P}}(0) \right \rangle \right |{}^{+\infty}_{-\infty} + \left . 2 \Bigl \langle \mathbf {P}(t) \cdot {\mathbf {J}}_1(0) \Bigr \rangle \right |{}^{+\infty}_{-\infty} \right] . \end{aligned} {} \end{aligned} $$
The expectation of the time-lagged products in Eq. (45) is equal to the products of two expectations at large time lag. As the equilibrium expectations of both a total time derivative and a current vanish, we conclude that \( \left (L^{11}\right)^{\prime}=L^{11} \). A slight generalization of this argument, also using microscopic reversibility as in Onsager (1931a,b), allows us to conclude that \( \left (L^{12} \right)^{\prime}=L^{12} \) and that, in general, κ′ = κ.

2.1 Molecular Fluids

In a one-component molecular fluid such as liquid water or, say, ethanol, there are in general Q fluxes interacting with each other through Onsagers’ Eq. (9), where Q is the number of atomic species in a molecule. The requirement that atoms are bound in molecules of fixed composition, however, sets a number of constraints that substantially simplify the treatment of heat transport, making the molecular case similar to the one-component one.

Let us consider a molecule of chemical formula \( A_{N_A} B_{N_B}\cdots \), where A, B, ⋯ indicate atomic species and NA, NB, ⋯ the corresponding atomic stoichiometric indices. For each atomic species, we define the normalized number flux as:
$$ \displaystyle \begin{aligned} {{\mathbf {J}}^X} = \frac{1}{N_X}\sum_{n\in X} {\mathbf {V}}_n. {} \end{aligned} $$
If we indicate by MX the atomic mass of species X, momentum conservation requires that ∑XMXNXJX = 0 in the center-of-mass reference frame. The flux JXY = JX −JY is the total time derivative of a bounded vector, because its integral is the sum over all the molecules of the difference between the average atomic positions of either species within a same molecule, which is obviously bounded if molecules do not dissociate. As any number flux JX can be expressed as a linear combination of the total momentum and of several JXY fluxes, each of them is the total time derivative of a bounded vector. Therefore, the Onsager coefficient coupling any of these atomic fluxes with any other, or with the energy flux, vanishes. We conclude that energy is the only conserved quantity relevant for heat transport in a molecular fluid and that the energy-flux autocorrelation function directly yields the thermal conductivity, as in Eq. (1).

3 Density-Functional Theory of Adiabatic Heat Transport

Quantum simulation methods based on density-functional theory (DFT) have long been thought to be incompatible with the GK theory of thermal transport because in first-principles calculations, it is impossible to uniquely decompose the total energy into individual contributions from each atom (Stackhouse et al. 2010). For this reason, ab initio simulations of heat transport have often been performed using non-equilibrium approaches.

Stackhouse et al. (2010), for instance, computed the thermal conductivity of periclase MgO using a method devised by Müller-Plathe (1997). In this approach, a net heat flux, rather than a temperature gradient, is imposed to the simulated system, and the thermal conductivity is evaluated as the ratio between the heat flux and the resulting temperature gradient.

In the so-called approach to equilibrium methodology of Lampin et al. (2013), the system is first prepared in an out-of-equilibrium state characterized by an inhomogeneous temperature distribution, and the thermal conductivity is evaluated from the time it takes for the system to relax to equilibrium. This technique has been combined with AIMD to simulate thermal transport in a GeTe4 glass by Bouzid et al. (2017) and further generalized and applied to crystalline and nanostructured MgO by Puligheddu et al. (2017).

Recently, there have been several attempts to combine the GK approach to heat transport with ab initio techniques based on electronic-structure theory, by adopting some ad hoc definitions for the energy flux. Kang and Wang (2017), for instance, derived an expression for the energy flux from a (rather arbitrary) quantum-mechanical definition of the atomic energies and used a modified MD integration algorithm to cope with the difficulties ensuing from the implementation of their expression in PBC. Carbogno et al. (2017) gave a different expression for the energy flux, based on a normal-mode decomposition of the atomic coordinates and forces, which, while allowing to reduce the effects of thermal fluctuations, can only be applied to crystalline solids.

In spite of the undoubted ingenuity of these proposals, the problem still remains as of how it is possible that a rather arbitrary definition of the heat flux results in an allegedly well-defined value for the thermal conductivity. The gauge-invariance principle introduced in Sect. 2 not only provides a solution to this conundrum, but it also gives a rigorous way of deriving an expression for the energy flux directly from DFT, without introducing any ad hoc ingredients.

In order to derive such an expression for the adiabatic energy flux, we start with the standard DFT expression of the total energy in terms of the Kohn-Sham (KS) eigenvalues εv, eigenfunctions ϕv(r), and density n(r) =∑v|ϕv(r)|2 (Martin 2008):
$$ \displaystyle \begin{aligned}E_{{\scriptscriptstyle DFT}} = \frac{1}{2}\sum_{n}M_{n}V_{n}^{2} + \frac{\mathtt{e}^2}{2}\sum_{n,m\ne n}\frac{Z_{n}Z_{m}}{|{\mathbf {R}}_{n}-{\mathbf {R}}_{m}|} \\ + \sum_{v}\varepsilon_{v}-\frac{\mathtt{e}^2}{2}\int\frac{n(\mathbf {r})n(\mathbf {r}^{\prime})}{|\mathbf {r}-\mathbf {r}^{\prime}|}d\mathbf {r}d\mathbf {r}^{\prime}+\int\left(\epsilon_{{\scriptscriptstyle XC}}[n](\mathbf {r})-\mu_{{\scriptscriptstyle XC}}[n](\mathbf {r})\right)n(\mathbf {r})d\mathbf {r},\end{aligned} $$
where e is the electron charge; 𝜖XC[n](r) is a local exchange-correlation (XC) energy per particle defined by the relation \( \int \epsilon _{\scriptscriptstyle XC}[n](\mathbf {r})n(\mathbf {r}) d\mathbf {r}=E_{\scriptscriptstyle XC} [n] \), the latter being the total XC energy of the system; and \( \mu _{\scriptscriptstyle XC} (\mathbf {r}) = \frac {\delta E_{\scriptscriptstyle XC}}{\delta n(\mathbf {r})} \) is the XC potential. The DFT total energy can be readily written as the integral of a DFT energy density (Chetty and Martin 1992):
$$ \displaystyle \begin{aligned} \begin{aligned} E_{{\scriptscriptstyle DFT}} & = \int e_{{\scriptscriptstyle DFT}}(\mathbf {r})d\mathbf {r},\\ e_{{\scriptscriptstyle DFT}}(\mathbf {r}) & = e_{el}(\mathbf {r})+e_{{\scriptscriptstyle Z}}(\mathbf {r}), \end{aligned} {} \end{aligned} $$
$$ \displaystyle \begin{aligned} e_{el}(\mathbf {r}) & =\mathfrak{Re} \sum_{v}\phi_{v}^{*}(\mathbf {r})\bigl(H_{{\scriptscriptstyle KS}}\phi_{n}(\mathbf {r})\bigr)\\{} & \qquad \qquad \qquad- \frac{1}{2}n(\mathbf {r})v_{{\scriptscriptstyle H}}(\mathbf {r}) +\left(\epsilon_{\scriptscriptstyle XC} (\mathbf {r}) - \mu_{\scriptscriptstyle XC} (\mathbf {r}) \right) n(\mathbf {r}), \end{aligned} $$
$$ \displaystyle \begin{aligned} e_{{\scriptscriptstyle Z}}(\mathbf {r}) & = \sum_{n}\delta(\mathbf {r}-{\mathbf {R}}_{n}) \left(\frac{1}{2}M_{n}V_{n}^{2}+w_{n}\right), \end{aligned} $$
$$ \displaystyle \begin{aligned} w_{n} & =\frac{\mathtt{e}^2}{2}\sum_{m\ne n}\frac{Z_{n}Z_{m}}{|{\mathbf {R}}_{n}-{\mathbf {R}}_{m}|}, {} \end{aligned} $$
HKS is the instantaneous self-consistent Kohn-Sham Hamiltonian and \( v_{\scriptscriptstyle H} = {\mathtt {e}^2} \int d\mathbf {r}^{\prime} \frac {n(\mathbf {r}^{\prime})}{|\mathbf {r}-\mathbf {r}^{\prime}|} \) is the Hartree potential. An explicit expression for the DFT energy flux is obtained by computing the first moment of the time derivative of the energy density, Eqs. (48), (49), (50), and (51), as indicated in Eq. (31), resulting in a number of terms, some of which are either infinite or ill-defined in PBC. Casting the result in a regular, boundary-insensitive, expression requires a careful breakup and refactoring of the various harmful terms, as explained by Marcolongo (2014) and in the online version of Marcolongo et al. (2016). The final result reads:
$$ \displaystyle \begin{aligned} {\mathbf {J}}^{\scriptscriptstyle E}_{{\scriptscriptstyle DFT}} &={\mathbf {J}}^{{\scriptscriptstyle H}} + {\mathbf {J}}^{{\scriptscriptstyle Z}} + {\mathbf {J}}^{0} + {\mathbf {J}}^{{\scriptscriptstyle KS}} + {\mathbf {J}}^{{\scriptscriptstyle XC}}, \end{aligned} $$
$$ \displaystyle \begin{aligned} {\mathbf {J}}^{{\scriptscriptstyle H}} &= \frac{1}{4\pi \Omega \mathtt{e}^2}\int \nabla v_{{\scriptscriptstyle H}}(\mathbf {r}) \dot v_{{\scriptscriptstyle H}}(\mathbf r) d\mathbf {r}, \end{aligned} $$
$$ \displaystyle \begin{aligned} {\mathbf {J}}^{{\scriptscriptstyle Z}} {} &= \frac{1}{\Omega} \sum_{n} \left[{\mathbf {V}}_{n}\left(\frac{1}{2}M_{n}V_{n}^{2} + w_{n}\right) + \sum_{m\ne n}({\mathbf {R}}_{n} - {\mathbf {R}}_{m}) \left({\mathbf {V}}_{m} \cdot \frac {\partial w_{n}}{\partial {\mathbf {R}}_{m}} \right) \right], \end{aligned} $$
$$ \displaystyle \begin{aligned} {\mathbf {J}}^{0} &= \frac{1}{\Omega} \sum_{n} \sum_{v}\left\langle \phi_{v} \left|(\mathbf {r}-{\mathbf {R}}_{n})\left({\mathbf {V}}_{n}\cdot\frac{\partial\hat{v}_{0}}{\partial{\mathbf {R}}_{n}}\right)\right| \phi_{v}\right\rangle, \end{aligned} $$
$$ \displaystyle \begin{aligned} {\mathbf {J}}^{{\scriptscriptstyle KS}} &= {} \frac{1}{\Omega} \mathfrak{Re} \sum_{v} \langle {\boldsymbol {\bar{\phi}}_v^c} | H_{{\scriptscriptstyle KS}}+\varepsilon_v | {\dot \phi_v^c} \rangle, \end{aligned} $$
$$ \displaystyle \begin{aligned} J_\alpha^{{\scriptscriptstyle XC}} &= \begin{cases} 0 & \mathrm {(LDA)} \\ -\frac{1}{\Omega} \int n(\mathbf {r}) \dot{n}(\mathbf {r}) \frac{\partial\epsilon^{{\scriptscriptstyle GGA}} (\mathbf {r})}{\partial(\partial_\alpha n)} d\mathbf {r} & \mathrm {(GGA)}, \end{cases} \end{aligned} $$
where \( \hat v_0 \) is the bare, possibly nonlocal, (pseudo-)potential acting on the electrons and:
$$ \displaystyle \begin{aligned} {|\boldsymbol {\bar{\phi}}_v^c\rangle} &= \hat P_c \,\mathbf {r} \,|\phi_v \rangle, {} \end{aligned} $$
$$ \displaystyle \begin{aligned} {|\dot \phi_v^c\rangle} &= {\dot{\hat P}_v} \,|\phi_v\rangle, {} \end{aligned} $$
are the projections over the empty-state manifold of the action of the position operator over the v-th occupied orbital, Eq. (58), and of its adiabatic time derivative (Giannozzi et al. 2017), Eq. (59), \( \hat P_v \) and \( \hat P_c = 1 - \hat P_v \) being the projector operators over the occupied- and empty-states manifolds, respectively. Both these functions are well defined in PBC and can be computed, explicitly or implicitly, using standard density-functional perturbation theory (Baroni et al. 2001).

4 Data Analysis

The MD evaluation of the GK integral, Eq. (1), usually proceeds in two steps. One first evaluates the integrand as a running average of the time-lagged current products, \( \langle J^i(\tau)J^j(0)\rangle \sim \frac {1}{\mathcal {T}-\tau} \int _0^{\mathcal {T}-\tau} J^i(t+\tau)J^j(t)dt \), where \( \mathcal {T} \) is the length of the MD trajectory. The matrix defined in Eq. (19) is then estimated as a function of the upper limit of integration: \( L^{ij}(\mathcal {T})\propto \frac {\Omega}{k_B} \int _0^{\mathcal {T}} \langle J^i(\tau)J^j(0)\rangle \,d\tau \). One then recovers, via Eq. (36), an estimate for the thermal conductivity depending on \( \mathcal {T} \): \( \kappa (\mathcal {T})\propto \frac {1}{(L^{-1}(\mathcal {T}))^{{\scriptscriptstyle 1}{\scriptscriptstyle 1}}} \). This function is usually very noisy: in fact, at times greater than the correlation time between Ji and Jj, the correlation function 〈Ji(τ)Jj(0)〉 approaches zero; hence \( L^{ij}(\mathcal {T}) \) starts integrating noise and behaves like the distance traveled by a random walk, whose variance grows linearly with the upper integration limit. The evaluation of transport coefficients thus requires averaging over multiple trajectories (possibly multiple segments of a same long trajectory) and estimating the resulting uncertainty as a function of both the length of each trajectory and the upper limit of integration. This is a cumbersome task that often leads to a poor estimate of the statistical and systematic errors on the computed conductivity, all the more so when the signal is inherently oscillatory, due to the existence of high-frequency features in the power spectrum of the energy flux, possibly due to intramolecular oscillations that meddle with the noise. Some authors try to overcome these problems by either fitting the autocorrelation function or the GK integral with a multi-exponential function (Schelling et al. 2002; Zhang et al. 2015) or by extrapolating the power spectrum of the energy flux to the zero-frequency limit (Volz and Chen 2000). Others have attempted an error analysis of the MD estimate of the GK integral, based on either heuristic or rigorous arguments (Jones and Mandadapu 2012; Wang et al. 2017; Oliveira and Greaney 2017), but they all require an estimate of an optimal value for the upper limit of integration, which determines a bias in the estimate and which is in general difficult to obtain. Different classes of systems require different approaches to error analysis, but it is widely believed that all of them always require so long simulation times as to be unaffordable with accurate but expensive AIMD techniques (Carbogno et al. 2017). In order to solve this problem, Ercole et al. (2017) considered it in the light of the statistical theory of stationary time series.

4.1 Solids and One-Component Fluids

In practice, MD gives access to a discrete sample of the flux process (a time series), Jn = J(n𝜖), 0 ≤ n ≤ N − 1, where 𝜖 is the sampling period of the flux and N the length of the time series, that we assume to be even. As was shown in Sect. 1.2.1, the Wiener-Khintchine theorem allows one to express the heat conductivity in terms of the zero-frequency value of the power spectrum of the energy flux (see Eqs. (21), (22), (23), and (24)):
$$ \displaystyle \begin{aligned} \kappa = \frac{\Omega}{2k_B T^2} S ({\omega=0).} {} \end{aligned} $$
Let us define the discrete Fourier transform of the flux time series as:
$$ \displaystyle \begin{aligned} \tilde{J}_{k}=\sum_{n=0}^{N-1}{\mathrm {e}^{2\pi i\frac{kn}{N}}} J_n, {} \end{aligned} $$
for 0 ≤ k ≤ N − 1. Here, the convention for the sign in the exponential of the time-to-frequency Fourier transform is opposite to what is adopted in Ercole et al. (2017) and in most of the signal analysis literature, in order to comply with the convention for the space-time Fourier transforms usually adopted in the Physics literature and in Eqs. (4) and (5). The sample spectrum \( \hat S_k \), aka periodogram, is defined as:
$$ \displaystyle \begin{aligned} \hat{S}_{k}=\frac{\epsilon}{N} \left |\tilde{J}_{k} \right |{}^2, {} \end{aligned} $$
and, for large N, it is an unbiased estimator of the power spectrum of the process, as defined in Eq. (21), evaluated at \( \omega _k=2\pi \frac {k}{N\epsilon} \), namely: \( \langle \hat S_k \rangle = S(\omega _k) \). The reality of the \( \hat J \)s implies that \( \tilde J_k=\tilde J^*_{N-k} \) and \( \hat S_k=\hat S_{N-k} \), so that periodograms are usually reported for \( 0\leq k\leq \frac {N}{2} \) and their Fourier transforms evaluated as discrete cosine transforms.
The space autocorrelations of conserved currents are usually short-ranged. Therefore, in the thermodynamic limit, the corresponding fluxes can be seen as sums of (almost) independent identically distributed stochastic variables, so that, according to the central-limit theorem, their equilibrium distribution is Gaussian. A slight generalization of this argument allows us to conclude that any conserved-flux process is Gaussian as well. The flux time series is in fact a multivariate stochastic variable that, in the thermodynamic limit, results from the sum of (almost) independent variables, thus tending to a multivariate normal deviate. This implies that at equilibrium, the real and imaginary parts of the \( \tilde J_k \)’s defined in Eq. (61) are zero-mean normal deviates that, in the large-N limit, are uncorrelated among themselves and have variances proportional to the power spectrum evaluated at ωk. For k = 0 or \( k=\frac {N}{2} \), \( \tilde J_k \) is real and \( {\sim}\mathcal {N}\left (0, \frac {N}{\epsilon}S({\omega _k}) \right) \); for \( k\notin \left \{0,\frac {N}{2}\right \} \), \( \mathfrak {Re}\tilde {J}_k \) and \( \mathfrak {Im}\tilde {J}_k \) are independent and both \( {\sim}\mathcal {N}\left (0, \frac {N}{2 \epsilon}S({\omega}_k) \right) \), where \( \mathcal {N} (\mu ,\sigma ^2) \) indicates a normal deviate with mean μ and variance σ2. We conclude that in the large-N limit the sample spectrum of the heat flux time series reads:
$$ \displaystyle \begin{aligned} \hat{S}_{k} = S \left({\omega}_k\right) {\xi}_{k}, {} \end{aligned} $$
where the ξs are independent random variables distributed as a \( \chi _1^2 \) variate for k = 0 or \( k=\frac {N}{2} \) and as one half a \( \chi _2^2 \) variate, otherwise. Here and in the following \( \chi ^2_\nu \) indicates the chi-square distribution with ν degrees of freedom. For the sake of simplicity, we make as though all the ξs were identically distributed, \( \xi _k \sim \frac {1}{2} \chi _2^2 \) for all values of k, thus making an error of order \( \mathcal {O}(1/N) \), which vanishes in the longtime limit that is being assumed throughout this section.
In many cases of practical interest, multiple time series are available to estimate the power spectrum of a same process, Open image in new window, p = 1, ⋯. For instance, in equilibrium MD, a same trajectory delivers one independent time series per Cartesian component of the heat flux, all of which are obviously equivalent in isotropic systems. In these cases, it is expedient to define a mean sample spectrum by averaging over the different realizations: where the Open image in new windows are \( \chi _{2\ell}^2 \) variates, divided by the number of degrees of freedom: Open image in new window \( \bigl (\text{for}\, k \notin \{0,\frac {N}{2} \}\bigr) \).

Equations (63) and (64) show that Open image in new window is an unbiased estimator of the zero-frequency value of the power spectrum, Open image in new window, and through Eq. (60), of the transport coefficients we are after. However, this estimator is not consistent, i.e., its variance does not vanish in the large-N limit. This is so because a longer time series increases the number of discrete frequencies at which the power spectrum is sampled, rather than its accuracy at any one of them.

Figure 3 displays the periodogram of water at ambient conditions, obtained from a 100 ps classical MD trajectory, showing the extremely noisy behavior of the periodogram as an estimator of the spectrum. Averaging over the values of the periodogram within a frequency window of given width (Weisstein MovingAverage) would consistently reduce the statistical noise, but the multiplicative nature of the latter in Eq. (63) makes it difficult to disentangle the noise from the signal and may introduce a bias. In order to cope with this problem, we had better transform the multiplicative noise into an additive one by defining the log-periodogram, Open image in new window, as: where Open image in new window are zero-mean identically distributed independent stochastic variables, Open image in new window, and ψ(z) is the digamma function (Weisstein PolyGamma). The variance of the Open image in new window variables is \( \sigma _{\ell}^{2} =\psi ^{\prime}(\ell) \), where ψ′(z) is the tri-gamma function (Weisstein PolyGamma).
Fig. 3

Periodogram of a classical flexible model of water obtained from a 100 ps MD trajectory. Gray: periodogram obtained directly from Eq. (64), with  = 3. Blue: periodogram filtered with a moving average window of width 1 THz, useful to reveal the main features of the spectrum (see text). The vertical dashed line delimits the low-frequency region used in the subsequent cepstral analysis

Whenever the number of (inverse) Fourier components of the logarithm of the power spectrum is much smaller than the length of the time series, applying a low-pass filter to Eq. (65) would result in a reduction of the power of the noise, without affecting the signal. In order to exploit this idea, we define the “cepstrum” of the time series as the inverse Fourier transform of its sample log-spectrum (Childers et al. 1977): A generalized central-limit theorem for Fourier transforms of stationary time series ensures that, in the large-N limit, these coefficients are a set of independent (almost) identically distributed zero-mean normal deviates (Anderson 1994; Peligrad and Wu 2010). It follows that: where Open image in new window are independent zero-mean normal deviates with variances Open image in new window \( =\frac {1}{N}\sigma _\ell \) for \( n\notin \left \{0,\frac {N}{2}\right \} \) and Open image in new window otherwise. Figure 4 displays the cepstral coefficients of the low-frequency region of the spectrum of water (marked in Fig. 3), showing that only the first few coefficients are substantially different from zero.
Fig. 4

Cepstral coefficients of water computed analyzing the low-frequency region of the periodogram (see Fig. 3), defined in Eq. (66)

Let us indicate by P the smallest integer such that Cn ≈ 0 for P≤ n ≤ N − P. By limiting the Fourier transform of the sample cepstrum, Eq. (66), to P coefficients, we obtain an efficient estimator of the zero-frequency component of the log-spectrum as: Inspection of Eq. (68) shows that Open image in new window is a normal estimator whose expectation and variance are:
$$ \displaystyle \begin{aligned} \sigma_\ell^{*}(P^{*},N)^{2} &=\sigma_{\ell}^{2}\frac{4P^{*}-2}{N}. {} \end{aligned} $$
Using Eq. (60), we see that the logarithm of the conductivity can be estimated from the cepstral coefficients of the flux time series through Eqs. (68), (69), and (70) and that the resulting estimator is always normal with a variance that depends on the specific system only through the number of these coefficients, P. Notice that the absolute error on the logarithm of the conductivity directly and nicely yields the relative error on the conductivity itself.
The efficacy of this approach obviously depends on our ability to estimate the number of coefficients necessary to keep the bias introduced by the truncation to a value smaller than the statistical error while maintaining the magnitude of the latter at a prescribed acceptable level. Ercole et al. (2017) proposed to estimate P using the Akaike’s information criterion (Akaike 1974), but other more advanced model selection approaches (Claeskens and Hjort 2008) may be more effective. This method consists in choosing P as the one that minimizes the function:
$$ \displaystyle \begin{aligned} \mathrm {AIC}(P)=\frac{N}{\sigma_\ell^{2}}\sum_{n=P}^{\frac{N}{2}} \hat{C}_{n}^{2}+2P. {} \end{aligned} $$
In Fig. 5a, we report the low-frequency region of the spectrum of water obtained by limiting the number of cepstral coefficients to P:
$$ \displaystyle \begin{aligned} ^\ell\hat{S}_k^* = \exp\left[ {2\sum_{n=1}^{P^*-1} {}^\ell\hat{C}_n \mathrm {e}^{2\pi i \frac{k n}{N}} + {}^\ell\hat{C}_0} - {}^\ell\Lambda\right], {} \end{aligned} $$
thus showing the filtering effect of this choice. Finally, Fig. 5b shows the value of thermal conductivity of water obtained through Eqs. (68), (69), and (70).
Fig. 5

(a) Filtered low-frequency region of the power spectrum of water obtained by limiting the number of cepstral coefficients to various values of P, Eq. (72). P = 7 is the cutoff value suggested by the Akaike’s information criterion, Eq. (71). Gray: the unfiltered periodogram obtained from Eq. (62). (b) Thermal conductivity of water estimated from Eqs. (68), (69), and (70) as a function of the cutoff, P. The colored bands indicate one standard deviation as estimated from theory. The vertical dashed line indicates the value suggested by the Akaike’s information criterion, Eq. (71)

4.2 Multicomponent Fluids

In Sect. 1.3.2, we have seen that in a fluid made of Q atomic species, there are in general Q macroscopic fluxes interacting with each other through Onsager’s phenomenological equations, Eq. (9), not counting the different Cartesian components that do not interact among themselves because of space isotropy. A MD simulation thus samples Q stochastic processes, one for each interacting flux, that we suppose to be stationary. These processes can be thought of as different components of a same multivariate process (Bertossa et al. 2018). As in Sect. 4.1, for the sake of generality we suppose to have independent samples of such a process, described by a multivariate time series of length N: Open image in new window; p = 1, …; i = 1, …Q; n = 0, …N − 1. Stationarity implies that \( \langle {J}^i_n\rangle \) does not depend on n and that \( \langle {J}^i_n {J}^j_m \rangle \) only depends on n − m. We will further assume that \( \langle {J}^i_n\rangle =0 \) and that \( \langle {J}^i_n {J}^j_0 \rangle \) is an even function of n, which is the case when Ji and Jj have the same signature under time-reversal. By combining Eq. (36) with Eq. (24), we see that in order to evaluate the thermal conductivity in the multicomponent case, we need an efficient estimator for \( \left (S^{-1}_0\right)^{11} \), where \( S^{kl}_0=S^{kl}(\omega =0) \) is the zero-frequency cross-spectrum of the relevant fluxes, ordered in such a way that the energy one is the first.

Similarly to the one-component case, we define a mean sample cross-spectrum (or cross-periodogram) as: By discretizing Eq. (23), we see that Open image in new window is an unbiased estimator of the cross-spectrum, Open image in new window. As it was the case for univariate processes, in the large N limit the real and imaginary parts of \( \tilde J^i_k \) are normal deviates that are uncorrelated for kk′. We conclude that the cross-periodogram is a random matrix distributed as a complex Wishart deviate (Goodman 1963a,b): The notation \( {\mathcal {CW}_Q} \left (S, \ell \right) \) in Eq. (74) indicates the distribution of the Q × Q Hermitian matrix Open image in new window, where Open image in new window (p = 1, ⋯, i = 1, ⋯Q) are samples of an Q-dimensional zero-mean normal variate whose covariance is Sij = 〈XiXj〉.
Similarly to the real case, a Bartlett decomposition (Kshirsagar 1959) holds for complex Wishart matrices (Nagar and Gupta 2011), reading: where “⊤” and “†” indicate the transpose and the adjoint of a real and complex matrix, respectively; \( \mathcal {S} \) is the Cholesky factor of the covariance matrix, \( S= \mathcal {S} \mathcal {S}^{\dagger} \); and R is a real lower triangular random matrix of the form:
$$ \displaystyle \begin{aligned} R = \begin{pmatrix} c_1 & 0 & 0 & \cdots & 0\\ n_{21} & c_2 &0 & \cdots& 0 \\ n_{31} & n_{32} & c_3 & \cdots & 0\\ \vdots & \vdots & \vdots &\ddots & \vdots \\ {n_{{\scriptscriptstyle Q}1}} & {n_{{\scriptscriptstyle Q}2}} & {n_{{\scriptscriptstyle Q}3}} &\cdots & {c_{\scriptscriptstyle Q}} \end{pmatrix}, \end{aligned} $$
where \( c^2_i \sim \chi ^2_{2(\ell -i+1)} \) and \( n_{ij}\sim \mathcal {N}(0,1) \). We stress that R is independent of the specific covariance matrix and only depends upon and Q. In particular, it is independent of the ordering of the fluxes Ji. By expressing the QQ matrix element of the inverse of \( ^{(\ell Q)}\hat {S} \) in Eq. (75) as the ratio between the corresponding minor and the full determinant, and using some obvious properties of the determinants and of triangular matrices, we find that:
$$ \displaystyle \begin{aligned} {\frac{\ell}{\left({}^{(\ell Q)}\hat{S}_k^{-1}\right)^{{\scriptscriptstyle Q}{\scriptscriptstyle Q}}} = \frac{1}{\left(S_k^{-1}\right)^{{\scriptscriptstyle Q}{\scriptscriptstyle Q}}} c^2_{\scriptscriptstyle Q},} {} \end{aligned} $$
As the ordering of the fluxes is arbitrary, a similar relation holds for all the diagonal elements of the inverse of the cross-periodogram. We conclude that the generalization of Eq. (64) for the multicomponent case is:
$$ \displaystyle \begin{aligned}^{\ell}\hat{\underline{S}}_{\,k}\equiv\frac{\ell}{2(\ell- {Q} +1)}\frac{1}{\left({{}^{(\ell Q)}\hat{S}_k^{-1}}\right)^{{\scriptscriptstyle 1}{\scriptscriptstyle 1}}} = \frac{1}{\left(S_k^{-1}\right)^{{\scriptscriptstyle 1}{\scriptscriptstyle 1}}} \, \xi_k, {} \end{aligned} $$
where ξk are independent random (with respect to k) random variables, distributed as:
$$ \displaystyle \begin{aligned} \xi_k \sim \begin{cases} {\frac{1}{\ell-Q+1} \,\chi^2_{\ell-Q+1}} \qquad& \mathrm {for} \; k \in \{0 , \frac{N}{2}\}, \\ \\ {\frac{1}{2(\ell-Q+1)} \, \chi^2_{2(\ell-Q+1)}} \qquad& \mathrm {otherwise}. \end{cases} \end{aligned} $$
Starting from here we can apply the cepstral analysis as in the one-component case. The only difference is the number of degrees of freedom of the χ2 distribution, that becomes 2( − Q + 1), and a different factor in front of the result. Figure 6 shows an example of multi-component power spectrum for a solution of water and ethanol.
Fig. 6

Multicomponent power spectrum, as defined in Eq. (78), for a classical flexible model of a solution of water and ethanol 50 mol%, obtained from a 100 ps trajectory. Gray: \( ^{\ell}\hat {\underline {S}}_{\,k} \) obtained directly from Eq. (78), with  = 3 and Q = 2. Blue: \( ^{\ell}\hat {\underline {S}}_{\,k} \) filtered with a moving average window of width 1 THz in order to reveal its main features. The vertical dashed line delimits the low-frequency region used in the subsequent cepstral analysis (Bertossa et al. 2018)

The method discussed so far shows a fundamental advantage with respect to a naïve implementation of direct time-integration approach. Figure 7 shows the two-component conductivity κ, obtained via Eq. (38), in the case of a water-ethanol solution, as a function of the upper time-integration limit \( \mathcal {T} \) (Bertossa et al. 2018). Both the Green-Kubo and the Einstein-Helfand definitions of the finite-time expression of Onsager’s coefficients (see Eq. (20)) are displayed. Due to thermal fluctuations, the integral of the correlation function becomes a random walk as soon as the latter vanishes, eventually assuming any value. Therefore, there will be a set of times (see Fig. 7) where the term LQQ at the denominator in Eq. (38) vanishes, leading to divergences in the evaluation of κ; an issue not affecting the one-component case. Hence, in such a formulation of the multicomponent case, the mean value of the thermal conductivity estimator in the time domain does not exist. On the contrary, the multicomponent frequency-domain approach presented in this section, and built on sound statistical basis, provides a well-defined expression for the estimator of κ and its statistical error.
Fig. 7

Convergence of the multicomponent thermal conductivity estimator κ using the direct time-integration approach and the cepstral method, for a classical flexible model of a solution of water and ethanol 50 mol%, obtained from a 100 ps trajectory. (a) Direct time-integration approach in its Green-Kubo (green, as obtained from the matrix \( {L^{ij}}(\mathcal {T})\propto\int _0^{\mathcal {T}}\left \langle {J^i(t) J^j(0)}\right \rangle dt \)) and Einstein-Helfand (orange – obtained from the matrix \( {\left (L^{ij} \right)^{\prime}}(\mathcal {T}) \propto\int _0^{\mathcal {T}} \left (1- \frac {t}{\mathcal {T}} \right)\left \langle {J^i(t) J^j(0)}\right \rangle dt \)) formulations. The horizontal purple band indicates the value obtained by the cepstral method. (b) Estimate of κ with the cepstral method as a function of the number of cepstral coefficients, P, see Eqs. (68), (69), and (70). The dashed vertical line indicates the value of P selected by the AIC, Eq. (71) (Bertossa et al. 2018)

4.3 Data Analysis Workflow

We summarize the steps leading to the estimation of thermal conductivity by the cepstral analysis method, in order to highlight the simplicity of its practical implementation.
  1. 1.

    From a MD simulation compute the heat flux time series \( J_n^1 \) and the independent particle fluxes \( J_n^q \), q = 2, …, Q.

  2. 2.

    Compute the discrete Fourier transform of the fluxes, \( \tilde {J}^{i}_k \), and the element \( 1/(\hat {S}^{-1})^{{\scriptscriptstyle 1}{\scriptscriptstyle 1}} \). In practice, only a selected low-frequency region shall be used (see Ercole et al. (2017) for a a detailed discussion). To lighten the notation, we drop the left superscripts of the variables in this subsection.

  3. 3.

    Calculate \( \log {}\left [1/(\hat {S}^{-1})^{{\scriptscriptstyle 1}{\scriptscriptstyle 1}}\right ] \).

  4. 4.

    Compute the inverse discrete Fourier transform of the result to obtain the cepstral coefficients \( \hat {C}_n \).

  5. 5.

    Apply the Akaike Information Criterion, Eq. (71), to estimate the number of cepstral coefficients to retain, P.

  6. 6.
    Finally apply Eq. (68) to obtain \( \hat {L}_0^* \), and evaluate the thermal conductivity as
    $$ \displaystyle \begin{aligned} \kappa = \frac{\Omega}{2k_B T^2} \exp\left[\hat{L}_0^* - {\psi(\ell - Q+1) + \log{}(\ell -Q+1)} \right], \end{aligned} $$
    and its statistical error as:
    $$ \displaystyle \begin{aligned} \frac{\Delta\kappa}{\kappa} = \sqrt{{\psi^{\prime}(\ell -Q+1)} \frac{4P^{*}-2}{N}}. \end{aligned} $$

5 A Few Representative Results

Calculations of the thermal conductivity based on the Green-Kubo formalism combined with first-principles molecular dynamics are quite recent. The first benchmarks from Marcolongo et al. (2016) have been performed on liquid Argon and heavy water at ambient conditions, as reported below.

5.1 A Benchmark on a Model Mono-atomic Fluid

As a first test, liquid Argon was simulated by Marcolongo et al. (2016) using a local LDA functional neglecting dispersion forces. The resulting fictitious system, dubbed LDA-Argon, is a hard-core weakly interacting fluid whose dynamics is expected to be easily mimicked by a simple two-body potential, which can be engineered by standard force-matching techniques. This observation allows one to effectively test the ideas developed in Sect. 3: even if the energy density in LDA-Argon and in its fitted classical counterpart will likely be different, the resulting thermal conductivity is expected to coincide within the quality of the classical fit.

Simulations were performed in a cubic supercell of 108 atoms with an edge of 17.5 Å, corresponding to a density of 1.34 g cm−3. Trajectories were sampled in the NVE ensemble for 100 ps, and the classical model was fitted with a pair potential of the form V (r) = P2(r)eαr, P2(r) being a second-order polynomial. In Fig. 8, we show the resulting autocorrelation functions at a representative temperature of 400 K. The DFT autocorrelation function shows a more structured behavior than that of the classical potential. Nevertheless, when considering the long time limit of the Green-Kubo integral, the thermal conductivities indeed coincide within statistical uncertainty, as predicted by theory.
Fig. 8

Benchmark of LDA-Argon, reproduced from Marcolongo et al. (2016). (a) The heat-flux autocorrelation function. (b) The GK integral as a function of the upper limit of integration. Color coding common to the two panels. Blue: ab initio molecular dynamics (100 ps). Orange: classical molecular dynamics (100 ps). Green: classical molecular dynamics (1000 ps)

5.2 Heavy Water at Ambient Conditions

Marcolongo et al. (2016) also computed the thermal conductivity of heavy water at ambient conditions. Simulations were performed using the PBE exchange correlation energy functional (Perdew et al. 1996), which is known to predict qualitatively the self-diffusion coefficient of water at ambient conditions only for a simulation temperature of about 400 K (Sit and Marzari 2005): the latter condition was imposed accordingly. A system of 64 heavy water molecules was sampled for 90 ps in the NVE ensemble using a cubic cell corresponding to the experimental density of 1.11 g cm−3.

The ab initio treatment of heat transport in molecular fluids requires some care in order to eliminate non-diffusive components of the energy flux that, while not contributing to the conductivity, do increase the noise of the flux time series to a level that may compromise its analysis. To see where the problem comes from, let us split the potential energy of the system into the sum of non-interacting atomic energies plus an interaction energy as: \( V(\{{\mathbf {R}}_n\}) = \sum _n\epsilon ^\circ _n + V_{int}(\{{\mathbf {R}}_n\}) \), where \( \epsilon _n^\circ \) is the energy of the n-th atom when it is isolated from the rest. In classical simulations, the energy of isolated atoms never enters the description of the system, and the \( \epsilon ^\circ _n \)’s can be simply set to zero. In quantum simulations, instead, atomic and interaction energies enter on a same footing, and the former give a large and fluctuating contribution to the total energy flux, \( {\mathbf {J}}^\circ =\sum _X\epsilon ^\circ _X {\mathbf {J}}^X \), where JX is the flux defined in Eq. (46). In a mono-atomic fluid, JX is constant because of momentum conservation, and it is actually equal to zero in the center-of-mass reference frame. In molecular fluids, the JX do not vanish, but, as we have seen in Sect. 2.1, they are non-diffusive and hence do not contribute to the heat conductivity while adding considerable noise to the energy-flux time series. In order to remove them, instead of estimating J from the noninteracting atomic energies, we prefer to implement a decorrelation technique, as described below.

Current decorrelation builds on a general inequality whose proof can be found in Marcolongo et al. (2016). Let J1 and J2 be two macroscopic fluxes and J12 = J1 + J2 their sum. The corresponding conductivities κ1, κ2, and κ12 then satisfy \( |{\kappa ^{12}}-\kappa ^1-\kappa ^2| \le 2 \sqrt {\kappa ^1 \kappa ^2} \). As a consequence, when κ2 vanishes, κ12 coincides with κ1. Let us now suppose that a set of fluxes {Yu}, u = 1, …U is known to exhibit a non-diffusive behavior. The above argument shows that the auxiliary flux defined as:
$$ \displaystyle \begin{aligned} \mathbf {J}^{\prime} \equiv \mathbf {J} - \sum_{{w}} \lambda^{{w}} {\mathbf {Y}}^{{w}} \end{aligned} $$
will yield the same thermal conductivity as J. Optimal values of the {λu} coefficients can then be determined by imposing that the new time series J is uncorrelated with respect to the non-diffusive ones, namely:
$$ \displaystyle \begin{aligned} \langle \mathbf {J} {\mathbf {Y}}^u \rangle-\sum_{w} \lambda^{w} \langle {\mathbf {Y}}^{w} {\mathbf {Y}}^u \rangle = 0, \quad u=1,\dots U. \end{aligned} $$
This procedure is particularly useful when the Yu fluxes give a slowly converging contribution to the Green-Kubo integral, which is thus difficult to evaluate numerically.
The decorrelation technique has been applied to heavy water considering two non-diffusive number fluxes: Y1 = JH + JO, i.e., the sum of hydrogen and oxygen average velocities and Y2 = Jel, the adiabatic electronic current. Note that the two time series JH and JO are trivially related, because of momentum conservation. Therefore JH, JO, or JH + JO would all be equivalent choices. The latter is defined, following the same notation of Sect. 3, as:
$$ \displaystyle \begin{aligned} {{\mathbf {J}}^{el}} = \frac{2}{\Omega}\mathfrak{Re} \sum_{v} \langle\boldsymbol {\bar{\phi}}_v^c |\dot \phi_v^c \rangle , \end{aligned} $$
as can be derived from the continuity equation for the density: \( \nabla \cdot \boldsymbol j^{el}(\boldsymbol r,t) =- \dot {n}^{el}(\boldsymbol r,t) \). In insulators Jel is non-diffusive and can thus be used to decorrelate the heat current. In the original paper the thermal conductivity was evaluated from the slope of the energy displacement \( \mathcal {D}(\tau)=\int _0^\tau \mathbf {J}(t)dt \) (see Eq. (20)) and the corresponding error obtained from a standard block analysis, resulting in a nonoptimal estimate of both (see Fig. 9a). The same data have been reanalyzed with the novel cepstral technique presented in Sect. 4. We denote by \( \left ({\mathbf {J}}^1\right)^{\prime} \) and \( \left ({\mathbf {J}}^{12} \right)^{\prime} \) the currents decorrelated with respect to Y1 alone and with respect to both Y1 and Y2, respectively. The power spectra of the two currents are plotted in Fig. 9b. Only the low-frequency region of the spectra (up to ∼9.0 THz) was used for the cepstral analysis (see Ercole et al. (2017) for the technical details). The minimization of Eq. (71) suggests a cutoff \( P^*_1=17 \) and \( P^*_{12}=15 \), but a value 1.5 times larger was actually been used to reduce the bias possibly due to the fast variation of the spectrum at frequency close to zero. The resulting thermal conductivities are κ1 = 0.80 ± 0.12 W∕mK for the \( \left ({\mathbf {J}}^1 \right)^{\prime} \) flux and κ12 = 0.93 ± 0.14 W∕mK for \( \left ({\mathbf {J}}^{12} \right)^{\prime} \), compatible with each other. By comparison, experiments give a value κ ≈ 0.6 W∕mK (Matsunaga and Nagashima 1983; Ramires et al. 1995). In this case, data analysis would not have yielded any meaningful results failing a proper decorrelation of the heat flux time series.
Fig. 9

(a) Value of thermal conductivity of heavy water obtained from a linear fitting of the energy displacement of \( \left ({\mathbf {J}}^1\right)^{\prime} \), \( \mathcal {D}(\tau)= \int _0^\tau\left ({\mathbf {J}}^1\right)^{\prime}(t)dt \). The two curves refer to different window widths used for the linear fit, of length 0.5 and 1.0 ps. The abscissa corresponds to the origin of the fitting window. (b) Periodogram of the \( \left ({\mathbf {J}}^1\right)^{\prime} \) and \( \left ({\mathbf {J}}^{12}\right) ^{\prime} \) currents, filtered with a moving average window in order to reveal the prominent features. The vertical dashed line delimits the low-frequency region used for cepstral analysis

6 Outlook

We believe that the ideas presented in this chapter will pave the way to new developments and applications in the field of heat transport, particularly for strongly anharmonic and/or disordered systems, where approaches based on the Boltzmann transport equation do not apply or are bound to fail. The general concept of gauge invariance of heat conductivity will likely apply to other transport properties as well, such as ionic conduction, viscosity, and many others, and/or simulation methodologies, such as those based on a neural-network representation of interatomic potentials, which hold the promise of a strong and long-lasting impact on molecular simulations. The applicability of this concept would not be as broad if not assisted by the powerful data-analysis methods which have also been described in this chapter. Here again, we believe that there is ample room for improvement, leveraging more general (possibly non-Fourier) representations of the log-spectrum of the currents to be analyzed and more advanced statistical-inference techniques to estimate the parameters of the spectral models resulting from these representations. From the applicative point of view, we expect that these methodological advances will have a strong impact in all those cases where heat, mass, and charge transport occurs in conditions that cannot be adequately described at the atomistic level by simple force fields, e.g., in complex materials; systems at extreme external conditions, such as those occurring in the planetary interiors; complex or reactive fluids; and many others.

7 Cross-References



This work was supported in part by the MaX EU Centre of Excellence, grant no 676598. SB, LE, and FG are grateful to Davide Donadio for insightful discussions all over the Summer of 2017 and beyond.


  1. Akaike H (1974) A new look at the statistical model identification. IEEE Trans Autom Control 19:716–723.
  2. Anderson TW (1994) The statistical analysis of time series. Wiley-Interscience, New YorkCrossRefGoogle Scholar
  3. Baroni S, Giannozzi P, Testa A (1987) Green’s-function approach to linear response in solids. Phys Rev Lett 58:1861–1864.
  4. Bertossa R, Ercole L, Baroni S (2018) Transport coefficients in multi-component fluids from equilibrium molecular dynamics, arXiv:1808.03341 [cond-mat.stat-mech]Google Scholar
  5. Baroni S, de Gironcoli S, Dal Corso A, Giannozzi P (2001) Phonons and related crystal properties from density-functional perturbation theory. Rev Mod Phys 73:515–562.
  6. Bouzid A, Zaoui H, Palla PL, Ori G, Boero M, Massobrio C, Cleri F, Lampin E (2017) Thermal conductivity of glassy GeTe4 by first-principles molecular dynamics. Phys Chem Chem Phys 19:9729–9732.
  7. Broido DA, Malorny M, Birner G, Mingo N, Stewart DA (2007) Intrinsic lattice thermal conductivity of semiconductors from first principles. Appl Phys Lett 91:231922.
  8. Car R, Parrinello M (1985) Unified approach for molecular dynamics and density-functional theory. Phys Rev Lett 55:2471–2474.
  9. Carbogno C, Ramprasad R, Scheffler M (2017) Ab initio Green-Kubo approach for the thermal conductivity of solids. Phys Rev Lett 118:175901.
  10. Casimir HBG (1945) On Onsager’s principle of microscopic reversibility. Rev Mod Phys 17:343–350.
  11. Chetty N, Martin R (1992) First-principles energy density and its applications to selected polar surfaces. Phys Rev B 45:6074–6088.
  12. Childers DG, Skinner DP, Kemerait RC (1977) The cepstrum: a guide to processing. Proc IEEE 65:1428–1443.
  13. Claeskens G, Hjort NL (2008) Model selection and model averaging. Cambridge University Press, CambridgeCrossRefGoogle Scholar
  14. Debernardi A, Baroni S, Molinari E (1995) Anharmonic phonon lifetimes in semiconductors from density-functional perturbation theory. Phys Rev Lett 75:1819–1822.
  15. Ercole L, Marcolongo A, Umari P, Baroni S (2016) Gauge invariance of thermal transport coefficients. J Low Temp Phys 185:79–86.
  16. Ercole L, Marcolongo A, Baroni S (2017) Accurate thermal conductivities from optimally short molecular dynamics simulations. Sci Rep 7:15835.
  17. Foster D (1975) Hydrodynamic fluctuations, broken symmetry, and correlation functions. Benjamin, ReadingGoogle Scholar
  18. Giannozzi P, De Gironcoli S, Pavone P, Baroni S (1991) Ab initio calculation of phonon dispersions in semiconductors. Phys Rev B 43:7231–7242.
  19. Giannozzi P, Andreussi O, Brumme T, Bunau O, Nardelli MB, Calandra M, Car R, Cavazzoni C, Ceresoli D, Cococcioni M, Colonna N, Carnimeo I, Corso AD, de Gironcoli S, Delugas P, Jr RAD, Ferretti A, Floris A, Fratesi G, Fugallo G, Gebauer R, Gerstmann U, Giustino F, Gorni T, Jia J, Kawamura M, Ko HY, Kokalj A, Küçükbenli E, Lazzeri M, Marsili M, Marzari N, Mauri F, Nguyen NL, Nguyen HV, de-la Roza AO, Paulatto L, Poncé S, Rocca D, Sabatini R, Santra B, Schlipf M, Seitsonen AP, Smogunov A, Timrov I, Thonhauser T, Umari P, Vast N, Wu X, Baroni S (2017) Advanced capabilities for materials modelling with quantum espresso. J Phys Condens Matter 29:465901.
  20. Goodman NR (1963a) The distribution of the determinant of a complex Wishart distributed matrix. Ann Math Stat 34:178–180.
  21. Goodman NR (1963b) Statistical analysis based on a certain multivariate complex Gaussian distribution (an introduction). Ann Math Stat 34:152–177MathSciNetCrossRefGoogle Scholar
  22. Green MS (1952) Markoff random processes and the statistical mechanics of time-dependent phenomena. J Chem Phys 20:1281–1295.
  23. Green MS (1954) Markoff random processes and the statistical mechanics of time-dependent phenomena. II. Irreversible processes in fluids. J Chem Phys 22:398–413.
  24. Helfand E (1960) Transport coefficients from dissipation in a canonical ensemble. Phys Rev 119: 1–9.
  25. Hohenberg P, Kohn W (1964) Inhomogeneous electron gas. Phys Rev 136:B864–B871.
  26. Irving JH, Kirkwood JG (1950) The statistical mechanical theory of transport processes. IV. The equations of hydrodynamics. J Chem Phys 18:817.
  27. Jones RE, Mandadapu KK (2012) Adaptive Green-Kubo estimates of transport coefficients from molecular dynamics based on robust error analysis. J Chem Phys 136:154102.
  28. Kadanoff LP, Martin PC (1963) Hydrodynamic equations and correlation functions. Ann Phys 24:419–469.
  29. Kang J, Wang LW (2017) First-principles Green-Kubo method for thermal conductivity calculations. Phys Rev B 96:20302.
  30. Khintchine A (1934) Korrelationstheorie der stationären stochastischen Prozesse. Math Ann 109:604–615.
  31. Kohn W, Sham LJ (1965) Self-consistent equations including exchange and correlation effects. Phys Rev 140:A1133–A1138.
  32. Kshirsagar AM (1959) Bartlett decomposition and wishart distribution. Ann Math Statist 30:239–241.
  33. Kubo R (1957) Statistical-mechanical theory of irreversible processes. I. General theory and simple applications to magnetic and conduction problems. J Phys Soc Jpn 12:570–586.
  34. Kubo R, Yokota M, Nakajima S (1957) Statistical-mechanical theory of irreversible processes. II. Response to thermal disturbance. J Phys Soc Jpn 12:1203–1211.
  35. Lampin E, Palla PL, Francioso PA, Cleri F (2013) Thermal conductivity from approach-to-equilibrium molecular dynamics. J Appl Phys 114:033525.
  36. Marcolongo A (2014) Theory and ab initio simulation of atomic heat transport. PhD thesis, Scuola Internazionale Superiore di Studi Avanzati, Trieste, an optional noteGoogle Scholar
  37. Marcolongo A, Umari P, Baroni S (2016) Microscopic theory and ab initio simulation of atomic heat transport. Nat Phys 12:80–84.
  38. Martin RM (2008) Electronic structure: basic theory and practical methods. Cambridge University Press, CambridgezbMATHGoogle Scholar
  39. Marx D, Hutter J (2009) Ab initio molecular dynamics: basic theory and advanced methods. Cambridge University Press, CambridgeCrossRefGoogle Scholar
  40. Matsunaga N, Nagashima A (1983) Transport properties of liquid and gaseous D2O over a wide range of temperature and pressure. J Phys Chem Ref Data 12:933–966.
  41. Müller-Plathe F (1997) A simple nonequilibrium molecular dynamics method for calculating the thermal conductivity. J Chem Phys 106:6082–6085.
  42. Nagar DK, Gupta AK (2011) Expectations of functions of complex wishart matrix. Acta Appl Math 113:265–288.
  43. Oliveira LDS, Greaney PA (2017) Method to manage integration error in the Green-Kubo method. Phys Rev E 95:023308.
  44. Onsager L (1931a) Reciprocal relations in irreversible processes. I. Phys Rev 37:405–426.
  45. Onsager L (1931b) Reciprocal relations in irreversible processes. II. Phys Rev 38:2265.
  46. Peierls R (1929) Zur kinetischen theorie der wärmeleitung in kristallen. Ann Phys (Berlin) 395:1055–1101.
  47. Peligrad M, Wu WB (2010) Central limit theorem for Fourier transforms of stationary processes. Ann Prob 38:2009–2022.
  48. Perdew JP, Burke K, Ernzerhof M (1996) Generalized gradient approximation made simple. Phys Rev Lett 77:3865–3868.
  49. Puligheddu M, Gygi F, Galli G (2017) First-principles simulations of heat transport. Phys Rev Mater 1:060802.
  50. Ramires MLV, de Castro CAN, Nagasaka Y, Nagashima A, Assael MJ, Wakeham WA (1995) Standard reference data for the thermal conductivity of water. J Phys Chem Ref Data 24:1377–1381.
  51. Schelling PK, Phillpot SR, Keblinski P (2002) Comparison of atomic-level simulation methods for computing thermal conductivity. Phys Rev B 65:144306.
  52. Sindzingre P, Gillan MJ (1990) A computer simulation study of transport coefficients in alkali halides. J Phys Condens Matter 2:7033ADSCrossRefGoogle Scholar
  53. Sit PHL, Marzari N (2005) Static and dynamical properties of heavy water at ambient conditions from first-principles molecular dynamics. J Chem Phys 122:204510.
  54. Stackhouse S, Stixrude L, Karki BB (2010) Thermal conductivity of periclase (MgO) from first principles. Phys Rev Lett 104:208501.
  55. Turney JE, Landry ES, McGaughey AJH, Amon CH (2009) Predicting phonon properties and thermal conductivity from anharmonic lattice dynamics calculations and molecular dynamics simulations. Phys Rev B 79:064301.
  56. Volz SG, Chen G (2000) Molecular-dynamics simulation of thermal conductivity of silicon crystals. Phys Rev B 61:2651–2656.
  57. Wang Z, Safarkhani S, Lin G, Ruan X (2017) Uncertainty quantification of thermal conductivities from equilibrium molecular dynamics simulations. Int J Heat Mass Trans 112:267–278.
  58. Weisstein EW (MovingAverage) Moving average. From MathWorld – a Wolfram Web Resource.
  59. Weisstein EW (PolyGamma) Polygamma functions. From MathWorld – a Wolfram Web Resource.
  60. Wiener N (1930) Generalized harmonic analysis. Acta Math 55:117–258.
  61. Zhang Y, Otani A, Maginn EJ (2015) Reliable viscosity calculation from equilibrium molecular dynamics simulations: a time decomposition method. J Chem Theory Comput 11:3537–3546.
  62. Zhou J, Liao B, Chen G (2016) First-principles calculations of thermal, electrical, and thermoelectric transport properties of semiconductors. Semicond Sci Technol 31:043001.

Copyright information

© Springer International Publishing AG, part of Springer Nature 2018

Authors and Affiliations

  • Stefano Baroni
    • 1
    • 2
    Email author
  • Riccardo Bertossa
    • 3
  • Loris Ercole
    • 3
  • Federico Grasselli
    • 3
  • Aris Marcolongo
    • 4
    • 5
  1. 1.SISSA – Scuola Internazionale Superiore di Studi AvanzatiTriesteItaly
  2. 2.CNR Istituto Officina dei MaterialiTriesteItaly
  3. 3.SISSATriesteItaly
  4. 4.Cognitive Computing and Computational Sciences DepartmentIBM ResearchZürichSwitzerland
  5. 5.THEOS-MARVELÉcole Polytechnique Fédérale de LausanneLausanneSwitzerland

Section editors and affiliations

  • Davide Donadio
    • 1
  1. 1.University of California, DavisDavisUSA

Personalised recommendations