cocomico.answer

CoCoMiCo Clingo answer objects.

Classes

Answer

An answer to a clingo query is a collection of terms in the stable model.

Module Contents

class cocomico.answer.Answer(scope_flat: all, exchange: all, polyopsonist: all, monopsonist: all, polypolist: all, monopolist: all, activated_flat: all, produced_seed_flat: all, consumed_seed_flat: all)[source]

An answer to a clingo query is a collection of terms in the stable model. The Answer object parses these terms into cocomico.base objects.

Parameters:
  • scope (set[Biomolecule]) – community scope

  • exchange (dict[Biomolecule,Exchange]) – metabolic exchanges

  • polyopsonist (all) – exchanges with more than one consumer

  • monopsonist (all) – exchanges with exactly one consumer

  • activated (set[Reaction]) – activated reactions

  • produced_seeds (set[Biomolecule]) – seeds that are also produced

  • consumed_seeds (set[Biomolecule]) – seeds that are actually consumed

  • scope_flat (all)

  • polypolist (all)

  • monopolist (all)

  • activated_flat (all)

  • produced_seed_flat (all)

  • consumed_seed_flat (all)

__str__()[source]

String representation of an answer