pmutt.statmech.elec.GroundStateElec

class pmutt.statmech.elec.GroundStateElec(potentialenergy=None, spin=0.0, atoms=None, D0=None)

Bases: _ModelBase

Electronic modes using the ideal gas assumption. Equations sourced from:

  • Sandler, S. I. An Introduction to Applied Statistical Thermodynamics; John Wiley & Sons, 2010.

potentialenergy

Potential energy in eV. If this value and atoms are not specified, defaults to 0

Type:

float, optional

spin

The total electron spin. Default is 0

  • 0 for molecules in which all electrons are paired

  • 0.5 for a free radical with a single unpaired electron

  • 1.0 for a triplet with two unpaired electrons, such as O 2

Type:

float, optional

atoms

If potentialenergy is not specified, the energy will be obtained using atoms.get_potential_energy().

Type:

ase.Atoms object, optional

D0

Bond strength in eV. Preferentially used when calculating partition coefficient.

Type:

float, optional

__init__(potentialenergy=None, spin=0.0, atoms=None, D0=None)

Methods

__init__([potentialenergy, spin, atoms, D0])

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

get_G(units[, T])

Calculate the Gibbs energy

get_GoRT(T)

Calculates the dimensionless Gibbs energy

get_H(units[, T])

Calculate the enthalpy

get_HoRT(T)

Calculates the dimensionless enthalpy

get_S(units, **kwargs)

Calculate the entropy

get_SoR()

Calculates the dimensionless entropy

get_U(units[, T])

Calculate the internal energy

get_UoRT(T)

Calculates the imensionless internal energy

get_q(T[, ignore_q_elec])

Calculates the partition function

to_dict()

Represents object as dictionary with JSON-accepted datatypes

Attributes

spin

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

Calculates the dimensionless heat capacity at constant pressure

\(\frac{C_P^{elec}}{R}=\frac{C_V^{elec}}{R}=0\)

Returns:

CpoR_elec – Electronic dimensionless heat capacity at constant pressure

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

Calculates the dimensionless heat capacity at constant volume

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

Returns:

CvoR_elec – electronic dimensionless heat capacity at constant volume

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

Calculates the dimensionless Helmholtz energy

\(\frac{A^{elec}}{RT}=\frac{U^{elec}}{RT}-\frac{S^{elec}}{R}\)

Parameters:

T (float) – Temperature in K

Returns:

FoRT_elec – Electronic 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)

Calculates the dimensionless Gibbs energy

\(\frac{G^{elec}}{RT}=\frac{H^{elec}}{RT}-\frac{S^{elec}}{R}\)

Parameters:

T (float) – Temperature in K

Returns:

GoRT_elec – Electronic 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)

Calculates the dimensionless enthalpy

\(\frac{H^{elec}}{RT}=\frac{U^{elec}}{RT}\)

Parameters:

T (float) – Temperature in K

Returns:

HoRT_elec – Electronic 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

\(\frac{S^{elec}}{R}=\log \omega\)

Returns:

SoR_elec – Electronic dimensionless entropy

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)

Calculates the imensionless internal energy

\(\frac{U^{elec}}{RT}=\frac{E}{RT}\)

Parameters:

T (float) – Temperature in K

Returns:

UoRT_elec – Electronic dimensionless internal energy

Return type:

float

get_q(T, ignore_q_elec=True)

Calculates the partition function

\(q^{elec}=1 + \omega_i \exp\bigg(-\frac{E}{RT}\bigg)\)

Parameters:
  • T (float) – Temperature in K

  • ignore_q_elec (bool, optional) – Ignore contribution of electronic mode to partition function . Often necessary since DFT’s value for potentialenergy is very negative causing q_elec to go to infinity. Default is True

Returns:

q_elec – Electronic partition function

Return type:

float

property spin
to_dict()

Represents object as dictionary with JSON-accepted datatypes

Returns:

obj_dict

Return type:

dict