GeomScale / dingo

A python library for metabolic networks sampling and analysis
GNU Lesser General Public License v3.0
41 stars 27 forks source link

sampler does not converge with iLJ478 model #21

Closed vissarion closed 2 years ago

vissarion commented 2 years ago

The following piece of code

import unittest
import os
import scipy
import numpy as np
from dingo import MetabolicNetwork, PolytopeSampler
from dingo.gurobi_based_implementations import fast_inner_ball

current_directory = os.getcwd()
input_file_json = current_directory + "/ext_data/iLJ478.json"

model = MetabolicNetwork.from_json(input_file_json)
model.set_fast_mode()

sampler = PolytopeSampler(model)
sampler.set_fast_mode()

steady_states = sampler.generate_steady_states()

returns

phase 1: number of correlated samples = 1200, effective sample size = 8, ratio of the maximum singilar value over the minimum singular value = 4470.89
phase 2: number of correlated samples = 1200, effective sample size = 8, ratio of the maximum singilar value over the minimum singular value = 2341.2
phase 3: number of correlated samples = 1200, effective sample size = 8, ratio of the maximum singilar value over the minimum singular value = 2240.94
phase 4: number of correlated samples = 1200, effective sample size = 8, ratio of the maximum singilar value over the minimum singular value = 738.163
phase 5: number of correlated samples = 1200, effective sample size = 9, ratio of the maximum singilar value over the minimum singular value = 30.622
phase 6: number of correlated samples = 1200, effective sample size = 38, ratio of the maximum singilar value over the minimum singular value = 17.2763
phase 7: number of correlated samples = 1200, effective sample size = 277, ratio of the maximum singilar value over the minimum singular value = 3.276
phase 8: number of correlated samples = 1200, effective sample size = 7, ratio of the maximum singilar value over the minimum singular value = 27.1693
phase 9: number of correlated samples = 1200, effective sample size = 9, ratio of the maximum singilar value over the minimum singular value = 612.636
phase 10: number of correlated samples = 1200, effective sample size = 9, ratio of the maximum singilar value over the minimum singular value = 8242.79
phase 11: number of correlated samples = 1200, effective sample size = 9, ratio of the maximum singilar value over the minimum singular value = 3117.12
phase 12: number of correlated samples = 1200, effective sample size = 8, ratio of the maximum singilar value over the minimum singular value = 28234.6
phase 13: number of correlated samples = 1200, effective sample size = 8, ratio of the maximum singilar value over the minimum singular value = 6980.29
Segmentation fault (core dumped)

iLJ478.json is downloaded from http://bigg.ucsd.edu/

Desktop:

OS: Ubuntu 20.04.2 LTS
python: Python 3.8.5 [GCC 9.3.0]
TolisChal commented 2 years ago

Thanks for the issue @vissarion. The commit https://github.com/GeomScale/dingo/commit/7f10f42bc614b5c71039860b24ae6d768ac2d696 resolves this issue.

vissarion commented 2 years ago

Thanks !