@@ -45,6 +45,30 @@ def calc_v0_from_fit_funct(fit_funct, x, save_range=0.0, return_ind=False):
4545
4646
4747class QuasiHarmonicJob (AtomisticParallelMaster ):
48+ """
49+ Obtain finite temperature properties in the framework of quasi harmonic approximation. For the
50+ theoretical understanding take a look at the Wikipedia page:
51+ https://en.wikipedia.org/wiki/Quasi-harmonic_approximation
52+
53+ Example:
54+
55+ >>> pr = Project('my_project')
56+ >>> lmp = pr.create_job('Lammps', 'lmp')
57+ >>> lmp.structure = structure_of_your_choice
58+ >>> phono = lmp.create_job('PhonopyJob', 'phono')
59+ >>> qha = phono.create_job('QuasiHarmonicJob', 'qha')
60+ >>> qha.run()
61+
62+ The final results can be obtained through `qha.optimise_volume()`.
63+
64+ The temperature range defined in the input can be modified afterwards. For this, follow these
65+ lines:
66+
67+ >>> qha.input['temperature_end'] = temperature_end
68+ >>> qha.input['temperature_steps'] = temperature_steps
69+ >>> qha.input['temperature_start'] = temperature_start
70+ >>> qha.collect_output()
71+ """
4872 def __init__ (self , project , job_name = "murnaghan" ):
4973 """
5074
@@ -104,6 +128,20 @@ def collect_output(self):
104128 hdf5_out [key ] = val
105129
106130 def optimise_volume (self , bulk_eng ):
131+ """
132+ Get finite temperature properties.
133+
134+ Args:
135+ bulk_eng (numpy.ndarray): array of bulk energies corresponding to the box sizes given
136+ in the quasi harmonic calculations. For the sake of compatibility, it is strongly
137+ recommended to use the pyiron Murnaghan class (and make sure that you use the
138+ same values for `num_points` and `vol_range`).
139+
140+ Returns:
141+ volume, free energy, entropy, heat capacity
142+
143+ The corresponding temperature values can be obtained from `job['output/temperatures'][0]`
144+ """
107145 v0_lst , free_eng_lst , entropy_lst , cv_lst = [], [], [], []
108146 for i , [t , free_energy , cv , entropy , v ] in enumerate (
109147 zip (self ["output/temperatures" ].T ,
0 commit comments