Saving a model after UnitConversion in SimBiology

조회 수: 17 (최근 30일)
Zebulon
Zebulon 2017년 1월 26일
댓글: Zebulon 2017년 2월 6일
Hi,
I was wondering if it was possible to save (and export to SBML) a model after UnitConversion? I cannot directly export to SBML a model that requires UnitConversion prior to simulation (conversion works fine, but simulations obviously do not). Can the converted model be manipulated though?
Thanks.

채택된 답변

Arthur Goldsipe
Arthur Goldsipe 2017년 1월 27일
Based on your reply, I now understand that you'd like to update a model in SimBiology, so that you can simulate it correctly with UnitConversion disabled. This will allow you to export the model to SBML so that you can also simulate it correctly in a tool that does not support unit conversion.
You should be able to automate much of the conversion process. However, the exact details will depend on your model and how you want to make the units consistent. At a high level, you will need to convert all species, compartments, and parameters to consistent units and update their values accordingly. The function sbioconvertunits can be quite helpful in this process. For example, you can update all species in model m1 so that units and values are in mole/liter with the code sbioconvertunits(m1.Species, 'mole/liter').
Good luck,
-Arthur
  댓글 수: 1
Zebulon
Zebulon 2017년 2월 6일
Thank you Arthur. Indeed, to export an SBML model and make it work in other software that do not do unit conversions, I had to convert all "molarity" units to "mole/liter" and keep volume consistently as liter for all compartments. Then the model was running in MATLAB without UnitConversion activated, and in external programs. Thanks.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Arthur Goldsipe
Arthur Goldsipe 2017년 1월 27일
Hi,
I'd like to make sure I understand your question. Tell me if this is accurate: When you simulate your model in SimBiology, you must use UnitConversion to get the correct answer. You also want to export this model to SBML. You want to make sure that the SBML file will be correct.
If you'd like to know what features of SimBiology can be exported to SBML, then read this documentation. With regard to unit conversion, SimBiology will include the units in the SBML file. If you import the SBML file into SimBiology and enable UnitConversion, you should get the same unit conversion behavior as you did before exporting the model.
That said, if you need to use that SBML file with another tool, you will need to make sure that the tool understands how to perform the necessary unit conversions. If you need to use the model with a tool that does not support unit conversion, you will probably need to SimBiology model so that it works correctly with UnitConversion disabled. Specifically, you need to make sure that all math expressions have consistent units.
If you add a comment and don't get a prompt reply, contact me directly. I don't get notified when there are updates to a question.
Good luck!
-Arthur
  댓글 수: 2
Zebulon
Zebulon 2017년 1월 27일
Dear Arthur,
Thanks for your answer. You are correct, I wish to use the model in an external application, which does not support UnitConversion. From MATLAB, SBML export works fine, but in this external application, simulations give the same result than if I were using the model in MATLAB without enabling UnitConversion, as expected.
I was wondering if there was a possibility to manipulate a converted model in MATLAB, and possibly export it, without having to manually convert units oneself?
Thanks.
Arthur Goldsipe
Arthur Goldsipe 2017년 1월 27일
Ah, now that I understand your question more clearly, I'll post another answer that more clearly addresses it.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Scan Parameter Ranges에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by