View on GitHub

Welcome to Thermo_pw

Thermo_pw is a driver of quantum-ESPRESSO routines for the automatic computation of ab-initio material properties.

THERMO_PW QUICK HELP

To use thermo_pw, a functional version of the Quantum ESPRESSO (QE) package is required. Thermo_pw can be downloaded from its main page as a .tar.gz file. The current production version is 2.0.2, compatible with QE-7.4.

Copy the thermo_pw archive into the main QE directory and unpack it using the command:

tar -xzvf thermo_pw.2.0.2.tar.gz

This command will create a directory named thermo_pw. To compile the code, you will need a Fortran compiler (e.g., the gcc package with gfortran, or gcc-fortran in some distributions) and the same libraries required by QE.

Once the thermo_pw directory is present in the main QE directory, cd into thermo_pw and write:

make join_qe

Then, cd back to the main QE directory and compile thermo_pw with the commands:

./configure

make thermo_pw

Alternatively, to use cmake, create a build directory, enter it, and execute:

cmake -DCMAKE_C_COMPILER=c_compiler -DCMAKE_Fortran_COMPILER=fortran_compiler ../

or, to compile for GPU:

cmake -DCMAKE_C_COMPILER=mpicc -DCMAKE_Fortran_COMPILER=mpif90 -DQE_ENABLE_CUDA=ON -DQE_ENABLE_OPENACC=ON -DQE_ENABLE_MPI_GPU_AWARE=ON ../

Subsequently, the make command will also generate the thermo_pw.x executable.

For running thermo_pw, the gnuplot package is beneficial. To plot the Brillouin zone, the asymptote package is necessary. Both are typically available as precompiled packages in many distributions.

For further details, please consult the user guide located in the thermo_pw/Doc directory. Please report any issues to dalcorso.at.sissa.it.

Development Version (Git):

The development version of thermo_pw is hosted on https://github.com/dalcorso/thermo_pw. To download it, the git package is required. Then, you can run the command:

git clone https://github.com/dalcorso/thermo_pw

This will create a thermo_pw directory containing the source code. Important Note: The Git version can only be used with QE version 7.4. Be aware that the Git version may not always function correctly, and its use is generally not recommended. Although thermo_pw has been in use for several years and is considered reasonably stable, it remains an experimental code provided "as is."

Compatibility with Older QE Versions:

Older versions of QE (earlier than 7.4) can still be used with thermo_pw by carefully matching the thermo_pw and QE versions, as detailed on the main thermo_pw page.

Before using thermo_pw, please apply the patches given below.

Patches for thermo_pw.2.0.2:

Patches for thermo_pw.2.0.1:

Patches for thermo_pw.2.0.0:

Patches for thermo_pw.1.9.1:

Patches for thermo_pw.1.9.0:

Patches for thermo_pw.1.8.1:

Patches for thermo_pw.1.8.0:

Patches for thermo_pw.1.7.1:

Patches for thermo_pw.1.7.0:

Patches for thermo_pw.1.6.1:

Patches for thermo_pw.1.6.0:

Patches for thermo_pw.1.5.1:

Patches for thermo_pw.1.5.0:

Patches for thermo_pw.1.4.1:

Patches for thermo_pw.1.4.0:

Patches for thermo_pw.1.3.1 and thermo_pw.1.3.2:

Patches for thermo_pw.1.3.0:

Patches for thermo_pw.1.2.1:

Patches for thermo_pw.1.2.0:

Patches for thermo_pw.1.1.1:

Patches for thermo_pw.1.0.0:

Known problems of thermo_pw.0.9.0:

Patches for thermo_pw.0.9.0:

Patches for thermo_pw.0.8.0:

Patches for thermo_pw.0.7.0:

Patches for thermo_pw.0.6.0:

Patches for thermo_pw.0.5.0:

Patches for thermo_pw.0.4.0:

Patches for thermo_pw.0.3.0:

Patches for thermo_pw.0.2.0:

Patches for thermo_pw.0.1.0:

