sbmlutils.converters.xpp_helpers

Some testing of astnode manipulations.

alp(Vm) = abar / (1 + k1 * exp(-2 * d1 * 96.485 * Vm / 8.313424 / (310)) / c)

Module Contents

Functions

ast_info(ast)

Print ASTNode information.

find_names_in_ast(ast[, names])

Find all names in given astnode.

replace_formula(formula, fid, old_args, new_args)

Replace information in given formula.

_top_bracket_content(s)

Get content of top bracket.

_bracket_stack(s)

Get bracket stack.

Attributes

formula

sbmlutils.converters.xpp_helpers.ast_info(ast)[source]

Print ASTNode information.

Parameters:

ast (libsbml.ASTNode) –

Return type:

None

sbmlutils.converters.xpp_helpers.find_names_in_ast(ast, names=None)[source]

Find all names in given astnode.

Names are the variables in the formula.

Parameters:
  • ast (libsbml.ASTNode) –

  • names (Optional[List[str]]) –

Returns:

Return type:

List[str]

sbmlutils.converters.xpp_helpers.replace_formula(formula, fid, old_args, new_args)[source]

Replace information in given formula.

Parameters:
  • formula (str) –

  • fid (str) –

  • old_args (List[str]) –

  • new_args (List[str]) –

Returns:

Return type:

str

sbmlutils.converters.xpp_helpers._top_bracket_content(s)[source]

Get content of top bracket.

Parameters:

s (str) –

Return type:

str

sbmlutils.converters.xpp_helpers._bracket_stack(s)[source]

Get bracket stack.

Parameters:

s (str) –

Return type:

Dict[int, int]

sbmlutils.converters.xpp_helpers.formula = 'abar / (1 + k1 * exp(-2 * d1 * 96.485 * Vm / 8.313424 / (310)) / c)'[source]