kinetic

Kinetic plot module. Given the energies and concentrations of the compounds and the energies transition states, this module creates a graph summarizing the kinetic behavior of the system. The background of the nodes is colored depending on their concentration, while the width of the edges and the direction of the arrows is decided based on the calculated net rate.

rnets.plotter.kinetic.build_dotgraph(nw: Network, graph_cfg: GraphCfg = GraphCfg(), chem_cfg: ChemCfg = ChemCfg(), colorbar_cfg: ColorbarCfg | None = None) Graph[source]

Build a kinetic dotgraph from a reaction network.

Parameters:
  • nw (Network) -- Network object to be converted into dot graph.

  • graph_cfg (GraphCfg, optional) -- Graphviz configuration. Defaults to ChemCfg

  • chem_cfg (ChemCfg, optional) -- Chemical parameters fo the system. Defaults to ChemCfg

  • colorbar_cfg (ColorbarCfg or None, optional) -- Colorbar parameters of the system. Defaults to None.

Returns:

Dot Graph representing the kinetic information with the colors and shapes of the network.

rnets.plotter.kinetic.filter_unique_react(rs: Sequence[Reaction]) tuple[Reaction, ...][source]

Given a set of reactions that may contain biderectional reactions, return a set without the reversed reactions.

Parameters:

rs (sequence of Reaction) -- Sequence of reactions that will bee filtered.

Returns:

Tuple containing the unique Reaction s.

rnets.plotter.kinetic.get_colorbar(nw: Network, graph_cfg: GraphCfg, colorbar_cfg: ColorbarCfg, colorspace: ColorSpace = 'lab') tuple[Node, Edge | tuple[()]][source]

Build a colorbar for the thermodynamic plot.

Parameters:
  • graph_cfg (GraphCfg, optional) -- Graphviz configuration. Defaults to ChemCfg.

  • colorbar_cfg (ColorbarCfg or None, optional) -- Colorbar parameters of the system. Defaults to None.

  • colorspace (ColorSpace, optional) -- Colorspace of the colorbar. Defaults to "lab".

Returns:

Node representing the color bar and the second value being an invisible edge that anchors the colorbar to another node.

Return type:

tuple of two values, the first one being a obj