#!/usr/bin/env python # coding: utf-8 # # This notebook provides a quick test for 3D stream plots in MuMot # In[ ]: import mumot mumot.__version__ # ## Here we define our 3D model: # In[ ]: model1 = mumot.parseModel(r""" U -> A : g_1 U -> B : g_2 U -> C : g_3 A -> U : a_1 B -> U : a_2 C -> U : a_3 A + U -> A + A : r_1 B + U -> B + B : r_2 C + U -> C + C : r_3 A + B -> A + U : s A + B -> B + U : s A + C -> A + U : s A + C -> C + U : s B + C -> B + U : s B + C -> C + U : s """) # In[ ]: model2 = model1.substitute('U = N - A - B - C') # 3d stream plot takes a random selection of starting points and plots streams by integrating the model equations using the start points as initial conditions. # The colour of each stream shows the initial speed of each stream in the stream plot. # New keywords for the 3d stream plot: # - setNumPoints (type: int) this sets the number of streams to be plotted # - maxTime (type: float) this sets the length of time over which the streams are integrated # In[ ]: modelStreamPlot = model2.stream('A', 'B', 'C', showFixedPoints = True, maxTime = 2.0) # In[ ]: modelStreamPlot.showLogs() # NOTE: streams can be slow to update when the sliders are changed, if showFixedPoints = True then sometimes it can get stuck on calculating the fixed points and won't update # In[ ]: