AnabelSMRuggiero / sbmltoodepy

A tool for creating Python implementations of SBML models.
BSD 3-Clause "New" or "Revised" License
13 stars 4 forks source link

boundary conditions not set correctly #11

Open augeorge opened 2 years ago

augeorge commented 2 years ago

Hello,

I noticed that the boundary_species flag isn't being set correctly in the parsed .json file (I'm guessing that this is also the case with the generated python module?).

code:

import sbmltoodepy
sbml_file = "toy_reaction.xml"
output_file = "toy_reaction.py"
json_output_file = "toy_reaction.json"
class_name = "ReactionModel"
sbmltoodepy.ParseAndCreateModel(sbml_file, outputFilePath = output_file, className = class_name, jsonFilePath = json_output_file)

from sbml .xml file:

<species id="B" compartment="vol" initialConcentration="1" substanceUnits="mole" hasOnlySubstanceUnits="false" boundaryCondition="true" constant="false"/>

from created .json file:

"B": {
    "Id": "B",
    "name": "",
    "value": 1.0,
    "valueType": "Concentration",
    "compartment": "vol",
    "isConstant": false,
    "isBoundarySpecies": null,
    "hasOnlySubstanceUnits": false
},