Skip to content

Commit

Permalink
Correctly scale output from phonopy jobs in QuasiHarmonic
Browse files Browse the repository at this point in the history
  • Loading branch information
pmrv committed Oct 27, 2023
1 parent fa18db9 commit 1c43480
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions pyiron_atomistics/atomistics/master/quasi.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,17 +110,23 @@ def collect_output(self):
free_energy_lst, entropy_lst, cv_lst, volume_lst = [], [], [], []
for job_id in self.child_ids:
job = self.project_hdf5.load(job_id)
# the underlying phonopy job might create a supercell; if its
# reference job is interactive this is reflected in its
# job.structure and the output quantities, so we need to rescale
# all the output here; if the structure did not change the
# conversion_factor will simply be 1.
conversion_factor = len(self.structure) / len(job.structure)
thermal_properties = job.get_thermal_properties(
temperatures=np.linspace(
self.input["temperature_start"],
self.input["temperature_end"],
int(self.input["temperature_steps"]),
)
)
free_energy_lst.append(thermal_properties.free_energies)
entropy_lst.append(thermal_properties.entropy)
cv_lst.append(thermal_properties.cv)
volume_lst.append(job.structure.get_volume())
free_energy_lst.append(thermal_properties.free_energies * conversion_factor)
entropy_lst.append(thermal_properties.entropy * conversion_factor)
cv_lst.append(thermal_properties.cv * conversion_factor)
volume_lst.append(job.structure.get_volume() * conversion_factor)

arg_lst = np.argsort(volume_lst)

Expand Down

0 comments on commit 1c43480

Please sign in to comment.