catmap.thermodynamics package

Submodules

catmap.thermodynamics.enthalpy_entropy module

class catmap.thermodynamics.enthalpy_entropy.ThermoCorrections(reaction_model=<catmap.model.ReactionModel instance>)[source]

Bases: catmap.ReactionModelWrapper

Class for including thermodynamic corrections.

The function “get_thermodynamic_corrections” automatically does all the work assuming the correct functions are in place.

thermodynamic_corrections: List of fundamentally different types of
corrections which could be included. Defaults are gas and adsorbate but other possibilities might be interface, electrochemical, etc.
thermodynamic_variables: List of variables which define a thermodynamic
state. If these attributes of the underlying reaction model do not change then the thermodynamic corrections will not be recalculated in order to save time.
To add a new correction type (called custom_correction):
  1. Define the function which performs the correction as an attribute.

    Assume the function is called “simple_custom_correction”.

  2. Place the “custom_correction” in the “thermodynamic_corrections” list

  3. Place any variables which the custom correction depends on in

    the thermodynamic_variables list

  4. Set the “custom_correction_thermo_mode” attribute of the

    underlying reaction model to “simple_custom_correction”

If these steps are followed then the correction should automatically be included in all calculations.

__getattr__(attr)

Return the value of the reaction model instance if its there. Otherwise return the instances own value (or none if the instance does not have the attribute defined and the attribute is not private)

__getattribute__(attr)

Force use of custom getattr

__init__(reaction_model=<catmap.model.ReactionModel instance>)[source]
__module__ = 'catmap.thermodynamics.enthalpy_entropy'
__setattr__(attr, val)

Set attribute for the instance as well as the reaction_model instance

_bar2Pa = 100000.0
_get_echem_corrections(correction_dict)[source]

Perform the thermodynamic corrections relevant to electrochemistry but are not specific to any particular mode.

_kJmol2eV = 0.01036427
approach_to_equilibrium_pressure()[source]

Set product pressures based on approach to equilibrium. Requires the following attributes to be set: global_reactions - a list of global reactions in the same syntax as elementary expressions,

with each one followed by its respective approach to equilibrium.

pressure_mode - must be set to ‘approach_to_equilibrium’ Note that this function is not well-tested and should be used with caution.

average_transition_state(thermo_dict, transition_state_list=[])[source]

Return transition state thermochemical corrections as average of IS and FS corrections

boltzmann_coverages(energy_dict)[source]

Return coverages based on Boltzmann distribution

concentration_pressure()[source]
estimate_hbond_corr(formula)[source]

Generate hydrogen bonding corrections given a formula and estimations for various functional groups used in Peterson(2010) - valid mostly for Pt(111) This is a very simplistic function. If you need more advanced descriptions of hydrogen bonding, consider setting your own hbond_dict.

fixed_enthalpy_entropy_adsorbate()[source]

Return free energy corrections based on input enthalpy, entropy, ZPE

fixed_enthalpy_entropy_gas(gas_names=None)[source]

Calculate free energy corrections based on input enthalpy, entropy, ZPE

fixed_entropy_gas(include_ZPE=True)[source]

Add entropy based on fixed_entropy_dict (entropy contribution to free energy assumed linear with temperature) and ZPE

frozen_adsorbate()[source]

Neglect all zero point, enthalpy, entropy corrections to adsorbate energy.

frozen_fixed_entropy_gas()[source]

Do not add ZPE, calculate fixed entropy correction.

frozen_gas()[source]

Neglect all thermal contributions, including the zero point energy.

generate_echem_TS_energies()[source]

Give real energies to the fake echem transition states

get_frequency_cutoff(kB_multiplier, temperature=None)[source]
get_rxn_index_from_TS(TS)[source]

Take in the name of a transition state and return the reaction index of the elementary rxn from which it belongs

get_thermodynamic_corrections(**kwargs)[source]

Calculate all ``thermodynamic’’ corrections beyond the energies in the input file. This master function will call sub-functions depending on the ``thermo mode’’ of each class of species

harmonic_adsorbate()[source]

Calculate the thermal correction to the free energy of an adsorbate in the harmonic approximation using the HarmonicThermo class in ase.thermochemistry.

adsorbate_names = the chemical formulas of the gasses of interest
(usually ending in _g to denote that they are in the gas phase). freq_dict = dictionary of vibrational frequencies for each gas of interest. Vibrational frequencies should be in eV. The dictionary should be of the form freq_dict[gas_name] = [freq1, freq2, ...]
hbond_electrochemical()[source]

Update simple_electrochemical with hbonding corrections as if they were on Pt(111)

hbond_with_estimates_electrochemical()[source]

Add hbond corrections to transition states involving pe and ele (coupled proton-electron transfers and electron transfers)

ideal_gas()[source]

