catmap.thermodynamics package¶
Submodules¶
catmap.thermodynamics.enthalpy_entropy module¶
-
class
catmap.thermodynamics.enthalpy_entropy.ThermoCorrections(reaction_model=<catmap.model.ReactionModel instance>)[source]¶ Bases:
catmap.ReactionModelWrapperClass 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):
- Define the function which performs the correction as an attribute.
Assume the function is called “simple_custom_correction”.
Place the “custom_correction” in the “thermodynamic_corrections” list
- Place any variables which the custom correction depends on in
the thermodynamic_variables list
- 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
-
__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
-
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.
-
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.
catmap.thermodynamics.first_order_interactions module¶
-
class
catmap.thermodynamics.first_order_interactions.FirstOrderInteractions(reaction_model=<catmap.model.ReactionModel instance>)[source]¶ Bases:
catmap.ReactionModelWrapperClass 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
-
__module__= 'catmap.thermodynamics.first_order_interactions'¶
-
__setattr__(attr, val)¶ Set attribute for the instance as well as the reaction_model instance
-
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.ReactionModelWrapperClass 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
-
__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()¶
-
parameterize_interactions()¶
-
params_to_matrix(param_vector)¶
-
required_interaction_parameters(cvg)¶
-