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'.
- 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:
- pykinetic.userinput.check_missing_compounds(chemicalsystem, raw_reactions)[source]
Checks if all the compounds in the chemicalsystem are 'defined' within the ChemicalSystem instance.
- Raises:
- 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