Skip to content

Load biomodel

Function for loading the BioModel.

ModelData dataclass

Dataclass for storing the model data.

Source code in aiagents4pharma/talk2biomodels/tools/load_biomodel.py
10
11
12
13
14
15
16
17
@dataclass
class ModelData:
    """
    Dataclass for storing the model data.
    """
    biomodel_id: int = None
    # sbml_file_path: Optional[str] = None
    use_uploaded_sbml_file: bool = False

load_biomodel(sys_bio_model, sbml_file_path=None)

Load the BioModel.

Source code in aiagents4pharma/talk2biomodels/tools/load_biomodel.py
19
20
21
22
23
24
25
26
27
28
def load_biomodel(sys_bio_model, sbml_file_path=None):
    """
    Load the BioModel.
    """
    model_object = None
    if sys_bio_model.biomodel_id:
        model_object = BasicoModel(biomodel_id=sys_bio_model.biomodel_id)
    elif sbml_file_path:
        model_object = BasicoModel(sbml_file_path=sbml_file_path)
    return model_object