analysis

Band class

class analysis.Band(process)[source]

Band class to analyze the phonon dispersion. Its instance variables contain an instance of core.PostProcess class storing the information on eigen-frequency and eigen-mode. The given information is further refined to make a dispersion relation w(k) along the k-point path connecting the high-symmetry points. The dispersion is written to external data and graphic files using the analysis.Band.write and analysis.Band.plot (or analysis.Band.plot_with_dos) methods, respectively.

Parameters

process (core.PostProcess) – Instance of PostProcess class

plot(k_labels=[], atoms=None, elimit=None, color='tab:orange', option='plain', cmap='jet', colorbar_label=None, colorbar_location='right')[source]

Plot phonon Band in the file name of band.png.

Parameters
  • k_labels (List[str]) – The label of high-symmetry k-points, defaults to []

  • atoms (List[int]) – The Index of atoms to be projected in Band plot, defaults to None

  • elimit (List[int]) – Energy (unit: THz) limitation of Band plot, defaults to None

  • color (str) – The color of Band line, defaults to tab:orange

  • option (str) – Option for Band projection plot, defaults to plain

  • cmap (str) – Colormaps accessible via matplotlib, defaults to jet

  • colorbar_label (str) – The label of colorbar for projection plot, defaults to None

  • colorbar_location (str) – Location of colorbar, defaults to right

plot_with_dos(k_labels=[], band_atoms=None, elimit=None, band_color='tab:orange', band_option='plain', cmap='jet', colorbar_label=None, dos_object=None, dos_atoms=None, dos_color='tab:orange', dos_option='plain', dos_legends=None, legend_location='upper right', bulk_dos=None, bulk_option='fill', bulk_legend=None, proportion=1.0)[source]

Plot phonon Band with associated DOS in the file name of band_dos.png.

Parameters
  • k_labels (List[str]) – The label of high-symmetry k-points, defaults to []

  • band_atoms (List[int]) – The Index of atoms to be projected in Band plot, defaults to None

  • elimit (List[int]) – Energy (unit: THz) limitation of Band plot, defaults to None

  • band_color (str) – The color of Band line, defaults to tab:orange

  • band_option (str) – Option for Band projection plot, defaults to plain

  • cmap (str) – Colormaps accessible via matplotlib, defaults to jet

  • colorbar_label (str) – The label of colorbar for projection plot, defaults to None

  • dos_object (analysis.dos) – Instance of DOS class, defaults to None

  • dos_atoms (List[int]) – The Index of atoms to be projected in DOS plot, defaults to None

  • dos_color (str) – The color of total DOS line, defaults to tab:orange

  • dos_option (str) – Option for DOS projection plot, defaults to plain

  • dos_legends (List[str]) – Legends for the projected DOS lines, defaults to None

  • legend_location (str) – Location of DOS legend, defaults to upper right

  • bulk_dos (np.ndarray[float]) – ‘(total number of frequency, 2) size’ matrix for bulk phonon DOS, defaults to None

  • bulk_option (str) – Option for bulk DOS plot, defaults to fill

  • bulk_legend (str) – Legends for the bulk DOS line, defaults to None

  • proportion (float) – Constant to be multiplied to bulk DOS, defaults to 1.0

set()[source]

Set the k-point path connecting the high-symmetry points and corresponding eigen-frequency, w(k).

write(out_folder: str = '.')[source]

Write phonon Band in the file name of band.dat.

Parameters

out_folder (str) – Folder path for band.dat to be stored, defaults to .

DOS class

class analysis.DOS(process, sigma: float = 0.1, num_dos: int = 200)[source]

DOS class to analyze the phonon dispersion. Its instance variables contain an instance of core.PostProcess class storing the information on eigen-frequency and eigen-mode. The given information is further refined to make density of states n(w) by sampling the k-point grids. The dispersion is written to external data and graphic files using the analysis.DOS.write and analysis.DOS.plot methods, respectively.

Parameters
  • process (core.PostProcess) – Instance of PostProcess class

  • sigma (float) – Sigma of gaussian smearing (if 0.0: tetrahedron method is used instead), defaults to 0.1

  • num_dos (int) – The number of DOS points, defaults to 200

plot(plot_total=True, atoms=None, elimit=None, color='tab:orange', option='plain', orientation='horizontal', label_position='left', legends=None, legend_location='best', bulk_dos=None, bulk_option='fill', bulk_legend=None, proportion=1.0)[source]

Plot DOSs in the file name of dos.png.

