diff --git a/abipy/dfpt/qha.py b/abipy/dfpt/qha.py index 892a80448..d15a62702 100644 --- a/abipy/dfpt/qha.py +++ b/abipy/dfpt/qha.py @@ -403,7 +403,8 @@ def write_phonopy_qha_inputs(self, tstart=0, tstop=2100, num=211, path=None) -> with open(os.path.join(path, "thermal_properties-{}.yaml".format(j)), 'wt') as f: f.write("\n".join(lines)) - def get_phonopy_qha(self, tstart=0, tstop=2100, num=211, eos='vinet', t_max=None, energy_plot_factor=None): + def get_phonopy_qha(self, tstart=0, tstop=2100, num=211, eos='vinet', t_max=None, + energy_plot_factor=None, pressure=None): """ Creates an instance of phonopy.qha.core.QHA that can be used generate further plots and output data. The object is returned right after the construction. The "run()" method should be executed @@ -419,6 +420,7 @@ def get_phonopy_qha(self, tstart=0, tstop=2100, num=211, eos='vinet', t_max=None "murnaghan" and "birch_murnaghan". Passed to phonopy's QHA. t_max: maximum temperature. Passed to phonopy's QHA. energy_plot_factor: factor multiplying the energies. Passed to phonopy's QHA. + pressure: pressure value, passed to phonopy. Returns: An instance of phonopy.qha.core.QHA """ @@ -437,7 +439,18 @@ def get_phonopy_qha(self, tstart=0, tstop=2100, num=211, eos='vinet', t_max=None en = self.energies + self.volumes * self.pressure / abu.eVA3_GPa - qha_p = QHA_phonopy(self.volumes, en, temperatures, cv, entropy, fe, eos, t_max, energy_plot_factor) + qha_p = QHA_phonopy( + volumes=self.volumes, + electronic_energies=en, + temperatures=temperatures, + cv=cv, + entropy=entropy, + fe_phonon=fe, + pressure=pressure, + eos=eos, + t_max=t_max, + energy_plot_factor=energy_plot_factor + ) return qha_p