THERMO_PW QUICK HELP
In order to use thermo_pw
you need a
working version of the Quantum
ESPRESSO (QE) package. Thermo_pw
can be downloaded from its
main page as
a .tar.gz
file. The current production version is
2.0.0
compatible with
QE-7.3
. The thermo_pw
file should be copied
in the main (QE) directory and unpacked with the command:
tar -xzvf thermo_pw.2.0.0.tar.gz
This command produces a directory called
thermo_pw
. To compile the code you need a Fortran compiler, for
instance the gcc
package and gfortran
(or
gcc-fortran
in some distributions),
and the same libraries required by QE
.
After getting the directory thermo_pw
in the main QE
directory, cd to the directory thermo_pw
and give the command
make join_qe
. Then cd to the main QE
directory and compile thermo_pw
with the command:
make thermo_pw
Instead, to use cmake
, you
create the directory build
enter there and give the command:
cmake -DCMAKE_C_COMPILER=c_compiler -DCMAKE_Fortran_COMPILER=fortran_compiler ../
Then the command
make
produces also the thermo_pw.x
executable.
To run thermo_pw
it is useful to have the
gnuplot package, and to plot
the Brillouin zone
you need the asymptote package.
Both are available as precompiled packages in many distributions.
For further information, please refer to the user guide
available in the thermo_pw/Doc
directory.
Please report any problem to
dalcorso .at. sissa.it.
The development version of thermo_pw
is hosted at https://github.com/dalcorso/thermo_pw. To download it you need the git
package. Then you can give the command:
git clone https://github.com/dalcorso/thermo_pw
and you should get a directory called thermo_pw
that contains the source code.
The git
version can be used only together with the version of QE
reported here: 7.3
. Please note that sometimes the git
version is not working properly and in any case its use is not recommended.
Although thermo_pw
has been
used for several years and can be considered reasonably stable, it remains an
experimental code given as it is.
A version of QE
older than 7.2
can still be used with thermo_pw
matching carefully the
versions of thermo_pw
and of QE
as explained in the
main thermo_pw
page.
Before using thermo_pw
, please apply the
patches given below.
Patches for thermo_pw.2.0.0:
To compile with cmake copy in thermo_pw/CMakeLists.txt
the file that you find here.
Patches for thermo_pw.1.9.1:
The code hangs when using start_q and last_q
with what='elastic_constants_geo'
. Correct
as in commit 48b77cc
of Mar. 11, 2024.
Patches for thermo_pw.1.9.0:
At line 150 of qe/many_k_ph.f90
continuation line
‘&’ is missing.
Thermo_pw was not working with scalapak.
See bug fix of Feb. 1, 2024.
A problem with calculation of EELS spectrum with
Sternheimer method.
See bug fix of Jan. 31, 2024
Patches for thermo_pw.1.8.1:
Thermo_pw was not working with scalapak.
See bug fix of Feb. 1, 2024
A problem with calculation of EELS spectrum with
Sternheimer method.
See bug fix of Jan. 31, 2024
A problem with calculation of electronic free energy
See bug fix aeedce4 of Jul. 3, 2023.
Patches for thermo_pw.1.8.0:
- To compile using cmake copy the thermo_pw/CMakeLists.txt of thermo_pw.1.8.1
in the thermo_pw directory.
A problem with calculation of electronic free energy See bug fix aeedce4 of Jul. 3, 2023.
Patches for thermo_pw.1.7.1:
Patches for thermo_pw.1.7.0:
Patches for thermo_pw.1.6.1:
- There is a problem with the GPU version and metals. Correct as in commit
7d344d0
of 18/01/2022. - Correct as in the commit of 04/03/2022 if you have problem with magnetic systems.
- Problems with spin-orbit. Correct the routine PW/src/v_of_rho.f90 adding the instruction v(:,:)=0.0_DP after line 208 and after line 476 and recompile.
Patches for thermo_pw.1.6.0:
Patches for thermo_pw.1.5.1:
- tools/epsilon_tpw.f90 was not updated to the QE68 conventions. Please change as in commit commit_cd4353f of 13/08/2021.
- At line 170 of atomic/src/import_upf.f90 exchange the calls to set_pawsetup and radial_grid_copy to have the atomic paw tests working again in QE6.8.
- At line 131 of thermo_pw/qe/pheqscf.f90 remove tpiba2 to have example21 working again.
- At line 723 of upflib/write_upf_new.f90 of QE7.0 change PP_AEWFC_rel with PP_AEWFC_REL. See also the FAQ 34.
Patches for thermo_pw.1.5.0:
Patches for thermo_pw.1.4.1:
- Still a missing transformation of ftau into ft. Please change as in commit commit_3e39531 of 7/5/2021.
- At line 576 of upflib/read_upf_new.f90 of QE6.7 change PP_AEWFC_rel with PP_AEWFC_REL.
- I usually change line 400 of Modules/read_namelists.f90 of QE6.7 restoring the old default diago_david_ndim=4.
- At line 170 of atomic/src/import_upf.f90 exchange the calls to set_pawsetup and radial_grid_copy to have the atomic paw tests working again in QE6.7. First call radial_grid_copy.
- At line 131 of thermo_pw/qe/pheqscf.f90 remove tpiba2 to have example21 working again.
Patches for thermo_pw.1.4.0:
- Still a missing transformation of ftau into ft. Please change as in commit commit_3e39531 of 7/5/2021.
- Problems with examples 10,11, and 18. Problems with electric fields and FR-PP. Please apply the changes as in commit: commit_7431482.
- To reproduce ph_example07 it is necessary to change line 1049 of file PW/src/pw_restart_new.f90 of QE6.6 as explained for version 1.3.0.
- At line 557 of upflib/read_upf_new.f90 of QE6.6 change PP_AEWFC_rel with PP_AEWFC_REL.
- I usually change line 400 of Modules/read_namelists.f90 of QE6.6 restoring the old default diago_david_ndim=4.
- At line 170 of atomic/src/import_upf.f90 exchange the calls to set_pawsetup and radial_grid_copy to have the atomic paw tests working again in QE6.6. First call radial_grid_copy.
- At line 131 of thermo_pw/qe/pheqscf.f90 remove tpiba2 to have example21 working again.
Patches for thermo_pw.1.3.1 and thermo_pw.1.3.2:
- Still a missing transformation of ftau into ft. Please change as in commit commit_3e39531 of 7/5/2021.
- The phonon calculation with US-PP and PAW-PP is unstable. Correct as in commit: commit_51b600a.
- To reproduce ph_example07 it is necessary to change line 1049 of file PW/src/pw_restart_new.f90 of QE6.6 as explained for version 1.3.0.
- QE6.6 does not stop any longer if some pools have no k point. thermo_pw is not working in this case. See in the FAQ 24 to solve this problem.
- tools/pdec.f90 does not compile with some compilers. Take the git version of this file and recompile.
- I usually change line 400 of Modules/read_namelists.f90 of QE6.6 restoring the old default diago_david_ndim=4.
- At line 170 of atomic/src/import_upf.f90 exchange the calls to set_pawsetup and radial_grid_copy to have the atomic paw tests working again in QE6.6. First call radial_grid_copy.
- At line 131 of thermo_pw/qe/pheqscf.f90 remove tpiba2 to have example21 working again.
Patches for thermo_pw.1.3.0:
- Still a missing transformation of ftau into ft. Please change as in commit commit_3e39531 of 7/5/2021.
- To reproduce ph_example07 it is necessary to change line 999 of file PW/src/pw_restart_new.f90 of QE6.5. Substitute angle1, angle2, starting_magnetization with starting_magnetization, angle1, angle2.
- At line 170 of atomic/src/import_upf.f90 exchange the calls to set_pawsetup and radial_grid_copy to have the atomic paw tests working again in QE6.5. First call radial_grid_copy.
Patches for thermo_pw.1.2.1:
- The phonon dispersions have a wrong scale when the dynamical matrices are written in the old format. Change as described in: commit 3bbabc9, in commit 42d4b2d and in commit 35fedef (Present also in version 1.2.0).
Patches for thermo_pw.1.2.0:
- When what=’elastic_constants_t’ a bug in QE prevents the use of use_free_energy=.TRUE. and elastic_algorithm=’energy_std’. Add the instruction: ibrav_ => NULL() at line 490 of Modules/qexsd.f90 of QE version 6.4.1.
Patches for thermo_pw.1.1.1:
- A bug in src/initialize_thermo_work.f90 could give wrong geometries for mur_lc_t for odd ngeo. Change line 607 of this file to delta=0.0_DP. (Only in versions 1.1.1 and 1.1.0).
Patches for thermo_pw.1.0.0:
- Grimme-d3 not implemented.
- zeu+US+pools not working. Apply the changes described in commit 6c70c8f.
- The plotted Gruneisen parameters have the wrong sign when lmurn=.TRUE.. Apply the change described in commit d78859e.
- Ionic relaxations are working only the first time pw.x is called. Apply the change described in commit 6a1a5d8.
Known problems of thermo_pw.0.9.0:
- Phonons + tetrahedra are not working (not implemented yet).
- Phonons + lsda are not working (use one of previous versions).
Patches for thermo_pw.0.9.0:
- EELS with US-PP has still a bug. At line 75 of
qe/addusddenseq.f90
changegg
withqmod
. - There is a problem with
sym_for_diago=.TRUE.
in the noncollinear/spin-orbit case. Usesym_for_diago=.FALSE.
or use the following file for qe/c_bands.f90 - The code stops using the old diagonalization in the phonon with the flag
sym_for_diago=.FALSE
. At line 144 ofqe/set_defaults_pw.f90
remove the_tpw
from the call toset_kplusq
. - Some compilers could have problems to compile the routine
thermo_pw/qe/set_kplusq.f90
. Use the following set_kplusq.f90. - The plotted Gruneisen parameters have the wrong sign when lmurn=.TRUE..
Apply the change described in commit d78859e.
Patches for thermo_pw.0.8.0:
- A bug might create some differences for phonons and US and PAW-PP calculated
with images, so for these cases update to
thermo_pw.0.9.0
is recommended. It might affect also previous versions that use the new xml output.
Patches for thermo_pw.0.7.0:
- With pools, all bands are red in the band plot. At line 550 of
src/sym_band_sub.f90
substitutenks
withnkstot
and recompile. - Some problems with Intel compiler can be solved as described in the patch 68ec9d7
- When
emin_input
andemax_input
are given in thethermo_control
namelist, some bands could be missing. The problem can be solved as described in the patch c39f6f0
Patches for thermo_pw.0.6.0:
- There is a problem with anharmonic properties calculated recovering the run
with
after_disp=.TRUE.
introduced in this version. Take the file thermo_pw/src/q2r_sub.f90, substitute the one ofthermo_pw.0.6.0
and recompile.
Moreover, at lines 11307 and 11336 oflib/point_group.f90
, change1D-8
with1D-5
. - Modules/clocks.f90 : line 41 set
maxclock=200
otherwisethermo_pw
might run out of clocks.
Patches for thermo_pw.0.5.0:
- Modules/clocks.f90 : line 41 set
maxclock=200
otherwisethermo_pw
might run out of clocks.
Patches for thermo_pw.0.4.0:
- A problem with
max_geometries
: this is a bug. Add the instructionph_geometries=0
at the line 431 of the filesrc/thermo_pw.f90
and recompile. - Compilation problem of
tools/test_colors.f90
: remove the RETURN command at the end of the file. - Error from
find_aux_ind_two_groups
in a phonon plot. Please check commit 122688 and make the same changes tosrc/matdyn_sub.f90
.
Patches for thermo_pw.0.3.0:
- With some compilers the code crashes at the beginning.
Please change line 571 of
src/thermo_readin.f90
fromCALL clean_ngeo()
toCALL clean_ngeo(ngeo,ibrav)
. - Anharmonic properties can be calculated only with the dynamical matrix in
.xml
format. Old format is not working. (See commit 110778). - The code is not recovering correctly and gives an error
check_stop_init
not initialized. (Please apply commit 110838).
Patches for thermo_pw.0.2.0:
- Problem in anharmonic properties: update to a newer version.
- Modules/clocks.f90 : line 41 set
maxclock=200
otherwisethermo_pw
might run out of clocks. - Bug fix: In anharmonic calculations some vertical lines in phonon dispersion
plots are double. Update to a newer version.
Patches for thermo_pw.0.1.0:
- src/Makefile : line 83 change
THERMO_PW
withthermo_pw
. - outdir: must end with a
/
, the other case is not dealt with correctly.
FAQ:
- How can I learn to use
thermo_pw
?
Please learn the basic use ofQuantum ESPRESSO
first. Then you can read thethermo_pw
tutorial and user’s guide and run the examples. TheseFAQ
assume that you have a basic understanding ofthermo_pw
and contain miscellaneous information not available in the user’s guide. - Can I study the thermal expansion of anisotropic solids using
thermo_pw
?
For some crystal systems, yes, but not all systems are supported or tested. Read carefully the user’s guide and use a version higher than0.3.0
. Also use dynamical matrices in.xml
format or the calculation of thermal expansion with Gruneisen parameters will not work with all versions previous to0.5.0
. - 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 that corresponds to a given temperature. In this way you evaluate the effect of thermal expansion on the band structure or on the gap. However an important temperature dependence of the band gaps and of the band structure comes from the electron-phonon interactions that are not included inthermo_pw
. For this purpose you should use another package. - Can I calculate the equilibrium geometry of a solid at a given temperature using
thermo_pw
?
Yes, but the calculation is as heavy as computing the anharmonic properties and it will take a lot of time and resources. You need to learn how to usethermo_pw
before starting such a complex calculation. - Which is the difference between
examples
andinputs
?
Examples
illustrate the features ofthermo_pw
and are fast, but are not converged.inputs
are more realistic examples. - Sometimes the examples of
thermo_pw
run correctly, sometimes they crash. Which is the problem?
The most probable reason is that you have not removed theresults
directory produced by a previous run of the example script. make thermo_pw
is not working. Compilation stops with some missing routines error.
Most probably you have not matched the versions ofQE
and ofthermo_pw
.- I have compiled
thermo_pw
but as I run it, it stops immediately. I am usingthermo_pw.0.3.0
.
Most probably you have not applied the patch described above. Update to a newer version. - After unpacking the tar file there is no
thermo_pw
directory.
The directory obtained unpacking the source files obtained from the github releases web page is calledthermo_pw-#version number
. Just change the name of this directory tothermo_pw
. - I cannot run the examples. I have problems using images. What
should I do?
If you want to run the examples without images edit the fileenvironment_variables
in the mainQE
directory. Search the two variablesPARA_IMAGE_PREFIX
andPARA_IMAGE_POSTFIX
and set-ni 1
. - I have not a parallel computer. I do not know what
mpi
is. Can I runthermo_pw
?
Onlythermo_pw.0.5.0
or later versions can be compiled in serial. All previous versions must be compiled together withmpi
. - An ionic relaxation converges with
pw.x
but not withthermo_pw.x
(version0.4.0
).
This is a bug of version0.4.0
. Please
update to a newer version. - The plot of the phonon dispersions is very strange with several disjoint
parts. Moreover the modes are not classified using symmetry. Why?
The mode symmetry analysis requires dynamical matrices in.xml
format. Please put the.xml
extension in thefildyn
variable in theph.x
input. Symmetry matrices are needed also to recognize symmetry equivalent point on the Brillouin zone. - The plot of the Gruneisen parameters has strange crossings in some points.
Why?
In some cases the plot of the Gruneisen parameters needs more accuracy on the symmetry analysis than the phonon plot. Accidentally degenerate frequencies might have very different Gruneisen parameters. Change the parameter5.D-2
at line 148 ofPHonon/PH/find_mode_sym.f90
to1.D-2
or less and recompilethermo_pw
. - Thermo_pw documentation does not compile and stops with an error
saying that
html.sty
is missing orlatex2html
is missing.
This is not a problem ofthermo_pw
. In order to compile the documentationthermo_pw
needs a quite completelatex
package. You can findhtml.sty
on the web and copy it insidethermo_pw/Doc
directory and you can install the packagelatex2html
. Even if you do not solve this problem,thermo_pw.x
will be available in thebin
directory of QE. Only the documentation will be missing. - The plot of the projected band structure has some problems. Some gaps
have the same color of the projected band structure.
This is a problem of old versions of gnuplot. Update to gnuplot 5.0 or higher. - The phonon dispersion plot seems strange, some branches are missing.
Please check that you used enough digits for the atomic positions. A typical problem appears when you write 1/3 and 2/3 in single precision. Thepw.x
code finds more symmetries than those that are actually present in the final modes and the routine that identifies the mode symmetry gets confused. - The code fails to identify the space group and stops with an error
‘‘point group orientation incorrect’’.
Most probably you are simulating a noncollinear magnetic system. Magnetic space group identification is not implemented but no check is done in versions up to 0.9.0. Please make the same changes as commit a68e6cb of 18 January 2018. If you find this error, you are using ibrav/=0, and your system is collinear, please send me your input. what='scf_disp'
and partial phonon computations withstart_q
,last_q
orstart_irr
last_irr
gives strange error messages.
The optionwhat='scf_disp'
requires all the dynamical matrices files in thedynamical_matrices
directory. Usewhat='scf_ph'
until you collect all the dynamical matrices and do a final run withwhat='scf_disp'
.- I am computing a phonon dispersion but some q points are not
computed.
Most probably you have not cleaned theoutdir
directory. Note that thethermo_pw
always tries to use the content of theoutdir
directory if present. - Is it possible to increase the temperature range?
Yes, you have to remove thetherm_files
directory while keeping thedynamical_matrices
and therestart
directories. If you removed theoutdir
directory, useafter_disp=.TRUE.
and setfildyn
with the name of the dynamical matrices. - Is it possible to increase the number of points used to compute the
phonon dos?
Yes, you have to remove both thephdisp_files
and thetherm_files
directories while keeping thedynamical_matrices
and therestart
directories. - I made a calculation with
with_eigen=.FALSE.
. Is it possible to restart withwith_eigen=.TRUE.
?
Yes, but you have to remove both thephdisp_files
and thetherm_files
directories, while keeping thedynamical_matrices
and therestart
directories. - I am using
thermo_pw 1.3.1
withQE6.6
but the code hangs or stops in random places when computing phonon dispersions.
Be careful with the use of pools. Since version6.6 QE
does not stop any longer if some pools have no k points, butthermo_pw
cannot deal with this case. In order to check if you are in this situation search the string ‘suboptimal parallelization: some nodes have no k-points’ in your output. The solution is to decrease the number of pools until the message disappear. If you want a permanent check of this problem usethermo_pw.1.3.2
. tmp_dir
cannot be opened.
Check youroutdir
directory in thepw.x
input. Usually this error indicates a missing parent directory. You might have an error in the path indicated inoutdir
or you are not allowed to write or execute the parent directory.- Error in namelist.
Most probably there is a mistake in a variable of the namelist. Please check accurately the user guide. The other possibility is that your editor added some hidden characters in the input file. Please check for it for instance with the commandcat -A input_file
. Another possibility is that you are reading the user guide of a version ofthermo_pw
different from the one you are using and the variable is not yet available. Please match the versions of the user guide and ofthermo_pw
. - Point group incompatible with the Bravais lattice.
This means that your point group is different from the point groups compatible with a given Bravais lattice. The calculation is still possible butthermo_pw
will not be able to find the space group and will not use the symmetries to simplify the calculation of the physical properties. Please check if you can find why some symmetries are missing, or why you have too many symmetries. Try to use one of the Bravais lattices suggested by the code. The message might also indicate that you have a supercell. If this is what you want, just ignore the message and continue the calculation, otherwise simplify your cell. - Is
thermo_pw
compatible with the GPU version of QE?
In part it is. With QE6.7 and with version 1.5.0 you can give the commandmake tpw_gpu
to obtain a version of the code that can be compiled withq-e-gpu.6.7
. Version 1.5.1 and QE6.8 or later versions can be compiled with CUDA enabled with the same commands used to enable CUDA in QE. You need to run configure with the CUDA options. Version 1.9.0 has been tested on Leonardo at CINECA with the nvidia fortran compiler. - The band or phonon symmetry is not indicated. There are many
question marks instead of the names of the irreducible representations.
The question marks indicate that the algorithm that finds the symmetry is confused and is unable to find a well defined symmetry. There are several possible reasons:- You might have a too small cut-off, or a too large threshold for the self consistence and the symmetry is not accurate enough. Please modify these parameters.
- Your atomic positions are quite close to a symmetry position but not exactly there. This is a common problem when using single precision atomic coordinates. Please correct the atomic coordinates adding more digits.
- There might be some problem with the pseudopotential and there is some ghost state. Please check other pseudopotentials to see if the problem disappears.
- If none of the above applies, there might be a problem in the algorithm
that finds the symmetry. Please send me your input or post it to one of
the forum mailing lists.
- Can I compute the temperature dependent elastic constants with
thermo_pw
?- Quasi-static elastic constants are available from version
0.6.0
.Quasi-harmonic elastic constants require version1.2.0
or later. The electronic contribution is implemented only starting for version1.4.0
. - Note that this feature is still work in progress and there are still some limitations. For instance, atomic coordinates are relaxed only at zero temperature.
- Note also that the quasi-harmonic calculation is very time consuming.
As an order of magnitude it requires hundreds of phonon dispersion
calculations.
- Quasi-static elastic constants are available from version
- Laue class not available when computing elastic constants.
- This error usually means that your system has less symmetry than expected from the Bravais lattice. For instance there is no Laue class available for a solid with a cubic Bravais lattice and point group symmetry different from T, T_d, T_h, O, or O_h.
- In this case the
thermo_pw
output writes that the point group and the Bravais lattice are not compatible and gives a set of Bravais lattices compatible with the symmetry. If you think that the symmetry of your system is correct, then you should use one of the Bravais lattices suggested bythermo_pw
. Instead if some symmetry is missing for other reasons (see the Quantum Espresso PW user’s guide for possible reasons), then correct the problem before running the elastic constant calculation. - If you are using supercells or you have a low dimensional system in a
supercell, then probably thermo_pw is not yet suited to compute automatically
the elastic constants of your system.
Thermo_pw
does not compile (with Quantum ESPRESSO version 7.0 or later). There is an error no rule to make filemake.depend
.- After writing
make join_qe
and returning to QE root directory you need to rerun./configure
beforemake thermo_pw
. (Thanks to H. Zhao for reporting the problem).
- After writing
Thermo_pw
has problems with fully relativistic PAW.- Before reporting such problems check the correct matching of the PP_AEWFC_REL tag in the UPF file and in the upf reading routine. Starting from version 6.5 of QE and until version 6.7 the xml tag for the small component of the all electron partial waves has been called PP_AEWFC_rel, while in previous versions of QE it was called PP_AEWFC_REL. As such the fully relativistic pseudopotentials created with a version of QE older than 6.5 (as many of the PPs distributed in the QE site) were no more read correctly. The code does not stop and most of the time produces only slightly uncorrect results expecially in the PP test. To read a PP that contains the PP_AEWFC_REL tag you can change the file upflib/read_upf_new.f90 and upflib/write_upf_new.f90 searching for the string PP_AEWFC_rel in both files and changing it into PP_AEWFC_REL. In QE6.8, QE7.0, and QE7.1 the routine upflib/read_upf_new.f90 has been corrected and these versions of QE read correctly UPF PPs with the tag PP_AEWFC_REL, but unfortunately continue to write UPF PP with the tag PP_AEWFC_rel. The routine upflib/write_upf_new.f90 must be changed to make the code consistent and to read correctly the pseudopotential generated by the same version of QE. For version QE7.0 apply also the correction to PW/src/v_of_rho.f90 described above.