From 2453cdbe2470327c7f5ffdb5ac58d70d4d139e5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Jan=C3=9Fen?= Date: Wed, 6 Dec 2023 23:51:51 +0100 Subject: [PATCH 1/2] Quasiharminic: Add additional parameters for get_thermal_properties() --- atomistics/workflows/phonons/workflow.py | 21 +++++++++- .../workflows/quasiharmonic/workflow.py | 41 +++++++++++++++++-- 2 files changed, 56 insertions(+), 6 deletions(-) diff --git a/atomistics/workflows/phonons/workflow.py b/atomistics/workflows/phonons/workflow.py index 37fcdf61..ef8aac50 100644 --- a/atomistics/workflows/phonons/workflow.py +++ b/atomistics/workflows/phonons/workflow.py @@ -119,7 +119,17 @@ def analyse_structures(self, output_dict): self._dos_dict = self.phonopy.get_total_dos_dict() return self._mesh_dict, self._dos_dict - def get_thermal_properties(self, t_min=1, t_max=1500, t_step=50, temperatures=None): + def get_thermal_properties( + self, + t_min=1, + t_max=1500, + t_step=50, + temperatures=None, + cutoff_frequency=None, + pretend_real=False, + band_indices=None, + is_projection=False + ): """ Returns thermal properties at constant volume in the given temperature range. Can only be called after job successfully ran. @@ -135,7 +145,14 @@ def get_thermal_properties(self, t_min=1, t_max=1500, t_step=50, temperatures=No :class:`Thermal`: thermal properties as returned by Phonopy """ self.phonopy.run_thermal_properties( - t_step=t_step, t_max=t_max, t_min=t_min, temperatures=temperatures + t_step=t_step, + t_max=t_max, + t_min=t_min, + temperatures=temperatures, + cutoff_frequency=cutoff_frequency, + pretend_real=pretend_real, + band_indices=band_indices, + is_projection=is_projection, ) tp_dict = self.phonopy.get_thermal_properties_dict() tp_dict["free_energy"] *= kJ_mol_to_eV diff --git a/atomistics/workflows/quasiharmonic/workflow.py b/atomistics/workflows/quasiharmonic/workflow.py index fb317035..58baf05c 100644 --- a/atomistics/workflows/quasiharmonic/workflow.py +++ b/atomistics/workflows/quasiharmonic/workflow.py @@ -72,7 +72,17 @@ def analyse_structures(self, output_dict): dos_collect_dict[strain] = dos_dict return eng_internal_dict, mesh_collect_dict, dos_collect_dict - def get_thermal_properties(self, t_min=1, t_max=1500, t_step=50, temperatures=None): + def get_thermal_properties( + self, + t_min=1, + t_max=1500, + t_step=50, + temperatures=None, + cutoff_frequency=None, + pretend_real=False, + band_indices=None, + is_projection=False + ): """ Returns thermal properties at constant volume in the given temperature range. Can only be called after job successfully ran. @@ -90,12 +100,28 @@ def get_thermal_properties(self, t_min=1, t_max=1500, t_step=50, temperatures=No tp_collect_dict = {} for strain, phono in self._phonopy_dict.items(): tp_collect_dict[strain] = phono.get_thermal_properties( - t_step=t_step, t_max=t_max, t_min=t_min, temperatures=temperatures + t_step=t_step, + t_max=t_max, + t_min=t_min, + temperatures=temperatures, + cutoff_frequency=cutoff_frequency, + pretend_real=pretend_real, + band_indices=band_indices, + is_projection=is_projection, ) return tp_collect_dict def get_thermal_expansion( - self, output_dict, t_min=1, t_max=1500, t_step=50, temperatures=None + self, + output_dict, + t_min=1, + t_max=1500, + t_step=50, + temperatures=None, + cutoff_frequency=None, + pretend_real=False, + band_indices=None, + is_projection=False ): ( eng_internal_dict, @@ -103,7 +129,14 @@ def get_thermal_expansion( dos_collect_dict, ) = self.analyse_structures(output_dict=output_dict) tp_collect_dict = self.get_thermal_properties( - t_min=t_min, t_max=t_max, t_step=t_step, temperatures=temperatures + t_min=t_min, + t_max=t_max, + t_step=t_step, + temperatures=temperatures, + cutoff_frequency=cutoff_frequency, + pretend_real=pretend_real, + band_indices=band_indices, + is_projection=is_projection, ) temperatures = tp_collect_dict[1.0]["temperatures"] From b2ac434c234c02133eea0050a3dbf90c7ad544d5 Mon Sep 17 00:00:00 2001 From: pyiron-runner Date: Thu, 7 Dec 2023 06:38:45 +0000 Subject: [PATCH 2/2] Format black --- atomistics/workflows/phonons/workflow.py | 2 +- atomistics/workflows/quasiharmonic/workflow.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/atomistics/workflows/phonons/workflow.py b/atomistics/workflows/phonons/workflow.py index ef8aac50..b7c54b6c 100644 --- a/atomistics/workflows/phonons/workflow.py +++ b/atomistics/workflows/phonons/workflow.py @@ -128,7 +128,7 @@ def get_thermal_properties( cutoff_frequency=None, pretend_real=False, band_indices=None, - is_projection=False + is_projection=False, ): """ Returns thermal properties at constant volume in the given temperature range. Can only be called after job diff --git a/atomistics/workflows/quasiharmonic/workflow.py b/atomistics/workflows/quasiharmonic/workflow.py index 58baf05c..92deb562 100644 --- a/atomistics/workflows/quasiharmonic/workflow.py +++ b/atomistics/workflows/quasiharmonic/workflow.py @@ -81,7 +81,7 @@ def get_thermal_properties( cutoff_frequency=None, pretend_real=False, band_indices=None, - is_projection=False + is_projection=False, ): """ Returns thermal properties at constant volume in the given temperature range. Can only be called after job @@ -121,7 +121,7 @@ def get_thermal_expansion( cutoff_frequency=None, pretend_real=False, band_indices=None, - is_projection=False + is_projection=False, ): ( eng_internal_dict,