mobspy package
Subpackages
- mobspy.data_handler package
- mobspy.modules package
- Submodules
- mobspy.modules.class_of_meta_specie_named_any module
- mobspy.modules.event_functions module
- mobspy.modules.function_rate_code module
- mobspy.modules.logic_operator_objects module
- mobspy.modules.meta_class module
BaseSpecies()CompilerListSpecies()List_SpeciesNew()Reacting_SpeciesReactionsSpeciesSpecies.add_characteristic()Species.add_quantities()Species.add_reaction()Species.add_reference()Species.c()Species.check_if_valid_characteristic()Species.get_all_characteristics()Species.get_characteristics()Species.get_index_from_reference_dict()Species.get_name()Species.get_ordered_references()Species.get_quantities()Species.get_reactions()Species.get_references()Species.get_simulation_context()Species.is_spe_or_reac()Species.is_species()Species.label()Species.meta_specie_named_any_contextSpecies.name()Species.order_references()Species.print_characteristics()Species.remove_characteristic()Species.remove_repeated_elements()Species.reset_counts()Species.reset_quantities()Species.reset_reactions()Species.reset_references()Species.reset_simulation_context()Species.set_reactions()Species.set_references()Species.set_simulation_context()Species.show_characteristics()Species.show_quantities()Species.show_reactions()Species.show_references()Species.str_under_context()Species.unit()Species.update_meta_specie_named_any_context()
compile_species_number_line()
- mobspy.modules.meta_class_utils module
- mobspy.modules.mobspy_expressions module
Bool_OverrideExpressionDefinerMobsPyExpressionOverrideQuantityOverrideQuantity.convert()OverrideQuantity.convert_into()OverrideQuantity.non_expression_add()OverrideQuantity.non_expression_mul()OverrideQuantity.non_expression_pow()OverrideQuantity.non_expression_radd()OverrideQuantity.non_expression_rmul()OverrideQuantity.non_expression_rsub()OverrideQuantity.non_expression_rtruediv()OverrideQuantity.non_expression_sub()OverrideQuantity.non_expression_truediv()OverrideQuantity.set_ms_active()
OverrideUnitRegistryQuantityConverterSpecific_Species_Operator
- mobspy.modules.mobspy_parameters module
- mobspy.modules.order_operators module
- mobspy.modules.reaction_construction_nb module
check_for_invalid_reactions()construct_order_structure()construct_product_structure()construct_rate_function_arguments()construct_reactant_structures()construct_single_reaction_for_sbml()copy_reaction()count_string_dictionary()create_all_reactions()expression_compilation_finish()expression_compilation_initiation()get_involved_species()iterator_for_combinations()
- mobspy.modules.reaction_construction_nb_parallel module
check_for_invalid_reactions()construct_order_structure()construct_product_structure()construct_rate_function_arguments()construct_reactant_structures()construct_single_reaction_for_sbml()copy_reaction()count_string_dictionary()create_all_reactions()get_involved_species()iterator_for_combinations()
- mobspy.modules.set_counts_module module
- mobspy.modules.species_string_generator module
- mobspy.modules.unit_handler module
- mobspy.modules.user_functions module
- Module contents
- mobspy.parameter_scripts package
- mobspy.parameters package
- mobspy.plot_params package
- mobspy.plot_scripts package
- mobspy.sbml_simulator package
- mobspy.simulation_logging package
Submodules
mobspy.simulation module
Main MobsPy module. It stocks the Simulation class which is responsible for simulating a Model
- class mobspy.simulation.Simulation(model, names=None, parameters=None, plot_parameters=None)
Bases:
object- compile(verbose=True)
Compiler method that calls the Compiler class in the modules directory
- Parameters:
verbose – (bool) = print or not the results of the compilation
- configure_parameters(config)
Configure simulation parameters from json file or dictionary
- Parameters:
file_name – (str) name of the json file
- configure_plot_parameters(config)
Configure plot parameters from json file or dictionary
- Parameters:
file_name – (str) name of the json file
- classmethod event_compilation_error()
- event_condition(trigger, delay=0)
Context manager for condition events. Called in “with Simulation.event_condition(trigger) :” format.
- Parameters:
trigger – () condition that triggers the event when fulfilled
delay – (int, float, Quantity) time to wait before triggering the event once the trigger condition has been fulfilled
- event_context_add(time, trigger)
Adds an event to the event context
- Parameters:
trigger – () condition that triggers the event when fulfilled
time – (int, float, Quantity) time to wait before triggering the event once the trigger condition has been fulfilled
- event_context_finish()
Removes the context in all meta-species and resets some varaiables. Called each time an event context is finished.
- event_context_initiator()
Sets the context in all meta-species. Called each time an event context is initiated.
- event_time(time)
Context manager for time events. Called in “with Simulation.event_time(time) :” format.
- Parameters:
time – (int, float, Quantity) any time used
- extract_plot_essentials(*species)
Extract essential information for plotting
- Parameters:
species – (meta-species objects) meta-species objects to plot
- Returns:
species_strings (str) = species strings to be plotted, self.results = data resulting from the
simulation, self.plot_parameters (dict) = parameters for plotting
- generate_sbml()
Generates sbmls strings from the current stored models in the simulation
“return: to_return (list of str) list of sbml files from all the simulations stored
- classmethod is_simulation()
- plot(*species)
Another way of calling plot_deterministic for simplicity
- Parameters:
species – (str or meta-species objects) list of species to be plotted
- plot_deterministic(*species)
Calls deterministic plot. See default_plots module in the plot_scripts directory
- Parameters:
species – (str or meta-species objects) list of species to be plotted
- plot_parametric(*species)
- plot_raw(parameters_or_file)
Calls raw plot. See default_plots module in the plot_scripts directory
- Parameters:
parameters_or_file – json file name with plot parameter configuration or dictionary with plot
parameter configuration
- plot_stochastic(*species)
Calls stochastic plot. See default_plots module in the plot_scripts directory
- Parameters:
species – (str or meta-species objects) list of species to be plotted
- run()
Runs the simulation by colling the models in the sbml_simulator directory. Compiles the model if it was not yet compiled
- save_data(file=None)
Saves the simulation result data to a file in json format
- Parameters:
file – (str) name of the file to save the data to. If none a default name is provided
- set_from_json(file_name)
Set simulation parameters from json file
- Parameters:
file_name – (str) name of the json file
- classmethod set_job_number(params)
Module contents
MobsPy: A Query-Based Language for Chemical Reaction Networks