.. Autogenerated in conf.py

.. _examples-flow:
.. _examples-050_hyperflow:

Integer Hyperflows and Pathways
################################################################################



A Specific Pathway
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

A Pathway is an integer hyper-flow: each reaction is assigned a
non-negative interger, specifying the number of times the reaction is used.
Virtual input and output reactions are added to each molecule.

`Explore in the playground <https://cheminf-live.imada.sdu.dk/mod?example=050_hyperflow__
500_basicFlow.py>`__.

.. literalinclude:: /_static/examples/py/050_hyperflow/500_basicFlow.py
	:language: python
	:linenos:
	:lines: 1-21
	:tab-width: 3


Extra Constraints
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

We can add many kinds of constraints. They do not need to be related to
input/ouput.

`Explore in the playground <https://cheminf-live.imada.sdu.dk/mod?example=050_hyperflow__
501_extraConstraints.py>`__.

.. literalinclude:: /_static/examples/py/050_hyperflow/501_extraConstraints.py
	:language: python
	:linenos:
	:lines: 1-27
	:tab-width: 3


Multiple Solutions
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

It is often interesting to look for alternate solutions,
possibly with a sub-optimal objective value.

`Explore in the playground <https://cheminf-live.imada.sdu.dk/mod?example=050_hyperflow__
502_multipleSolutions.py>`__.

.. literalinclude:: /_static/examples/py/050_hyperflow/502_multipleSolutions.py
	:language: python
	:linenos:
	:lines: 1-24
	:tab-width: 3


Finding Autocatalytic Cycles
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Some pathways have a specific higher-order structure, e.g., autocatalysis.

`Explore in the playground <https://cheminf-live.imada.sdu.dk/mod?example=050_hyperflow__
510_autocatalysis.py>`__.

.. literalinclude:: /_static/examples/py/050_hyperflow/510_autocatalysis.py
	:language: python
	:linenos:
	:lines: 1-19
	:tab-width: 3