utils

This module contains several utilities grouped by usage:

  • The 'Pykinetic Utilities' are functions with usage in the scripts that accompany this library.

  • Class Specializations. Subclasses of the ChemicalSystem used for the scripts pykinetic-model and pykinetic-scan.

Pykinetic Utilities

pykinetic.utils.write_indexfile(chemsys, file, withoutTS=True, isrelative=False)[source]

Writes a File that summarizes both Compounds and Reactions Files as they were modeled. Simple division of this file should lead to two files that should be able reproduce at least the function and the Jacobian.

Parameters:
  • chemsys (ChemicalSystem) -- A ChemicalSystem or subclass to output

  • FilePath (str) -- A valid filepath for the IndexFile

pykinetic.utils.calc_standard_state_correction(T, pressure='atm')[source]

Calculates the standard state correction to 1M and temperature=T.

Parameters:
  • T (float) -- Temperature in K

  • pressure (str, optional) -- units of the standard state considered to calculate gibbs free energies, Usually it is either 1atm or 1bar, by default 'atm'

Returns:

Standard state correction to 1M and the specified temperature

Return type:

Energy

Specialized ChemicalSystems

class pykinetic.utils.BiasedChemicalSystem(bias=0.0, bias_unit='kcal/mol', T=298.15, unit='kcal/mol')[source]

A specialization used to directly apply a constant bias to the energy of to all the species (as the Standard State Correction does). It is applied to compounds and TS except from the diffusion TSs.

Parameters:
  • bias (float, Energy) -- bias to the energy of each species (the default is 0.0).

  • bias_unit (str) -- (the default is 'kcal/mol').

  • T (float) -- Temperature in K (the default is 298.15).

  • unit (str) -- (the default is 'kcal/mol').

class pykinetic.utils.ScannableChemicalSystem(scan=0.0, scan_unit='kcal/mol', bias=0.0, bias_unit='kcal/mol', T=298.15, unit='kcal/mol')[source]

A specialization of BiasedChemicalSystem that provides the methods to apply dinamically change the energy of all the compounds and TS flagged as scannable.

Parameters:
  • scan (float, Energy) -- bias to the energy of each species (the default is 0.0).

  • scan_unit (str) -- (the default is 'kcal/mol').

  • bias (float, Energy) -- bias to the energy of each species (the default is 0.0).

  • bias_unit (str) -- (the default is 'kcal/mol').

  • T (float) -- Temperature in K (the default is 298.15).

  • unit (str) -- (the default is 'kcal/mol').