pmutt.statmech.EmptyMode

class pmutt.statmech.EmptyMode

Bases: _ModelBase

Placeholder mode that returns 1 for partition function and 0 for all functions other thermodynamic properties.

__init__()

Methods

__init__()

from_dict(json_obj)

Recreate an object from the JSON representation.

get_Cp(units, **kwargs)

Calculate the heat capacity (constant P)

get_CpoR()

Default method to calculate the dimensionless heat capacity at constant pressure.

get_Cv(units, **kwargs)

Calculate the heat capacity (constant V)

get_CvoR()

Default method to calculate the dimensionless heat capacity at constant volume.

get_F(units[, T])

Calculate the Helmholtz energy

get_FoRT()

Calculates the dimensionless Helmholtz energy

get_G(units[, T])

Calculate the Gibbs energy

get_GoRT()

Calculates the dimensionless Gibbs free energy

get_H(units[, T])

Calculate the enthalpy

get_HoRT()

Default method to calculate the dimensionless enthalpy.

get_S(units, **kwargs)

Calculate the entropy

get_SoR()

Default method to calculate the dimensionless entropy.

get_U(units[, T])

Calculate the internal energy

get_UoRT()

Default method to calculate the dimensionless internal energy.

get_q()

Default method to calculate the partition coefficient.

to_dict()

Represents object as dictionary with JSON-accepted datatypes

classmethod from_dict(json_obj)

Recreate an object from the JSON representation.

Parameters:

json_obj (dict) – JSON representation

Returns:

Obj

Return type:

Appropriate object

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()

Default method to calculate the dimensionless heat capacity at constant pressure.

Returns:

CpoR – Returns 0

Return type:

float

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()

Default method to calculate the dimensionless heat capacity at constant volume.

Returns:

CvoR – Returns 0

Return type:

float

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()

Calculates the dimensionless Helmholtz energy

Parameters:

kwargs (keyword arguments) – Parameters needed by get_UoRT and get_SoR

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()

Calculates the dimensionless Gibbs free energy

Parameters:

kwargs (keyword arguments) – Parameters needed by get_HoRT and get_SoR

Returns:

GoRT – Dimensionless Gibbs free 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()

Default method to calculate the dimensionless enthalpy.

Returns:

HoRT – Returns 0

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()

Default method to calculate the dimensionless entropy.

Returns:

SoR – 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()

Default method to calculate the dimensionless internal energy.

Returns:

UoRT – Returns 0

Return type:

float

get_q()

Default method to calculate the partition coefficient.

Returns:

q – Returns 1

Return type:

float

to_dict()

Represents object as dictionary with JSON-accepted datatypes

Returns:

obj_dict

Return type:

dict