Calculate the thermal correction to the free energy of an ideal gas using the IdealGasThermo class in ase.thermochemistry along with the molecular structures in ase.data.molecules.

gas_names = the chemical formulas of the gasses of interest (usually
ending in _g to denote that they are in the gas phase).
freq_dict = dictionary of vibrational frequencies for each gas
of interest. Vibrational frequencies should be in eV. The dictionary should be of the form freq_dict[gas_name] = [freq1, freq2, ...]
ideal_gas_params = dictionary of the symetry number,
geometry keyword, and spin of the gas. If no dictionary is specified then the function will attempt to look the gas up in the hard-coded gas_params dictionary. The dictionary should be of the form ideal_gas_params[gas_name] = [symmetry_number,geometry, spin]
atoms_dict = dictionary of ase atoms objects to use for
calculating rotational contributions. If none is specified then the function will look in ase.data.molecules.
shomate_gas()[source]

Calculate free energy corrections using shomate equation

simple_electrochemical()[source]

Calculate electrochemical (potential) corrections to free energy. Transition state energies are corrected by a beta*voltage term.

static_pressure()[source]
summary_text()[source]
zero_point_adsorbate()[source]

Add zero point energy correction to adsorbate energy.

zero_point_gas()[source]

Add zero point energy correction to gasses.

catmap.thermodynamics.enthalpy_entropy.fit_shomate(Ts, Cps, Hs, Ss, params0, plot_file=None)[source]

catmap.thermodynamics.first_order_interactions module

class catmap.thermodynamics.first_order_interactions.FirstOrderInteractions(reaction_model=<catmap.model.ReactionModel instance>)[source]

Bases: catmap.ReactionModelWrapper

Class for implementing ‘first-order adsorbate interaction model. Should be sub-classed by scaler.

__getattr__(attr)

Return the value of the reaction model instance if its there. Otherwise return the instances own value (or none if the instance does not have the attribute defined and the attribute is not private)

__getattribute__(attr)

Force use of custom getattr

__init__(reaction_model=<catmap.model.ReactionModel instance>)[source]
__module__ = 'catmap.thermodynamics.first_order_interactions'
__setattr__(attr, val)

Set attribute for the instance as well as the reaction_model instance

error_norm(diff_err, int_err)[source]
fit()[source]
fit_interaction_parameter(theta_list, E_diffs, E_ints, param_name, surf_name)[source]
fit_old()[source]
get_TS_weight_matrix(weight)[source]

Helper function to get `weights’ of how to distribute TS-cross interactions between IS/FS. Should not be called externally.

get_energy_error(epsilon_ij, theta, Ediff, Eint, parameter_name, surface_name)[source]
get_interaction_info()[source]
get_interaction_matrix(descriptors)[source]
get_interaction_scaling_matrix()[source]
get_interaction_transition_state_scaling_matrix()[source]
static linear_response(*args, **kwargs)[source]
parameterize_interactions()[source]
params_to_matrix(param_vector)[source]
static piecewise_linear_response(*args, **kwargs)[source]
required_interaction_parameters(cvg)[source]
static smooth_piecewise_linear_response(*args, **kwargs)[source]

catmap.thermodynamics.second_order_interactions module

class catmap.thermodynamics.second_order_interactions.SecondOrderInteractions(reaction_model=<catmap.model.ReactionModel instance>)[source]

Bases: catmap.thermodynamics.first_order_interactions.FirstOrderInteractions, catmap.ReactionModelWrapper

Class for implementing ‘first-order adsorbate interaction model. Should be sub-classed by scaler.

__getattr__(attr)

Return the value of the reaction model instance if its there. Otherwise return the instances own value (or none if the instance does not have the attribute defined and the attribute is not private)

__getattribute__(attr)

Force use of custom getattr

__init__(reaction_model=<catmap.model.ReactionModel instance>)[source]
__module__ = 'catmap.thermodynamics.second_order_interactions'
__setattr__(attr, val)

Set attribute for the instance as well as the reaction_model instance

error_norm(diff_err, int_err)
fit()
fit_interaction_parameter(theta_list, E_diffs, E_ints, param_name, surf_name)
fit_old()
get_TS_weight_matrix(weight)

Helper function to get `weights’ of how to distribute TS-cross interactions between IS/FS. Should not be called externally.

get_energy_error(epsilon_ij, theta, Ediff, Eint, parameter_name, surface_name)
get_interaction_info()
get_interaction_matrix(descriptors)
get_interaction_scaling_matrix()
get_interaction_transition_state_scaling_matrix()
static linear_response(*args, **kwargs)[source]
static offset_smooth_piecewise_linear_response(*args, **kwargs)[source]
parameterize_interactions()
params_to_matrix(param_vector)
static piecewise_linear_response(*args, **kwargs)[source]
required_interaction_parameters(cvg)
static smooth_piecewise_linear_response(*args, **kwargs)[source]

Module contents