Package: sbml2hyb
SBML2HYBOverviewHybrid modelling combine parametric functions (derived from knowledge) and nonparametric functions (derived from data) in the same model structure.
The sbml2hyb tool is an stand-alone executable application forSBMLcompatible hybrid modelling. The tool is written in Python and is intended as an interface to convert existing SBML models into a hybrid model (combines mechanistic equations and ML techniques).The new internal hybrid model format HMOD (intermediate format — enables communication between the essential components of the mechanistic and hybrid models) can be translated to SBML and vice-versa in sbml2hyb. SeeHMODfile example.Quick start guideInstallationUsers have two options to install sbml2hyb:(i) As a typical stand-alone executable Windows application; download thefiles. After saving the Windows folder where you prefer on your computer, double-click the executable (sbml2hyb_exe.exe) file to open the tool. It works also onmacOSsystem.(ii) As a Python package (pip installer); run the following command viapip:pip install sbml2hybsbml2hyb is written in Python (requires version 3.8 or higher).Alternatively, you can clone this GitHub repository to a location on your computer's file system and then runsbml2hyb.pyfrom the command-line.After installing the package the user can simply import the library and call it. This is an example on how to use:from sbml2hyb import sbml2hybPackage Dependenciestkinter 3.10.7Pillow 9.0libsbml 5.19.6Python 3.8.2Tensorflow 2.10.0Getting Started►  How to use SBML2HYBThe users can use sbml2hyb either via the command line interface or via a graphical user interface (GUI) that allows to convert SBML files into HMOD files and vice versa.
Once the simple Graphical User Interface (GUI) window opens, click the"Translate SBML file"or"Translate HMOD file"button, to find the SBML or HMOD mechanistic model file you want to convert on the tool, respectively. After few seconds, the user get the final output in the main panel of the GUI. Here, the user can save (click"Save file"button) the standard model file (.xml or .hmod).The user can then add the information of the neural network component (Click"Add ML"button) into the HMOD/SBML model format (note that first the user needs to load a mechanistic HMOD/SBML model file). Once the user do this, they need select the"inputs"and"outputs"options of the neural network, and the Keras H5 file (i.e., add the ML component information). Click the"Confirm"button. Finally, the resulting hybrid model in HMOD (or SBML) format can then be reconverted in SBML (or HMOD), respectively. Click"Translate HMOD file"or"Translate SBML file"button.NOTE: To generate an Keras H5 file that serves as a blueprint of the machine learning segment of a hybrid model, the Keras library from Tensorflow should be used (seeinstructionsand an example asnotebook).Visit also the documentation of the tool hosted onRead the Docs.►  Creating a hybrid SBML modelExample:Park&RamirezmodelYou can view the mechanistic model SBML file input for this example in aseparate file. The screenshot below (Figure 1) illustrates the output of thePark&Ramirezmechanistic HMOD modelafter the SBML conversion. The user select then the model"inputs"(S) and"outputs"(miu,vPM,VPT) options of the neural network, and theKeras H5 file(Figure 2) to convert directly to the hybrid model. You can view the resulting final hybrid HMOD file from the toolhereand printscreens below (Figure 3). The hybrid model in HMOD format is then reconverted in thehybrid SBML model.Figure 1.Figure 2.Figure 3.Developed atNOVA School of Science and Technology, Universidade NOVA de Lisboa (since 2021)HelpIf you have any trouble using the tool or suggestions, please contact:  rs [dot] costa [at] fct [dot] unl [dot] pt OR open anissue.LicenseThis work is licensed under aGNU Public License (version 3.0).