Quantum ESPRESSO: a modular and open-source software project for quantum simulations of materials
Summary (6 min read)
1. Introduction
- The combination of methodological and algorithmic innovations and ever-increasing computer power is delivering a simulation revolution in materials modeling, starting from the nanoscale up to bulk materials and devices [1].
- Such approaches will require software packages that can perform different kinds of computations on different aspects of the same problem and/or different portions of the same system, and that allow for interoperability or joint usage of the different modules.
- A successful example comes from the software for simulations in quantum chemistry, that has often (but not always) evolved towards commercialization: the development and maintenance of most well-known packages is devolved to non-profit [5–8] or commercial [9–12] companies.
- This model has worked well, and is also used by some of the leading development groups in the condensed-matter electronicstructure community [13, 14], while some proprietary projects allow for some free academic usage of their products [14–19].
2. The QUANTUM ESPRESSO project
- QUANTUM ESPRESSO is an integrated suite of computer codes for electronic-structure calculations and materials modeling based on density-functional theory, plane waves basis sets and pseudopotentials to represent electron–ion interactions.
- The two main goals of this project are to foster methodological innovation in the field of electronic-structure simulations and to provide a wide and diverse community of end users with highly efficient, robust, and userfriendly software implementing the most recent innovations in this field.
- Interoperability of different components within QUANTUM ESPRESSO is granted by the use of common formats for the input, output, and work files.
- Fortran95 offers the possibility to introduce advanced programming techniques without sacrificing performance.
2.1. QE-forge
- The ambition of the QUANTUM ESPRESSO project is not limited to providing highly efficient and user-friendly software for large-scale electronic-structure calculations and materials modeling.
- QUANTUM ESPRESSO aims at promoting active cooperation among a vast and diverse community of scientists developing new methods and algorithms in electronic-structure theory and of end users interested in their application to the numerical simulation of materials and devices.
- As mentioned, the main source of inspiration for the model the authors want to promote is the successful cooperative experience of the GNU/Linux developers’ and users’ community.
- These developments have largely benefited from the SourceForge code repository and software development service [31], or by other similar services, such as RubyForge, Tigris.org, BountySource, BerliOS, JavaForge, and GNU Savannah.
- Inspired by this model, the QUANTUM ESPRESSO developers’ and users’ community has set up its own web portal, named qe-forge [27].
2.2. Educational usage of QUANTUM ESPRESSO
- Training on advanced simulation techniques using the QUANTUM ESPRESSO distribution is regularly offered at SISSA to first-year graduate students within the electronicstructure course.
- The scope of this course is not limited to the opportunities that modern simulation techniques based on electronic-structure theory offer to molecular and materials modeling.
- Based on this experience, the QUANTUM ESPRESSO developers’ group offers, on a regular basis, training courses to graduate students and young researchers worldwide, also in collaboration with the Abdus Salam International Centre for Theoretical Physics, which operates under the aegis of UNESCO and IAEA agencies of the UNO.
- At MIT, for example, it is one of the teaching tools in the class Introduction to Modeling and Simulations—an institute-wide course offered to undergraduates from the School of Science and the School of Engineering.
- The authors experience shows that, when compared to the cost of purchasing, maintaining and administering computer clusters, the use of web-based computational resources becomes a very appealing and affordable option.
3. Short description of QUANTUM ESPRESSO
- QUANTUM ESPRESSO implements a variety of methods and algorithms aimed at a chemically realistic modeling of materials from the nanoscale upwards, based on the solution of the density-functional theory (DFT) [2, 3] problem, using a plane waves (PWs) basis set and pseudopotentials (PPs) [32] to represent electron–ion interactions.
- The codes are constructed around the use of periodic boundary conditions, which allows for a straightforward treatment of infinite crystalline systems, and an efficient convergence to the thermodynamic limit for aperiodic but extended systems, such as liquids or amorphous materials.
- The latter is an area of very active development.
3.1. Data file format
- The interoperability of different software components within a complex project such as QUANTUM ESPRESSO relies on the careful design of file formats for data exchange.
- The need for data file formats that make data exchange easier than it is now is starting to be widely appreciated in the electronicstructure community.
- This problem has many aspects and likely no simple, ‘one-size-fits-all’, solution.
- Another problem affecting interoperability of PW–PP codes is the availability of data files containing atomic PPs— one of the basic ingredients of the calculation.
- Again, the choice has fallen on a simple solution that makes it easy to write converters from and to the format used by QUANTUM ESPRESSO.
4. QUANTUM ESPRESSO packages
- The complete QUANTUM ESPRESSO distribution is rather large.
- 10 000 lines of specific documentation (not counting different formats), more than 100 different examples and more than 100 tests of the different functionalities.
- QUANTUM ESPRESSO is presently divided into several executables, performing different types of calculations, although some of them have overlapping functionalities.
- Typically there is a single set of functions/subroutines or a single Fortran 90 module that performs each specific task (e.g. matrix diagonalizations, or potential updates), but there are still important exceptions to this rule, reflecting the different origin and different styles of the original components.
- In the following, the main components are briefly described.
4.1. PWscf
- PWscf implements an iterative approach to reach selfconsistency, using at each step iterative diagonalization techniques, in the framework of the plane-wave pseudopotential method.
- In the case of US PPs, the electronic wavefunctions can be made smoother at the price of having to augment their square modulus with additional contributions to recover the actual physical charge densities.
- PWscf can use the well established LDA and GGA exchange–correlation functionals, including spin-polarization within the scheme proposed in [82] and can treat noncollinear magnetism [48, 49] as e.g. induced by relativistic effects (spin– orbit interactions) [83, 84] or by complex magnetic interactions (e.g. in the presence of frustration).
- BZ integrations in metallic systems can be performed using a variety of smearing/broadening techniques, such as Fermi– Dirac, Gaussian, Methfessel–Paxton [91], and Marzari– Vanderbilt cold smearing [92].
- Constantpressure (N PT ) MD is performed by adding additional degrees of freedom for the cell size and volume, using either the Parrinello–Rahman Lagrangian [101] or the so-called invariant Lagrangian of Wentzcovitch [53].
4.4. Atomic
- The atomic code performs three different tasks: (i) solution of the self-consistent all-electron radial KS equations (with a Coulomb nuclear potential and spherically symmetric charge density); (ii) generation of NC PPs, US PPs, or PAW datasets; (iii) test of the above PPs and data-sets.
- These three tasks can be either separately executed or performed in a single run.
- US PPs can be generated by a two-step pseudization process, starting from NC PPs, as described in [143], or using the solutions of the all-electron equation and pseudizing the augmentation functions [80].
- The latter method is used also for the PAW data-set generation.
- Transferability tests can be made simultaneously for several atomic configurations, with or without spin-polarization, by solving the nonrelativistic radial KS equations generalized for separable nonlocal PPs and for the presence of an overlap matrix.
4.5. PWcond
- The PWcond code implements the scattering approach proposed by Choi and Ihm [60] for the study of coherent electron transport in atomic-sized nanocontacts within the Landauer–Büttiker theory.
- Within this scheme the linear response ballistic conductance is proportional to the quantummechanical electron transmission at the Fermi energy for an open quantum system consisting of a scattering region (e.g., an atomic chain or a molecule with some portions of left and right leads) connected ideally from both sides to semi-infinite metallic leads.
- The transmission is evaluated by solving the KS equations, with the boundary conditions that an electron coming from the left lead and propagating rightwards gets partially reflected and partially transmitted by the scattering region.
- As a by-product of the method, the PWcond code provides the complex band structure of the leads, which includes, besides propagating Bloch waves, also states with complex kz in the direction of transport, describing wavefunctions exponentially growing or decaying in the z direction.
- The original method formulated with NC PPs has been generalized to US PPs both in the scalar relativistic [144] and in the fully relativistic forms [145].
4.6. GIPAW
- The GIPAW code allows for the calculation of physical parameters measured in (i) nuclear magnetic resonance (NMR) spectroscopy in insulators (the electric-field-gradient (EFG) tensors and the chemical shift tensors), and by (ii) electronic paramagnetic resonance (EPR) spectroscopy for paramagnetic defects in solids or in radicals (the hyperfine tensors and the gtensor).
- GIPAW is based on the PW– PP method, and uses many subroutines of PWscf and of PHonon.
- All the NMR and EPR parameters depend on the detailed shape of the electronic wavefunctions near the nuclei and thus require the reconstruction of the all-electron wavefunctions from the pseudo wavefunctions.
- In the presence of a magnetic field the PAW method is no longer gauge- and translationally invariant.
- The NMR chemical shifts are computed following the method described in [63], the g-tensor following [150] and the magnetic susceptibility following [63, 148].
4.7. XSPECTRA
- The XSPECTRA code allows for the calculation of K-edge x-ray absorption spectra (XAS).
- The code uses the self-consistent charge density produced by PWscf and acts as a post-processing tool.
- From the self-consistent charge density, the xray absorption spectra are obtained using the Lanczos method and a continued fraction expansion [65, 152].
- Correlation effects can be simulated in a mean-field way using the Hubbard U correction [86] that has been included in the XSPECTRA code in [153].
- Currently the code is limited to collinear magnetism.
4.9. PostProc
- The PostProc module contains a number of codes for postprocessing and analysis of data files produced by PWscf and CP.
- The following operations can be performed: Interfacing to graphical and molecular graphics applications.
- Charge and spin density, potentials, ELF [68] and STM images [67] are extracted or calculated and written to files that can be directly read by most common plotting programs, such as xcrysden [159] and VMD [160].
- Calculation of various quantities that are useful for the analysis of the results.
- In addition to the already mentioned ELF and STM, one can calculate projections over atomic states (e.g. Löwdin charges [69]), DOS and Projected DOS (PDOS), planar and spherical averages, and the complex macroscopic dielectric function in the random-phase approximation (RPA).
4.10. PWgui
- PWgui is the graphical user interface (GUI) for the PWscf, PHonon, and atomic packages as well as for some of the main codes in PostProc (e.g. pp.x and projwfc.x).
- PWgui is an input file builder whose main goal is to lower the learning barrier for the newcomer, who would otherwise have to struggle with the input syntax.
- Its event-driven mechanism automatically adjusts the display of required input fields (i.e. enables certain sets of widgets and disables others) to the specific cases selected .
- As the QUANTUM ESPRESSO codes evolve, the input file syntax expands as well.
- To effectively deal with such issue, PWgui uses the GUIB concept [166].
5. Parallelization
- Keeping pace with the evolution of high-end supercomputers is one of the guiding lines in the design of QUANTUM ESPRESSO, with a significant effort being dedicated to porting it to the latest available architectures.
- The second level is pool parallelization, implemented by further dividing each group of processors into npool pools of processors, each taking care of one or more k-points.
- On the other hand, using ultrasoft pseudopotentials is generally faster because the use of a smaller basis set is obviously more efficient, even though the overall parallel performance may not be as good.
- Scalability does not yet extend to tens of thousands of processors as in especially-crafted codes like QBox [170], but excellent scalability on up to 4800 processors has been demonstrated , even for cases where coarse-grained parallelization does not help, using only MPI parallelization.
- The efforts of the QUANTUM ESPRESSO developers’ team are not limited to the performance on massively parallel architectures.
6. Perspectives and outlook
- Further developments and extensions of QUANTUM ESPRESSO will be driven by the needs of the community using it and working on it.
- Many of the soon-to-come additions will deal with excited-state calculations within time-dependent DFT (TDDFT [172, 173]) and/or many-body perturbation theory [174].
- It is foreseen that by the time this paper appears, some of these developments will have been publicly released.
- It is hoped that many new functionalities will be made available to QUANTUM ESPRESSO users by external groups who will make their own software compatible/interfaceable with QUANTUM ESPRESSO.
- Grid computing and the commoditization of computer clusters will also lead to great improvements in high-throughput calculations for materials design and discovery.
Acknowledgments
- The QUANTUM ESPRESSO project is an initiative of the CNR-INFM DEMOCRITOS National Simulation Center in Trieste and its partners, in collaboration with MIT, Princeton University, the University of Minnesota, the Ecole Polytechnique Fédérale de Lausanne, the Université Pierre et Marie Curie in Paris, the Jožef Stefan Institute in Ljubljana, and the S3 research center in Modena.
- Many of the ideas embodied in the QUANTUM ESPRESSO codes have flourished in the very stimulating environment of the International School of Advanced Studies, SISSA, where Democritos is hosted, and have benefited from the ingenuity of generations of graduate students and young postdocs.
- Moreover it can be shown that, when exchange and correlation contributions to the electronic screening do not dominate over the electrostatic ones, this quantity is an upper bound to the self-consistent error incurred when using the standard form for the DFT energy.
- The algorithm here described was inspired by the conjugategradient algorithm of [189], and is similar to one of the variants described in [190].
- The symmetrization technique can be extended to all quantities that are expressed as sums over the BZ.
Did you find this useful? Give us your feedback
Citations
3,638 citations
3,215 citations
2,282 citations
2,256 citations
2,217 citations
References
18,546 citations
14,008 citations
5,172 citations
2,599 citations
Related Papers (5)
Frequently Asked Questions (17)
Q2. What can be used to minimize the electronic energy functional to self-consistency?
CP can also be used to directly minimize the electronic energy functional to self-consistency while keeping thenuclei fixed, or to perform structural minimizations of nuclear positions, using the ‘global minimization’ approaches of [117, 118], and damped dynamics or conjugate-gradients on the electronic or ionic degrees of freedom.
Q3. How can a transferability test be made?
Transferability tests can be made simultaneously for several atomic configurations, with or without spin-polarization, by solving the nonrelativistic radial KS equations generalized for separable nonlocal PPs and for the presence of an overlap matrix.
Q4. What is the common example of a successful approach to software development?
A successful example comes from the software for simulations in quantum chemistry, that has often (but not always) evolved towards commercialization: the development and maintenance of most well-known packages is devolved to non-profit [5–8] or commercial [9–12] companies.
Q5. What is the purpose of a single definition/description of a given input file?
A single definition/description of a given input file serves (i) as a documentation per-se, (ii) as a PWgui help documentation, and (iii) as a utility to synchronize the PWgui with up-to-date input file formats.
Q6. What is the common method of achieving a quantum fragment in a complex electrochemical?
A quantum fragment can be embedded in a complex electrostatic environment that includes a model solvent [106] and a counterion distribution [107], as is typical of electrochemical systems.
Q7. What is the current trend in the electronic-structure community?
The current trend in the electronic-structure community seems to be the adoption of one of the following approaches:• structured file formats, notably Hierarchical Data Format (HDF) [71] and network Common Data Form (netCDF) [72], that have been widely used for years in other communities; • file formats based on the Extensible Markup Language (XML) [73].
Q8. What is the main source of inspiration for the model the authors want to promote?
As mentioned, the main source of inspiration for the model the authors want to promote is the successful cooperative experience of the GNU/Linux developers’ and users’ community.
Q9. What is the format used to convert pseudopotentials?
Converters are available to translate pseudopotentials encoded in different formats (e.g. according to the Fritz–Haber [75] or Vanderbilt [76] conventions) into the UPF format adopted by QUANTUM ESPRESSO.
Q10. What is the current trend towards distributed computing?
The new trend towards distributed computing is exemplified by the recent development of the VLab cyber infrastructure (CI) [184, 185], a service-oriented architecture (SOA) that uses QUANTUM ESPRESSO as the back-end computational package plus a web portal [186].
Q11. What is the common method of achieving electron self-consistency?
Microcanonical (NVE) MD is performed on the BO surface, i.e. achieving electron self-consistency at each time step, using the Verlet algorithm [99].
Q12. What is the importance of transitioning these development codes to production tools?
Transitioning these development codes to production tools is nevertheless essential, both to extensively validate new methods and to speed up their acceptance by the scientific community.
Q13. What is the main reason for the need for in-house computer codes?
The readiness to implement new algorithms that utilize novel ideas requires total control over the software being used—for this reason, the physics community has long relied on in-house computer codes to develop and implement new ideas and algorithms.
Q14. What is the main reason for the increase in the availability of massively parallel machines?
The increasing availability of massively parallel machines will likely lead to an increased interest towards large-scale calculations.
Q15. How can one perform a sampling of the Brillouin zone?
The sampling of the Brillouin zone (BZ) can be performed using either special [89, 90] k-points provided in input or those automatically calculated starting from a uniform grid.
Q16. What is the common method of calculating the effects of finite macroscopic electric fields?
The effects of finite macroscopic electric fields on the electronic structure of the ground state can be accounted for either through the method of [102, 103] based on the Berry phase, or (for slab geometries only) through a sawtooth external potential [104, 105].
Q17. What is the main reason for the revolution in materials simulation and modeling?
Over the past few decades, innovation in materials simulation and modeling has resulted from the concerted efforts of many individuals and groups worldwide, often of small size.