next up previous contents
Next: 3.29 what='polarization_geo' Up: 3. Input variables Previous: 3.27 what='mur_lc_t'   Contents

3.28 what='elastic_constants_geo'

With this option the code can compute the elastic constants and elastic compliances as a function of temperature using the quasi-harmonic approximation. For the same geometries that are used to compute the elastic constants with the elastic_algorithm='energy_std' or elastic_algorithm= 'energy', the code can compute the phonon dispersions and compute the elastic constants at each temperature as the second derivatives of the Helmholtz free energy with respect to strain. The second derivatives are corrected so that the stress-strain elastic constants are shown in the plots and in output. The temperature dependent elastic constants are calculated on a regular grid of unperturbed geometries, the same geometries chosen by the option what='mur_lc', and written on separate files, one for each unperturbed geometry, inside the directory anhar_files. The variables fact_ngeo and ngeo_ph are not available with this option. The unperturbed geometries can also be chosen by the user using the variable lgeo_from_file=.TRUE.. Using start_geometry_qha and last_geometry_qha it is possible to compute the temperature dependent elastic constants for selected or for a single unperturbed configuration. The use of start_geometry and last_geometry is also allowed but it refers to the global number of geometries necessary to compute the elastic constants in all the grid.

Since the calculation of the Helmholtz free energy derivatives is quite heavy, it has to be requested explicitly using the flag use_free_energy=.TRUE..
By default, the code computes only the elastic constants at T = 0 K as second derivatives of the energy and writes them on files in the directory elastic_ constants. A run of thermo_pw using what='mur_lc_t' having on files the T = 0 K elastic constants in the directory elastic_constants allows the calculation of the anharmonic properties using temperature dependent elastic constants and bulk moduli obtained by interpolating (within the ``quasi-static approximation") the elastic constants computed by this option at the crystal parameters that, at each temperature, minimize the free energy. When both the T = 0 K and the temperature dependent elastic constants are on file in the directory elastic_constants and anhar_files respectively, the latter are used. When both use_free_energy=.TRUE. and lel_free_energy=.TRUE. the electronic free energy is added to the free energy before computing the elastic constants. In this case the code expects to find on file (in therm_files) the electronic thermodynamic properties for each perturbed geometry. These files are produced with this same option and the flags use_free_energy=.FALSE. and lel_free_energy= .TRUE.. In this case the code computes the electronic thermodynamic properties at each perturbed geometry and writes them on file, without calculating the elastic constants. The variables that control this run are:

use_free_energy : when .TRUE. computes the elastic constants 
              as second derivatives of the Helmholtz free 
              energy with respect to strain. When .FALSE. 
              the elastic constants are computed as second 
              derivatives of the energy or using the 
              stress-strain algorithms.
              Default: .FALSE.
start_geometry_qha : Among the geometries considered by the 
              option mur_lc_t the calculations of elastic 
              constants are done starting from this geometry.
              Default: integer 1
last_geometry_qha : Among the geometries considered by the 
              option mur_lc_t the calculations of elastic 
              constants are done only up to this geometry.
              Default: integer total number of geometries.
ltau_el_cons_from_file : if .TRUE. the geometry as well as the
             atomic coordinates of each unperturbed geometry
             are read from file. They must be in the restart
             directory calculated in a previous 
             what='mur_lc' calculation. The coordinates of the
             distorted geometries are calculated applying strain
             to these coordinates and then relaxing. The names of the 
             files with these geometries contain the string .mlc.
             These files are always written by an what='mur_lc' 
             calculation, but not used by default. When atoms can
             move this flag is compulsory when using frozen_ion=.TRUE.
             since the relaxed equilibrium coordinates have to be
             strained. When frozen_ion=.FALSE. the use of this flag
             could speed up the calculation but does not change the
             results. 
             Default : .FALSE.
ltau_from_file : if .TRUE. the atomic coordinates of each 
             distorted geometry are read from file and not 
             calculated by a strain of the coordinates of the 
             equilibrium geometries. 
             They must be in the restart directory calculated in 
             a previous what='elastic_constants_geo' calculation.
             Be careful with this flag because frozen_phonon=.TRUE.
             might not work if the coordinates have been relaxed
             by a previous run.
             Default : .FALSE.
only_anhar : if .TRUE. the code reads only the files of the therm_files
             directory that contain the thermodynamic functions and 
             computes the QHA quantities. The energies in restart directory
             need also to be present. The dynamical matrices instead are 
             not necessary. The typical use of this flag is together with
             the flag save_distorted_energies=.TRUE. in a previous 
             what='mur_lc_t' calculation.
             Default : .FALSE.

An example for this option with use_free_energy=.FALSE. can be found in example22 while an example with use_free_energy=.TRUE. can be found in example23.
Number of tasks for this option: The product of the number of tasks needed by the what='scf_elastic_constants' option and the number of geometries used with what=mur_lc_t when use_free_energy=.FALSE.. When use_free_ energy=.TRUE. and all_geometries_together=.TRUE. the number of tasks of the previous case is further multiplied by the number of tasks needed to compute a phonon dispersion (see above the option what='scf_ph').
When use_free_energy=.TRUE. and all_geometries_together=.FALSE. the number of tasks of this option is equal to the number of tasks needed to compute a phonon dispersion.


next up previous contents
Next: 3.29 what='polarization_geo' Up: 3. Input variables Previous: 3.27 what='mur_lc_t'   Contents
2026-08-13