filename = "thermal_properties.yaml-%d" % index print "Reading", filename thermal_properties = yaml.load(open(filename), Loader=Loader)['thermal_properties'] temperatures = [v['temperature'] for v in thermal_properties] cv.append([v['heat_capacity'] for v in thermal_properties]) entropy.append([v['entropy'] for v in thermal_properties]) fe.append([v['free_energy'] for v in thermal_properties]) qha = PhonopyQHA(volumes, energies, temperatures=temperatures, free_energy=np.transpose(fe), cv=np.transpose(cv), entropy=np.transpose(entropy), t_max=400, verbose=True) # qha.plot_helmholtz_volume().show() # qha.plot_volume_temperature().show() # qha.plot_thermal_expansion().show() # plot = qha.plot_volume_expansion() # if plot: # plot.show() # qha.plot_gibbs_temperature().show() # qha.plot_bulk_modulus_temperature().show() # qha.plot_heat_capacity_P_numerical().show() # qha.plot_heat_capacity_P_polyfit().show() qha.plot_gruneisen_temperature().show()
for index in range(-5, 6): filename = "thermal_properties.yaml-%d" % index print "Reading", filename thermal_properties = yaml.load(open(filename), Loader=Loader)['thermal_properties'] temperatures = [v['temperature'] for v in thermal_properties] cv.append([v['heat_capacity'] for v in thermal_properties]) entropy.append([v['entropy'] for v in thermal_properties]) fe.append([v['free_energy'] for v in thermal_properties]) qha = PhonopyQHA(volumes, energies, temperatures=temperatures, free_energy=np.transpose(fe), cv=np.transpose(cv), entropy=np.transpose(entropy), t_max=400, verbose=True) # qha.plot_helmholtz_volume().show() # qha.plot_volume_temperature().show() # qha.plot_thermal_expansion().show() # plot = qha.plot_volume_expansion() # if plot: # plot.show() # qha.plot_gibbs_temperature().show() # qha.plot_bulk_modulus_temperature().show() # qha.plot_heat_capacity_P_numerical().show() # qha.plot_heat_capacity_P_polyfit().show() qha.plot_gruneisen_temperature().show()
# Get data qha_temperatures = phonopy_qha._qha._temperatures[:phonopy_qha._qha. _max_t_index] helmholtz_volume = phonopy_qha.get_helmholtz_volume() thermal_expansion = phonopy_qha.get_thermal_expansion() volume_temperature = phonopy_qha.get_volume_temperature() heat_capacity_P_numerical = phonopy_qha.get_heat_capacity_P_numerical() volume_expansion = phonopy_qha.get_volume_expansion() gibbs_temperature = phonopy_qha.get_gibbs_temperature() #phonopy_qha.plot_bulk_modulus() #plt.show() phonopy_qha.plot_qha() plt.show() phonopy_qha.plot_gruneisen_temperature() plt.show() phonopy_qha.plot_gibbs_temperature() plt.show() phonopy_qha.plot_heat_capacity_P_numerical() plt.show() phonopy_qha.write_gibbs_temperature() phonopy_qha.write_heat_capacity_P_numerical() qha_output = ArrayData() qha_output.set_array('temperature', np.array(qha_temperatures)) qha_output.set_array('helmholtz_volume', np.array(helmholtz_volume)) qha_output.set_array('thermal_expansion', np.array(thermal_expansion)) qha_output.set_array('volume_temperature', np.array(volume_temperature)) qha_output.set_array('heat_capacity_P_numerical',