# rmgpy.thermo.ThermoData¶

class rmgpy.thermo.ThermoData(Tdata=None, Cpdata=None, H298=None, S298=None, Cp0=None, CpInf=None, Tmin=None, Tmax=None, E0=None, label='', comment='')

A heat capacity model based on a set of discrete heat capacity data points. The attributes are:

Attribute

Description

Tdata

An array of temperatures at which the heat capacity is known

Cpdata

An array of heat capacities at the given temperatures

H298

The standard enthalpy of formation at 298 K

S298

The standard entropy at 298 K

Tmin

The minimum temperature at which the model is valid, or zero if unknown or undefined

Tmax

The maximum temperature at which the model is valid, or zero if unknown or undefined

E0

The energy at zero Kelvin (including zero point energy)

comment

Information about the model (e.g. its source)

Cp0

The heat capacity at zero temperature.

CpInf

The heat capacity at infinite temperature.

Cpdata

An array of heat capacities at the given temperatures.

E0

The ground state energy (J/mol) at zero Kelvin, including zero point energy, or None if not yet specified.

H298

The standard enthalpy of formation at 298 K.

S298

The standard entropy of formation at 298 K.

Tdata

An array of temperatures at which the heat capacity is known.

Tmax

The maximum temperature at which the model is valid, or None if not defined.

Tmin

The minimum temperature at which the model is valid, or None if not defined.

as_dict(self) dict

A helper function for dumping objects as dictionaries for YAML files

Returns:

A dictionary representation of the object

Return type:

dict

comment

unicode

Type:

comment

discrepancy(self, HeatCapacityModel other) double

Return some measure of how dissimilar self is from other.

The measure is arbitrary, but hopefully useful for sorting purposes. Discrepancy of 0 means they are identical

get_enthalpy(self, double T) double

Return the enthalpy in J/mol at the specified temperature T in K.

get_entropy(self, double T) double

Return the entropy in J/mol*K at the specified temperature T in K.

get_free_energy(self, double T) double

Return the Gibbs free energy in J/mol at the specified temperature T in K.

get_heat_capacity(self, double T) double

Return the constant-pressure heat capacity in J/mol*K at the specified temperature T in K.

is_all_zeros(self) bool

Check whether a ThermoData object has all zero values, e.g.:

ThermoData(

Tdata=([300, 400, 500, 600, 800, 1000, 1500], “K”), Cpdata=([0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], “J/(mol*K)”), H298=(0.0, “kJ/mol”), S298=(0.0, “J/(mol*K)”),

)

Returns:

Whether all values are zeroes or not.

Return type:

bool

is_identical_to(self, HeatCapacityModel other) bool

Returns True if self and other report very similar thermo values for heat capacity, enthalpy, entropy, and free energy over a wide range of temperatures, or False otherwise.

is_similar_to(self, HeatCapacityModel other) bool

Returns True if self and other report similar thermo values for heat capacity, enthalpy, entropy, and free energy over a wide range of temperatures, or False otherwise.

is_temperature_valid(self, double T) bool

Return True if the temperature T in K is within the valid temperature range of the thermodynamic data, or False if not. If the minimum and maximum temperature are not defined, True is returned.

label

unicode

Type:

label

make_object(self, dict data, dict class_dict)

A helper function for constructing objects from a dictionary (used when loading YAML files)

Parameters:
• data (dict) – The dictionary representation of the object

• class_dict (dict) – A mapping of class names to the classes themselves

Returns:

None

to_nasa(self, double Tmin, double Tmax, double Tint, bool fixedTint=False, bool weighting=True, int continuity=3) NASA

Convert the object to a NASA object. You must specify the minimum and maximum temperatures of the fit Tmin and Tmax in K, as well as the intermediate temperature Tint in K to use as the bridge between the two fitted polynomials. The remaining parameters can be used to modify the fitting algorithm used:

• fixedTint - False to allow Tint to vary in order to improve the fit, or True to keep it fixed

• weighting - True to weight the fit by $$T^{-1}$$ to emphasize good fit at lower temperatures, or False to not use weighting

• continuity - The number of continuity constraints to enforce at Tint:

• 0: no constraints on continuity of $$C_\mathrm{p}(T)$$ at Tint

• 1: constrain $$C_\mathrm{p}(T)$$ to be continous at Tint

• 2: constrain $$C_\mathrm{p}(T)$$ and $$\frac{d C_\mathrm{p}}{dT}$$ to be continuous at Tint

• 3: constrain $$C_\mathrm{p}(T)$$, $$\frac{d C_\mathrm{p}}{dT}$$, and $$\frac{d^2 C_\mathrm{p}}{dT^2}$$ to be continuous at Tint

• 4: constrain $$C_\mathrm{p}(T)$$, $$\frac{d C_\mathrm{p}}{dT}$$, $$\frac{d^2 C_\mathrm{p}}{dT^2}$$, and $$\frac{d^3 C_\mathrm{p}}{dT^3}$$ to be continuous at Tint

• 5: constrain $$C_\mathrm{p}(T)$$, $$\frac{d C_\mathrm{p}}{dT}$$, $$\frac{d^2 C_\mathrm{p}}{dT^2}$$, $$\frac{d^3 C_\mathrm{p}}{dT^3}$$, and $$\frac{d^4 C_\mathrm{p}}{dT^4}$$ to be continuous at Tint

Note that values of continuity of 5 or higher effectively constrain all the coefficients to be equal and should be equivalent to fitting only one polynomial (rather than two).

Returns the fitted NASA object containing the two fitted NASAPolynomial objects.

to_wilhoit(self, B=None)

Convert the Benson model to a Wilhoit model. For the conversion to succeed, you must have set the Cp0 and CpInf attributes of the Benson model.

B: the characteristic temperature in Kelvin.