Compilation¶

General¶

AMICI¶

Creation

Legacy

legacy.define_observables()[source]¶

Create observables for the AMICI model

Warning

This function is an adapted copy/paste from the Jupyter Notebook

Antimony¶

Creation

Definitions

definitions.define_compartments()[source]¶

Write compartments names in the given Antimony file

Note

First row is considered as a header, and hence it is skipped. First column of the array should contain the compartments names. Second column of the array should contain the compartments volumes.

Parameters:
  • file – The open Antimony file.

  • compartments – Content of the input compartments file structured as specified in the __Note__ section.

Returns:

Nothing.

definitions.define_species()[source]¶
Write species names and affiliated compartments in the given

Antimony file

Note

First row is considered as a header, and hence it is skipped. First column of the array should contain species names. Second column of the array should contain species compartments.

Argurments:

file: The open Antimony file. species: Content of the input species file structured as

specified in the __Note__ section.

Returns:

Nothing.

definitions.define_units()[source]¶

Write unit definitions in the given Antimony file

Parameters:

f_antimony – The open Antimony file.

Returns:

Nothing.

Initial Conditions

initial_conditions.set_compartments_ic()[source]¶

Write compartments initial conditions in the given Antimony file

Note

First row is considered as a header, and hence it is skipped. First column of the array should contain compartments name. Second column of the array should contain compartments concentrations.

Parameters:
  • file – The open Antimony file.

  • compartments – Content of the input compartments file structured as specified in the __Note__ section.

Returns:

Nothing.

initial_conditions.set_reactions_ic()[source]¶
Write reactions parameters initial conditions in the given

Antimony file

Warning

TODO use only one array for the parameters instead of taking the risk to separate names from values.

Parameters:
  • file – The open Antimony file.

  • p_names – The parameters names.

  • p_values – The parameters values.

Returns:

Nothing.

initial_conditions.set_species_ic()[source]¶

Write species initial concentrations in the given Antimony file

Note

First row is considered as a header, and hence it is skipped. First column of the array should contain species names. Third column of the array should contain species concentrations.

Parameters:
  • file – The open Antimony file.

  • species – Content of the input species file.

Returns:

Nothing.

Conversion scripts¶

SBML¶

Annotations

annotations.sbml_annotate_model()[source]¶

Annotate species and compartments of the given SBML model

Parameters:
  • file_path – The path towards the SBML file.

  • compartments – Content of the compartments input file.

  • species – Content of the species input file.

Returns:

Nothing.

annotations.write_compartments_annotations()[source]¶

Set compartments annotations in the given SBML file

Note

First row should be the header and will be skipped. First column contains the compartments names. Annotations are expected to be located on the 3rd column of the array.

Parameters:
  • file – The loaded SBML file.

  • compartments – Content of the compartments input file as specified in the __Note__ section.

Returns:

Nothing.

annotations.write_species_annotations()[source]¶

Set species annotations in the given SBML file

Note

First row should be the header and will be skipped. Annotations are expected to be located between the 4th and the last column of the array.

Parameters:
  • file – The loaded SBML file.

  • species – Content of the species input file.

Returns:

Nothing.

Creation