Method name is changed from set_thermal_properties to run.

This commit is contained in:
Atsushi Togo 2015-10-14 22:20:24 +09:00
parent 79c78df9bc
commit e8fb956289
4 changed files with 9 additions and 7 deletions

View File

@ -605,9 +605,7 @@ class Phonopy:
is_projection=is_projection,
band_indices=band_indices,
cutoff_frequency=cutoff_frequency)
tp.set_thermal_properties(t_step=t_step,
t_max=t_max,
t_min=t_min)
tp.run(t_step=t_step, t_max=t_max, t_min=t_min)
self._thermal_properties = tp
def get_thermal_properties(self):

View File

@ -55,9 +55,7 @@ class ThermalProperties:
self._thermal_properties = []
for V in volumes:
tp = self._get_thermal_properties_at_V(V)
tp.set_thermal_properties(t_step=t_step,
t_max=t_max,
t_min=t_min)
tp.run(t_step=t_step, t_max=t_max, t_min=t_min)
self._thermal_properties.append(tp)
def get_thermal_properties(self):

View File

@ -154,6 +154,12 @@ class ThermalProperties(ThermalPropertiesBase):
pyplot.xlabel('Temperature [K]')
def set_thermal_properties(self, t_step=10, t_max=1000, t_min=0):
import warnings
warnings.warn("\'set_thermal_properties\' method is depreciated. "
"Use \'run\' method instead.")
self.run(t_step=t_step, t_max=t_max, t_min=t_min)
def run(self, t_step=10, t_max=1000, t_min=0):
temperatures = np.arange(t_min, t_max + t_step / 2.0, t_step,
dtype='double')
fe = []

View File

@ -500,7 +500,7 @@ def post_process_free_energy(phonopy_obj, mesh_obj, parameters, frequency_unit_t
Tmin = parameters["Tstart"]
Tmax = parameters["Tend"]
Tstep = ( Tmax - Tmin) / parameters["Tpoints"]
tp_obj.set_thermal_properties(Tstep, Tmax, Tmin)
tp_obj.run(Tstep, Tmax, Tmin)
T, F, S, cv = tp_obj.get_thermal_properties()
kJmolToEv = 1.0 / EvTokJmol
JmolToEv = kJmolToEv / 1000