From a75c0b0068d58a477d42c0647d0d2de05868c3c8 Mon Sep 17 00:00:00 2001 From: Alon Grinberg Dana Date: Mon, 4 Mar 2024 13:47:57 +0200 Subject: [PATCH] Allow users to limit the number of generations in a flux diagram --- t3/utils/flux.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/t3/utils/flux.py b/t3/utils/flux.py index 5c3216d1..ddd9d11e 100644 --- a/t3/utils/flux.py +++ b/t3/utils/flux.py @@ -36,6 +36,7 @@ def generate_flux(model_path: str, scaling: Optional[float] = None, fix_cantera_model: bool = True, allowed_nodes: Optional[List[str]] = None, + max_chemical_generations: Optional[int] = None, ): """ Generate a flux diagram for a given model and composition. @@ -71,6 +72,7 @@ def generate_flux(model_path: str, fix_cantera_model (bool, optional): Whether to fix the Cantera model before running the simulation. allowed_nodes (Optional[List[str]], optional): A list of nodes to consider. any node outside this list will not appear in the flux diagram. + max_chemical_generations (Optional[int], optional): The maximal number of chemical generations to consider. Structures: profiles: {