def test_read_heat_shock_10x(self): """ Instantiate a model from heat_shock_10x.xml """ doc = StochMLDocument.fromFile("../examples/heat_shock_10x.xml") model = doc.toModel("heat_shock_10x") xmlstr = model.serialize() # Run StochKit means1,variances1,trajectories1 = stochkit(model,job_id="test_1",seed=45367) means2,variances2,trajectories2 = stochkit("../examples/heat_shock_10x.xml",job_id="test_2",seed=45367) isok = (means1==means2).all() self.assertEqual(isok,True)
def test_read_schlogl(self): """ Instantiate a model from schlogl.xml """ doc = StochMLDocument.fromFile("../examples/schlogl.xml") model = doc.toModel("schlogl") xmlstr = model.serialize() # Run StochKit means1,variances1,trajectories1 = stochkit(model,job_id="test_s_1",seed=45367,time=1.0) means2,variances2,trajectories2 = stochkit("../examples/schlogl.xml",job_id="test_s_2",seed=45367,time=1.0) isok = (means1==means2).all() self.assertEqual(isok,True)
def test_read_heat_shock_10x(self): """ Instantiate a model from heat_shock_10x.xml """ doc = StochMLDocument.fromFile("../examples/heat_shock_10x.xml") model = doc.toModel("heat_shock_10x") xmlstr = model.serialize() # Run StochKit means1, variances1, trajectories1 = stochkit(model, job_id="test_1", seed=45367) means2, variances2, trajectories2 = stochkit( "../examples/heat_shock_10x.xml", job_id="test_2", seed=45367) isok = (means1 == means2).all() self.assertEqual(isok, True)
def test_read_dimer_decay(self): """ Instantiate a model from dimer_decay.xml """ doc = StochMLDocument.fromFile("../examples/dimer_decay.xml") model = doc.toModel("dimer_decay") xmlstr = model.serialize() # Run StochKit with the same seed for both the # original model (diectly using the XML file) and using the file # serialized from the imported model instance. They should result in # the same output even if the format of the XML file is not identical. means1,variances1,trajectories1 = stochkit(model,job_id="test_dd_1",seed=45367) means2,variances2,trajectories2 = stochkit("../examples/dimer_decay.xml",job_id="test_dd_2",seed=45367) isok = (means1==means2).all() self.assertEqual(isok,True)
def test_read_schlogl(self): """ Instantiate a model from schlogl.xml """ doc = StochMLDocument.fromFile("../examples/schlogl.xml") model = doc.toModel("schlogl") xmlstr = model.serialize() # Run StochKit means1, variances1, trajectories1 = stochkit(model, job_id="test_s_1", seed=45367, time=1.0) means2, variances2, trajectories2 = stochkit("../examples/schlogl.xml", job_id="test_s_2", seed=45367, time=1.0) isok = (means1 == means2).all() self.assertEqual(isok, True)
def test_read_dimer_decay(self): """ Instantiate a model from dimer_decay.xml """ doc = StochMLDocument.fromFile("../examples/dimer_decay.xml") model = doc.toModel("dimer_decay") xmlstr = model.serialize() # Run StochKit with the same seed for both the # original model (diectly using the XML file) and using the file # serialized from the imported model instance. They should result in # the same output even if the format of the XML file is not identical. means1, variances1, trajectories1 = stochkit(model, job_id="test_dd_1", seed=45367) means2, variances2, trajectories2 = stochkit( "../examples/dimer_decay.xml", job_id="test_dd_2", seed=45367) isok = (means1 == means2).all() self.assertEqual(isok, True)