pmutt.statmech.lsr.ExtendedLSR

class pmutt.statmech.lsr.ExtendedLSR(slopes, intercept, reactions, surf_species=None, gas_species=None)

Bases: _ModelBase

Represents an extended linear scaling relationship

slopes

Slopes of extended LSR relationship. Represents alpha in above equation

Type:

(N,) np.ndarray

intercept

Intercept of LSR relationship in kcal/mol. Represents beta in above equation

Type:

float

reactions

Reactions to use to calculate reference binding energies. Binding energy calculated using get_delta_E and if that fails, get_delta_H. If the binding energy is specified as a float (in kcal/mol), it will be converted to a Reaction made of StatMech objects

Type:

(N,) np.ndarray or list of Reaction object

surf_species

Surface species. If the surface’s energies is specified as a ndarray (in kcal/mol), it will be converted to a StatMech object with a single ConstantMode mode. Default is 0.

Type:

(N,) np.ndarray or list of StatMech object, optional

gas_species

Gas-phase species. If the gas’ energies is specified as a ndarray (in kcal/mol), it will be converted to a StatMech object with a single ConstantMode mode. Default is 0.

Type:

(N,) np.ndarray or list of StatMech object, optional

notes

Extra notes such as the source of the Extended LSR. Default is None

Type:

str or dict, optional

__init__(slopes, intercept, reactions, surf_species=None, gas_species=None)

Methods

__init__(slopes, intercept, reactions[, ...])

from_dict(json_obj)

Recreate an object from the JSON representation.

get_Cp(units, **kwargs)

Calculate the heat capacity (constant P)

get_CpoR()

Calculates the dimensionless heat capacity at constant pressure.

get_Cv(units, **kwargs)

Calculate the heat capacity (constant V)

get_CvoR()

Calculates the dimensionless heat capacity at constant volume.

get_F(units[, T])

Calculate the Helmholtz energy

get_FoRT([T])

Calculates the dimensionless Helmholtz energy using the LSR relationship

get_G(units[, T])

Calculate the Gibbs energy

get_GoRT([T])

Calculates the dimensionless Gibbs energy using the LSR relationship

get_H(units[, T])

Calculate the enthalpy

get_HoRT([T])

Calculates the dimensionless enthalpy using the LSR relationship

get_S(units, **kwargs)

Calculate the entropy

get_SoR()

Calculates the dimensionless entropy using the LSR relationship

get_U(units[, T])

Calculate the internal energy

get_UoRT([T])

Calculates the dimensionless internal energy using the Extended LSR relationship

get_q()

Default method to calculate the partition coefficient.

to_dict()

Represents object as dictionary with JSON-accepted datatypes

Attributes

gas_species

reactions

surf_species

classmethod from_dict(json_obj)

Recreate an object from the JSON representation.

Parameters:

json_obj (dict) – JSON representation

Returns:

LSR

Return type:

LSR object

property gas_species
get_Cp(units, **kwargs)

Calculate the heat capacity (constant P)

Parameters:
  • units (str) – Units as string. See R() for accepted units.

  • kwargs (keyword arguments) – Parameters needed by get_CpoR

Returns:

Cp – Heat capacity (constant P) in appropriate units

Return type:

float

get_CpoR()

Calculates the dimensionless heat capacity at constant pressure.

\(\frac{C_V^{LSR}}{R}=0\)

get_Cv(units, **kwargs)

Calculate the heat capacity (constant V)

Parameters:
  • units (str) – Units as string. See R() for accepted units.

  • kwargs (keyword arguments) – Parameters needed by get_CvoR

Returns:

Cv – Heat capacity (constant V) in appropriate units

Return type:

float

get_CvoR()

Calculates the dimensionless heat capacity at constant volume.

\(\frac{C_V^{LSR}}{R}=0\)

get_F(units, T=298.15, **kwargs)

Calculate the Helmholtz energy

Parameters:
  • units (str) – Units as string. See R() for accepted units but omit the ‘/K’ (e.g. J/mol).

  • T (float, optional) – Temperature in K. Default is 298.15 K

  • kwargs (keyword arguments) – Parameters needed by get_FoRT

Returns:

F – Hemholtz energy in appropriate units

Return type:

float

get_FoRT(T=298.15, **kwargs)

Calculates the dimensionless Helmholtz energy using the LSR relationship

Parameters:
  • T (float, optional) – Temperature in K. Default is 298.15 K

  • kwargs (keyword arguments) – Parameters to calculate reference binding energy, surface energy and gas-phase energy

Returns:

FoRT – Dimensionless Helmholtz energy

Return type:

float

get_G(units, T=298.15, **kwargs)

Calculate the Gibbs energy

Parameters:
  • units (str) – Units as string. See R() for accepted units but omit the ‘/K’ (e.g. J/mol).

  • T (float, optional) – Temperature in K. Default is 298.15 K

  • kwargs (keyword arguments) – Parameters needed by get_GoRT

Returns:

G – Gibbs energy in appropriate units

Return type:

float

get_GoRT(T=298.15, **kwargs)

Calculates the dimensionless Gibbs energy using the LSR relationship

Parameters:
  • T (float, optional) – Temperature in K. Default is 298.15 K

  • kwargs (keyword arguments) – Parameters to calculate reference binding energy, surface energy and gas-phase energy

Returns:

GoRT – Dimensionless Gibbs energy

Return type:

float

get_H(units, T=298.15, **kwargs)

Calculate the enthalpy

Parameters:
  • units (str) – Units as string. See R() for accepted units but omit the ‘/K’ (e.g. J/mol).

  • T (float, optional) – Temperature in K. Default is 298.15 K

  • kwargs (keyword arguments) – Parameters needed by get_HoRT

Returns:

H – Enthalpy in appropriate units

Return type:

float

get_HoRT(T=298.15, **kwargs)

Calculates the dimensionless enthalpy using the LSR relationship

Parameters:
  • T (float, optional) – Temperature in K. Default is 298.15 K

  • kwargs (keyword arguments) – Parameters to calculate reference binding energy, surface energy and gas-phase energy

Returns:

HoRT – Dimensionless enthalpy

Return type:

float

get_S(units, **kwargs)

Calculate the entropy

Parameters:
  • units (str) – Units as string. See R() for accepted units.

  • kwargs (keyword arguments) – Parameters needed by get_SoR

Returns:

S – Entropy in appropriate units

Return type:

float

get_SoR()

Calculates the dimensionless entropy using the LSR relationship

Returns:

SoR – Dimensionless entropy. Since LSR handles binding energies, always returns 0

Return type:

float

get_U(units, T=298.15, **kwargs)

Calculate the internal energy

Parameters:
  • units (str) – Units as string. See R() for accepted units but omit the ‘/K’ (e.g. J/mol).

  • T (float, optional) – Temperature in K. Default is 298.15 K

  • kwargs (keyword arguments) – Parameters needed by get_UoRT

Returns:

U – Internal energy in appropriate units

Return type:

float

get_UoRT(T=298.15, **kwargs)

Calculates the dimensionless internal energy using the Extended LSR relationship

Parameters:
  • T (float, optional) – Temperature in K. Default is 298.15 K

  • kwargs (keyword arguments) – Parameters to calculate reference binding energy, surface energy and gas-phase energy

Returns:

UoRT – Dimensionless internal energy

Return type:

float

get_q()

Default method to calculate the partition coefficient.

Returns:

q – Returns 1

Return type:

float

property reactions
property surf_species
to_dict()

Represents object as dictionary with JSON-accepted datatypes

Returns:

obj_dict

Return type:

dict