Parameters
  • plot_total (bool) – Plot total DOS (True) or not (False), defaults to True

  • atoms (List[int]) – The Index of atoms to be projected in DOS plot, defaults to None

  • elimit (List[int]) – Energy (unit: THz) limitation of DOS plot, defaults to None

  • color (str) – The color of total DOS line, defaults to tab:orange

  • option (str) – Option for DOS projection plot, defaults to plain

  • orientation (str) – Orientation of DOS plot, defaults to horizontal

  • label_position (str) – Y-axis label position (whether left or right) in vertical DOS plot, defaults to left

  • legends (List[str]) – Legends for the projected DOS lines, defaults to None

  • legend_location (str) – Location of DOS legend, defaults to best

  • bulk_dos (np.ndarray[float]) – ‘(total number of frequency, 2) size’ matrix for bulk phonon DOS, defaults to None

  • bulk_option (str) – Option for bulk DOS plot, defaults to fill

  • bulk_legend (str) – Legends for the bulk DOS line, defaults to None

  • proportion (float) – Constant to be multiplied to bulk DOS, defaults to 1.0

set()[source]

Set the frequency points and corresponding density of states, n(w).

write(out_folder='.')[source]

Write total and projected DOSs in the file name of total_dos.dat and projected_dos.dat, respectively.

Parameters

out_folder (str) – Folder path for total_dos.dat and projected_dos.dat to be stored, defaults to .

Mode class

class analysis.Mode(process)[source]

Mode class to analyze the phonon dispersion. Its instance variables contain an instance of core.PostProcess class storing the information on eigen-frequency and eigen-mode. Based on the given information, phonon modes are visualized at a specified k-point. The vibrational motions are written to external data and movie files using the analysis.Mode.write and analysis.Mode.plot methods, respectively.

Parameters

process (core.PostProcess) – Instance of PostProcess class

plot(out_folder='.', unit_cell='POSCAR', code_name='vasp')[source]

Visualize phonon Mode using modules of the Atomic Simulation Environment (ASE).

Parameters
  • out_folder (str) – Folder path for Trajectory.traj to be stored, defaults to .

  • unit_cell (str) – Path of unit cell input file, defaults to POSCAR

  • code_name (str) – Specification of the file-format by a DFT program, defaults to vasp

set(mode_inds: InterPhon.util.MatrixLike = (0,), k_point: InterPhon.util.MatrixLike = (0.0, 0.0, 0.0))[source]

Set the k-point, mode index, and corresponding phonon mode.

Parameters
  • mode_inds (MatrixLike or int) – The index of phonon mode labeled by (k-point, index)

  • k_point (MatrixLike) – The k-point of phonon mode labeled by (k-point, index)

write(out_folder='.')[source]

Write phonon Mode in the file name of XDATCAR_phonon_mode.

Parameters

out_folder (str) – Folder path for XDATCAR_phonon_mode to be stored, defaults to .

write_mode_displace(out_folder='.', amplitude: float = 1.0, code_name: str = 'vasp')[source]

Write a supercell file which is commensurate with k-point and displaced along phonon Mode in the file name of MPOSCAR.

Parameters
  • out_folder (str) – Folder path for MPOSCAR to be stored, defaults to .

  • amplitude (float) – Amplitude of vibrational motions, defaults to 1.0

  • code_name (str) – Specification of the file-format by a DFT program, defaults to vasp

ThermalProperty class

class analysis.ThermalProperty(process, temp: InterPhon.util.MatrixLike = range(0, 1000, 10))[source]

ThermalProperty class to analyze the thermal properties determined by phonon dispersion. Its instance variables contain an instance of core.PostProcess class storing the information on eigen-frequency and eigen-mode. The given information is further refined to predict vibrational entropy and free energy. The thermal properties are written to external data and graphic files using the analysis.ThermalProperty.write and analysis.ThermalProperty.plot methods, respectively.

Parameters
  • process (core.PostProcess) – Instance of PostProcess class

  • temp (MatrixLike) – Temperatures to be studied, defaults to range(0, 1000, 10)

plot(legend_location='best')[source]

Plot thermal properties in the file name of thermal_properties.png.

Parameters

legend_location (str) – Location of DOS legend, defaults to best

set()[source]

Set the vibrational entropy and free energy in the range of temperatures.

write(out_folder='.')[source]

Write thermal properties in the file name of thermal_properties.dat.

Parameters

out_folder (str) – Folder path for thermal_properties.dat to be stored, defaults to .