modcell2

cont_jaccard(v1, v2, tol)

Number of common elements between two vectors, under a given tolerance. Vectors must be of the same dimensions.

create_problem_directory(problem_name, parent_directory)

Creates directory and subdirectory for a modcell problem.

Parameters:
  • problem_name (string) –
  • parent_directory (string,optional) – If not provided the $modcell2/problems directory will be used.
load_prodnet(problem_name)

Load production network ensuring that the problem_path field is correct

Parameters:problem_name (string) –
solve_lp(cmodel, LP_SOLVER)

Solve a linear programming problem

Parameters:
  • cmodel (cobra model) –
  • LP_SOLVER (str) – options are ‘gurobi’, ‘glpk’, and ‘linprog’.
Returns:

  • r (vector) – optimal reaction flux vector. Note that unfeasible solutions return an r of zeros.
  • status (integer) – 1 optimal solution, 0 non-optimal/infeasible solution.