atomistics.workflows.quasiharmonic.QuasiHarmonicWorkflow#

class atomistics.workflows.quasiharmonic.QuasiHarmonicWorkflow(structure: Atoms, num_points: int = 11, vol_range: float = 0.05, fit_type: str = 'polynomial', fit_order: int = 3, interaction_range: float = 10.0, displacement: float = 0.01, dos_mesh: int = 20, primitive_matrix: ndarray | None = None, number_of_snapshots: int | None = None)[source]#

Bases: EnergyVolumeCurveWorkflow

__init__(structure: Atoms, num_points: int = 11, vol_range: float = 0.05, fit_type: str = 'polynomial', fit_order: int = 3, interaction_range: float = 10.0, displacement: float = 0.01, dos_mesh: int = 20, primitive_matrix: ndarray | None = None, number_of_snapshots: int | None = None)[source]#

Initialize the QuasiHarmonicWorkflow.

Parameters:
  • structure (Atoms) – The input structure.

  • num_points (int, optional) – The number of points for the energy-volume curve. Defaults to 11.

  • vol_range (float, optional) – The range of volume strain. Defaults to 0.05.

  • fit_type (str, optional) – The type of fitting for the energy-volume curve. Defaults to “polynomial”.

  • fit_order (int, optional) – The order of the fitting polynomial. Defaults to 3.

  • interaction_range (float, optional) – The interaction range for supercell generation. Defaults to 10.0.

  • displacement (float, optional) – The displacement for finite difference calculation. Defaults to 0.01.

  • dos_mesh (int, optional) – The density of states mesh. Defaults to 20.

  • primitive_matrix (np.ndarray, optional) – The primitive matrix for supercell generation. Defaults to None.

  • number_of_snapshots (int, optional) – The number of snapshots for each structure. Defaults to None.

Methods

__init__(structure[, num_points, vol_range, ...])

Initialize the QuasiHarmonicWorkflow.

analyse_structures(output_dict[, output_keys])

Analyze structures using Phonopy.

generate_structures()

Generate structures for the QuasiHarmonicWorkflow.

get_thermal_properties([t_min, t_max, ...])

Returns thermal properties at constant volume in the given temperature range.

Attributes

fit_dict

Get the fit dictionary.

analyse_structures(output_dict: dict, output_keys: tuple[str, ...] = ('force_constants', 'mesh_dict')) tuple[dict, dict][source]#

Analyze structures using Phonopy.

Parameters:
  • output_dict (dict) – Dictionary of output data for different strains.

  • output_keys (tuple[str], optional) – Keys to include in the output dictionary. Defaults to (“force_constants”, “mesh_dict”).

Returns:

A tuple containing the following:
  • eng_internal_dict (dict): Dictionary of internal energies for different strains.

  • phonopy_collect_dict (dict): Dictionary of Phonopy analysis results for different strains.

Return type:

tuple[dict, dict]

property fit_dict: dict[str, Any]#

Get the fit dictionary.

Returns:

The fit dictionary.

Return type:

dict

generate_structures() dict[source]#

Generate structures for the QuasiHarmonicWorkflow.

Returns:

A dictionary containing the calculated energies and forces for different strains.

Return type:

dict

get_thermal_properties(t_min: float = 1.0, t_max: float = 1500.0, t_step: float = 50.0, temperatures: ndarray | None = None, constant_volume: bool = False, output_keys: tuple[str, ...] = ('temperatures', 'volumes', 'free_energy', 'entropy', 'heat_capacity'), *, cutoff_frequency: float | None = None, pretend_real: bool = False, band_indices: ndarray | None = None, is_projection: bool = False, quantum_mechanical: bool = True) dict[source]#

Returns thermal properties at constant volume in the given temperature range. Can only be called after job successfully ran.

Parameters:
  • t_min (float) – minimum sample temperature

  • t_max (float) – maximum sample temperature

  • t_step (int) – temperature sample interval

  • temperatures (array_like, float) – custom array of temperature samples, if given t_min, t_max, t_step are ignored.

  • cutoff_frequency (float) – cutoff frequency for phonon modes

  • pretend_real (bool) – if True, the real part of the phonon frequencies is returned

  • band_indices (array_like, int) – indices of bands to calculate

  • is_projection (bool) – if True, the phonon DOS is projected onto the band structure

  • quantum_mechanical (bool) – if True, the quantum mechanical partition function is used

  • output_keys (tuple[str]) – keys to include in the output dictionary

Returns:

thermal properties as returned by Phonopy

Return type:

Thermal