Ejemplo n.º 1
0
def phosphorylated_is_active(name_b):
    """
    Macro for 'phosphorylated "B" is active'.
    """
    # Forall Model, *Forall* Rule in Model, Forall B, Named B named_b => and(...)
    B = new_variable(nickname=name_b)

    intp = datatypes.new_interpretation()

    return predicate.ForAll(predicate.Implies(predicate.Named(B, name_b),
        predicate.And(predicate.Implies(predicate.PreLabeled(B, PHOSPHORYLATED),
                    predicate.PreLabeled(B, ACTIVE)),
            predicate.Implies(predicate.PostLabeled(B, PHOSPHORYLATED),
                    predicate.PostLabeled(B, ACTIVE)))))
Ejemplo n.º 2
0
def directly_activates(name_a, name_b):
    """
    Macro for 'activated "A" activates "B"'.
    """
    # Forall Model, Exists Rule in Model, [...]
    A = new_variable(nickname=name_a)
    B = new_variable(nickname=name_b)

    intp = datatypes.new_interpretation()

    return predicate.Exists(predicate.Implies(predicate.Named(A, name_a),
            predicate.Implies(predicate.Named(B, name_b),
                predicate.And(predicate.PreLabeled(A, ACTIVE),
                    predicate.PreUnlabeled(B, ACTIVE),
                    predicate.PostLabeled(A, ACTIVE),
                    predicate.PostLabeled(B, ACTIVE)))))
Ejemplo n.º 3
0
def directly_phosphorylates(name_a, name_b):
    """
    Macro for 'activated "A" phosphorylates "B"'.
    """
    A = new_variable(nickname=name_a)
    B = new_variable(nickname=name_b)

    # Okay, so what I actually want this to say is as follows:
    # Forall Model, Exists Rule in Model, reaction stuff holds over rule
    # reaction stuff = Forall A B, Named A name_a /\ Named B name_b => prelabeled etc
    intp = datatypes.new_interpretation()

    return predicate.Exists(predicate.Implies(predicate.Named(A, name_a),
            predicate.Implies(predicate.Named(B, name_b),
                predicate.And(predicate.PreLabeled(A, ACTIVE),
                    predicate.PreUnlabeled(B, PHOSPHORYLATED),
                    predicate.PostLabeled(A, ACTIVE),
                    predicate.PostLabeled(B, PHOSPHORYLATED)))))
Ejemplo n.º 4
0
 def setUp(self):
     self.submodel = datatypes.new_model()
     self.interpretation = datatypes.new_interpretation()
Ejemplo n.º 5
0
 def get_predicate(self):
     # returns a z3 predicate
     modelset = new_modelset()
     interpretation = new_interpretation()
     predicate = self._assert(modelset, interpretation, None, None)
     return predicate
Ejemplo n.º 6
0
 def get_predicate(self):
     # returns a z3 predicate
     modelset = new_modelset()
     interpretation = new_interpretation()
     predicate = self._assert(modelset, interpretation, None, None)
     return predicate