2.1. Make input file for qha

Make input file for qha using data from Quantum ESPRESSO.

class qha.basic_io.input_maker.FromQEOutput(inp_file_list, inp_static, inp_q_points)[source]

A class that can generate a standard “input” file for the qha run command if the original data is given by Quantum ESPRESSO.

Parameters
  • inp_file_list (str) –

    A YAML file that contains three keys and values:

    1. formula_unit_number: The number of formula units in a unit cell.

    2. comment: Comment that could be added as the first line of the input, which usually specifies the system which user wants to calculate.

    3. frequency_files: A YAML list of strings specifying all the frequency files given by Quantum ESPRESSO matdyn.x.

    To become more familiar with YAML syntax, which is used in the “settings” file, please refer to this documentation.

  • inp_static (str) – A pure text file specifying the energies and pressures of each volume from the static calculation. The order of these volumes must be the same as the frequency_files listing order.

  • inp_q_points (str) – A pure text file specifying the q-points’ coordinates and their corresponding weights in the Brillouin zone.

read_file_list()[source]

Read all the files’ names for frequency files given by Quantum ESPRESSO program matdyn.x.

Return type

None

static read_frequency_file(inp)[source]

Read Quantum ESPRESSO’s output for phonon frequencies. This method is provided for reading only one file.

Parameters

inp (str) – The name or path of the file.

Return type

Tuple[array(float64, 1d, A), array(float64, 2d, A)]

Returns

The q-space coordinates of each q-point in the file and corresponding frequencies for each q-point on each band.

read_frequency_files()[source]

Read the phonon frequencies for all files (which are specified in the frequency_files key of the settings file).

Return type

None

read_q_points()[source]

Read q-points’ coordinates and their weights in the Brillouin zone. The q-points’ coordinates are supposed to be three-dimensional. No other information should be given. If user still wants to, write lines that start with #, and then they will be ignored when reading.

Return type

None

read_static()[source]

Read static information, including pressures (which will not be used in calculation by now), optimized volumes, and static energies.

Return type

None

write_to_file(outfile='input')[source]

Write all data to a file outfile, which will be regarded as standard input file for qha.

Parameters

outfile – The path or name of the output file, by default is 'input' (for further calculation).

Return type

None