From e9993fd254c5ed0fda5b39b7b46f1b76d665ef54 Mon Sep 17 00:00:00 2001 From: Runze Liu <146490083+rul048@users.noreply.github.com> Date: Thu, 25 Jan 2024 09:34:41 -0800 Subject: [PATCH 1/5] Update phonon.py The unit is incorrect. Signed-off-by: Runze Liu <146490083+rul048@users.noreply.github.com> --- matcalc/phonon.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/matcalc/phonon.py b/matcalc/phonon.py index 2fcbd07..87d0072 100644 --- a/matcalc/phonon.py +++ b/matcalc/phonon.py @@ -67,9 +67,9 @@ def calc(self, structure: Structure) -> dict: thermal_properties: { temperatures: list of temperatures in Kelvin, - free_energy: list of Helmholtz free energies at corresponding temperatures in eV, - entropy: list of entropies at corresponding temperatures in eV/K, - heat_capacity: list of heat capacities at constant volume at corresponding temperatures in eV/K^2, + free_energy: list of Helmholtz free energies at corresponding temperatures in KJ/mol, + entropy: list of entropies at corresponding temperatures in J/K/mol, + heat_capacity: list of heat capacities at constant volume at corresponding temperatures in J/K/mol, } } """ From 78516e5ec3c1889b50fbd26576b29d3e611d0bd6 Mon Sep 17 00:00:00 2001 From: Runze Liu <146490083+rul048@users.noreply.github.com> Date: Thu, 25 Jan 2024 11:38:38 -0800 Subject: [PATCH 2/5] Update phonon.py Add code comments with links to show where the units are documented originally. Signed-off-by: Runze Liu <146490083+rul048@users.noreply.github.com> --- matcalc/phonon.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/matcalc/phonon.py b/matcalc/phonon.py index 87d0072..40ad548 100644 --- a/matcalc/phonon.py +++ b/matcalc/phonon.py @@ -56,7 +56,10 @@ def __init__( def calc(self, structure: Structure) -> dict: """ - Calculates thermal properties of Pymatgen structure with phonopy. + Calculates thermal properties of Pymatgen structure with phonopy. + The units are documented in phonopy, See phonopy.Phonopy.run_thermal_properties() (https://github.com/phonopy/phonopy/blob/develop/phonopy/api_phonopy.py#L2591) + → phonopy.phonon.thermal_properties.ThermalProperties.run() (https://github.com/phonopy/phonopy/blob/develop/phonopy/phonon/thermal_properties.py#L498) + → phonopy.phonon.thermal_properties.ThermalPropertiesBase.run_free_energy(), run_entropy(), run_heat_capacity() (https://github.com/phonopy/phonopy/blob/develop/phonopy/phonon/thermal_properties.py#L217, #L233, #L225) Args: structure: Pymatgen structure. From 301702d0731f58963c084c7af53fd9f1391a820b Mon Sep 17 00:00:00 2001 From: Runze Liu <146490083+rul048@users.noreply.github.com> Date: Thu, 25 Jan 2024 11:59:58 -0800 Subject: [PATCH 3/5] Update phonon.py Delete previous comments that were too long. Signed-off-by: Runze Liu <146490083+rul048@users.noreply.github.com> --- matcalc/phonon.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/matcalc/phonon.py b/matcalc/phonon.py index 40ad548..87d0072 100644 --- a/matcalc/phonon.py +++ b/matcalc/phonon.py @@ -56,10 +56,7 @@ def __init__( def calc(self, structure: Structure) -> dict: """ - Calculates thermal properties of Pymatgen structure with phonopy. - The units are documented in phonopy, See phonopy.Phonopy.run_thermal_properties() (https://github.com/phonopy/phonopy/blob/develop/phonopy/api_phonopy.py#L2591) - → phonopy.phonon.thermal_properties.ThermalProperties.run() (https://github.com/phonopy/phonopy/blob/develop/phonopy/phonon/thermal_properties.py#L498) - → phonopy.phonon.thermal_properties.ThermalPropertiesBase.run_free_energy(), run_entropy(), run_heat_capacity() (https://github.com/phonopy/phonopy/blob/develop/phonopy/phonon/thermal_properties.py#L217, #L233, #L225) + Calculates thermal properties of Pymatgen structure with phonopy. Args: structure: Pymatgen structure. From f41deb2c34d21f4713815092e0be659258c09443 Mon Sep 17 00:00:00 2001 From: Runze Liu <146490083+rul048@users.noreply.github.com> Date: Fri, 26 Jan 2024 17:35:40 -0800 Subject: [PATCH 4/5] Update phonon.py Add the comments and links. Signed-off-by: Runze Liu <146490083+rul048@users.noreply.github.com> --- matcalc/phonon.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/matcalc/phonon.py b/matcalc/phonon.py index 87d0072..b529f8f 100644 --- a/matcalc/phonon.py +++ b/matcalc/phonon.py @@ -67,9 +67,17 @@ def calc(self, structure: Structure) -> dict: thermal_properties: { temperatures: list of temperatures in Kelvin, - free_energy: list of Helmholtz free energies at corresponding temperatures in KJ/mol, + free_energy: list of Helmholtz free energies at corresponding temperatures in kJ/mol, entropy: list of entropies at corresponding temperatures in J/K/mol, heat_capacity: list of heat capacities at constant volume at corresponding temperatures in J/K/mol, + + The units are originally documented in phonopy. + See phonopy.Phonopy.run_thermal_properties() + (https://github.com/phonopy/phonopy/blob/develop/phonopy/api_phonopy.py#L2591) + -> phonopy.phonon.thermal_properties.ThermalProperties.run() + (https://github.com/phonopy/phonopy/blob/develop/phonopy/phonon/thermal_properties.py#L498) + -> phonopy.phonon.thermal_properties.ThermalPropertiesBase.run_free_energy(), run_entropy(), run_heat_capacity() + (https://github.com/phonopy/phonopy/blob/develop/phonopy/phonon/thermal_properties.py#L217, #L233, #L225) } } """ From 74e8f11c277f65ac04be2646440436ee472b2be4 Mon Sep 17 00:00:00 2001 From: Runze Liu <146490083+rul048@users.noreply.github.com> Date: Fri, 26 Jan 2024 17:53:04 -0800 Subject: [PATCH 5/5] Update phonon.py Signed-off-by: Runze Liu <146490083+rul048@users.noreply.github.com> --- matcalc/phonon.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/matcalc/phonon.py b/matcalc/phonon.py index b529f8f..2d7ba68 100644 --- a/matcalc/phonon.py +++ b/matcalc/phonon.py @@ -70,14 +70,17 @@ def calc(self, structure: Structure) -> dict: free_energy: list of Helmholtz free energies at corresponding temperatures in kJ/mol, entropy: list of entropies at corresponding temperatures in J/K/mol, heat_capacity: list of heat capacities at constant volume at corresponding temperatures in J/K/mol, - The units are originally documented in phonopy. See phonopy.Phonopy.run_thermal_properties() (https://github.com/phonopy/phonopy/blob/develop/phonopy/api_phonopy.py#L2591) -> phonopy.phonon.thermal_properties.ThermalProperties.run() (https://github.com/phonopy/phonopy/blob/develop/phonopy/phonon/thermal_properties.py#L498) - -> phonopy.phonon.thermal_properties.ThermalPropertiesBase.run_free_energy(), run_entropy(), run_heat_capacity() - (https://github.com/phonopy/phonopy/blob/develop/phonopy/phonon/thermal_properties.py#L217, #L233, #L225) + -> phonopy.phonon.thermal_properties.ThermalPropertiesBase.run_free_energy() + (https://github.com/phonopy/phonopy/blob/develop/phonopy/phonon/thermal_properties.py#L217) + phonopy.phonon.thermal_properties.ThermalPropertiesBase.run_entropy() + (https://github.com/phonopy/phonopy/blob/develop/phonopy/phonon/thermal_properties.py#L233) + phonopy.phonon.thermal_properties.ThermalPropertiesBase.run_heat_capacity() + (https://github.com/phonopy/phonopy/blob/develop/phonopy/phonon/thermal_properties.py#L225) } } """