# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# +
import init
from SBMLLint.common import constants as cn
from SBMLLint.common.molecule import Molecule, MoleculeStoichiometry
from SBMLLint.common import simple_sbml
from SBMLLint.common.reaction import Reaction
from SBMLLint.tools import sbmllint
from SBMLLint.tools import print_reactions

import os
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import time

# +
from games_setup import *
from SBMLLint.common import constants as cn
from SBMLLint.common.simple_sbml import SimpleSBML
from SBMLLint.common.stoichiometry_matrix import StoichiometryMatrix

from SBMLLint.games.som import SOM
from SBMLLint.games.games_pp import GAMES_PP, SOMStoichiometry, SOMReaction, TOLERANCE
from SBMLLint.games.games_report import GAMESReport, SimplifiedReaction
# -

recon3d = "Recon3D"
recon3d_filepath = os.path.join(cn.BIGG_DIR, "Recon3D.xml")

simple = SimpleSBML()
simple.initialize(recon3d_filepath)

simple.reactions[:50]



# Analyze by LP
s = StoichiometryMatrix(simple)
lp_start = time.time()
consistent = s.isConsistent()
if not consistent:
  print("%s is not consistent! Error detected\n" % recon3d)
else:
  print("%s is consistent" % recon3d)
lp_end = time.time()
lp_time = lp_end - lp_start

print(lp_time)



StarcoderdataJupyterScriptsDedupFiltered