FAQ:

  1. How can I learn to use thermo_pw?
    To begin, please familiarize yourself with the basic use of Quantum ESPRESSO. Afterward, you can read the thermo_pw tutorial and user’s guide and run the examples. These FAQs assume a basic understanding of thermo_pw and contain miscellaneous information not available in the user’s guide.

  2. Can I study the thermal expansion of anisotropic solids using thermo_pw?
    Yes, for certain crystal systems, but not all are currently supported or extensively tested. Please read the user’s guide carefully and ensure you are using a version higher than 0.3.0. Additionally, use dynamical matrices in .xml format, as calculations of thermal expansion with Grüneisen parameters will not work with all versions prior to 0.5.0 otherwise.

  3. Can I calculate the temperature dependence of the band gap or in general of the band structure using thermo_pw?
    You can calculate the band structure at the crystal geometry corresponding to a specific temperature. This allows you to evaluate the effect of thermal expansion on the band structure or band gap. However, a significant component of the temperature dependence of band gaps and band structures arises from electron-phonon interactions, which are not included in thermo_pw. For such calculations, you will need to use a different package.

  4. Can I calculate the equilibrium geometry of a solid at a given temperature using thermo_pw?
    Yes, this is possible. However, the calculation is as computationally intensive as determining quasi-harmonic properties and will require significant time and resources. We strongly recommend that users gain a thorough understanding of thermo_pw’s usage before attempting such a complex calculation.

  5. Which is the difference between examples and inputs?
    Examples are designed to quickly illustrate thermo_pw’s features; however, they are not fully converged for accuracy. In contrast, inputs provide more realistic, production-ready examples.

  6. Why do thermo_pw examples sometimes run correctly and sometimes crash?
    The most probable reason is that you have not removed the results directory generated by a previous run of the example script.

  7. make thermo_pw is not working. The compilation stops with a missing routines error. What’s wrong?
    The most probable reason is an incompatibility between the versions of QE and thermo_pw. Please ensure they are compatible.

  8. After unpacking the tar file, I don’t see a thermo_pw directory. Where is it?
    When you unpack the source files downloaded from the GitHub releases page, the directory is named thermo_pw-#version_number (e.g., thermo_pw-1.0.0). Simply rename this directory to thermo_pw to proceed.

  9. I’m having trouble running the examples, specifically with issues related to images. What should I do?
    If you wish to run the examples without using images, you need to modify the environment_variables file located in your main QE directory. Locate the variable PARA_IMAGE_POSTFIX and set -ni 1.

  10. I don’t have a parallel computer and am unfamiliar with MPI. Can I still run thermo_pw?
    Yes, you can, but only thermo_pw version 0.5.0 and later can be compiled and run in serial (single-processor) mode. Earlier versions require MPI for compilation and execution.

  11. The phonon dispersion plot appears strange, with disjoint parts and modes not classified by symmetry. What is the cause?
    This issue arises because the mode symmetry analysis requires dynamical matrices in .xml format. To resolve this, please ensure you include the .xml extension in the fildyn variable within your ph_control input file. Symmetry matrices are also crucial for recognizing symmetry-equivalent points in the Brillouin zone.

  12. Why does the plot of Grüneisen parameters show strange crossings at certain points?
    In some cases, plotting Grüneisen parameters requires higher accuracy in symmetry analysis than the phonon plot. Accidentally degenerate frequencies might have significantly different Grüneisen parameters. To address this, open PHonon/PH/find_mode_sym.f90, change the parameter 5.D-2 at line 148 to 1.D-2 (or a smaller value), and then recompile thermo_pw.

  13. The thermo_pw documentation fails to compile with errors indicating html.sty or latex2html are missing. How can I fix this?
    This is not an issue with thermo_pw itself. Compiling the thermo_pw documentation requires a comprehensive LaTeX distribution. To resolve the errors, you can:
    • Download html.sty from the web and copy it into the thermo_pw/Doc directory.
    • Install the latex2html package.
      Even if you do not resolve these documentation compilation issues, the thermo_pw.x executable will still be available in the bin directory of your QE installation. Only the documentation will be inaccessible.

  14. I’m experiencing issues with the projected band structure plot; some gaps have the same color as the projected band structure. What’s the problem?
    This is a known issue with older versions of Gnuplot. Please update to Gnuplot 5.0 or higher to resolve it.

  15. My phonon dispersion plot looks strange, with some branches missing. What could be the issue?
    This often occurs if you haven’t used enough digits for the atomic positions in your input. A common problem arises when positions like 1/3 and 2/3 are specified with insufficient precision. In such cases, the pw.x code may incorrectly identify more symmetries than are actually present in the final modes, confusing the routine that identifies mode symmetry.

  16. The code fails to identify the space group and stops with an error: “point group orientation incorrect.” Why?
    This error most likely indicates you are simulating a noncollinear magnetic system. Keep in mind that magnetic space group identification isn’t implemented in thermo_pw. Versions up to 0.9.0 don’t perform a check for this, which can lead to the error. To resolve this, please apply the changes introduced in commit a68e6cb (January 18, 2018). If you encounter this error while using ibrav/=0 with a collinear system, please send your input file for further investigation.

  17. When using what='scf_disp' with partial phonon computations (e.g., start_q, last_q, start_irr, last_irr), I receive strange error messages. Why?
    The what='scf_disp' option requires all the dynamical matrix files to be present in the dynamical_matrices directory. If you are performing partial phonon calculations, use what='scf_ph' until all necessary dynamical matrices have been generated and collected. Once all files are present, you can then run with what='scf_disp' for the final computation.

  18. I’m computing a phonon dispersion, but some q points are not being computed. What’s the reason?
    The most probable reason is that you have not cleaned your outdir directory. Note that thermo_pw always attempts to reuse content from the outdir directory if it finds any.

  19. Is it possible to increase the temperature range of my calculation?
    Yes, you can. To do so, you must remove the therm_files directory while preserving the dynamical_matrices and restart directories. If you have also removed the outdir directory, set after_disp=.TRUE. in your input and specify the name of the dynamical matrices using the fildyn variable.

  20. Is it possible to increase the number of points used to compute the phonon DOS?
    Yes, you can. To do so, you must remove both the phdisp_files and therm_files directories while preserving the dynamical_matrices and restart directories.

  21. I performed calculations with with_eigen=.FALSE.. Is it possible to restart with with_eigen=.TRUE.?
    Yes, you can. To do so, you must remove both the phdisp_files and therm_files directories while preserving the dynamical_matrices and restart directories.

  22. I’m using thermo_pw 1.3.1 with QE-6.6, and the code hangs or stops randomly during phonon dispersion calculations. What’s the issue?
    Be cautious when using parallel pools. Since version 6.6, QE no longer halts if some pools lack k-points, but thermo_pw (version 1.3.1) cannot handle this scenario, leading to hangs or crashes. To check if this is your situation, search your output file for the string: 'suboptimal parallelization: some nodes have no k-points'. Solution: Decrease the number of pools until this message no longer appears. For a permanent check and resolution of this problem, consider upgrading to thermo_pw 1.3.2 or higher.

  23. I’m receiving an error message that tmp_dir cannot be opened. What should I do?
    This error typically indicates a problem with the outdir directory specified in your pw.x input file. Most probable causes include:
    • A missing parent directory in the path specified for outdir.
    • Insufficient permissions to write to or execute in the outdir’s parent directory.
      Please check the outdir path and your directory permissions.

  24. I’m receiving an “Error in namelist.” What should I do?
    This error most likely indicates a mistake in a variable within your namelist. Please consult the user guide carefully to verify all variable spellings and expected values.
    Other common causes include:
    • Hidden characters: Your text editor might have introduced hidden characters into the input file. You can check for these using a command like cat -A input_file.
    • Version mismatch: You might be using a user guide from a different thermo_pw version than the one you are running, leading to unrecognized variables. Always ensure that the version of your user guide matches your thermo_pw installation.

  25. I’m receiving the error “Point group incompatible with the Bravais lattice.” What does this mean?
    This message indicates that the point group identified for your system is not compatible with the specified Bravais lattice. While the calculation can still proceed, thermo_pw will not be able to automatically determine the space group, nor will it utilize symmetries to simplify the calculation of physical properties.
    Possible causes and solutions:
    Incorrect symmetry:
    • Missing symmetries: Investigate why some symmetries might be absent from your input (e.g., imprecise atomic coordinates).
    • Excess symmetries: Conversely, you might have defined too many symmetries that are not truly present in the actual structure. Action: Try using one of the Bravais lattices suggested by the code, or review your structure for subtle deviations from the intended symmetry.
      Supercell:
    • The message might also appear if you are intentionally simulating a supercell. Action: If this is your intent, you can safely ignore this message and continue the calculation. Otherwise, simplify your unit cell to match the primitive cell.

  26. Is thermo_pw compatible with the GPU version of QE?
    Partial compatibility exists. With QE 6.7 and thermo_pw version 1.5.0, you can compile a GPU-compatible version of thermo_pw by running make tpw_gpu. This is designed to work with q-e-gpu.6.7. For thermo_pw version 1.5.1 and QE 6.8 (or later versions), thermo_pw can be compiled with CUDA support using the same commands you would use to enable CUDA in standard QE. This typically involves configuring QE with specific CUDA options. Thermo_pw versions from 1.9.0 to 2.0.2 have been specifically tested on the Leonardo supercomputer at CINECA using the NVIDIA Fortran compiler. These later versions also include custom GPU routines, exclusive to thermo_pw, that enable the simultaneous calculation of numerous k-points on the GPU. These routines are optimized for metallic systems with small cells.

  27. The band or phonon symmetry is not indicated; instead, many question marks appear in place of irreducible representation names. Why?
    The presence of question marks signifies that the symmetry-finding algorithm is unable to definitively determine the symmetry. This can be due to several reasons:
    • Insufficient accuracy: Your calculation might have a cut-off that is too small, or a self-consistency threshold that is too large, resulting in insufficient accuracy for proper symmetry identification. Action: Please adjust these parameters.
    • Imprecise atomic positions: Your atomic positions may be very close to, but not exactly on, a true symmetry position. This is a common issue when using single-precision atomic coordinates. Action: Correct your atomic coordinates by adding more digits of precision.
    • Pseudopotential issues: There might be a problem with the pseudopotential, possibly indicating a “ghost state”. Action: Try using different pseudopotentials to see if the issue resolves.
    • Algorithm problem: If none of the above solutions apply, there might be an issue with the symmetry-finding algorithm itself. Action: In this case, please send me your input file or post it to one of the forum mailing lists.

  28. Can I compute the temperature dependent elastic constants with thermo_pw?
    Yes, with version-specific capabilities:
    • Quasi-static elastic constants are available starting from version 0.6.0.
    • Quasi-harmonic elastic constants require version 1.2.0 or later.
    • The electronic contribution to elastic constants is implemented only from version 1.4.0 onwards.
      Important notes:
    • This feature is still under development and has some limitations. For instance, atomic coordinates are currently relaxed only at zero temperature (within ZSISA). Full free energy minimization is possible only when there is only one internal degree of freedom.
    • Be aware that quasi-harmonic calculations are highly time-consuming, often requiring, as an order of magnitude, hundreds of phonon dispersion computations.

  29. I’m receiving a “Laue class not available” error when computing elastic constants. What does this mean?
    • This error typically indicates that your system possesses fewer symmetries than expected for its specified Bravais lattice. For example, for a solid with a cubic Bravais lattice, a Laue class cannot be assigned if its point group symmetry is different from T, T_d, T_h, O, or O_h.
    • In such cases, thermo_pw’s output will state that the point group and Bravais lattice are incompatible and will suggest alternative compatible Bravais lattices.
      Recommended actions:
    • If you are confident in your system’s symmetry: Consider using one of the Bravais lattices suggested by thermo_pw.
    • If symmetries are missing due to other reasons: (e.g., imprecise atomic coordinates, as discussed in the QE PW user’s guide), you must correct these issues before proceeding with the elastic constant calculation.
    • For supercells or low-dimensional systems: If you are using supercells, or have a low-dimensional system within a supercell, thermo_pw might not yet be automatically suited for computing the elastic constants of your system.

  30. thermo_pw fails to compile with QE version 7.0 or later, showing a “no rule to make file make.depend” error. How can I fix this?
    After running make join_qe and returning to the QE root directory, you must re-run ./configure before attempting make thermo_pw. This step is crucial for regenerating the necessary build dependencies. (Thanks to H. Zhao for reporting the problem).

  31. Thermo_pw is having problems with fully relativistic PAW pseudopotentials. What should I do?
    Before reporting any issues, please check for a mismatch in the PP_AEWFC_REL tag between your UPF file and thermo_pw’s UPF reading routines. This is a common source of problems.
    Understanding the tag mismatch:
    • From QE versions 6.5 to 6.7, the XML tag for the small component of all-electron partial waves was named PP_AEWFC_rel. In previous QE versions, it was PP_AEWFC_REL. This change means fully relativistic pseudopotentials created with QE versions older than 6.5 (including many distributed on the QE site) might no longer be read correctly by thermo_pw versions relying on the PP_AEWFC_rel tag. The code often doesn’t stop but might produce subtly incorrect results, especially during pseudopotential tests.
      Solutions for tag mismatch:
    • For PPs with PP_AEWFC_REL (older QE): If your pseudopotential contains the PP_AEWFC_REL tag, manually edit upflib/read_upf_new.f90 and upflib/write_upf_new.f90. In both files, search for the string PP_AEWFC_rel and change it to PP_AEWFC_REL.
      Consistency with newer QE versions: </br>
    • QE 6.8, 7.0, and 7.1: The upflib/read_upf_new.f90 routine in these QE versions correctly reads UPF PPs with the PP_AEWFC_REL tag. However, they continue to write UPF PPs with the PP_AEWFC_rel tag, creating an inconsistency. To ensure thermo_pw correctly reads pseudopotentials generated by the same QE version, you must modify upflib/write_upf_new.f90 (changing PP_AEWFC_rel to PP_AEWFC_REL). For QE 7.0 only: Additionally, apply the correction described above to PW/src/v_of_rho.f90 for QE 7.0.