ecell / ecell4

An integrated software environment for multi-algorithm, multi-timescale, multi-spatial-representation simulation of various cellular phenomena
https://ecell4.e-cell.org/
GNU General Public License v3.0
17 stars 9 forks source link

can't load an sbml file #54

Closed ortega2247 closed 5 years ago

ortega2247 commented 5 years ago

I tried loading the attached sbml file and obtained the following error:

ImportError: cannot import name 'generate_ratelaw' from 'ecell4.util.decorator'

I looked into the ecell4.util.decorator and it doesn't import or have a generate_ratelaw function. However, the generate_ratelaw is defined in the ecell4.util.model_parser module

example_ecell4.xml.zip

kaizu commented 5 years ago

I fixed some mistakes in our code. Thanks! In addition to load_sbml, I also found a bug in export_sbml.

Please download the new version of ports.py from https://github.com/ecell/ecell4/raw/master/ecell4/util/ports.py, and try the following code again.

https://gist.github.com/kaizu/b477e452001b2ab2b36ce3c801399079

This update would be released soon.

In ecell4, sbml is not fully supported. Please ask when you have some trouble with it again.

ortega2247 commented 5 years ago

I just checked the example and the load_sbml and save_sbml functions are working. Thanks for the help!