next up previous contents
Next: 4.11 what='scf_disp' Up: 4 Input variables Previous: 4.9 what='plot_bz'   Contents

4.10 what='scf_ph'

With this option the code makes a self-consistent calculation followed by a phonon calculation. The phonon calculation is controlled by the file ph_control and can be at a single q point or on a mesh of q points. The different representations are calculated in parallel when several images are available. No other input variable is necessary. The outputs of this calculation are the dynamical matrices files.
thermo_pw adds to the ph.x code the ability to compute the complex dielectric constant tensor of insulators as a function of a complex frequency for the study of optical properties within time-dependent density functional perturbation theory (TD-DFPT). As a default the TD-DFPT algorithm uses the Sternheimer equation and a self-consistent loop, but it is also possible to use a Lanczos chain. The option is activated in the ph.x input by setting epsil=.TRUE. and fpol=.TRUE., but at variance with the ph.x code, the frequencies must be specified as complex numbers. The following additional variables can be put in the input of the ph.x code, to select the frequency range and the number of frequencies to compute:
freq_line : if this variable is .TRUE., after the FREQUENCY keyword
          the code expects the number of frequency points and the 
          starting and final frequencies. 
          If .FALSE. the number of frequencies and a list of frequencies 
          are given. The frequencies are complex numbers and are given 
          with a real and an imaginary part (in Ry), without parenthesis.
          Default: .FALSE.
delta_freq : When freq_line is .TRUE. instead of giving the last frequency 
          of the line one can give the distance between two frequency points
          delta_freq as a complex number. The last point of the line is 
          calculated using the number of frequencies nfs and the first 
          frequency. When delta_freq is not zero the last frequency 
          is not used and can be omitted.
          Default: complex, (0.0, 0.0).
start_freq : Number of the initial frequency calculated in the job in
          the sequence of frequencies.
          Default: integer  1
last_freq : Number of the final frequency calculated in the job in the
          sequence of frequencies.
          Default: integer nfs (total number of frequencies)
lfreq_ev  : If .TRUE. the units of the frequencies are eV instead of the
          default Ry units.
          Default: logical .FALSE.
linear_im_freq: This option is used only when freq_line=.TRUE. 
          When linear_freq_im is .TRUE., the imaginary part of each 
          frequency is calculated as eta * freq where eta is the imaginary 
          part of the first frequency on the frequency line.
          Default: logical .FALSE.
llanczos: When this flag is .TRUE. at finite frequencies a Lanczos 
          algorithm is used to solve the linear system. Can be very fast 
          but might require much more memory than the standard algorithm.
          Presently it is incompatible with images.
          Default : .FALSE.
lanczos_steps: steps of the Lanczos chain.
          Default : interger 2000
lanczos_steps_ext:  steps of the extrapolated lanczos chain
          Default: integer 10000
lanczos_restart_steps: number of steps between saving of the Lanczos status.
          If 0 the status is saved only at the end of the run. Use 
          recover=.TRUE. to resume an interrupted lanczos chain or to
          increase the number of steps.
          Default: integer 0
extrapolation : extrapolation type. Presently only 'no' or 'average' are
          available. In the first case no extrapolation is applied, in
          the second the average of the beta and gamma is used.
          Default: character 'average'
pseudo_hermitian : when .TRUE. a pseudo-hermitian algorithm is used to 
          make the Lanczos steps. Should be twice faster than the default
          non hermitian algorithm.
          Default: .TRUE.
only_spectrum : Computes only the spectrum assuming that the Lanczos
          chain coefficients are in a file. It gives error if the number
          of requested Lanczos steps is larger than those available on file.
          Default: logical .FALSE.
lcg:      When this flag is .TRUE. a global conjugate gradient algorithm
          is used to compute the dielectric constant and the phonon 
          frequencies. It will not require mixing, but will use more
          memory than the standard algorithm (for insulators only).
          It is not available for the frequency dependent case.
          Default : .FALSE.
When in the input of the phonon code a non zero wave-vector q is specified, the previous options produce the inverse of the dielectric constant as a function of the frequency at the wave-vector q (this option can be used both for insulators and metals).
Additional variables can be specified in the thermo_pw input to control where the frequency dependent dielectric constant is written and plotted and how the images divide the work:
flepsilon : beginning of the name of the file where the frequency dependent 
          dielectric constant is written (the code adds the extensions _re
          and _im)
          Default: character(len=*) 'epsilon'
flpsepsilon : name of the postscript file where the frequency dependent 
          dielectric constant is plotted.
          Default: character(len=*) 'output_epsilon'
omega_group : number of frequencies calculated together by each image.
          This variables is used only with images.
          Default: integer 1.
An example of the use of this option can be found in example03, example16, example17, example20, and example21.
Number of tasks for this option: for a phonon calculation the number of parallelizable tasks of the phonon code (smaller but of the order of the number of q points times 3Nat , where Nat is the number of atoms in the unit cell), for a dielectric constant calculation using Sternheimer equation nfs/omega_group, number of frequencies, divided the number of frequencies in each group, for a dielectric constant calculation using Lanczos 1 (images not allowed).

It is also possible to separate the self-consistent and the phonon calculation, by running first thermo_pw.x using what='scf' and then running, on the same directory, thermo_pw.x using what='scf_ph'. The same input can be used in the two calculations, only the thermo_control file need to be changed. The number or processors/pools/images can be changed in the same cases in which this is possible in Quantum ESPRESSO.

Using images in a phonon calculation with the master/slave approach has an overhead because each image must recalculate the initialization and the band structure at each task, or check if the bands are already on disk, calculated previously by the same image. On some systems with slow disks it could be faster to recalculate the bands instead of reading them from disk. It is also possible to use the image breaking suggested by the ph.x code that keeps, as much as possible, on the same image the tasks that require the same initialization without recomputing it. The input variables that control this part of the calculation are:

force_band_calculation : if .TRUE. the bands are never read from disk but
              recalculated when needed.
              Default: logical .FALSE.
use_ph_images : if .TRUE. each image makes a set of tasks so as to minimize
              the number of band calculations and phonon initialization.
              Default: logical .FALSE. if nimage>1 .TRUE. nimage=1.
sym_for_diago : When .TRUE. use symmetry to calculate the bands and the 
              unperturbed wavefunctions instead of diagonalizing 
              the Hamiltonian.
              Default: logical .FALSE.


next up previous contents
Next: 4.11 what='scf_disp' Up: 4 Input variables Previous: 4.9 what='plot_bz'   Contents
2019-04-16