dfttk.quasi_harmonic
QuasiHarmonic class for storing, processing, and plotting quasi-harmonic data.
- class dfttk.quasi_harmonic.QuasiHarmonic(number_of_atoms, volumes, temperatures)[source]
Bases:
objectStores, processes, and plots quasi-harmonic data for a given system.
- process(method, energies, vibrational_helmholtz_energies, vibrational_entropies, vibrational_heat_capacities, electronic_helmholtz_energies=None, electronic_entropies=None, electronic_heat_capacities=None, P=0.0, eos_name='BM4')[source]
Calculates and stores the quasiharmonic properties for a given method.
- Parameters:
method (
str) – Calculation method.energies (
ndarray) – Static energies (shape: [n_volumes]).vibrational_helmholtz_energies (
ndarray) – Vibrational helmholtz energies (shape: [n_temps, n_volumes]).vibrational_entropies (
ndarray) – Vibrational entropies (shape: [n_temps, n_volumes]).vibrational_heat_capacities (
ndarray) – Vibrational heat capacities (shape: [n_temps, n_volumes]).electronic_helmholtz_energies (
ndarray) – Electronic helmholtz energies (shape: [n_temps, n_volumes]). Defaults to None.electronic_entropies (
ndarray) – Electronic entropies (shape: [n_temps, n_volumes]). Defaults to None.electronic_heat_capacities (
ndarray) – Electronic heat capacities (shape: [n_temps, n_volumes]). Defaults to None.P (
float) – Pressure in GPa. Defaults to 0.00.eos_name (
str) – Equation of state to use. Defaults to “BM4”.
- Raises:
ValueError – If the array does not have the expected shape.
ValueError – If P is negative.
ValueError – If eos_name is not a supported EOS function.
- Return type:
None
- plot(method, P, plot_type, selected_temperatures=None)[source]
Generate plots for the quasiharmonic data.
- Parameters:
method (
str) – Calculation method.P (
float) – Pressure in GPa.plot_type (
str) – Type of plot to generate.selected_temperatures (
ndarray) – Specific temperatures to plot for helmholtz_energy_pv.
- Returns:
Plotly figure object for the selected data.
- Return type:
Figure- Raises:
ValueError – If the requested method or pressure data is not available.
ValueError – If plot_type is not recognized.