선정목록으로
QEHeat: An open-source energy flux calculator for the computation of heat-transport coefficients from first principles
수소연료전지 · (7) MEA(막전극접합체)
기본 정보
- 저자
- DOI
- 10.48550/arxiv.2104.06383
- 저널
- arXiv (Cornell University)
- 발행년도
- 2022
- 발행기관
- Cornell University
- 피인용수
- 0
- 라이선스
- 0
- 논문 유형
- –
- 언어
- –
- 원문 페이지
- https://doi.org/10.48550/arxiv.2104.06383
- 토픽
- Thermal properties of materials
- OpenAlex ID
- W6910743176
평가 내용
- 관련도
- 사업분야
- 수소연료전지 · (7) MEA(막전극접합체)
- 부 분야
- –
- R&D 측면
- –
- 확신도
- –
- 근거 용어
- –
- 판단 근거
- 임베딩 유사도 기반 평가로 '수소연료전지 > MEA(막전극접합체)' 분야에 선정된 논문입니다.
- R&D 활용 포인트
- –
- 평가 입력
- –
초록
We give a detailed presentation of the theory and numerical implementation of an expression for the adiabatic energy flux in extended systems, derived from density-functional theory. This expression can be used to estimate the heat conductivity from equilibrium ab initio molecular dynamics, using the Green-Kubo linear response theory of transport coefficients. Our expression is implemented in an open-source component of the QE suite of computer codes for quantum mechanical materials modelling, which is being made publicly available.
본문 107,285자
본문 펼치기
## QEHeat : An open-source energy flux calculator for the computation of heat-transport coefficients from first principles
Aris Marcolongo <sup>a</sup>, Riccardo Bertossa <sup>b</sup>, Davide Tisi <sup>b</sup>, Stefano Baroni <sup>b,c,∗</sup>
_aMathematical Institute, University of Bern_
_bSISSA – Scuola Internazionale Superiore di Studi Avanzati, Via Bonomea 265, 34136 Trieste,_
_Italy_
_cCNR – Istituto O_ ffi _cina dei Materiali, SISSA, 34136 Trieste_
Abstract
We give a detailed presentation of the theory and numerical implementation of
an expression for the adiabatic energy flux in extended systems, derived from
density-functional theory. This expression can be used to estimate the heat conductivity from equilibrium _ab_ _initio_ molecular dynamics, using the Green-Kubo
linear response theory of transport coefficients. Our expression is implemented in
an open-source component of the Quantum ESPRESSO suite of computer codes
for quantum mechanical materials modeling, which is being made publicly available.
_Keywords:_ Density Functional Theory; Ab Initio Molecular Dynamics;
Transport Coefficients; Heat Conductivity; Energy Current; Green Kubo; Linear
Response.
PROGRAM SUMMARY
_Program Title:_ `QEHeat`
_Licensing provisions:_ GPLv3
_Programming language:_ Fortran
_Nature_ _of_ _problem:_ The computation of thermal transport coefficients via equilibrium
molecular dynamics and the Green-Kubo theory of linear response requires the definition
of a heat-flux describing the instantaneous flow of energy. When considering predictive
∗Corresponding author:
_E-mail address:_ aris.marcolongo@gmail.com (A. Marcolongo)
_E-mail address:_ baroni@sissa.it (S. Baroni)
1
first-principles methods, a definition of the heat-flux compatible with density-functional
theory is required [1]. The evaluation of such a heat flux requires an extension of stateof-the-art atomic simulation codes.
_Solution method:_ This work describes in detail the numerical implementation of the adiabatic energy current derived in Refs. [1,2] and makes it available to the users of the Quantum ESPRESSO suite of computer codes [3]. Used in conjunction with the `cp.x` code, to
perform Car-Parrinello _ab initio molecular dynamics_, and the `SPORTRAN` post-processing
tool for data analysis [4-6], the program allows to estimate heat transport coefficients in
extended systems entirely from first principles. The new code provides as well to developers a modular and easily extendable framework to evaluate time derivatives of electronic
properties (e.g. electronic densities or potentials) via a finite difference approach.
References
[1] A. Marcolongo, P. Umari, and S. Baroni, Nat. Phys. 12, 80 (2016);
[2] S. Baroni, R. Bertossa, L. Ercole, F. Grasselli, and A. Marcolongo, _Heat_ _transport_
_in insulators from ab initio Green-Kubo theory_ in _Handbook of Materials Modeling._
_Applications:_ _Current_ _and_ _Emerging_ _Materials_, edited by W. Andreoni and S. Yip
(Springer, 2018) 2nd ed., Chap. 12-1 ( `https://arxi` - `[.org/abs/1802.08006](https://arxiv.org/abs/1802.08006)` ).
[3] P. Giannozzi _et al._, J. Phys. Condens. Matter 21, 395502 (2009); P. Giannozzi _et al._,
_ibid._ 29, 465901 (2017); P. Giannozzi _et al._, J. Chem. Phys. 152 154105 (2020);
[4] L. Ercole, A. Marcolongo, and S. Baroni, Sci. Rep. 7, 15835 (2017);
[5] R. Bertossa, F. Grasselli, L. Ercole, and S. Baroni Phys. Rev. Lett. 122, 255901
(2019).
[6] L. Ercole, R. Bertossa, S. Bisacchi, and S. Baroni, `SporTran` : _a_ _code_ _to_ _estimate_
_transport coe_ ffi _cients from the cepstral analysis of a multi-variate current stationary_
_time series_, https://github.com/lorisercole/sportran (2017–2021).
1. Introduction
The Green-Kubo (GK) linear-response theory of heat transport [1–4] has long
been deemed incompatible with modern quantum-simulation methods based on
Density-Functional Theory (DFT) [5, 6], essentially because the concepts of energy density and current, upon which that theory stands, are ill-defined at the
molecular scale. This predicament has been reversed by a recent paper [7] by
2
Marcolongo, Umari, and Baroni (MUB) where it was shown that, due to a general _gauge invariance_ principle of transport coefficients [8], the heat conductivity
is largely independent of the details of the microscopic definition of the energy
densities and currents from which it is derived. Leveraging this remarkable finding, an explicit expression for the energy flux, based on DFT, was given in that
same paper. This expression was implemented in a private branch of the Quantum ESPRESSO project [9–11] and, due to its considerable complexity, it has not
been publicly available so far to the scientific community at large. The purpose of
the present paper is to provide a detailed derivation of the MUB expression for the
DFT energy flux, a description of its implementation in Quantum ESPRESSO, and
to release and document an open-source code for its computation, named `QEHeat` .
`QEHeat` can be easily interfaced to read a dynamical trajectory generated with a
code of choice and compute the MUB flux for the corresponding steps. `QEHeat` is
already delivered with a user-friendly interface for the `cp.x` program of the Quantum ESPRESSO distribution, which is routinely used to perform Car-Parrinello
molecular dynamics simulations [9–11]. The combination of `QEHeat`, `cp.x` and
the post-processing tool `SPORTRAN` [12], designed to perform the statistical analysis needed to evaluate transport coefficients, provides a convenient framework
to compute the heat conductivity of extended insulating systems—be they crystalline, amorphous, or liquid—entirely from first principles. We warn the user that
the MUB flux is an _adiabatic_ energy flux. This refers to the fact that electrons are
supposed to populate the ground state during time evolution, which is the case for
insulators with a finite band gap.
We note that other computational efforts have been proposed to evaluate microscopic expressions for the energy flux based on DFT. For example, Kang et. al
[13] evaluate an atomic decomposition of the total energy and then use a two-step
procedure to take into account periodic boundary conditions when evaluating the
energy flux. Carbogno et. al [14] neglect the convective contribution to the energy
flux and use a DFT-based expression for the virial component. This approach is
developed as an approximation suited to the description of thermal transport in
solids. The open-source distribution of `QEHeat` will make it easier to compare
the computational advantages of the various expressions which, after the assessment of the principle of gauge invariance, are being developed by the community.
Finally, the evaluation of the energy flux provided by `QEHeat` involves a finite
difference evaluation of electronic properties, e.g. electronic densities or potentials, which are performed entirely in-memory, storing the results of different total
energy calculations into ad-hoc data structures. Therefore, `QEHeat` provides as
3
well to developers a modular and easily extendable framework to evaluate time
derivatives of electronic properties via a finite difference approach.
2. Overview
According to the GK theory of linear response [1–4], the heat conductivity of
an isotropic system is given by:
<u>1</u>
κ =
3Ω _kBT_ <sup>2</sup>
- ∞
_J_ ( _t_ ) · _J_ (0)
0
- _dt_, (1)
where Ω is the system volume, _J_ ( _t_ ) = �Ω <sup>_j_</sup> <sup>(</sup> <sup>_r_</sup> <sup>,</sup> <sup>_t_</sup> <sup>)</sup> <sup>_d_</sup> <sup>_r_</sup> <sup>,</sup> <sup>_i.e._</sup> <sup>the</sup> <sup>volume</sup> <sup>integral</sup> <sup>of</sup>
the energy current density, is the energy flux (note that with this definition the
flux is extensive), _T_ the temperature, and ⟨·⟩ indicates an equilibrium average
over the initial conditions of a molecular trajectory. `QEHeat` serves the purpose of
evaluating _J_ at the DFT level of theory. A formal expression for the energy flux
can be obtained by integrating by parts the continuity equation ˙ϵ = −∇· _j_ as [5, 6]:
where Ω is the system volume, _J_ ( _t_ ) =
_J_ =
Ω
_d_ _r_ ϵ˙( _r_ ) _r_, (2)
where ϵ( _r_ ) is the energy density of the system, whose integral is its total energy.
Strictly speaking, Eq. (2) is ill-defined in periodic boundary conditions (PBC),
which are commonly adopted in molecular simulations. In order to compute it
explicitly within PBC, one has to first recast it in a boundary-insensitive form,
and Ω can then be replaced with the volume of the simulation cell in Eqs. (1-2).
Once this is done, the DFT energy flux can be cast into the MUB form, called here
_J_ <sup>_MUB_</sup>, and discussed in detail in later sections.
`QEHeat` computes the MUB energy flux as a function of the atomic positions,
{ _R_ _s_ } and velocities, { _V_ _s_ }, _i.e._ for any selected snapshot of an _ab initio_ molecular
dynamics (AIMD) trajectory. Despite the complexity of the resulting formula for
the energy current, from a practical point of view the use of `QEHeat` relies on a
limited number of additional input parameters with respect to a standard Quantum ESPRESSO DFT computation. These are reported in the `energy_current`
input namelist, which is shown in figure 1. The meaning of all the keywords is
explained in more detail in section Section 5. The only additional parameters are
`eta` and `n_max`, controlling the Ewald summations, which appear only in classical
contributions to the energy current, and `delta_t`, a time-discretization parameter,
used to perform numerical derivatives. The default values should work for most
systems.
4
```
&energy_current
delta_t = 1.000,
file_output = ’current_hz’,
eta = 0.100,
n_max = 5,
trajdir = ’traj/cp’,
first_step = 1,
vel_input_units = ’CP’
/
```
Figure 1: Example of the energy ~~c~~ urrent namelist. delta ~~t~~ is the time used for numerical derivatives. eta and n ~~m~~ ax are the parameters used to converge Ewald sums. trajdir is the prefix of the trajectory files. In this example, the program reads the files ”traj/cp.pos” and ”traj/cp.vel”. first ~~s~~ tep
tell the program the first step id to compute. The step ids are part of the trajectory file format. After
this namelist the full pw.x input is required. A full example of the input and the documentation of
the keywords can be found at `[https://gitlab.com/QEF/q-e/-/tree/master/QEHeat/Doc](https://gitlab.com/QEF/q-e/-/tree/master/QEHeat/Doc)` .
See also Section 5.
The work is organized as follows. In Section 3 we show the formulas that
`QEHeat` implements for the abiabatic energy flux, and Appendix 3 is dedicated
to the exact numerical schemes. Section 4 contains an overview of the code, and
Section 5 describes the input parameters in more details and shows some stability
and implementation checks. Finally, in Section 6 we showcase how to use the energy flux time series provided `QEHeat` to evaluate thermal conductivity, using the
`SporTran` data analysis post-processing tool (the data analysis is fully explained
in the Jupyter notebook data ~~a~~ nalysis.ipynb in the Supplementary Materials).
3. DFT energy flux
In this section we recall the expression of MUB energy flux [7] and some of
the notation used throughout the paper. For a more extensive and detailed study
of the implementations of the many components of the MUB current the reader is
referred to Appendix B. _J_ <sup>_MUB_</sup> is expressed as a sum of five components:
_J_ <sup>_MUB_</sup> = _J_ <sup>_KS_</sup> + _J_ <sup>0</sup> + _J_ <sup>_n_</sup> + _J_ <sup>_H_</sup> + _J_ <sup>_XC_</sup>, (3)
5
where
_J_ <sup>_KS_</sup> =
_J_ <sup>0</sup> =
_J_ <sup>_n_</sup> =
_s_ _L_
_s_
_s_ <sup>+</sup>
_V_ _se_ 0
( _R_ _s_ - _R_ _t_ - _L_ ) ( _V_ _t_ - ∇ _t_ _L_ _ws_ ) −
�⟨ϕ�| _r_ ˆ _H_ <sup>ˆ</sup> <sup>_KS_</sup> |ϕ˙ �⟩ + ε�⟨ϕ˙ �| _r_ ˆ |ϕ�⟩�, (4)
����( _r_ ˆ - _R_ _s_ - _L_ ) - _V_ _s_ - ∇ _s_ _L_ �ˆ <sup>0����</sup> - ϕ�
, (5)
ϕ�
_t_ - _s_
_L_
_L_ ( _V_ _s_ - ∇ _s_ _L_ _ws_ )
(6)
_L_ �0
_J_ <sup>_H_</sup> = <u>1</u>
4π _e_ <sup>2</sup>
�˙ <sup>_H_</sup> ( _r_ )∇� <sup>_H_</sup> ( _r_ ) _d_ _r_, (7)
_J_ <sup>_XC_</sup> =
0 (LDA)
- (8)
_n_ ( _r_ )˙ _n_ ( _r_ ) _∂_ ϵ <sup>_GGA_</sup> ( _r_ ) _d_ _r_ (GGA).
In the following, these components are referred to as the _Kohn-Sham_, _Zero_, _Ionic_,
_Hartree_ and _Exchange-Correlation_ fluxes, respectively. For the insulating systems
of interest in this work, the ionic degrees of freedom completely define the state
of the system and the electrons populate the ground state, according to the adiabatic approximation. Each time derivative, indicated with the usual _dot_ operator,
has then to be understood from the implicit dependence on the atomic positions.
We note that a complete understanding of the different components of the MUB
energy flux is not needed to perform, as a user, a thermal-conductivity calculation. Here and in the following, we indicate with _L_ the lattice vector. We stress
that periodic boundary conditions (PBC) are assumed here over the unit (simulation) cell. This implies that Kohn-Sham orbitals and energies are sampled at
the Γ point of the Brillouin cell. The notation ∇ _s_ _L_ is a shorthand for the gradient
with respect to displacement of the atom at location _R_ _s_ + _L_ . A summation over
_s_ runs over all atoms belonging to the simulation cell. Unless otherwise specified, carets indicate quantum-mechanical operators, as in _H_ <sup>ˆ</sup> <sup>_KS_</sup> or _r_ ˆ. Following
is a brief report of the definition of the most important terms according to their
physical meaning. For a more extensive summary of the notation used here and
throughout the text the reader is referred to Appendix A (“Notation”). The ionic
energy _e_ <sup>0</sup> _s_ <sup>is</sup> <sup>the</sup> <sup>sum</sup> <sup>of</sup> <sup>the</sup> <sup>kinetic</sup> <sup>energy,</sup> <sup><u>1</u></sup> 2 <sup>_MsV_</sup> _s_ <sup>2,</sup> <sup>and</sup> <sup>_ws_</sup> <sup>the</sup> <sup>classical</sup> <sup>electro-</sup>
<sup>0</sup> _s_ <sup>is</sup> <sup>the</sup> <sup>sum</sup> <sup>of</sup> <sup>the</sup> <sup>kinetic</sup> <sup>energy,</sup> <sup><u>1</u></sup> 2
energy _e_ <sup>0</sup> _s_ <sup>is</sup> <sup>the</sup> <sup>sum</sup> <sup>of</sup> <sup>the</sup> <sup>kinetic</sup> <sup>energy,</sup> <sup><u>1</u></sup> 2 <sup>_MsV_</sup> _s_ <sup>2,</sup> <sup>and</sup> <sup>_ws_</sup> <sup>the</sup> <sup>classical</sup> <sup>electro-</sup>
static interaction between the _s_ -atom and all other atoms in the system. The electronic degrees of freedom are instead described by the instantaneous Kohn-Sham
Hamiltonian, _H_ <sup>ˆ</sup> <sup>_KS_</sup>, and its eigenvalues and eigenvectors, the Kohn-Sham energies,
ϵ�, and orbitals, ϕ�. A summation over � runs over all occupied orbitals. Several
6
quantities, like the electronic number-density distribution, _n_ ( _r_ ), and Hartree potential, � <sup>_H_</sup> ( _r_ ), are implicit functions of the wave-functions. �ˆ <sup>0</sup> is the total external
atomic pseudo-potential, describing the interaction between electrons and nuclei.
For a more detailed analysis see Appendix B.2. The symbol ϵ <sup>_GGA_</sup> stands for
the generalized gradient approximation (GGA) exchange-correlation local energy
per particle and its derivative with respect to density gradients is indicated with
_∂_ ϵ <sup>_GGA_</sup>, which is a vector whose component along direction _i_ ∈{ _x_, _y_, _z_ } is given
by ∂ϵ <sup>_GGA_</sup> ( _n_, ∇ _n_ )/∂(∇ _in_ ). In the present version of `QEHeat` only the local density
approximation (LDA) and the generalized gradient approximation given by the
PBE [15] functional are implemented.
The formulas reported are compatible with PBC. Thus, they can be implemented for periodic systems, where some of the summations need to be extended
to all the periodic replicas of the atoms. Nevertheless, the computation of the various contributions to the energy current, Eqs. (4-8), is plagued by the occurrence
of several divergences, arising from the long range character of the Coulomb interaction. As it is the case for the total energies, atomic forces, and stress, the
individual electronic, ionic, and electron-ion contributions diverge and it is only
their sum that is regular in the thermodynamic limit. In order to regularize the
individual components of the MUB flux, we compute all the relevant terms by
screening the Coulomb interaction with a Yukawa cutoff, <sup><u>1</u></sup> _x_ <sup>→</sup> <sup>_<u>e</u>_</sup> <sup>−</sup> _x_ <sup>µ</sup> <sup>_x_</sup> <sup>.</sup> <sup>In Appendix</sup>
<sup><u>1</u></sup> _x_ <sup>→</sup> <sup>_<u>e</u>_</sup> <sup>−</sup> _x_ <sup>µ</sup> <sup>_x_</sup>
screening the Coulomb interaction with a Yukawa cutoff, <sup><u>1</u></sup> _x_ <sup>→</sup> <sup>_<u>e</u>_</sup> <sup>−</sup> _x_ <sup>µ</sup> <sup>_x_</sup> <sup>.</sup> <sup>In Appendix</sup>
B, we check explicitly that the singular contributions to the various terms cancel
each other in the µ → 0 limit, so that they can be consistently and safely neglected
and do not appear in the final formulas reported in Appendix B.
4. Code structure
We start by describing the strategy implemented to compute numerical derivatives of quantities appearing in Eqs. (4), (7), and (8), like _n_ ˙ and �˙ <sup>_H_</sup>, since they
require a special treatment. Quite generally, one needs to evaluate terms of the
type _f_ <sup>˙</sup> ({ _R_ _s_ ( _t_ )}), where the function _f_ can be a scalar function, which depends on
time only through the set of the instantaneous ionic positions { _R_ _s_ ( _t_ )}, evolving according to Hamilton’s equations of motion. `QEHeat` implements a finite-difference
scheme, using by default a symmetric numerical differentiation formula:
_f_ ˙({ _R_ _s_ }) ≈ <sup>_<u>f</u>_</sup> <sup><u>({</u></sup> <sup>_<u>R</u>_</sup> <sup>_<u>s</u>_</sup> <sup><u>+</u></sup> <sup>_<u>V</u>_</sup> <sup>_<u>sdt</u>_</sup> <sup><u>/2}) −</u></sup> <sup>_<u>f</u>_</sup> <sup><u>({</u></sup> <sup>_<u>R</u>_</sup> <sup>_<u>s</u>_</sup> <sup>−</sup> <sup>_<u>V</u>_</sup> <sup>_<u>sdt</u>_</sup> <sup><u>/2})</u></sup> (9)
_dt_
The small parameter _dt_ is an input of the computation. In such a scheme quantities that are not differentiated are evaluated at time _t_, so three wave-functions are
7
required to be kept in memory at the same time. `QEHeat` performs therefore for
each step two additional self-consistent-field (SCF) DFT calculations, using the
same DFT solver of the Quantum ESPRESSO distribution, at slightly displaced
positions, i.e. { _R_ _s_ - _V_ _sdt_ /2} and { _R_ _s_ + _V_ _sdt_ /2} along the AIMD trajectory. The
wave-functions of the previous calculation are used as a starting point for the next
one, which require much less iterations to converge. We note that `QEHeat` gives
the user also the possibility to use a non-symmetric differentiation scheme, which
is shown in Appendix E. This scheme is computationally cheaper. Nevertheless,
for differentiable functions, the order of convergence of the symmetric scheme is
quadratic in _dt_, whereas the non-symmetric one is linear. Accordingly, the stability is improved with the default symmetric scheme. We recommend therefore
the latter and use it for all calculations here presented. See also the dedicated Appendix E.
The trajectory data is managed by the Fortran derived data type `cpv_trajectory`
defined in the file `cpv_traj.f90`, while the orbitals and the associated atomic position are managed by the derived type `scf_result`, implemented in `scf_result.f90` .
The most relevant subroutine that acts on this object is `scf_result_set_from_global_variable`,
that copies the eigenfunctions, the eigenvalues, the potential and the atomic positions from the Quantum ESPRESSO’s global variables to the instance of `scf_result` .
The results for each of the three (or two) wave-functions that are required by the
computation routines are stored in the variable `scf_all`, defined in the main program routine. Global variables are avoided as mush as possible.
The code starts by reading the input “namelists”: first the `energy_current`
namelist, then all the `pw.x` namelists. Then it calls all the `pw.x` -related initialization routines. After eventually reading the previously generated output file that
allows the program to set the correct starting timestep, it enters the main loop
over the input trajectory timesteps. The trajectory files have the same format of
Quantum ESPRESSO’s `cp.x` code output files.
The most important routines where the above mentioned data structures are
used are the following:
- `SUBROUTINE` `current_zero` (module `zero_mod` )
Carries out the computation of Eq. (5). This routine is called in the middle
of the computation using the same timestep _t_ of the positions stored in the
input trajectory, so that the result does not depend on _dt_ .
- `SUBROUTINE` `current_ionic` (module `ionic_mod` )
Computes all parts of Eq. (6), and it is called as `current_zero` at the same
8
timestep of the input trajectory
- `SUBROUTINE` `current_hartree_xc` (module `hartree_xc_mod` )
Computes (7) and (8). Since a numerical derivative is needed, this routine
reads the wave-functions from the global type `scf_all` and it is run at the
end of all necessary `run_pwscf` calls.
- `SUBROUTINE` `current_kohn_sham` (module `kohn_sham_mod` )
Computes (4). As `current_hartree_xc`, it needs all the wave-functions
calculated by the DFT solver for this step.
- `SUBROUTINE` `run_pwscf`
Uses Quantum ESPRESSO’s routines to solve the DFT problem for the
atomic positions stored in the global array `tau` . Equivalent (but the starting
wave-function and potential, that can be the last computed one) to a standard
call to the `pw.x` program with the input stripped of the `ENERGY_CURRENT`
namelist. The result is stored in the Quantum Espresso’s global arrays ( `evc` )
- `SUBROUTINE` `prepare_next_step`
This routine is used to change the global array `tau` to `tau` + `vel` - _dt_ - `ipm`,
where `ipm` is the argument of the subroutine that can be -1,0,1. After doing
that it calls the necessary routines to prepare the potential for `run_pwscf` .
The 4 modules, one for each part of the MUB current, are completely independent
of one another. The structure of the main loop over the trajectory’s time steps is
summarized in Algorithm 1.
As every big computational code an extended test suite is needed to safeguard
the correctness of the calculation after every source code modification. We implemented small tests that are able to run on a single core of a cheap laptop that
check against changes in the numerical output of many parts of the code, using
the standard Quantum ESPRESSO’s test suite framework.
To conclude the section we want to do some remarks on the code and its interactivity with others typical _ab_ _initio_ simulations tools. In principle the wavefunctions computed on-the fly by `cp.x` during the AIMD run could be used, but
we preferred to implement a workflow where the computation of the currents is
completely decoupled from the AIMD engine, thus the wave-functions are always
recomputed by `pw.x` . The chosen approach allows the user to run the calculation
in post-processing mode, thus using the preferred code to generate the dynamics,
not to be limited to those in the QE packages. This way it allows, also, a trivial
and powerful per-snaphot parallelization.
9
<u>Algorithm 1</u> <u>Workflow of</u> <u>`all`</u> ~~<u>`c`</u>~~ <u>`urrents.f90.`</u>
1: Quantum ESPRESSO initialization (plane waves, pseudo-potentials,...)
2: Reading of Restart
3: for each snapshot do
4: call `run_pwscf` with positions displaced at _t_ - _dt_ /2
5: call `run_pwscf` with non-displaced positions at _t_
6: call `current_zero`, evaluate currents derived from the pseudo-potential
7: call `current_ionic`, evaluate the electrostatic and kinetic Ionic current
8: call `run_pwscf` with positions displaced at _t_ + _dt_ /2
9: call `current_hartree_xc`, evaluate Excange and Hartree currents
10: call `current_kohn_sham`, evaluate Kohn-Sham current
Steps 6 and 7 do not require any finite differences, while steps 9 and 10 do. Step 10 is the
<u>most expensive.</u>
5. Code usage and benchmarks
_5.1._ _Input description_
The input is organized in a traditional fortran namelist input file, similar to the
input files of many Quantum Espresso’s programs, and an optional trajectory file
(that is a file for the atomic velocities and a file for atomic positions) if the user
wants to compute the energy current for more than one snapshot with a single run.
A full example of the input can be found at `[https://gitlab.com/QEF/q-e/](https://gitlab.com/QEF/q-e/-/tree/master/QEHeat/examples)`
`[-/tree/master/QEHeat/examples](https://gitlab.com/QEF/q-e/-/tree/master/QEHeat/examples)` . Before running `QEHeat` it is necessary to
obtain velocities and positions from a different code, for a complete description
of the units of measure see Table 1. If the Quantum Espresso’s `cp.x` program
is used for this purpose, its output trajectory files can be recycled as input trajectory files without any modification. The program’s mandatory input is organized into an `ENERGY_CURRENT` namelist and all the usual `pw.x` namelists. We
remind the user that, up to the present version, only norm conserving pseupotentials and the PBE exchange correlation functional are supported. At the end of the
input file the `ATOMIC_VELOCITIES` card is required. In the `IONS` namelists the
value `ion_velocities` `=` `’from_input’` is required, since the program must
read the atomic velocities to compute the energy current. An extensive input description can be found in the file `INPUT_ALL_CURRENTS.html` in the `Doc` folder
of the code repository. Here we remark the most important parameters of the
`ENERGY_CURRENT` namelist:
10
- `delta_t` : time in PW’s atomic unit used to compute all the numerical
derivatives like the one in Eq. (9);
- `trajdir` : prefix of the cp-formatted trajectory. Optional: if not setted,
only the positions and the velocities of the input file are read;
- `n_max` : number of periodic images along the directions of each basis cell
vector to converge Ewald sums. This fixes the range of L in Eq. (6) ;
- `eta` : convergence parameter of the Ewald sums needed in the computation
of _J_ <sup>_n_</sup>, for more details see Appendix B.3.
An example of the namelist is provided in fig. 1. An additional output file is
written and updated at the end of each step in the folder where the program is
run. All the currents are printed in a column format, ready to be analyzed by an
external post-processing tool.
As discussed in Appendix E, `CONTROL` ’s `conv_thr` and `ENERGY_CURRENT` ’s
`delta_t` have a profound link and influence heavily each other, and despite we
think the default value of `delta_t=1.0` is safe enough, they must be carefully
tested, veryfing that the standard deviation of the result is low enough.
The standard deviation of the output energy current can be estimated by repeating the same calculation for every step, many different times, setting for each repetition a random starting potential and a random starting wave-function. The input
options `re_init_wfc_1` `=` `.true.` together with `n_repeat_every_step` `=` `20`,
for example, do 20 repetition of every timestep, resetting the starting wave-functions/potential
before the first scf calculation. The `pw.x` ’s input option `startingwfc` `=` `’random’`
is suggested, to obtain a faithful error estimation. If more reinitializations are
desired, the options `re_init_wfc_2` and `re_init_wfc_3` can control the randomness of the starting wfc and potential of every of the 3 (or 2) wave-functions
needed to perform the numerical derivatives, as explained in section 4. Note that
when the wave-function is reinitialized from scratch, the computation time raises
since more scf cycles are required to reach the target convergence threshold. When
`n_repeat_every_step` is greater than 1, an additional column formatted output
file with the averages and the standard deviations is produced.
_5.2._ _Implementation checks:_ _Finite systems translating at constant speed_
The Green-Kubo current associated with a localized energy density ϵ( _r_, _t_ )
rigidly translating with constant velocity �, is equal to _E_ <sup>_tot_</sup> × �. One possible way
to show this is to consider ϵ( _r_, _t_ ) = ϵ( _r_ - - _t_, 0) ≡ ϵ <sup>0</sup> ( _r_ - - _t_ ),thus _Ja_ = - ϵ˙ _rad_ _r_ =
11
INPUT
OUTPUT
<u>parameter</u> <u>units</u>
dt τ _a_ . _u_ .
eta 1/ _a_ <sup>2</sup> 0
velocities _a_ 0/τ _a_ . _u_ . (CP units can be specified)
<u>positions</u> _<u>a</u>_ <u>0</u>
energy current _Ry_ - _a_ 0/τ _a_ . _u_ .
electronic density current _a_ 0/τ _a_ . _u_ .
center of mass currents _a_ 0/τ _a_ . _u_ .
Table 1: Units used for the input and the output, where _Ry_ = 2.1799 · 10 <sup>−18</sup> _J_ = 13.606 _eV_, _a_ 0 =
5.2918 · 10 <sup>−11</sup> _m_, τ _a_ . _u_ . = 4.8378 · 10 <sup>−17</sup> _s_ are the Rydberg units of energy, the Bohr radius and
the time unit in Rydberg atomic units. The program assumes the input velocities to be in Rydberg
atomic units, the standard for `pw.x`, unless specified otherwise with vel ~~i~~ nput ~~u~~ nits=’CP’ in the
energy ~~c~~ urrent namelist. In that case it assumes Hartree atomic units, the standard for `cp.x` .
`cp.x` ’s unit of time is 2.4189 · 10 <sup>−17</sup> _s_ .
-
−� _b_ (∂ _b_ ϵ <sup>0</sup> ) _rad_ _r_ = - _a_ ϵ <sup>0</sup> _d_ _r_ = _E_ <sup>_tot_</sup> - _a_ . Note that we used the fact that ϵ <sup>0</sup> can be
taken identically equal to zero at the boundary of the integration volume, to remove boundary contributions from the integraton by parts. The identity requires
therefore the energy density to be localized and this condition can be mimicked in
PBC considering a large enough supercell. We used this property to check the correctness of our implementation for each individual current in Eq. (3). We simulate
a single Argon atom and a water molecule at equilibrium, both translating at constant speed. We then compare _J_ <sup>_MUB_</sup> output from `QEHeat` and _E_ <sup>_tot_</sup> �, where _E_ <sup>_tot_</sup> is
evaluated using an independent computation from the QE code. As discussed, the
resulting currents need to be equal only in the limit of large cells, where boundary effects can be neglected, i.e. the energy density is truly localized, and under
tight convergence criteria. In Fig. 2, we report the ratio between the computed
and theoretical values as a function of the cell parameter, showing that the correct limit behavior is recovered. For this calculation we used a cutoff of 120 _Ry_
and econv = 10 <sup>−14</sup> _Ry_ . Additionally, in Appendix C we perform the same test
using a large cell parameter but removing individual current components (i.e. the
{XC,IONIC,ZERO,KOHN} components) from the total energy flux. Since removing each component changes the difference with respect to the limiting theoretical
value, this proves the correct implementation of each individual current.
−� _b_
- (∂ _b_ ϵ <sup>0</sup> ) _rad_ _r_ = - _a_
In the same figure, using the same approach, we tested the electronic density
current defined in eq. (B.58) as well. In the infinite cell limit the electron density
current of a system translating at a constant speed - is _J_ <sup>_el_</sup> = _Ne_ - where _Ne_ is
12
1.7
1.6
1.5
1.4
1.3
1.2
1.1
1.0
0.9
<u>Ar electronic</u>
~~H~~ <u>2</u> ~~O electronic~~
<u>Ar energy</u>
<u>H2O energy</u>
<u>6</u> <u>8</u> <u>10</u> <u>12</u> <u>14</u> <u>16</u> <u>18</u> <u>20</u>
cell parameter (Bohr)
Figure 2: Proof that the behaviour of the code is correct for systems translating at equilibrium and
constant velocity. In this setting, the output of QEHeat can be exactly compared with the known
theoretical value, indicated with _Jtheory_, in the large cell limit. Indeed the plot shows that the ratio
_J_ / _Jtheory_ goes to one increasing the simulation cell. This test can be performed for _J_ equal to the
electronic density current (dotted), that is used to calculate a part of the energy current, and for
the energy current itself (not dotted). Tests are performed for a single relaxed water molecule
( _H_ 2 _O_ ) and a single argon atom ( _Ar_ ). The electronic current should be, in the infinite cell limit,
_J_ theory <sup>_el_</sup> <sup>=</sup> <sup>_Nel_</sup> <sup>× �, where</sup> <sup>_Nel_</sup> <sup>is the number of electrons and the energy flux should be, in the infinite</sup>
cell limit, equal to _J_ _theory_ <sup>_ene_</sup> <sup>=</sup> <sup>_Etot_</sup> <sup>× �,</sup> <sup>_Etot_</sup> <sup>being the total energy.</sup>
13
the number of electrons. It is possible to see in figure 2 that the correct limit is
obtained, validating the implementation of the code.
6. Example of a thermal conductivity calculation
As an example of a complete `QEHeat` calculation, coupled with the `SPORTRAN`
tool for signal analysis, we report the results of a thermal conductivity calculation
for PBE ([15] ) water. It is known in the literature [16–18] that DFT with PBE
functional does not provide a correctly structured water. Nevertheless, PBE water
is a simple example of a single component molecular fluid that can be used to
show all aspects of the theory. For a complete description of the signal-analysis
theory used here to post-process the simulation, based on cepstral analysis, we
refer to the works [5, 6, 8, 19] and to [12] for example notebooks and tutorials.
The details of the present analysis are reported for reproducibility in the Jupyter
notebook ”data ~~a~~ nalysis.ipynb”, provided as supplementary material, and we report here the results. We warn the reader that the heat flux returned by `QEHeat`
almost always contains non-diffusive signals, i.e. signals not contributing to thermal conductivity, with a high amplitude, that may be a problem for a standard
numerical Green-Kubo integration. The high formation energies present in abinitio computations can generate such components in the energy flux. By using
the fact that these components are highly correlated with the mass and electronic
density flux, renormalization or multicomponent techniques, effectively decorrelating the energy flux from these spurious signals, solve this issue. For a longer
discussion we refer to [19] and references therein. Here we took advantage of the
multicomponent filters implemented in `SPORTRAN` .
We consider a 64 molecules water system at 600K. First, the molecular dynamics trajectory was computed with the cp.x code using a cubic box with size of
12.43Å and an integration timestep ∆ _t_ = 3 in Hartree atomic units, with a total
length of 240ps. `QEHeat` shows excellence stability properties as a function of
the time-discretization parameter _dt_, which are shown and thoroughly discussed
in Appendix E. A value of _dt_ equal to twice the Car-Parinello MD simulation
timestep, _dt_ = 2∆ _t_, is of particular interest because it would be beneficial in an
on-the-fly computation, allowing to reuse the same wavefunctions computed in
the MD simulation, neglecting the need for the recomputation of the scf cycles.
In the Appendix we also show that, at a fixed value of the self consistency threshold for convergence `econv`, the variance of the MUB estimator decreases with
_dt_ . Thus, it is favourable, in order to control numerical noise, to choose _dt_ as
large as possible, as long as the bias introduced by nonlinear effects is negligi
14
ble. For these calculations, we first investigated two values of `econv`, namely
10 <sup>−8</sup> and 10 <sup>−11</sup> Ry with a rather small _dt_ = 0.5 Rydberg atomic units. The final result of the computation, i.e. the thermal conductivity coefficient, is affected
very weakly by this parameter, that on the contrary changes in a noticeable way
the computational cost. In this case both computations gave (1.07 ± 0.09)W/mK.
Moreover we checked that using a _dt_ that is equal to the integration timestep of
the Car-Parrinello simulation and econv = 10 <sup>−8</sup> produces the same spectrum with
no noticeable differences and the same thermal conductivity coefficient: in this
case we had (0.98 ± 0.09)W/mK.
According to our experience, the overall cost of a `QEHeat` calculation is often of the same order of magnitude of the full Car Parrinello molecular dynamics
simulation even if the `QEHeat` computation can be trivially parallelized. The data
analysis with `SPORTRAN` adds a negligible computational cost. A more detailed
study of the computational costs and how to reduce it can be found in Appendix
F. Here we just stress that the total computational time can be also reduced choosing an appropriate length of the simulation, according to the desired precision.
Fig. 3 show the dependence of κ from the simulation length both for our water
system (upper panel) and a solid ice X structure from ref. [20] (lower panel),
where the oxygen are packed in a bbc lattice and tetrahedrally coordinated to hydrogen atoms located exactly midway between two neighboring oxygen atoms. In
the present didactic work we choose a very long simulation time of 240 ps but
from the figure is it clear that a simulation length around 100 ps can provide a
reasonable estimate. Depending on the system, even shorter simulations lengths
could suffice: the lower panel of Fig. 3 presents the same data of ice X from
[20], where a simulation of 20 − 30 ps proved to be sufficient. We also warn the
reader that for strongly harmonic systems, e.g. solids at ambient temperature and
pressure, also large cell sizes may be required to remove boundary effects.
7. Conclusions
We have presented a robust implementation of the MUB energy current, allowing to compute the heat conductivity from an explicit expression of the energy
flux based on DFT, something that is made possible only by recent findings [22].
The code is distributed via `QEHeat`, an open-source component of the Quantum
ESPRESSO suite of computers codes, and it interfaces easily with other major
components of the distribution, mainly `pw.x` and `cp.x` . The implementation has
been tested and validated, proving it to be stable and solid with the parameters.
Finally, `QEHeat` can also be considered as a modular and easily extendable infor
15
2
1
40
30
20
Water
<u>0</u> <u>50</u> <u>100</u> <u>150</u> <u>200</u>
IceX
<u>10</u> <u>20</u> <u>30</u> <u>40</u> <u>50</u> <u>60</u> <u>70</u>
trajectory lenght (ps)
Figure 3: The dependence of κ with respect to the trajectory length for 64 molecules of water
system at 600K and for the ice X system in [20]. The orange line correspond to the values with the
longest trajectory possible, κ = 1.07 ± 0.09 W/(mK) and κ = 16.1 ± 1.1 W/(mK) for water and ice
X respectively. The data for the ice X system are taken from the Material Cloud repository [21]
16
matic framework to evaluate time derivatives of electronic properties, e.g. electronic densities or potentials.
Declaration of competing interest
The authors declare that they have no known competing financial interests or
personal relationships that could have appeared to influence the work reported in
this paper.
Acknowledgments
The authors are grateful to Federico Grasselli, Paolo Pegolo and Pietro Delugas for a thorough reading of the manuscript, and to Pietro Delugas and Loris
Ercole for early contributions to the code base. This work was partially funded by
the EU through the MaX Centre of Excellence for supercomputing applications
(Project No. 824143) and by the Italian Ministry for University and Research
(MUR), through the PRIN grant FERMAT.
References
[1] M. S. Green, Markoff random processes [and](http://aip.scitation.org/doi/10.1063/1.1700722) the statistical mechanics of
[time-dependent](http://aip.scitation.org/doi/10.1063/1.1700722) phenomena., J. Chem. Phys. 20 (8) (1952) 1281–1295.
`[doi:10.1063/1.1700722](https://doi.org/10.1063/1.1700722)` .
URL `[http://aip.scitation.org/doi/10.1063/1.1700722](http://aip.scitation.org/doi/10.1063/1.1700722)`
[2] M. S. Green, Markoff random processes [and](http://aip.scitation.org/doi/abs/10.1063/1.1740082) the statistical mechanics of
time-dependent phenomena. ii. irreversible processes in fluids, J. Chem.
Phys. 22 (1954) 398–413. `[doi:10.1063/1.1740082](https://doi.org/10.1063/1.1740082)` .
URL `[http://aip.scitation.org/doi/abs/10.1063/1.1740082](http://aip.scitation.org/doi/abs/10.1063/1.1740082)`
[3] R. Kubo, Statistical-mechanical theory of irreversible processes. i. General
theory and simple applications to magnetic and conduction problems, J.
Phys. Soc. Jpn. 12 (6) (1957) 570–586. `[doi:10.1143/JPSJ.12.570](https://doi.org/10.1143/JPSJ.12.570)` .
[4] R. Kubo, M. Yokota, S. Nakajima, Statistical-mechanical theory of irre
versible processes. ii. response to thermal disturbance, J. Phys. Soc. Jpn.
12 (11) (1957) 1203–1211. `[doi:10.1143/JPSJ.12.1203](https://doi.org/10.1143/JPSJ.12.1203)` .
17
[5] S. Baroni, R. Bertossa, L. Ercole, F. Grasselli, A. Marcolongo, Heat Trans
port in Insulators from Ab Initio Green-Kubo Theory, Springer International Publishing, Cham, 2020, pp. 809–844. `arXi` - `[:1802.08006](http://arxiv.org/abs/1802.08006)`, `[doi:](https://doi.org/10.1007/978-3-319-44680-6_12)`
`[10.1007/978-3-319-44680-6\_12](https://doi.org/10.1007/978-3-319-44680-6_12)` .
[6] F. Grasselli, S. Baroni, Invariance principles in the theory and computation
of transport coefficients, European Physical Journal B (2021). `arXi` - `[:2105.](http://arxiv.org/abs/2105.02137)`
`[02137](http://arxiv.org/abs/2105.02137)`, `[doi:10.1140/epjb/s10051-021-00152-5](https://doi.org/10.1140/epjb/s10051-021-00152-5)` .
[7] A. Marcolongo, P. Umari, S. Baroni, Microscopic theory and quantum sim
ulation of atomic heat transport, Nat. Phys. 12 (1) (2016) 80–84. `[doi:](https://doi.org/10.1038/nphys3509)`
`[10.1038/nphys3509](https://doi.org/10.1038/nphys3509)` .
[8] L. Ercole, A. Marcolongo, P. Umari, S. Baroni, Gauge Invariance of Thermal
Transport Coefficients, J. Low Temp. Phys. 185 (1-2) (2016) 79–86. `[doi:](https://doi.org/10.1007/s10909-016-1617-6)`
`[10.1007/s10909-016-1617-6](https://doi.org/10.1007/s10909-016-1617-6)` .
[9] P. Giannozzi, S. Baroni, N. Bonini, M. Calandra, R. Car, C. Cavazzoni,
D. Ceresoli, G. L. Chiarotti, M. Cococcioni, I. Dabo, et al., QUANTUM
ESPRESSO: a modular and open-source software project for quantum simulations of materials, J. Phys. Condens. Matter 21 (39) (2009) 395502.
[10] P. Giannozzi, O. Andreussi, T. Brumme, O. Bunau, M. Nardelli Buongiorno,
M. Calandra, R. Car, C. Cavazzoni, D. Ceresoli, M. Cococcioni, et al., Advanced capabilities for materials modelling with Quantum ESPRESSO, J.
Phys. Condens. Matter 29 (46) (2017) 465901.
[11] P. Giannozzi, O. Baseggio, P. Bonf`a, D. Brunato, R. Car, I. Carnimeo,
C. Cavazzoni, S. de Gironcoli, P. Delugas, F. F. Ruffino, A. Ferretti,
N. Marzari, I. Timrov, A. Urru, S. Baroni, Quantum [ESPRESSO](https://doi.org/10.1063/5.0005082) toward
the [exascale,](https://doi.org/10.1063/5.0005082) J. Chem. Phys. 152 (15) (2020) 154105. `[doi:10.1063/5.](https://doi.org/10.1063/5.0005082)`
`[0005082](https://doi.org/10.1063/5.0005082)` .
URL `[https://doi.org/10.1063/5.0005082](https://doi.org/10.1063/5.0005082)`
[12] L. Ercole, R. Bertossa, S. Bisacchi, S. Baroni, `SporTran` [: a code to estimate](https://github.com/lorisercole/sportran)
transport coefficients from the [cepstral](https://github.com/lorisercole/sportran) analysis of a multi-variate current
[stationary time series (2017–2020).](https://github.com/lorisercole/sportran)
URL `[https://github.com/lorisercole/sportran](https://github.com/lorisercole/sportran)`
18
[13] J. Kang, L.-W. Wang, First-principles Green-Kubo method for thermal con
ductivity calculations, Phys. Rev. B 96 (2) (2017) 20302. `[doi:10.1103/](https://doi.org/10.1103/PhysRevB.96.020302)`
`PhysRe` - `[B.96.020302](https://doi.org/10.1103/PhysRevB.96.020302)` .
[14] C. Carbogno, R. Ramprasad, M. Scheffler, Ab initio green-kubo approach
for the thermal conductivity of solids, Phys. Rev. Lett. 118 (2017) 175901.
`[doi:10.1103/PhysRe](https://doi.org/10.1103/PhysRevLett.118.175901)` - `Lett.118.175901` .
[15] J. P. Perdew, K. Burke, M. Ernzerhof, Generalized [gradient](https://link.aps.org/doi/10.1103/PhysRevLett.77.3865) approxima
tion [made](https://link.aps.org/doi/10.1103/PhysRevLett.77.3865) simple, Phys. Rev. Lett. 77 (1996) 3865–3868. `[doi:10.1103/](https://doi.org/10.1103/PhysRevLett.77.3865)`
`PhysRe` - `[Lett.77.3865](https://doi.org/10.1103/PhysRevLett.77.3865)` .
URL `[https://link.aps.org/doi/10.1103/PhysRe](https://link.aps.org/doi/10.1103/PhysRevLett.77.3865)` - `Lett.77.3865`
[16] M. Chen, H.-Y. Ko, R. C. Remsing, M. F. Calegari Andrade, B. Santra,
[Z. Sun, A. Selloni, R. Car, M. L. Klein, J. P. Perdew, X. Wu, Ab initio theory](https://www.pnas.org/content/114/41/10846)
and [modeling](https://www.pnas.org/content/114/41/10846) of water, Proceedings of the National Academy of Sciences
114 (41) (2017) 10846–10851. `[doi:10.1073/pnas.1712499114](https://doi.org/10.1073/pnas.1712499114)` .
URL `[https://www.pnas.org/content/114/41/10846](https://www.pnas.org/content/114/41/10846)`
[17] J. C. Grossman, E. Schwegler, E. W. Draeger, F. Gygi, G. Galli, Towards an
assessment of the accuracy of density functional theory for first principles
simulations of water, The Journal of Chemical Physics 120 (1) (2004) 300–
311. `[doi:10.1063/1.1630560](https://doi.org/10.1063/1.1630560)` .
[18] P. H.-L. Sit, N. Marzari, Static and dynamical [properties](https://doi.org/10.1063/1.1908913) of heavy water at
[ambient conditions from first-principles molecular dynamics, The Journal of](https://doi.org/10.1063/1.1908913)
Chemical Physics 122 (20) (2005) 204510. `arXi` - `[:https://doi.org/10.](http://arxiv.org/abs/https://doi.org/10.1063/1.1908913)`
`[1063/1.1908913](http://arxiv.org/abs/https://doi.org/10.1063/1.1908913)`, `[doi:10.1063/1.1908913](https://doi.org/10.1063/1.1908913)` .
URL `[https://doi.org/10.1063/1.1908913](https://doi.org/10.1063/1.1908913)`
[19] A. Marcolongo, L. Ercole, S. Baroni, Gauge Fixing for Heat-Transport
Simulations., JCTC 16 (5) (2020) 3352–3362. `[doi:10.1021/acs.jctc.](https://doi.org/10.1021/acs.jctc.9b01174)`
`[9b01174](https://doi.org/10.1021/acs.jctc.9b01174)` .
[20] F. Grasselli, L. Stixrude, S. Baroni, Heat and [charge](https://doi.org/10.1038/s41467-020-17275-5) transport in
H2O at ice-giant conditions from [ab](https://doi.org/10.1038/s41467-020-17275-5) initio molecular dynamics simu[lations,](https://doi.org/10.1038/s41467-020-17275-5) Nature Communications 11 (1) (2020) 3605. `[doi:10.1038/](https://doi.org/10.1038/s41467-020-17275-5)`
`[s41467-020-17275-5](https://doi.org/10.1038/s41467-020-17275-5)` .
URL `[https://doi.org/10.1038/s41467-020-17275-5](https://doi.org/10.1038/s41467-020-17275-5)`
19
[21] [F. Grasselli, L. Stixrude, S. Baroni, Heat and charge transport in h2o at ice-](https://archive.materialscloud.org/record/2020.73)
giant conditions from ab initio [molecular](https://archive.materialscloud.org/record/2020.73) dynamics simulations. `[doi:10.](https://doi.org/10.24435/materialscloud:hn-6f)`
`[24435/materialscloud:hn-6f](https://doi.org/10.24435/materialscloud:hn-6f)` .
URL `https://archi` - `[e.materialscloud.org/record/2020.73](https://archive.materialscloud.org/record/2020.73)`
[22] A. Marcolongo, Theory and ab initio [simulation](http://hdl.handle.net/20.500.11767/3897) of atomic heat transport,
Ph.D. thesis, Scuola Internazionale Superiore di Studi Avanzati, Trieste
(2014).
URL `[http://hdl.handle.net/20.500.11767/3897](http://hdl.handle.net/20.500.11767/3897)`
[23] [S. Baroni, S. de Gironcoli, A. Dal Corso, P. Giannozzi, Phonons and related](https://link.aps.org/doi/10.1103/RevModPhys.73.515)
crystal properties from [density-functional](https://link.aps.org/doi/10.1103/RevModPhys.73.515) perturbation theory, Rev. Mod.
Phys. 73 (2001) 515–562. `doi:10.1103/Re` [�](https://doi.org/10.1103/RevModPhys.73.515) `ModPhys.73.515` .
URL `[https://link.aps.org/doi/10.1103/Re](https://link.aps.org/doi/10.1103/RevModPhys.73.515)` - `ModPhys.73.515`
[24] R. Bertossa, F. Grasselli, L. Ercole, S. Baroni, Theory and Numerical
Simulation of Heat Transport in Multicomponent Systems, Phys. Rev.
Lett. 122 (25) (2019) 255901. `arXi` - `[:1808.03341](http://arxiv.org/abs/1808.03341)`, `[doi:10.1103/](https://doi.org/10.1103/PhysRevLett.122.255901)`
`PhysRe` - `[Lett.122.255901](https://doi.org/10.1103/PhysRevLett.122.255901)` .
[25] G. Grosso, G. Parravicini, Solid State Physics, Elsevier Science, 2000.
[26] D. J. Thouless, Quantization of [particle](https://link.aps.org/doi/10.1103/PhysRevB.27.6083) transport, Phys. Rev. B 27 (1983)
6083–6087. `[doi:10.1103/PhysRe](https://doi.org/10.1103/PhysRevB.27.6083)` - `B.27.6083` .
URL `[https://link.aps.org/doi/10.1103/PhysRe](https://link.aps.org/doi/10.1103/PhysRevB.27.6083)` - `B.27.6083`
[27] S. Baroni, S. de Gironcoli, A. Dal Corso, P. Giannozzi, Phonons and related
crystal properties from density-functional perturbation theory, Rev. Mod.
Phys. 73 (2001) 515–562. `doi:10.1103/Re` [�](https://doi.org/10.1103/RevModPhys.73.515) `ModPhys.73.515` .
[28] [Marconi, the tier-0 system, accessed:](https://www.hpc.cineca.it/hardware/marconi) 2021-04-09.
URL `[https://www.hpc.cineca.it/hardware/marconi](https://www.hpc.cineca.it/hardware/marconi)`
Appendix A. Notation
Notations and definitions used throughout the text :
- _e_ : electron charge ;
- _e_ <sup>0</sup> _s_ <sup>:</sup> <sup>ionic energy, equal to</sup> <sup><u>1</u></sup> 2 <sup>_Ms_</sup> <sup>�2</sup> _s_ <sup>+</sup> <sup>_ws_</sup> <sup>, where</sup> <sup>_ws_</sup> <sup>is the electrostatic energy.</sup>
20
- ϵ _XC_ : local XC energy per particle, defined by the relation: _EXC_ = - ϵ _XC_ [ _n_ ]( _r_ ) _n_ ( _r_ ) _d_ _r_ .
“LDA” and “GGA” in Eq. (8) indicate the local-density and generalizedgradient approximations to the XC energy functional ;
- ϵ� : electronic eigenvalues ;
- _f_ <sup>˜</sup> ( _G_ ) : Fourier transform of periodic functions. Given a function _f_ ( _r_ ) periodic with respect to the unit cell, the Fourier transform _f_ <sup>˜</sup> ( _G_ ), evaluated at
the reciprocal lattice vector _G_ is defined by the convention:
_f_ ˜( _G_ ) ≡ <sup><u>1</u></sup>
Ω
Ω
_f_ ( _r_ ) _e_ <sup>−</sup> <sup>_i_</sup> <sup>_G_</sup> <sup>·</sup> <sup>_r_</sup> _d_ _r_ ; (A.1)
- F [ _f_ ]( _G_ ) : Fourier transform of non periodic and localized functions. Given
a function _f_ ( _r_ ) smooth enough and localized (hence not periodic), its Fourier
transform is defined for every value of _G_ (hence not only for reciprocal lattice vectors), by the convention:
F [ _f_ ]( _G_ ) ≡ <sup><u>1</u></sup>
Ω
_R_ <sup>3</sup> <sup>_f_</sup> <sup>(</sup> <sup>_r_</sup> <sup>)</sup> <sup>_e_</sup> <sup>−</sup> <sup>_i_</sup> <sup>_G_</sup> <sup>·</sup> <sup>_r_</sup> <sup>_d_</sup> <sup>_r_</sup> <sup>,</sup> (A.2)
where a convenient normalization factor Ω has been introduced ;
- _H_ ˆ <sup>_KS_</sup> : instantaneous Kohn-Sham (KS) Hamiltonian ;
- _L_ : lattice vector, as defined by the unit cell ;
- _Ms_ : atomic mass of atomic _s_ ;
- _n_ ( _r_ ) : ground-state electron-density distribution, defined as _n_ ( _r_ ) = <sup>�</sup> - <sup>|φ</sup> - <sup>|2</sup>
;
- - <sup>_H_</sup> : Hartree potential, defined as:
- <sup>_H_</sup> ( _r_ ) =
_R_ <sup>3</sup>
_<u>e</u>_ <sup>2</sup> _<u>n</u>_ <u>(</u> _<u>r</u>_ <sup>′</sup> <u>)</u>
| _r_ - _r_ <sup>′</sup> | <sup>_d_</sup> <sup>_r_</sup> <sup>′.</sup> (A.3)
Note that if _n_ ( _r_ ) is periodic, also the Hartree potential is periodic;
- _r_ ˆ : multiplicative position operator or versor along direction pointed by
vector _r_ . The meaning should be clear from the context.
- ˆ - : unit versor along the direction of �
- �ˆ0 : ionic (pseudo-) potential acting on the electrons ;
21
- _ws_ : electrostatic energy, equal to _ws_ = <sup>_<u>e</u>_</sup> 2 <sup>2</sup> _t_ - _s_
- - _<u>ZtZs</u>_ - <u>1</u>
_ws_ : electrostatic energy, equal to _ws_ = <sup>_<u>e</u>_</sup> 2 <sup>2</sup> _t_ - _s_ _L_ | _R_ _s_ - _R_ _t_ - _L_ | <sup>+</sup> 2 <sup><u>1</u></sup> <sup>_e_</sup> <sup>2</sup> <sup>_Z_</sup> _s_ <sup>2</sup> _L_ �0 _L_
;
_L_
| _R_ _s_ - _<u>Z</u>_ _R_ _<u>tZst</u>_ - _L_ | <sup>+</sup> 2 <sup><u>1</u></sup>
2 <sup><u>1</u></sup> <sup>_e_</sup> <sup>2</sup> <sup>_Z_</sup> _s_ <sup>2</sup>
_L_ �0
- _Zs_ : atomic charge of atom _s_, expressed in units of the elementary electronic
charge ;
- φ, |φ⟩ : a generic normalized wave-function. With brackets, the same wavefunction is considered as a vector of a Hilbert space with a scalar product ⟨⟩
;
- Ω : volume of the unit cell ;
- _∂_ ϵ _GGA_ : derivative of the GGA XC local energy per particle with respect
to density gradients. It is a vector whose component along direction _i_ is
explicitly given by ∂ϵ _GGA_ /∂(∇ _ni_ ),
- ∇ : gradient with respect to the spatial coordinate _r_ ;
- ⟨⟩ : standard scalar product between wave-functions ;
- [ ] : <sup>˙</sup> derivative with respect to time ;
Appendix B. Numerical implementation of each current component
In the following appendix we will give an exhaustive and detailed description
of the implemented components of the MUB current.
_Appendix_ _B.1._ _Kohn-Sham current_
Starting from Eq. (4) and after some simple algebra [22] we end up with the
following expression for the Kohn-Sham current. For every Cartesian component,
_i_, one has:
- <sup>c</sup> <sup>_i_</sup> <sup>(</sup> <sup>_t_</sup> <sup>)</sup> ��� _H_ ˆ _KS_ + ϵ���� φ˙ c� <sup>(</sup> <sup>_t_</sup> <sup>)⟩,</sup> (B.1)
_Ji_ <sup>_KS_</sup> = R
_Ji_ <sup>_KS_</sup>
⟨φ <sup>¯</sup> - <sup>c</sup>
where
|φ <sup>¯</sup> - <sup>c</sup> <sup>_i_</sup> <sup>⟩≡</sup> <sup>_P_</sup> <sup>ˆ</sup> <sup>c</sup> <sup>_r_</sup> <sup>ˆ</sup> <sup>_i_</sup> <sup>|φ�⟩</sup> <sup>,</sup> (B.2)
|φ <sup>˙</sup> - <sup>c⟩, ≡</sup> <sup>_P_</sup> <sup>ˆ</sup> <sup>c ���φ˙</sup> <sup>�</sup> -, (B.3)
_P_ ˆ <sup>c</sup> ≡ 1 − _P_ ˆ <sup>v</sup> (B.4)
_P_ ˆ <sup>v</sup> ≡
|φ�⟩⟨φ�|, (B.5)
22
and _P_ <sup>ˆ</sup> <sup>v</sup> and _P_ <sup>ˆ</sup> <sup>c</sup> are the projectors over the occupied- (valence-) and empty- (conduction) state manifolds respectively. φ <sup>¯</sup> - <sup>c</sup> <sup>is calculated by solving the linear system:</sup>
( _H_ <sup>ˆ</sup> <sup>_KS_</sup> - ϵ� + α _P_ <sup>ˆ</sup> <sup>v</sup> ) ���φ¯ - c <sup>_i_</sup> - = _P_ ˆ c[ _H_ ˆ _KS_, ˆ _r i_ ] |φ�⟩, (B.6)
where [·, ·] indicates the commutator between quantum mechanical operators and
α is a positive constant that removes the singularity of the linear system and forces
the solution to be orthogonal to the valence manyfold, using standard techniques
from density-functional perturbation theory (DFPT) [23]. In order to avoid alignment problems between wave-functions at different time steps, φ <sup>˙</sup> - <sup>c</sup> <sup>is calculated by</sup>
moving the derivative to the projector [10, 22], using the relation:
- ���φ˙ - c ≡ _P_ <sup>ˆ</sup> <sup>c ��</sup> �φ <sup>˙</sup>
= _P_ <sup>ˆ</sup> <sup>c ˙ˆ</sup> _P_ <sup>v</sup> |φ�⟩,
(B.7)
which can be evaluated using a finite-difference scheme, as explained in detail in
Sec. 4, reading:
���φ˙ - c� = _P_ <sup>ˆ</sup> <sup>c ˙ˆ</sup> _P_ <sup>v</sup> |φ�⟩
∼ <sup><u>1</u></sup>
_dt_ <sup>(1 −</sup> <sup>_P_</sup> <sup>ˆ</sup> <sup>v(</sup> <sup>_t_</sup> <sup>))( ˆ</sup> <sup>_P_</sup> <sup>v(</sup> <sup>_t_</sup> <sup>+</sup> <sup>_dt_</sup> <sup>/2) −</sup> <sup>_P_</sup> <sup>ˆ</sup> <sup>v(</sup> <sup>_t_</sup> <sup>−</sup> <sup>_dt_</sup> <sup>/2)) |φ�(</sup> <sup>_t_</sup> <sup>)⟩</sup> <sup>,</sup>
(B.8)
where _dt_ is a time-discretization parameter, input of a `QEHeat` computation, which
is discussed in more detail in Section 4 and Appendix E. After evaluating Eq.
(B.8) and solving Eq. (B.6), the results can be inserted into (B.1). We note that
the computational cost to evaluate all the components of the MUB current is dominated by the solution of the linear system, Eq. (B.6).
_Appendix_ _B.2._ _Zero current_
The _Zero_ current _J_ <sup>0</sup>, Eq. (5), can be better treated by separating the local and
non-local contributions from the ionic pseudo-potential, ˆ�0. Each contribution acts
on a generic wave-function φ in the following way:
�ˆ <sup>0</sup> =
_s_ _L_
�ˆ <sup>_LOC_</sup> _s_ _L_
<sup>_LOC_</sup> _s_ _L_ <sup>+ ˆ�</sup> <sup>_NL_</sup> _s_ _L_
<sup>_NL_</sup> _s_ _L_ <sup>,</sup> (B.9)
⟨ _r_ |�ˆ <sup>_LOC_</sup> _s_ _L_
<sup>_LOC_</sup> _s_ _L_ <sup>|φ⟩</sup> <sup>=</sup> <sup>_f LOC_</sup> _s_
<sup>_LOC_</sup> _s_ (| _r_ - _R_ _s_ - _L_ |) φ( _r_ ), (B.10)
_lm_ <sup>_s_</sup> <sup>_L_</sup> <sup>|φ⟩,</sup> (B.11)
�ˆ <sup>_NL_</sup> _s_ _L_ <sup>|φ⟩</sup> <sup>=</sup>
_lm_
_Dl_ <sup>_s_</sup>
_l_ <sup>_s_</sup> <sup>|β</sup> _lm_ <sup>_s_</sup> <sup>_L_</sup>
_lm_ <sup>_s_</sup> <sup>_L_</sup> <sup>⟩⟨β</sup> _lm_ <sup>_s_</sup> <sup>_L_</sup>
23
where the total pseudopotential has been separated into atomic contributions and
into its local (LOC), long-tailed, and non-local (NL), short-range, components.
The subscripts in the expressions �ˆ <sup>_LOC_</sup> _s_ _L_ and �ˆ <sup>_NL_</sup> _s_ _L_ <sup>indicate</sup> <sup>that</sup> <sup>the</sup> <sup>corresponding</sup>
<sup>_LOC_</sup> _s_ _L_ and �ˆ <sup>_NL_</sup> _s_ _L_
The subscripts in the expressions �ˆ <sup>_LOC_</sup> _s_ _L_ and �ˆ <sup>_NL_</sup> _s_ _L_ <sup>indicate</sup> <sup>that</sup> <sup>the</sup> <sup>corresponding</sup>
ionic pseudo-potential is centered at the atomic position _R_ _s_ + _L_ . Note that the
atomic contributions �ˆ <sup>_LOC_</sup> _s_ _L_ <sup>/</sup> <sup>_NL_</sup>, when differentiated with respect to ionic positions,
atomic contributions �ˆ <sup>_LOC_</sup> _s_ _L_ <sup>/</sup> <sup>_NL_</sup>, when differentiated with respect to ionic positions,
only depend on the position of the atom located at _R_ _s_ + _L_ .
The local and nonlocal potentials provide two contributions to the Zero current, which we discuss individually in the next sections. For the local contribution, _fs_ <sup>_LOC_</sup> ( _r_ ) is the radial local pseudo-potential provided in the pseudo-potential
tion, _fs_ <sup>_LOC_</sup> ( _r_ ) is the radial local pseudo-potential provided in the pseudo-potential
datasets for each species. The centered beta functions β _lm_ <sup>_s_</sup> <sup>(</sup> <sup>_r_</sup> <sup>) (also called projec-</sup>
datasets for each species. The centered beta functions β _lm_ <sup>_s_</sup> <sup>(</sup> <sup>_r_</sup> <sup>) (also called projec-</sup>
tors) define the non-local component of the pseudo-potentials and are defined as
β _lm_ <sup>_s_</sup> <sup>(</sup> <sup>_r_</sup> <sup>)</sup> <sup>≡</sup> <sup>β</sup> _l_ <sup>_s_</sup> <sup>(</sup> <sup>_r_</sup> <sup>)</sup> <sup>_Ylm_</sup> <sup>( ˆ</sup> <sup>_r_</sup> <sup>),</sup> <sup>where</sup> <sup>_Ylm_</sup> <sup>are</sup> <sup>the</sup> <sup>real</sup> <sup>spherical</sup> <sup>harmonics</sup> <sup>with</sup> <sup>quantum</sup>
_lm_ <sup>_s_</sup> <sup>(</sup> <sup>_r_</sup> <sup>)</sup> <sup>≡</sup> <sup>β</sup> _l_ <sup>_s_</sup>
β _lm_ <sup>_s_</sup> <sup>(</sup> <sup>_r_</sup> <sup>)</sup> <sup>≡</sup> <sup>β</sup> _l_ <sup>_s_</sup> <sup>(</sup> <sup>_r_</sup> <sup>)</sup> <sup>_Ylm_</sup> <sup>( ˆ</sup> <sup>_r_</sup> <sup>),</sup> <sup>where</sup> <sup>_Ylm_</sup> <sup>are</sup> <sup>the</sup> <sup>real</sup> <sup>spherical</sup> <sup>harmonics</sup> <sup>with</sup> <sup>quantum</sup>
numbers _l_, _m_ and _r_ ˆ is the unit versor, not to be confused with the multiplicative
position operator. We denote the radial components of the beta functions with the
similar notation β _l_ <sup>_s_</sup> <sup>(</sup> <sup>_r_</sup> <sup>).</sup> <sup>These are the ones provided for each atomic species in the</sup>
similar notation β _l_ <sup>_s_</sup> <sup>(</sup> <sup>_r_</sup> <sup>).</sup> <sup>These are the ones provided for each atomic species in the</sup>
pseudo-potential datasets, alongside the constant _D_ matrix. At every time step,
the beta functions need to be centered on the instantaneous ionic positions and in
Eq. (B.11) we indicated the translated beta function for atom at position _R_ _s_ - _L_
with an apex. More explicitly :
⟨ _r_ |β _lm_ <sup>_s_</sup> <sup>_L_</sup>
_lm_ <sup>_s_</sup> <sup>(</sup> <sup>_r_</sup> <sup>−</sup> <sup>_R_</sup> <sup>_s_</sup> <sup>−</sup> <sup>_L_</sup> <sup>).</sup> (B.12)
_lm_ <sup>_s_</sup> <sup>_L_</sup> <sup>⟩≡</sup> <sup>β</sup> <sup>_s_</sup>
We fix some handy notation and define from a (real) localized function γ( _r_ ) ( _e.g._
a β function or the local pseudo-potential) its periodic counterpart as:
~~γ~~ <u>(</u> _r_ ) ≡
_L_
γ( _r_ - _L_ ), (B.13)
whose Fourier components can be computed as:
~~γ˜~~ <u>(</u> _G_ ) = F [γ]( _G_ ) ≡ <sup><u>1</u></sup>
Ω
R <sup>3 γ(</sup> <sup>_r_</sup> <sup>)</sup> <sup>_e_</sup> <sup>−</sup> <sup>_i_</sup> <sup>_G_</sup> <sup>·</sup> <sup>_r_</sup> <sup>_d_</sup> <sup>_r_</sup> <sup>,</sup> (B.14)
where we introduced the symbol F [γ]( _G_ ) to identify a standard Fourier transform over all the three dimensional space, here defined for localized functions.
In the following we use the notation ~~γ~~ <sup>_~~a~~_</sup> to indicate the translated and periodic
function built from its localized counterpart, analogously to the notation introduced for the projector. Note that the following relation is used in the code,
~~γ˜~~ _<u>a</u>_ ( _G_ ) = _e_ - _i_ _G_ - _a_ F [γ]( _G_ ), thanks to standard properties of the Fourier transform.
The remaining Fourier transforms are evaluated numerically by `QEHeat` whenever
needed, as explained below.
24
_Appendix_ _B.2.1._ _Zero current:_ _local contribution_
The local pseudo-potential of the _s_ -atom _fs_ <sup>_LOC_</sup> ( _r_ ) behaves as ∼− _Zse_ <sup>2</sup> / _r_ for
large _r_ . We call this local long-range contribution to the flux _J_ 0 <sup>_LR_</sup> <sup>:</sup>
The local pseudo-potential of the _s_ -atom _fs_ <sup>_LOC_</sup>
0 <sup>_LR_</sup> <sup>:</sup>
_V_ _s_ - ∇ _s_ _L_ _fs_ <sup>_LOC_</sup> (| _r_ ˆ - _R_ _s_ - _L_ |)
- _V_ _s_ - ∇ _s_ _L_ _fs_ <sup>_LOC_</sup>
. (B.15)
φ�
- ( _r_ ˆ - _R_ _s_ - _L_ )
����
����
_s_ _L_
- <sup>�</sup> ���φ�
_J_ 0 <sup>_LR_</sup> =
We use the chain rule and the definitions:
( _r_ - _L_ ) _i_ ( _r_ - _L_ ) _j_ ′ _LOC_
| _r_ - _L_ | _fs_ (| _r_ - _L_ |) (B.16)
_hij_ <sup>_s_</sup> <sup>(</sup> <sup>_r_</sup> <sup>) ≡</sup>
_L_
_j_ ∈{ _x_, _y_, _z_ }
_ui_ ( _r_ ) ≡−
_s_
_Vs jhi j_ <sup>_s_</sup> <sup>(</sup> <sup>_r_</sup> <sup>−</sup> <sup>_R_</sup> <sup>_s_</sup> <sup>),</sup> (B.17)
′ _LOC_
where _fs_ ( _r_ ) is the derivative of the local pseudo-potential. Note that both _h_ and
_u_ are periodic functions. The current can then be rewritten as:
_J_ 0 <sup>_LR_</sup>, _i_ <sup>=</sup>
Ω
_n_ ( _r_ ) _ui_ ( _r_ ) _d_ _r_
= Ω
_G_
_n_ ˜( _G_ )˜ _ui_ (− _G_ ), (B.18)
where:
_u_ ˜ _i_ ( _G_ ) = −
-
_s_ _j_ ∈{ _x_, _y_, _z_ }
_Vs jh_ <sup>˜</sup> _i j_ <sup>_s_</sup> <sup>(</sup> <sup>_G_</sup> <sup>)</sup> <sup>_e_</sup> <sup>−</sup> <sup>_i_</sup> <sup>_G_</sup> <sup>·</sup> <sup>_R_</sup> <sup>_s_</sup> <sup>.</sup> (B.19)
The reciprocal Fourier components of _hi j_ <sup>_s_</sup> <sup>(</sup> <sup>_r_</sup> <sup>) are computed through the follow-</sup>
ing procedure, which avoids an explicit numerical differentiation of the pseudopotential. One writes:
_L_
_L_
_s_ <sup>_LOC_</sup> (| _r_ - _L_ |)
_hij_ <sup>_s_</sup> <sup>(</sup> <sup>_r_</sup> <sup>) = ∂</sup> <sup>_j_</sup>
( _r_ - _L_ ) _i fs_ <sup>_LOC_</sup>
- δ _i j_
_fs_ <sup>_LOC_</sup> (| _r_ - _L_ |)
- _e_ <sup>_i_</sup> <sup>_G_</sup> <sup>·</sup> <sup>_r_</sup> . (B.20)
≡
_G_
- _h_ ˜ 1 _ij_, _s_ <sup>(</sup> <sup>_G_</sup> <sup>) + ˜</sup> <sup>_h_</sup> _i j_ <sup>2,</sup> <sup>_s_</sup> <sup>(</sup>
_i j_ <sup>2,</sup> <sup>_s_</sup> <sup>(</sup> <sup>_G_</sup> <sup>)</sup>
The resulting expressions of _h_ <sup>˜</sup> <sup>1</sup> ( _G_ ) and _h_ <sup>˜</sup> <sup>2</sup> ( _G_ ) can be evaluted using Eq. (B.14)
and the standard expansion of _e_ <sup>−</sup> <sup>_i_</sup> <sup>_G_</sup> <sup>·</sup> <sup>_r_</sup> into spherical harmonics and Bessel functions
_Jl_ :
_G_ <sup>2</sup> <sup>_G_</sup>
_h_ ˜ <sup>1</sup> _ij_ <sup>,</sup> <sup>_s_</sup> <sup>(</sup> <sup>_G_</sup> <sup>) =</sup>
0 for _G_ = 0
<u>4π</u> _GiG_ _j_ - ∞
Ω _G_ <sup>2</sup> <sup>_G_</sup> 0 _r_ <sup>3</sup> _fs_ <sup>_LOC_</sup> ( _r_ ) _J_ 1( _Gr_ ) _dr_ for _G_ - 0
(B.21)
_s_ <sup>_LOC_</sup> ( _r_ ) _J_ 1( _Gr_ ) _dr_ for _G_ - 0,
_GiG_ _j_
- ∞
_r_ <sup>3</sup> _fs_ <sup>_LOC_</sup>
0
25
where the _G_ = 0 component vanishes thanks to the presence of a derivative in the
definition of _h_ <sup>1</sup> . For _h_ <sup>2</sup> the situation is different:
- ∞
_r_ <sup>2</sup> _fs_ <sup>_LOC_</sup>
0
∞
_r_ <sup>2</sup> _fs_ <sup>_LOC_</sup>
0
<u>4π</u>
Ω
<u>4π</u>
Ω
−δ _ij_
_s_ <sup>_LOC_</sup> ( _r_ ) _dr_ for _G_ = 0
_h_ ˜ <sup>2</sup> _ij_ <sup>,</sup> <sup>_s_</sup> <sup>(</sup> <sup>_G_</sup> <sup>) =</sup>
−δ _ij_
- ∞
(B.22)
_s_ <sup>_LOC_</sup> ( _r_ ) _J_ 0( _Gr_ ) _dr_ for _G_ - 0
These expressions need still to be a bit elaborated before being evaluated by
`QEHeat` . In order to evaluate integrals of the localized functions, one needs to
add and subtract the asymptotic long-range tail of the local pseudo-potential. The
long-range part can be integrated analytically for any finite value of the Yukawa
screening parameter, µ, after plugging in the exact form of the spherical Bessel
functions. For _h_ 2, this permits to extract the divergent part in the _G_ = 0 contribution as well. The final results read:
<u>4π</u>
Ω
0 for _G_ = 0
_h_ ˜ <sup>1</sup> _i j_ <sup>,</sup> <sup>_s_</sup> <sup>(</sup> <sup>_G_</sup> <sup>) =</sup>
- _J_ 1( _Gr_ ) _dr_ - <sup><u>2</u></sup> <sup>_<u>e</u>_</sup> <sup>2</sup> <sup>_<u>Zs</u>_</sup>
_G_ <sup>3</sup>
_GiG_ _j_
_G_ <sup>2</sup> <sup>_G_</sup>
_r_
�� ∞
_r_ <sup>3</sup>
0
_fs_ <sup>_LOC_</sup>
_s_ <sup>_LOC_</sup> ( _r_ ) + <sup>_<u>e</u>_</sup> <sup>2</sup> <sup>_<u>Zs</u>_</sup>
for _G_ - 0
(B.23)
and
- _dr_ - <sup>_<u>e</u>_</sup> <sup>2</sup> <sup>_<u>Zs</u>_</sup>
µ <sup>2</sup>
�� ∞
_r_ <sup>2</sup>
0
�� ∞
_r_ <sup>2</sup>
0
_s_ <sup>_LOC_</sup> ( _r_ ) + <sup>_<u>e</u>_</sup> <sup>2</sup> <sup>_<u>Zs</u>_</sup>
_r_
−δ _ij_
_fs_ <sup>_LOC_</sup>
for _G_ = 0
_h_ ˜ <sup>2</sup> _ij_ <sup>,</sup> <sup>_s_</sup> <sup>(</sup> <sup>_G_</sup> <sup>) =</sup>
- _J_ 0( _Gr_ ) _dr_ - <sup>_<u>e</u>_</sup> <sup>2</sup> <sup>_<u>Zs</u>_</sup>
_G_ <sup>2</sup>
_r_
−δ _ij_
<u>4π</u>
Ω
<u>4π</u>
Ω
_fs_ <sup>_LOC_</sup>
_s_ <sup>_LOC_</sup> ( _r_ ) + <sup>_<u>e</u>_</sup> <sup>2</sup> <sup>_<u>Zs</u>_</sup>
- _J_ 0( _Gr_ ) _dr_ - <sup>_<u>e</u>_</sup> <sup>2</sup> <sup>_<u>Zs</u>_</sup>
for _G_ - 0
(B.24)
We note here again that only from _h_ 2 we get a Coulombian divergence when
µ → 0. Overall, the divergent part of the Zero current is equal to
_di_ <sup>0</sup> - <sup>= −</sup> <sup>_Ztote_</sup> <sup>2</sup> <sup><u>4π</u></sup>
µ <sup>2</sup>
_J_ <sup>0</sup>
µ <sup>2</sup> Ω
_s_
_V_ _sZs_, (B.25)
where _Ztot_ = <sup>�</sup> _s_ <sup>_Z_</sup> _s_ <sup>.</sup>
_Appendix_ _B.2.2._ _Zero current:_ _nonlocal contribution_
The non-local part is inherently short range and we call it _J_ 0 <sup>_S R_</sup> <sup>:</sup>
_s_ _L_
�������
φ�
-, (B.26)
������� φ�
_J_ 0 <sup>_S R_</sup> =
- _V_ _s_ - ∇ _s_ _L_ �ˆ <sup>_NL_</sup> _s_ _L_
( _r_ ˆ - _R_ _s_ - _L_ )
26
For a pair of two localized functions (γ1( _r_ ), γ2( _r_ )) we introduce the notation,
given a generic translation _a_ :
<sup>_~~a~~_</sup> 1 <sup>|φ�⟩⟨φ�|</sup> <sup>~~γ~~</sup> <sup>_a_</sup> 2 <sup>⟩</sup> <sup>=</sup> <sup><u>⟨</u></sup> <sup>~~γ~~</sup> <sup>_~~a~~_</sup> 1 <sup>| ˆ</sup> <sup>_P_</sup> <sup>�|</sup> <sup>~~γ~~</sup> <sup>_~~a~~_</sup> 2 <sup>⟩,</sup> (B.27)
A[γ1, γ2]( _a_ ) ≡
⟨ ~~γ~~ <sup>_~~a~~_</sup> 1 <sup>|</sup>
where we recall that ~~γ~~ <sup>_~~a~~_</sup> 1 <sup>and</sup> <sup>~~γ~~</sup> <sup>_~~a~~_</sup> 2 <sup>are the translated and periodic counterpart of lo-</sup>
calized functions. We note that, once the Fourier components of φ, ~~γ~~ 1 and ~~γ~~ 2
are known, evaluating A[γ1, γ2]( _a_ ) involves just scalar products between periodic functions and is straightforward. Using these expressions and expanding the
projector operator in their integral form, the current can be rewritten as:
_J_ 0 <sup>_S R_</sup>, _i_ <sup>=</sup>
_s_
_lm_
_j_ ∈{ _x_, _y_, _z_ }
_lm_ <sup>_s_</sup> <sup>](</sup> <sup>_R_</sup> <sup>_s_</sup> <sup>) + A[</sup> <sup>_ri_</sup> <sup>β</sup> <sup>_s_</sup>
_lm_ <sup>_s_</sup> <sup>](</sup> <sup>_R_</sup> <sup>_s_</sup> <sup>)</sup>
- .
_lm_ <sup>_s_</sup> <sup>, −∂</sup> <sup>_j_</sup> <sup>β</sup> <sup>_s_</sup>
_VsjDl_ <sup>_s_</sup>
�A[− _ri_ ∂ _j_ β <sup>_s_</sup>
_lm_ <sup>_s_</sup> <sup>, β</sup> <sup>_s_</sup>
(B.28)
In order to evaluate Eq. (B.28) via (B.27) the Fourier transforms of the following four localized functions are needed : β _lm_ ( _r_ ), _ri_ β _lm_ ( _r_ ), −∂ _i_ β _lm_ ( _r_ ), − _ri_ ∂ _j_ β _lm_ ( _r_ ),
where we dropped the atomic index _s_ . We need only to evaluate the first two
expressions thanks to the identities:
( _G_ ) = − _iG j_ F <sup>�</sup> γ <sup>�</sup> ( _G_ ) (B.29)
( _G_ ) = − _iG j_ F <sup>�</sup> _ri_ γ <sup>�</sup> ( _G_ ) + δ _i_, _j_ F <sup>�</sup> γ <sup>�</sup> ( _G_ ), (B.30)
F
�−∂ _j_ γ
F
�− _ri_ ∂ _j_ γ
which are valid for every localized function γ( _r_ ). We show how to evaluate the
Fourier transform of the second function, _ri_ β _lm_ ( _r_ ), for _i_ = _x_, which is the most
complex one. The procedure is similar for the remaining expressions. One starts
by replacing the factor _x_ using that _Y_ 11 ( ˆ _r_ ) = − 43π _rx_ <sup>(according to the convention</sup>
followed by Quantum ESPRESSO for the sign of the spherical harmonics). By
expanding _e_ <sup>−</sup> <sup>_i_</sup> <sup>_G_</sup> <sup>·</sup> <sup>_r_</sup> as well into spherical harmonics, one gets:
_l_ <sup>′</sup> _m_ <sup>′</sup>
F [ _x_ β _lm_ ]( _G_ ) = − <sup><u>4π</u></sup>
Ω
�4π
3
_Yl_ ′ _m_ ′
- _G_ ˆ ×
�(− _i_ ) <sup>_l_</sup> <sup>′ �</sup> <sup>∞</sup> _r_ <sup>3</sup> β _l_ ( _r_ ) _Jl_ ′( _Gr_ ) _dr_
0
��� _d_ ˆ _r_ _Yl_ ′ _m_ ′ ( ˆ _r_ ) _Ylm_ ( ˆ _r_ ) _Y_ 11 ( ˆ _r_ ), (B.31)
where _d_ ˆ _r_ indicates an integral over the solid angle, such that _d_ _r_ = _r_ <sup>2</sup> _d_ ˆ _r_ _dr_ . In
Quantum ESPRESSO the Clebsch-Gordan coefficients are stored in a array `ap`
defined as:
_YlmYl_ ′ _m_ ′ =
_LM_
`ap` <sup>�</sup> _L_, _M_, _l_, _m_, _l_ <sup>′</sup>, _m_ <sup>′�</sup> _YLM_ (B.32)
27
Application of this relation to the product _YlmY_ 11 allows us to simplify Eq. (B.31)
to the final form:
_LM_
F [ _x_ β _lm_ ]( _G_ ) = − <sup><u>4π</u></sup>
Ω
~~�~~ <u>4π</u>
3
- ∞
_r_ <sup>3</sup> β _l_ ( _r_ ) _JL_ ( _Gr_ ) _dr_
0
`ap` ( _L_, _M_, _l_, _m_, 1, 1) .
_YLM_
- <sup>�</sup>
- _G_ ˆ (− _i_ ) <sup>_L_</sup>
(B.33)
The remaining radial integral is performed numerically on a grid.
_Appendix_ _B.3._ _Ionic current_
The so-called Ionic flux, _J_ <sup>_n_</sup>, is the contribution to the total energy flux that
depends only on the ionic positions, _R_ _s_, and velocities, _V_ _s_ . First of all let’s take,
as reported in Appendix A, the definition of the ionic energy _e_ <sup>0</sup> _s_ <sup>=</sup> <sup><u>1</u></sup> 2 <sup>_MsV_</sup> _s_ <sup>2</sup> <sup>+</sup> <sup>_ws_</sup>
<sup>0</sup> _s_ <sup>=</sup> <sup><u>1</u></sup> 2
as reported in Appendix A, the definition of the ionic energy _e_ <sup>0</sup> _s_ <sup>=</sup> <sup><u>1</u></sup> 2 <sup>_MsV_</sup> _s_ <sup>2</sup> <sup>+</sup> <sup>_ws_</sup>
and the electrostatic energy:
_ws_ = <sup>_<u>e</u>_</sup> <sup>2</sup>
2
_t_ - _s_
_L_ �0
_L_
_<u>ZtZs</u>_
_s_
| _R_ _s_ - _R_ _t_ - _L_ | <sup>+</sup> 2 <sup><u>1</u></sup> <sup>_e_</sup> <sup>2</sup> <sup>_Z_</sup> <sup>2</sup>
<u>1</u>
_L_ <sup>,</sup> (B.34)
where _L_ = | _L_ |. We can separate the expression of the Ionic flux, Eq. (6), in
two terms: one depending only on the mass and velocity of the ions, an other
depending on _ws_ and its gradient.
_<u>R</u>_ _<u>s</u>_ - _<u>R</u>_ _<u>t</u>_ - _<u>L</u>_
∇ _t_ _L_ _ws_ = − <sup>_<u>e</u>_</sup> <sup>2</sup> (B.35)
2 <sup>_ZsZt_</sup> | _R_ _s_ - _R_ _t_ - _L_ | <sup>_f_</sup> <sup>′(|</sup> <sup>_R_</sup> <sup>_s_</sup> <sup>−</sup> <sup>_R_</sup> <sup>_t_</sup> <sup>−</sup> <sup>_L_</sup> <sup>|),</sup>
where ∇ _t_ _L_ is the shorthand notation for the gradient with respect to displacement
of the atom with position _R_ _t_ + _L_, introduced in Section 2. We, also, introduced _f_ ( _x_ ) = <u>1</u> _x_ <sup>to</sup> <sup>keep</sup> <sup>track</sup> <sup>of</sup> <sup>the</sup> <sup>Coulombian</sup> <sup>contributions</sup> <sup>when</sup> <sup>applying</sup>
the Yukawa screening.
For the sake of simplicity, let’s introduce the following four quantities:
_L_ - 0
_L_ - 0
_L_
_L_
_LiL_ _j_
| _L_ | <sup>_f_</sup> <sup>′(</sup> <sup>_L_</sup> <sup>),</sup> (B.36)
_f_ ( _L_ ), (B.37)
_f_ (| _R_ _s_ - _R_ _t_ - _L_ |), (B.38)
( _R_ _s_ - _R_ _t_ - _L_ ) _i_ ( _R_ _s_ - _R_ _t_ - _L_ ) _j_
_f_ <sup>′</sup> (| _R_ _s_ - _R_ _t_ - _L_ |), (B.39)
| _R_ _s_ - _R_ _t_ - _L_ |
28
_S_
_A_
_ij_ <sup>=</sup>
_S_ <sup>_B_</sup> =
_S_ <sup>_C_</sup> ( _R_ _s_ - _R_ _t_ ) =
_S_
_D_
_ij_ <sup>(</sup> <sup>_R_</sup> <sup>_s_</sup> <sup>−</sup> <sup>_R_</sup> <sup>_t_</sup> <sup>) =</sup>
where _i_, _j_ ∈{ _x_, _y_, _z_ } represent the Cartesian coordinates. Then, consider the following properties for the function _f_ ( _x_ ):
∂ _i f_ (| _x_ - _L_ |) = <sup><u>(</u></sup> <sup>_<u>x</u>_</sup> <sup>−</sup> <sup>_<u>L</u>_</sup> <sup><u>)</u></sup> <sup>_<u>i</u>_</sup> (B.40)
| _x_ - _L_ | <sup>_f_</sup> <sup>′(|</sup> <sup>_x_</sup> <sup>−</sup> <sup>_L_</sup> <sup>|),</sup>
<u>(</u> _<u>x</u>_ - _<u>L</u>_ <u>)</u> _<u>i</u>_ <u>(</u> _<u>x</u>_ - _<u>L</u>_ <u>)</u> _<u>j</u>_ _f_ <sup>′</sup> (| _x_ - _L_ |). The following relations be
| _x_ - _L_ |
and that _S_
_A_
_ij_ <sup>=</sup> <sup>lim</sup> <sup>_x_</sup> <sup>→0</sup> _L_ - 0
tween _S_
_A_ _D_
_ij_ <sup>,</sup> <sup>_S B_</sup> <sup>,</sup> <sup>_S C_</sup> <sup>(</sup> <sup>_R_</sup> <sup>_s_</sup> <sup>−</sup> <sup>_R_</sup> <sup>_t_</sup> <sup>) and</sup> <sup>_S_</sup> _i j_ <sup>(</sup> <sup>_R_</sup> <sup>_s_</sup> <sup>−</sup> <sup>_R_</sup> <sup>_t_</sup> <sup>) hold:</sup>
_L_ - 0
_S_
_A_
_ij_ <sup>= lim</sup>
_x_ →0
_A_
_ij_ <sup>= lim</sup>
∂ _x_ _j_
( _x_ - _L_ ) _i f_ (| _x_ - _L_ |)
- _S B_ δ _i j_
≡ _S_ _ij_ <sup>_A_</sup> <sup>−</sup> <sup>_S B_</sup> <sup>δ</sup> <sup>_i j_</sup> <sup>,</sup>
_L_
∂ _x_ _j_
( _x_ - _L_ ) _i f_ (| _x_ - _L_ |)
_x_ = _R_ _s_ - _R_ _t_
(B.41)
(B.42)
_S_
_D_
_ij_ <sup>(</sup> <sup>_R_</sup> <sup>_s_</sup> <sup>−</sup> <sup>_R_</sup> <sup>_t_</sup> <sup>) =</sup>
- _S_ <sup>_C_</sup> ( _R_ _s_ - _R_ _t_ )δ _i j_
≡ _S_ _ij_ <sup>_D_</sup> <sup>(</sup> <sup>_R_</sup> <sup>_s_</sup> <sup>−</sup> <sup>_R_</sup> <sup>_t_</sup> <sup>) −</sup> <sup>_S C_</sup> <sup>(</sup> <sup>_R_</sup> <sup>_s_</sup> <sup>−</sup> <sup>_R_</sup> <sup>_t_</sup> <sup>)δ</sup> <sup>_i j_</sup> <sup>,</sup>
Finally, by combining Eqs. (B.34) to (B.39), (B.41) and (B.42) into Eq. (6) we
can re-write _J_ <sup>_n_</sup> :
_J_ <sup>_n_</sup> = _J_ <sup>_nA_</sup> + _J_ <sup>_nB_</sup> + _J_ <sup>_nC_</sup> + _J_ <sup>_nD_</sup> (B.43)
_J_ <sup>_nA_</sup> = <sup><u>1</u></sup>
2
_s_
_V_ _sMsVs_ <sup>2</sup> (B.44)
_s_ <sup>2</sup> <sup>_e_</sup> <sup>2</sup> <sup>_S B_</sup> <sup>−</sup> <sup>_<u>e</u>_</sup> <sup>2</sup>
_j_ ∈ _x_, _y_, _z_
2
<sup>_A_</sup> _i j_ (B.45)
_Ji_ <sup>_nB_</sup> =
_J_ <sup>_nC_</sup> =
_s_
_s_
_VsiZs_ <sup>2</sup>
_ZtZse_ <sup>2</sup> _S_ <sup>_C_</sup> ( _R_ _s_ - _R_ _t_ ) _V_ _s_ (B.46)
_s_
_Vs jZs_ <sup>2</sup>
_s_ <sup>2</sup> <sup>_S A_</sup> _i j_
_t_ - _s_
_i_ <sup>_nD_</sup> = − <sup>_<u>e</u>_</sup> <sup>2</sup>
_Ji_ <sup>_nD_</sup>
2
_j_ ∈ _x_, _y_, _z_
_S_ _i j_ <sup>_D_</sup> <sup>(</sup> <sup>_R_</sup> <sup>_s_</sup> <sup>−</sup> <sup>_R_</sup> <sup>_t_</sup> <sup>)</sup> <sup>_Vt j_</sup> <sup>.</sup> (B.47)
_S_ _i j_ <sup>_D_</sup>
_t_ - _s_
_s_
_ZtZs_
Introducing the matrix _Tij_ = _S_ <sup>_B_</sup> δ _i j_ + _S_ _i j_ <sup>_A_</sup> <sup>, which only depends on the cell and not</sup>
on the individual atoms within it, we can rewrite Eq. (B.45) as a sum of terms that
depends only on the atomic species and the cell:
_i_ <sup>_nB_</sup> = <sup>_<u>e</u>_</sup> <sup>2</sup>
_S_
_Vt j_, (B.48)
_t_ ∈ _S_
_Ji_ <sup>_nB_</sup>
2
_Ti j_
_j_ ∈{ _x_, _y_, _z_ }
29
_ZS_ <sup>2</sup>
_ZS_ <sup>2</sup>
where <sup>�</sup> _S_ <sup>is</sup> <sup>a</sup> <sup>sum</sup> <sup>over</sup> <sup>the</sup> <sup>atomic</sup> <sup>species.</sup> <sup>Recent</sup> <sup>theoretical</sup> <sup>developments</sup> <sup>in</sup>
the statistical analysis of fluxes [5, 7, 8, 19, 24], and in particular the so called
_gauge_ [7] and _convective_ [24] _invariances_ tell us that fluxes written as sum of
terms that depends only on the atomic species do not contribute to the value of the
thermal transport coefficient. Thus, _J_ <sup>_nB_</sup> can be neglected in the computation of
_J_ <sup>_n_</sup>, reducing the implemented formula to:
_J_ <sup>_n_</sup> = _J_ <sup>_nA_</sup> + _J_ <sup>_nC_</sup> + _J_ <sup>_nD_</sup> . (B.49)
We still need to deal with the long-range Coulomb contributions in _J_ <sup>_nC_</sup>, _J_ <sup>_nD_</sup>
and _J_ <sup>_nB_</sup> . Following the scheme explained in Section 2 we introduce a Yukawa
screened interaction, <sup><u>1</u></sup> _x_ <sup>→</sup> <sup>_<u>e</u>_</sup> <sup>−</sup> _x_ <sup>µ</sup> <sup>_x_</sup> <sup>, and we will study the limit µ</sup> <sup>→</sup> <sup>0.</sup> <sup>We can, then,</sup>
<sup><u>1</u></sup> _x_ <sup>→</sup> <sup>_<u>e</u>_</sup> <sup>−</sup> _x_ <sup>µ</sup> <sup>_x_</sup>
screened interaction, <sup><u>1</u></sup> _x_ <sup>→</sup> <sup>_<u>e</u>_</sup> <sup>−</sup> _x_ <sup>µ</sup> <sup>_x_</sup> <sup>, and we will study the limit µ</sup> <sup>→</sup> <sup>0.</sup> <sup>We can, then,</sup>
straightforwardly apply the Ewald techniques [25], with a convergence parameter
η, for the computation of _S_ _ij_ <sup>_A_</sup> <sup>,</sup> <sup>_S B_</sup> <sup>,</sup> <sup>_S C_</sup> <sup>(</sup> <sup>_R_</sup> <sup>_s_</sup> <sup>−</sup> <sup>_R_</sup> <sup>_t_</sup> <sup>) and</sup> <sup>_S D_</sup> _i j_ <sup>(</sup> <sup>_R_</sup> <sup>_s_</sup> <sup>−</sup> <sup>_R_</sup> <sup>_t_</sup> <sup>).</sup> <sup>Further details</sup>
_ij_ <sup>_A_</sup> <sup>,</sup> <sup>_S B_</sup> <sup>,</sup> <sup>_S C_</sup> <sup>(</sup> <sup>_R_</sup> <sup>_s_</sup> <sup>−</sup> <sup>_R_</sup> <sup>_t_</sup> <sup>) and</sup> <sup>_S D_</sup> _i j_
<sup>_D_</sup> _i j_ <sup>(</sup> <sup>_R_</sup> <sup>_s_</sup> <sup>−</sup> <sup>_R_</sup> <sup>_t_</sup> <sup>).</sup> <sup>Further details</sup>
30
of the computation can be found in Appendix C:
- _f_ ( _L_ )erfc( <sup>√</sup> <u>η</u> _L_ ) + 2 - πη <sup>_e_</sup> <sup>−η</sup> <sup>_L_</sup> <sup>2�</sup>
_LiL_ _j_
_L_ <sup>2</sup>
_S_ _ij_ <sup>_A_</sup> <sup>= −</sup>
_L_ - 0
- 2δ _i j_
- <u>η</u>
π
�2 + <sup>_<u>G</u>_</sup> <sup>2</sup>
2η
_GiG_ _j_
_G_ <sup>2</sup>
exp( <sup><u>−</u></sup> <sup>_<u>G</u>_</sup> <sup>2</sup>
4η <sup>)</sup>
_G_ <sup>2</sup>
,
<u>4π</u>
Ω
_f_ ( _L_ )erfc( <sup>~~√~~</sup> <u>η</u> _L_ ) +
_G_ - 0
+ δ _ij_
_L_ - 0
(B.50)
_G_ - 0
Ω
,
_S_ <sup>_B_</sup> =
_S_ <sup>_C_</sup> ( _R_ _s_ - _R_ _t_ ) =
_S_ _i j_ <sup>_D_</sup> <sup>(</sup> <sup>_R_</sup> <sup>_s_</sup> <sup>−</sup> <sup>_R_</sup> <sup>_t_</sup> <sup>) =</sup>
_L_ - 0
_L_
_L_
4η
_<u>e</u>_ <sup>−</sup> <sup>_<u>G</u>_</sup> <sup>2</sup>
4η
<sup>−</sup> <sup>_<u>G</u>_</sup> <sup>2</sup>
_G_ <sup>2</sup> <sup>+</sup> <sup><u>4</u></sup> Ω <sup><u>π</u></sup>
4η
_f_ ( _L_ )erfc( <sup>√</sup> <u>η</u> _L_ ) − 2 - πη <sup>+</sup> <sup><u>4</u></sup> Ω <sup><u>π</u></sup>
�µ1 <sup>2</sup> <sup>−</sup> 4 <sup><u>1</u></sup> η
(B.51)
_f_ (| _R_ _s_ - _R_ _t_ - _L_ |)erfc( <sup>√</sup> <u>η|</u> _R_ _s_ - _R_ _t_ - _L_ |)+
<u>4π</u>
Ω
_G_ - 0
Ω
- µ1 <sup>2</sup> <sup>−</sup> 4 <sup><u>1</u></sup> η
,
<u>−</u> _<u>G</u>_ <sup>2</sup>
4η
_<u>e</u>_
4η
_G_ <sup>2</sup> <sup>_ei_</sup> <sup>_G_</sup> <sup>(</sup> <sup>_R_</sup> <sup>_s_</sup> <sup>−</sup> <sup>_R_</sup> <sup>_t_</sup> <sup>) +</sup> <sup><u>4</u></sup> Ω <sup><u>π</u></sup>
- ~~√~~ <u>η</u> _<u>h</u>_ ( ~~√~~ <u>η|</u> _R_ _s_ - _R_ _t_ - _L_ |)δ _i j_ +
(B.52)
+
η _h_ <sup>′</sup> ( <sup>~~√~~</sup> <u>η|</u> _R_ _s_ - _R_ _t_ - _L_ |) <sup>(</sup> <sup>_R_</sup> <sup>_s_</sup> <sup>−</sup> <sup>_R_</sup> <sup>_t_</sup> <sup>−</sup> <sup>_L_</sup> <sup>)</sup> <sup>_i_</sup> <sup>(</sup> <sup>_R_</sup> <sup>_s_</sup> <sup>−</sup> <sup>_R_</sup> <sup>_t_</sup> <sup>−</sup> <sup>_L_</sup> <sup>)</sup> <sup>_j_</sup>
| _R_ _s_ - _R_ _t_ - _L_ |
η _h_ <sup>′</sup> ( <sup>~~√~~</sup> <u>η|</u> _R_ _s_ - _R_ _t_ - _L_ |) <sup>(</sup> <sup>_R_</sup> <sup>_s_</sup> <sup>−</sup> <sup>_R_</sup> <sup>_t_</sup> <sup>−</sup> <sup>_L_</sup> <sup>)</sup> <sup>_i_</sup> <sup>(</sup> <sup>_R_</sup> <sup>_s_</sup> <sup>−</sup> <sup>_R_</sup> <sup>_t_</sup> <sup>−</sup> <sup>_L_</sup> <sup>)</sup> <sup>_j_</sup>
�2 + <sup>_<u>G</u>_</sup> <sup>2</sup>
2η
_GiG_ _j_
_G_ <sup>2</sup>
4η
_<u>e</u>_ <sup>−</sup> <sup>_<u>G</u>_</sup> <sup>2</sup>
_G_ <sup>2</sup>
,
+
_G_ - 0
_e_ <sup>_i_</sup> <sup>_G_</sup> <sup>(</sup> <sup>_R_</sup> <sup>_s_</sup> <sup>−</sup> <sup>_R_</sup> <sup>_t_</sup> <sup>)</sup> <sup><u>4π</u></sup>
Ω
(B.53)
where erfc( _x_ ) = 1 − erf( _x_ ), erf( _x_ ) is the error function [25], and _h_ ( _x_ ) = <u>erfc(</u> _<u>x</u>_ <u>).</u>
_x_
Since Eqs. (B.50) and (B.53) do not diverge in µ, the divergent parts of the Ionic
31
flux are given only by Eqs. (B.51) and (B.52):
_di_ <sup>_nB_</sup> - <sup>=</sup> <sup>_e_</sup> <sup>2</sup> <sup><u>4π</u></sup>
Ωµ
_t_ - _s_
_J_ _di_ <sup>_nB_</sup>
Ωµ <sup>2</sup>
_V_ _sZs_ <sup>2,</sup> (B.54)
_di_ <sup>_nC_</sup> - <sup>=</sup> <sup>_e_</sup> <sup>2</sup> <sup><u>4π</u></sup>
µ <sup>2</sup>
_J_ _di_ <sup>_nC_</sup>
µ <sup>2</sup> Ω
_s_
_s_
_J_ _di_ <sup>_n_</sup>
_di_ <sup>_n_</sup> - <sup>=</sup> <sup>_J_</sup> <sup>_nB_</sup> _di_
<sup>_nB_</sup> _di_ - <sup>+</sup> <sup>_J_</sup> <sup>_nC_</sup> _di_
<sup>_nC_</sup> _di_ - <sup>,</sup>
= _Ztote_ <sup>2</sup> <sup><u>4π</u></sup>
µ <sup>2</sup> Ω
_s_
_ZsZt_ _V_ _s_, (B.55)
_Zs_ _V_ _s_ . (B.56)
_Appendix_ _B.4._ _Hartree and Exchange-correlation currents_
A finite-difference scheme, explained in detail in section 4, can be directly
implemented to evaluate the scalar fields �˙ <sup>_H_</sup> ( _r_ ) and _n_ ˙( _r_ ), which are needed to
evaluate _J_ <sup>_H_</sup> and _J_ <sup>_XC_</sup> . For the Hartree current, the gradient _∇_ - _H_ ( _r_ ) is needed as
well. Since the gradient operator in reciprocal space is multiplicative, this suggests
to rewrite the entire expression in reciprocal space:
_J_ <sup>_H_</sup> = − _i_ <sup><u>Ω</u></sup>
�˙ <sup>_H_</sup> ( _G_ )� <sup>_H_</sup> (− _G_ ) _G_, (B.57)
<sup><u>Ω</u></sup>
4π _e_ <sup>2</sup>
_G_
which is the equation actually implemented. Analogously, for _J_ <sup>_XC_</sup> the gradient
_∇_ _n_ ( _r_ ) is first computed in reciprocal space and then Fourier transformed onto
the real grid. In the PBE case, ϵ _GGA_ has an explicit analytical expression as a
function of _n_ and | _∇_ _n_ |. The analytic expression of the derivative ∂ϵ _GGA_ /∂( _∇_ _n_ ) is
cumbersome but can be straightforwardly derived from the latter. The resulting
expression is then evaluated at the local values of _n_ ( _r_ _i_ ) and _∇_ _n_ ( _r_ _s_ ) for each point
_r_ _s_ of the grid in real space. Finally, contributions from all grid points are summed
up.
_Appendix_ _B.5._ _Electronic density current_
As a by-product of the computation of the adiabatic energy flux, `QEHeat` also
evaluates the adiabatic electron-number flux by implementing Thouless’ expression [26] and using DFPT [27]. To this end, by leveraging the continuity equation,
one first formally expresses the number flux as the first moment of the time deriva
32
tive of the electron number density, to obtain for every Cartesian component _i_ :
_J_ _i_ <sup>_el_</sup> <sup>=</sup>
=
_n_ ˙( _r_ ) _rid_ _r_
�φ�| _r_ ˆ _i_ |φ <sup>˙</sup> �� +
�φ˙ �| _r_ ˆ _i_ |φ��
= 2
�φ¯ - c <sup>_i_</sup> <sup>|φ˙</sup> - <sup>c</sup> - . (B.58)
All quantities needed to evaluate the Electronic density current have already been
discussed in the section dedicated to the Kohn-Sham current. The electronic flux
thus evaluated is interesting _per_ _se_, _e.g._ to compute the electric conductivity in
ionic conductors, and also as an ingredient to facilitate the statistical analysis
of the energy-flux time series, using _multi-component_ [24] or _decorrelation_ [19]
techniques.
_Appendix_ _B.6._ _Center-of-mass ionic current and Charge current_
The code outputs a trivial but useful current defined for each atomic species as
_J_ _S_ <sup>_CM_</sup> =
_t_ ∈ _S_
_V_ _t_, (B.59)
where _S_ is the atomic species index. The sum is over all atoms of kind _S_ . This
current can be used both for data analysis or for computing the Charge current
together with Eq. (B.58):
_J_ <sup>_Q_</sup> = − _e_ _J_ <sup>_el_</sup> +
_t_
_ZS_ _J_ _S_ <sup>_CM_</sup> (B.60)
- _teZt_ = − _e_ _J_ <sup>_el_</sup> + _e_
_S_
where _eZS_ is the pseudo-potential charge of the atom of species _S_, and _J_ <sup>_el_</sup> is the
Electronic density current computed by the code, defined in Eq. (B.58).
_Appendix_ _B.7._ _Divergences_
In this section, we discuss the divergences arisen in the computations of Ewald
sums in Appendices Appendix B.2.1 and Appendix B.3. First of all, we note that
_J_ _di_ <sup>0</sup> - <sup>+</sup> <sup>_J_</sup> <sup>_n_</sup> _di_ - <sup>=</sup> <sup>0, showing that the expression for the total MUB flux is free of any</sup>
_di_ <sup>0</sup> - <sup>+</sup> <sup>_J_</sup> <sup>_n_</sup> _di_
_J_ _di_ <sup>0</sup> - <sup>+</sup> <sup>_J_</sup> <sup>_n_</sup> _di_ - <sup>=</sup> <sup>0, showing that the expression for the total MUB flux is free of any</sup>
divergent term, as we already stated in Section 2. We highlight that any divergent
term, being _J_ _di_ <sup>0</sup> - <sup>,</sup> <sup>_J_</sup> <sup>_nB_</sup> _di_ - <sup>or</sup> <sup>_J_</sup> <sup>_nC_</sup> _di_ - <sup>, it can be written as a sum of terms depending only</sup>
<sup>_nB_</sup> _di_ - <sup>or</sup> <sup>_J_</sup> <sup>_nC_</sup> _di_
_di_ <sup>0</sup> - <sup>,</sup> <sup>_J_</sup> <sup>_nB_</sup> _di_
term, being _J_ _di_ <sup>0</sup> - <sup>,</sup> <sup>_J_</sup> <sup>_nB_</sup> _di_ - <sup>or</sup> <sup>_J_</sup> <sup>_nC_</sup> _di_ - <sup>, it can be written as a sum of terms depending only</sup>
on the atomic species, precisely as _J_ _di_ <sup>_nB_</sup> - <sup>.</sup> <sup>Thus, invoking the same</sup> <sup>_invariance prin-_</sup>
on the atomic species, precisely as _J_ _di_ <sup>_nB_</sup> - <sup>.</sup> <sup>Thus, invoking the same</sup> <sup>_invariance prin-_</sup>
_ciples_ that allowed us to neglect _J_ _di_ <sup>_nB_</sup> - <sup>, we can state that any divergent contribution</sup>
_ciples_ that allowed us to neglect _J_ _di_ <sup>_nB_</sup> - <sup>, we can state that any divergent contribution</sup>
is non diffusive and would not contribute to the transport coefficient.
33
Appendix C. Reciprocal space computation of the _Si j_ <sup>_A_</sup> <sup>and</sup> <sup>_SB_</sup>
In the following appendix we show explicitly the computation of _S_ _i j_ <sup>_A_</sup> <sup>,</sup> <sup>_S B_</sup> <sup>.</sup> <sup>_S C_</sup>
and _S_ _ij_ <sup>_D_</sup> <sup>can</sup> <sup>be</sup> <sup>computed</sup> <sup>applying</sup> <sup>more</sup> <sup>straightforwardly</sup> <sup>standard</sup> <sup>Ewald</sup> <sup>tech-</sup>
niques [25], then the full derivation is left to reader.
Recalling the definition of _S_ _i j_ <sup>_A_</sup> <sup>from Eq. (B.41):</sup>
_S_ _ij_ <sup>_A_</sup>
<sup>lim</sup> _x_ →0 <sup>∂</sup> <sup>_x_</sup> <sup>_j_</sup>
_ij_ <sup>_A_</sup> <sup>= lim</sup> _x_ →0
( _x_ - _L_ ) _i f_ (| _x_ - _L_ |)
_L_ - 0
erf( <sup>√</sup> <u>η|</u> _x_ - _L_ ) + erfc( <sup>~~√~~</sup> <u>η|</u> _x_ - _L_ )
(C.1)
= lim _x_ →0 <sup>∂</sup> <sup>_x_</sup> <sup>_j_</sup>
_L_ - 0
( _x_ - _L_ ) _i f_ (| _x_ - _L_ |)
�.
The term containing erfc( <sup>√</sup> <u>η|</u> _x_ - _L_ |) can be simply computed in real space:
�erfc( √η _L_ )
+ 2
_L_
~~�~~ πη <sup>_e_</sup> <sup>−η</sup> <sup>_L_</sup> <sup>2�</sup>
_LiL_ _j_
_L_ <sup>2</sup>
+
lim _x_ →0 <sup>∂</sup> <sup>_x_</sup> <sup>_j_</sup>
_L_ - 0
( _x_ - _L_ ) _i f_ (| _x_ - _L_ |)erfc( <sup>~~√~~</sup> <u>η|</u> _x_ - _L_ |) = −
_L_ - 0
erfc( <sup>~~√~~</sup> <u>η</u> _L_ )
,
_L_
+ δ _i j_
_L_ - 0
(C.2)
while:
lim _x_ →0 <sup>∂</sup> <sup>_x_</sup> <sup>_j_</sup>
( _x_ - _L_ ) _i f_ (| _x_ - _L_ |)erf( <sup>~~√~~</sup> <u>η|</u> _x_ - _L_ |) =
_L_ - 0
- _xi_ erf( ~~√~~ <u>η</u> _x_ ) _f_ ( _x_ )� . (C.3)
lim
_x_ →0 <sup>∂</sup> <sup>_x_</sup> <sup>_j_</sup>
lim _x_ →0 <sup>∂</sup> <sup>_x_</sup> <sup>_j_</sup>
_L_
( _x_ - _L_ ) _i f_ (| _x_ - _L_ |)erf( <sup>~~√~~</sup> <u>η|</u> _x_ - _L_ |) − lim
_x_ →0
The first term of Eq. (C.3) can be easily computed in reciprocal space, while
_xier f_ ( <sup>√</sup> <u>η</u> _x_ ) _f_ ( _x_ )
- - ~~�~~ <u>η</u>
it can be demonstrated that lim _x_ →0 ∂ _x_ _j_ _xier f_ ( <sup>√</sup> <u>η</u> _x_ ) _f_ ( _x_ ) = 2δ _i j_ π <sup>.</sup> <sup>Summing all</sup>
these pieces together we get the expression in Eq. (B.50):
it can be demonstrated that lim _x_ →0 ∂ _x_ _j_
- = 2δ _i j_
�erfc( ~~√~~ <u>η</u> _L_ )
+ 2
_L_
�πη <sup>_e_</sup> <sup>−η</sup> <sup>_L_</sup> <sup>2�</sup>
_S_ _ij_ <sup>_A_</sup> <sup>= −</sup>
- _LiL_ _j_
_L_ <sup>2</sup>
_L_ - 0
- 2δ _i j_
- <u>η</u>
π
�2 + <sup>_<u>G</u>_</sup> <sup>2</sup>
2η
_G_ - 0
_GiG_ _j_
_G_ <sup>2</sup>
exp( <sup><u>−</u></sup> <sup>_<u>G</u>_</sup> <sup>2</sup>
4η <sup>)</sup>
_G_ <sup>2</sup>
. (C.4)
erfc( <sup>√</sup> <u>η</u> _L_ )
+
_L_
<u>4π</u>
Ω
+ δ _ij_
_L_ - 0
34
_S_ <sup>_B_</sup> is, instead, defined as:
_S_ <sup>_B_</sup> =
_L_ - 0
_f_ ( _L_ ), (C.5)
introducing a functional dependence on _x_ :
_S_ <sup>_B_</sup> = lim
_x_ →0
_L_ - 0
_L_ - 0
_f_ (| _x_ - _L_ |) =
_f_ (| _x_ - _L_ |)erfc( <sup>~~√~~</sup> <u>η|</u> _x_ - _L_ |).
= lim
_x_ →0
_f_ (| _x_ - _L_ |)erf( <sup>~~√~~</sup> <u>η|</u> _x_ - _L_ |) + lim
_x_ →0
_L_ - 0
(C.6)
The second expression can be computed in direct space as it is, while the first
requires some further work:
_f_ (| _x_ - _L_ |)erf( <sup>~~√~~</sup> <u>η|</u> _x_ - _L_ |) = lim
_x_ →0
_L_
_L_
_f_ (| _x_ - _L_ |)erf( <sup>~~√~~</sup> <u>η|</u> _x_ - _L_ |) − lim _x_ →0 <sup>_f_</sup> <sup>(</sup> <sup>_x_</sup> <sup>)erf(</sup> <sup>~~√~~</sup> <sup><u>η</u></sup> <sup>_x_</sup> <sup>)</sup>
lim
_x_ →0
_L_ - 0
- <u>η</u>
π <sup>.</sup>
(C.7)
= lim
_x_ →0
_f_ (| _x_ - _L_ |)erf( <sup>~~√~~</sup> <u>η|</u> _x_ - _L_ |) − 2
Now the first term of Eq. (C.7) can be computed in reciprocal space, thus, summing all the contributions, we can regain the expression in Eq. (B.51) for _S_ <sup>_B_</sup> :
_G_ - 0
Ω
. (C.8)
~~�~~ πη <sup>+</sup> <sup><u>4</u></sup> Ω <sup><u>π</u></sup>
_S_ <sup>_B_</sup> =
_L_ - 0
_f_ ( _L_ )erfc( <sup>~~√~~</sup> <u>η</u> _L_ ) − 2
exp( <sup><u>−</u></sup> <sup>_<u>G</u>_</sup> <sup>2</sup>
4η
<sup><u>−</u></sup> <sup>_<u>G</u>_</sup> <sup>2</sup>
4η <sup>)</sup> + <sup><u>4π</u></sup>
_G_ <sup>2</sup> Ω
<sup><u>−</u></sup> <sup>_<u>G</u>_</sup> <sup>2</sup>
4η <sup>)</sup>
- µ1 <sup>2</sup> <sup>−</sup> 4 <sup><u>1</u></sup> η
Finally we remark that the two terms computed in this Appendix are general and
work for generic cells. However, since _J_ <sup>_nB_</sup> does not contribute to the value of
thermal transport coefficient, up to the present version of `QEHeat` we only implemented the simpler expression for cubic cells:
_J_ <sup>_nB_</sup> =
_s_
_s_
_s_ <sup>2</sup> <sup>_e_</sup> <sup>2(</sup> <sup>_S B_</sup> <sup>−</sup> <sup><u>1</u></sup>
2
_V_ _sZs_ <sup>2</sup>
<sup><u>1</u></sup>
2 <sup>_S A_</sup> <sup>) =</sup>
<u>2</u>
3
,
_L_ - 0
3
_f_ ( _L_ ) _er fc_ ( <sup>√</sup> <u>η</u> _L_ ) + <sup><u>8π</u></sup>
3Ω
35
_G_ - 0
exp( <sup><u>−</u></sup> <sup>_<u>G</u>_</sup> <sup>2</sup>
4η
<sup><u>−</u></sup> <sup>_<u>G</u>_</sup> <sup>2</sup>
4η <sup>)</sup>
- <sup><u>4</u></sup>
_G_ <sup>2</sup> 3
<sup>_<u>G</u>_</sup> <sup>2</sup>
4η <sup>)</sup>
_V_ _sZs_ <sup>2</sup> <sup>_e_</sup> <sup>2</sup>
�πη <sup>−</sup> 3 <sup><u>2</u></sup> η <sup><u>π</u></sup> Ω <sup>+</sup> Ω <sup><u>4</u></sup> µ <sup><u>π2</u></sup>
(C.9)
where we defined:
_S_ <sup>_A_</sup> ≡ <sup><u>1</u></sup> 3 <sup>Tr[</sup> <sup>_S A_</sup> _i j_ <sup>],</sup> (C.10)
Tr[·] indicating the trace of a matrix. The following identity can be used to recover
the formula for cubic systems from the general one:
Ω <sup>~~√~~</sup> <u>η</u> <sup><u>3</u></sup>
~~√~~
<u>π</u> <sup>3</sup>
_L_
_e_ <sup>−η</sup> <sup>_L_</sup> <sup>2</sup> =
�− _<u>G</u>_ 2
4η
(C.11)
_G_
exp
Appendix D. Implementation check of individual currents
As discussed in the text, in the case of a finite system at equilibrium translating
at constant speed �, the current _J_ <sup>_MUB_</sup> must be equal to _E_ <sup>_tot_</sup> × �. In Fig. D.4
we report the modulus of _J_ <sup>_MUB_</sup> - _E_ <sup>_tot_</sup> �, normalized by the module of _E_ <sup>_tot_</sup> - and
indicated with REF ~~E~~ RROR. In order to check the correct implementation of each
individual current, we also report values of ∆ _X_, which represent the same quantity
after the substitution _J_ <sup>_MUB_</sup> → _J_ <sup>_MUB_</sup> - _J_ <sup>_X_</sup>, _X_ ∈{XC, IONIC, ZERO, KOHN}.
If the current _X_ is correctly computed, the error with respect to the reference
value _E_ <sup>_tot_</sup> - should increase, as is indeed observed. For Argon, we used the QE
parameters ecut = 160 _Ry_ and econv = 10 <sup>−16</sup> _Ry_ . For water ecut = 120 _Ry_,
econv = 10 <sup>−14</sup> _Ry_ . We used a cubic simulation cell of 20 and 30Å for Argon and
water respectively.
Appendix E. Numerical stability of `QEHeat`
In the following appendix we show the stability and convergence properties of
a `QEHeat` calculation on a snapshot of 125 water molecules.
Fig. E.5 reports a scaled version of the three Cartesian components of the
MUB energy flux _Ji_ ( _dt_ ), _i_ ∈{ _x_, _z_, _y_ }, as a function of the time-discretization parameter _dt_ . The _x_ −axis is in units of the Car-Parinello MD simulation timestep,
indicated with ∆ _t_ . For each Cartesian coordinate, the behaviour of the error
( _Ji_ ( _dt_ ) − _J_ REF, _i_ )/ _J_ REF, considering a reference and scale values, is reported, thus
showing possible non-linear contributions due to the choice of a large _dt_ . The
reference value _J_ REF, _i_ is evaluated for each coordinate at the smallest value of _dt_
available and _JREF_ = | _J_ REF|.
Fig. E.5 shows the presence of small non-linear effects for higher values of
_dt_, and that, at least for the presented system, nonlinear effects do not take off
36
10 <sup>0</sup>
10 1
10 2
10 3
Ar
H2O
<u>REF_ERROR</u> XC IONIC ZERO KOHN
Figure D.4: In the case of a finite system at equilibrium translating at constant speed �, the current
_J_ <sup>_MUB_</sup> must be equal to _J_ <sup>_theory_</sup> ≡ _E_ <sup>_tot_</sup> × �. We report in the picture on the leftmost histogram
REF ~~E~~ RROR = | _J_ <sup>_MUB_</sup> - _J_ <sup>_theory_</sup> |/| _J_ <sup>_theory_</sup> | in the case of an Argon atom and a water molecule
translating at constant speed. Ideally REF ~~E~~ RROR should be identically zero, but for numerical reasons it can be just a small value. To check that REF ~~E~~ RROR is indeed small and at the
same time to validate the correct implementation of each individual current, ∆ _X_ represents the
same quantity after the substitution, in the numerator of the fraction, _J_ <sup>_MUB_</sup> → _J_ <sup>_MUB_</sup> - _J_ <sup>_X_</sup>, _X_ ∈
{XC, IONIC, ZERO, KOHN}. Since removing a current component increases the error w.r.t. the
expected value significantly, this proves the correct implementation of each individual current. See
text for the parameters used in the computations.
37
substantially up to _dt_ = 2∆ _t_ . At this value of _dt_, even reducing it by a factor of
10 would change the component of the current by less than 0.001%, a negligible
error given that a typical value of the thermal transport coefficient has an accuracy
of 10% [20, 22, 24]. Moreover _dt_ = 2∆ _t_ would be beneficial in an on-the-fly
computation, allowing to reuse the same wavefunctions computed in the MD simulation, neglecting the need for the recomputation of the scf cycles. The errorbars
in the figure are computed using the testing feature, provided with `QEHeat`, presented in Section 5 and averaging 20 fluxes obtained from different initial random
wave-functions.
4 10 5
3 10 5
2 10 5
10 5
0.0
<u>x</u>
<u>y</u>
<u>z</u>
0.1 <u>1.0</u> <u>10</u>
dt / t
Figure E.5: The behaviour of ( _Ji_ ( _dt_ ) − _J_ REF, _i_ )/ _J_ REF as a function of the timestep _dt_ used in the
symmetric derivative for a snapshot of H2O, where _J_ REF = | _J_ REF| and _i_ ∈{ _x_, _y_, _z_ }. The symbol
_Ji_ ( _dt_ ) refers to a component of the MUB flux computed with a discretization step _dt_, as reported
in the _x_ -axis. The reference value _J_ REF, _i_ is evaluated for each coordinate at the smallest value of
_dt_ available, in the example taken to be with _dt_ /∆ _t_ = 0.13. The _x_ -axis is in units of the simulation
step ∆ _t_ . The picture shows that the code can handle correctly even small values of _dt_ . At the
same time, it shows that the non-linear effects due to high values of _dt_ are negligible up to the
range of _dt_ explored, and in particular negligible at _dt_ = 2∆ _t_ . The errorbar are an estimate of
the statistical uncertainty computed using the testing feature presented in Section 5 and using 20
different initialization of the wavefunctions.
The previous calculations were performed with the self-consistent threshold
38
`econv` equal to 10 <sup>−14</sup> Ry. The lower, the better the quality of the wavefunctions
calculated. In order to further test and prove the stability of the MUB current,
we used again the aforementioned testing feature to compute the _dt_ dependence
of the statistical uncertainty of the MUB current, at different values of `econv` .
Fig. E.6 shows the percentage error of the _x_ -component of the flux for a specific
snapshot of 125 molecule. Even though the dependence on _dt_ is similar for the
two values of `econv`, it is clear that increasing `econv`, at a fixed _dt_, increases the
statistical error by orders of magnitude, three orders when `econv` is changed from
10 <sup>−14</sup> Ry to 10 <sup>−08</sup> Ry and at any fixed _dt_ . Note also that the variance decreases
when increasing _dt_, in an exponential way. It must be stated that the errors in
Fig. E.6 do not include the effect of the non-linearity due to a too large _dt_, bringing
a (small) bias to the estimation of the MUB flux which can be seen, for example,
in Fig. E.5.
10 2
10 3
10 4
10 5
10 6
10 7
10 8
<u>econv</u> ~~= 10~~ ~~14 Ry~~
<u>econv = 10</u> 08 Ry
<u>0.1</u> <u>1.0</u> <u>10</u>
dt/ t
Figure E.6: Percentage error on the x component of the total energy flux for a selected snapshot
of H2O . The source of error here considered is due to the inherent noise on the wave-functions
computed by Quantum ESPRESSO and was estimated restarting `QEHeat` 20−times with different
seeds. The error is plotted for different values of `econv` as function of the timestep _dt_ used in
the symmetric derivative. Note that the error decreases decreasing `econv`, as expected, but also
increasing _dt_ . Not shown here is the onset of the non-linear behavior due to a too large _dt_, visible,
instead, in Fig. E.5. (see also Appendix E). Different colors represent different values of `econv` .
39
In Section 4 we showed how `QEHeat` implements numerical derivatives with
the symmetric approach. The code allows also, simply changing the `three_point_derivative`
keyword to `false`, to compute the derivative within a non-symmetric approach.
In this case the implemented expression is:
_f_ ˙({ _R_ _s_ }) ≈ <sup>_<u>f</u>_</sup> <sup><u>({</u></sup> <sup>_<u>R</u>_</sup> <sup>_<u>s</u>_</sup> <sup>}) −</sup> <sup>_<u>f</u>_</sup> <sup><u>({</u></sup> <sup>_<u>R</u>_</sup> <sup>_<u>s</u>_</sup> <sup>−</sup> <sup>_<u>V</u>_</sup> <sup>_<u>sdt</u>_</sup> <sup>})</sup>, (E.1)
_dt_
removing one scf computation with respect to the symmetric derivative scheme,
thus reducing slightly the computational time. Quantities that are not numerically
time-derived are evaluated with atoms at positions { Rs }. For the same snapshot of
water of Fig. E.6 and _ecut_ = 85 Ry, _econ_ - = 10 <sup>−14</sup> Ry, we computed the energy
current with both the non and symmetric derivative approaches. Figure E.7 shows
that the latter returns an energy flux by far more numerically stable with _dt_ . However, in both cases, the values of the current only slowly deviate from a constant
behaviour, after increasing dt. Even the 2-point derivative gives results that differ
of few percentage points.
Appendix F. Computational Cost
The computational cost of a QEHeat calculation depends on several factors
that one should take into consideration, e.g.:
- _Typical decaying times._ Decaying times, defined as time lengths when the
relevant autocorrelation functions become negligible, can vary a lot according to the system. Longer decaying times require longer simulations to
acquire enough statistics. Typically, liquid materials show smaller decaying
times. Other convenient situations are solids at high pressures and temperatures, or glasses. See also Fig. 3 in main text.
- _Sampling frequency_ . It is not necessary to compute the energy flux for every
single step of the molecular dynamics trajectory, in order to avoid unneeded
wastes of computer time. The optimal sampling frequency can depend on
the chosen methodology to extract the thermal conductivity coefficient from
the time series of the energy flux. Cepstral theory helps in deciding an optimal sampling frequency ( see e.g. the analysis reported in Supp materials
). In the example for liquid water of Sec. 6, we evaluated the heat flux every 60 units of time in Hartree atomic unit, i.e. 20 Car-Parrinello molecular
dynamics steps in our simulation.
40
1.000
0.995
0.990
1.010
1.005
1.000
1.075
1.050
1.025
1.000
<u>0.1</u> <u>1.0</u> <u>10</u>
dt/ t
<u>x</u>
<u>y</u>
~~z~~
~~non-symmetric derivative~~
~~symmetric derivative~~
Figure E.7: The behaviour of _Ji_ ( _dt_ )/ _J_ REF as function of the timestep _dt_ used in the numerical
derivative. The three panels compare the results obtained with the non and symmetric derivative,
each panel shows a different component of the energy current _Ji_ . _J_ REF, taken as reference, is
the modulus of MUB flux computed for _dt_ = 0.66∆ _t_ and the symmetric derivative approach.
The errorbars are obtained repeating the computation of the current with a different initial wavefunction. The picture also shows that for the non-symmetric derivative there are only slightly
stronger non-linear behavior on the current for large _dt_ .
- _Simulation_ _cell_ _sizes._ One has to take into account that strongly harmonic
systems, like crystalline solids at ambient temperature, may require large
simulation cells to remove boundary effects. For high temperature or high
pressure solids this should be a smaller issue. Anharhmonic effects in disordered systems or glasses can also reduce the typical path lengths and reduce
therefore boundary effects.
- _Required_ _accuracy._ All settings should be tuned according to the desired
accuracy on the thermal conductivity coefficient, which may vary according
to the application.
We provide here the overall computational cost of the computation presented in
section 6 for liquid water, as a guideline, even if system specific setups are suggested. For this test, we chose conservative parameters and the default symmetric
41
derivative scheme. We ran the _MD_ calculations with 4 nodes, 192 processors,
whereas the `QEHeat` calculations, being trivially parallelizable, where each run on
1 node and 48 processors. All times here reported are multiplied by the number
of processors and identify therefore the total cost of the computation.
For the 64-molecules system, a general MD step costs ≈ 1.2 × 10 <sup>2</sup> s of cpu time
(average over ≈ 2.5 × 10 <sup>5</sup> steps, leading to a trajectory 240ps long). The cost of
evaluating _J_ <sup>_MUB_</sup> for a single snapshot was ≈ 1.5 × 10 <sup>3</sup> s of cpu time, in which
84% of the time is reserved to the solution of the linear system in Eq. (4) during
the evaluation of _J_ <sup>_KS_</sup> . The 3 minimizations needed for the symmetric derivative
scheme cost all together ≈ 2.2 × 10 <sup>3</sup> s (mean over all PW calculations). We evaluated _J_ <sup>_MUB_</sup> every 20 MD timesteps, thus the overall overhead was around 1.5
times the cost of the whole _ab initio_ molecular dynamics simulation.
To conclude, at the present state our code recomputes the self-consistent cycles
for each step, adding some extra time that we considered in this analysis. We are
currently working on using directly the wafefunctions provided during the CarParrinello molecular dynamics (CP-MD) simulation, a promising feature considering that our analysis on the _dt_ dependence implies that the discretization step
can be chosen equal to the CP-MD time step, and it will be available in a future release. All the computations are done on the Tier-0 system called Marconi
CINECA, which have 3188 nodes equipped with 2 Intel Xeon 8160 (SkyLake) at
2.10 GHz with 24-cores each [28].
42
섹션 본문
섹션 본문이 없습니다.
참고문헌
참고문헌 정보가 없습니다.