userinput

This module contains the basic functions to read the user provided files and populate a ChemicalSystem class from them. The core function of this module is 'populate_chemicalsystem_fromfiles'.

exception pykinetic.userinput.MissingCompounds[source]
exception pykinetic.userinput.MissingTransitionStates[source]
pykinetic.userinput.check_missing_TS(raw_reactions, TS_dict)[source]

Checks if all the labeled transition states of the reactions are 'defined' are defined.

Raises:

MissingTransitionStates --

pykinetic.userinput.check_missing_compounds(chemicalsystem, raw_reactions)[source]

Checks if all the compounds in the chemicalsystem are 'defined' within the ChemicalSystem instance.

Raises:

MissingCompounds --

pykinetic.userinput.create_TS_dict(TS_lines, energy_unit='J/mol')[source]

To-document

pykinetic.userinput.create_compounds(raw_compounds, energy_unit='J/mol')[source]

To-document

pykinetic.userinput.is_energy(text)[source]

Returns if a given string corresponds to an energy or not. If the string is a

Parameters:

text (str) -- A string that may be an energy

Returns:

If True or True-like then the evaluated string is an energy.

Return type:

bool or truth-like value

pykinetic.userinput.populate_chemicalsystem_fromfiles(chemicalsystem, file_c, file_r, energy_unit='J/mol', relativeE=False)[source]

Fills a chemicalsystem with the compounds and reactions specified in the compunds file and the reactions file.

Parameters:
  • chemicalsystem (pykinetic.classes.ChemicalSystem) -- chemical system that will be populated

  • file_c (str or Path) -- path to the correctly formatted compounds file

  • file_r (str or Path) -- path to the correctly formatted reactions file

  • energy_unit (str, optional) -- default unit to assume when none is found, by default 'J/mol'

  • relativeE (bool, optional) -- If true the energies of the reactions are assumed to be the barriers relative to reactants instead of assumed to be the energy of the transition state connecting reactants and products, by default False

pykinetic.userinput.prepare_inline_TS(TS_text, TS_dict, energy_unit='J/mol')[source]

To-document

pykinetic.userinput.read_compounds(file)[source]

To-document

pykinetic.userinput.read_reactions(file)[source]

To-document

pykinetic.userinput.split_reaction_line(reaction_text)[source]

To-document