PourPy.database

Attributes

elements

element_list

Classes

DefaultParser

Helper class that provides a standard way to create an ABC using

Database

Module Contents

class PourPy.database.DefaultParser

Bases: Parser

Helper class that provides a standard way to create an ABC using inheritance.

static parse_reactions(reactions: tuple)

Parses several reactions given as tuple

Parameters:

reactions (tuple) – reactions to be parsed, each entry of a tuple is a reaction string

:return : reactions as list, each entry is a dict containing reactants :rtype : list

static parse_reaction(reaction: str)

Parse a reaction from its string representation

Parameters:

reaction (str) – reaction to be parsed

:return : reactants as dict :rtype : dict

static parse_species(species: tuple, elements: dict)
static parse_specie(specie: str)

Parse a specie and its chemical props from its string representation

Parameters:

specie (str) – specie_name,state,dGf,dHf,Sm as string

:return : name of the specie, properties as dictionary :rtype : tuple

static parse_elements()
class PourPy.database.Database(species: list, elements: dict, parser=None)

Bases: object

__str__()

Return str(self).

classmethod from_default(species: tuple)

Create database containing species and their chemical properties from a tuple of string : param species : Species data as tuple of strings : type species : tuple

classmethod from_file(filename: str)

Create database containing species and their chemical properties from a txt file : param filename : file containing species data : type filename : str

add_reactions(reactions: tuple)
associate_reactions_to_database(reactions: list)
PourPy.database.elements
PourPy.database.element_list