pwscf

Some handy tools to construct strings for building pwscf input files. Readers for QE postprocessing tool output (matdyn.x, dynmat.x).

EPS

Double-precision floating-point number type, compatible with Python float and C double.

atpos_str(symbols, coords[, fmt, zero_eps, ...])

Convenience function to make a string for the ATOMIC_POSITIONS section of a pw.x input file.

atpos_str_fast(symbols, coords)

Fast version of atpos_str() for usage in loops.

atspec_str(symbols, masses, pseudos)

Convenience function to make a string for the ATOMIC_SPECIES section of a pw.x input file.

bool2str(x)

Return Fortran bool string for bool input.

ibrav2cell(ibrav, celldm)

Convert PWscf's ibrav + celldm to cell.

kpoints_str(lst[, base])

[3,3,3] -> "nk1=3,nk2=3,nk3=3"

kpoints_str_pwin(lst[, shift])

[3,3,3] -> " 3 3 3 0 0 0" Useful for pwscf input files, card K_POINTS.

kpoints_str_pwin_full(lst[, shift, gamma])

Full k-points string for pw.x input files, card K_POINTS.

kpointstr(lst[, base])

[3,3,3] -> "nk1=3,nk2=3,nk3=3"

kpointstr_pwin(lst[, shift])

[3,3,3] -> " 3 3 3 0 0 0" Useful for pwscf input files, card K_POINTS.

kpointstr_pwin2(lst[, shift, gamma])

Full k-points string for pw.x input files, card K_POINTS.

read_all_dyn(path[, nqpoints, natoms, base])

Same as read_matdyn_modes(), but instead of the file matdyn.modes which contains freqs,vecs for all qpoints, we read all dynamical matrix files in path, one per qpoint.

read_dyn(filename[, natoms])

Read one dynamical matrix file (for 1 qpoint) produced by ph.x and extract the same as read_matdyn_modes() for this qpoint only.

read_dynmat([path, natoms, filename, axsf])

Read dynmat.x output.

read_dynmat_ir_raman([filename, natoms, cols])

Read dynmat.x text output file and extract IR and Raman intensities.

read_dynmat_out(*args, **kwds)

Backward compat wrapper for read_dynmat_ir_raman().

read_matdyn_freq(filename)

Parse frequency file produced by QE's matdyn.x ("flfrq" in matdyn.x input, usually "matdyn.freq" or so) when calculating a phonon dispersion on a grid (ldisp=.true., used for phonon dos) or a pre-defined k-path in the BZ.

read_matdyn_modes(filename[, natoms])

Parse modes file produced by QE's matdyn.x.