#! /usr/bin/env python from testutils import McellTest from testutils import get_output_dir from testutils import cleandir from reaction_output import RequireCountConstraints from reaction_output import RequireCountEquilibrium from reaction_output import RequireCountRxnRate from reaction_output import RequireCounts from reaction_output import RequireCountsPositive from reaction_output import RequireCountsPositiveOrZero from reaction_output import RequireHitsCrossRelations from reaction_output import RequireValidTriggerOutput import unittest import math class TestReactionsNumeric(unittest.TestCase): def test_volume(self): t = McellTest("reactions", "01-volume_highconc.mdl", ["-quiet"]) t.add_extra_check(RequireCountConstraints("dat/01-volume_highconc/V_out.dat", [(0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), # 0 (0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), # 0 (0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), # 0 (0, 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), # 0 (0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), # 0 (0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), # 0 (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), # 0 (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), # 0 (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0), # 0 (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0), # 0 (1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0), # 1000 (0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0), # 1000 (0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0), # 1000 (0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0), # 1000 (0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0), # 1000 (0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0), # 1000 (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0), # 1000 (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1)], # 1000 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000], header=True)) t.add_extra_check(RequireCountEquilibrium("dat/01-volume_highconc/V_out.dat", [500] * 26, [25] * 26, header=True)) t.add_extra_check(RequireCountRxnRate("dat/01-volume_highconc/rxn_out.dat", values=[1e5]*7 + [3.33e4]*1 +[1e5]*7 + [3.33e4]*1, tolerances=[1.5e4]*7 + [5e3]*1 +[1.5e4]*7 + [5e3]*1, min_time=5e-3, base_time=0.0, header=True)) t.invoke(get_output_dir()) def test_volume_noacc3d(self): t = McellTest("reactions", "02-volume_highconc_noacc3d.mdl", ["-quiet"]) t.add_extra_check(RequireCountConstraints("dat/02-volume_highconc_noacc3d/V_out.dat", [(0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), # 0 (0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), # 0 (0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), # 0 (0, 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), # 0 (0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), # 0 (0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), # 0 (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), # 0 (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), # 0 (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0), # 0 (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0), # 0 (1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0), # 1000 (0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0), # 1000 (0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0), # 1000 (0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0), # 1000 (0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0), # 1000 (0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0), # 1000 (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0), # 1000 (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1)], # 1000 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000], header=True)) t.add_extra_check(RequireCountEquilibrium("dat/02-volume_highconc_noacc3d/V_out.dat", [500] * 26, [25] * 26, header=True)) t.add_extra_check(RequireCountRxnRate("dat/02-volume_highconc_noacc3d/rxn_out.dat", values= [1e5] * 5 + [2e4] * 3 + [1e5] * 5 + [2e4] * 3, tolerances=([1.5e4] * 5) + ([6e3] * 3) + ([1.5e4] * 5) + ([6e3] * 3), min_time=5e-3, base_time=0.0, header=True)) t.invoke(get_output_dir()) def test_surface(self): t = McellTest("reactions", "03-surface.mdl", ["-quiet"]) t.add_extra_check(RequireCountConstraints("dat/03-surface/V_out.dat", [(0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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, 0, 0, 0, 0, 1, 0, 0, 0, 0), # 1000 /* V_t4 + B_vt2 == 1000 */ (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0), # 1000 /* V_t7 + B_vt3 == 1000 */ (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0), # 1000 /* V_vt1 + B_vvt == 1000 */ (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0), # 1000 /* V_vt4 + B_vvt2 == 1000 */ (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1)], # 1000 /* V_vt4 + B_vvt2 == 1000 */ [0]*26 + [1000]*18, header=True)) t.add_extra_check(RequireCountEquilibrium("dat/03-surface/V_out.dat", [500] * 62, [25] * 62, header=True)) t.add_extra_check(RequireCountRxnRate("dat/03-surface/rxn_out.dat", values= [1e5] * 15 + [1e4]*3 + [1e5] * 15 + [1e4]*3, tolerances=[1.5e4] * 15 + [7.0e3] * 3 + [1.5e4] * 15 + [7.0e3] * 3, min_time=5e-3, base_time=0.0, header=True)) t.add_extra_check(RequireCountRxnRate("dat/03-surface/b19_rxn_out.dat", values= [3.3e4] * 4, tolerances=[0.99e4] * 4, min_time=5e-3, base_time=0.0, header=True)) t.add_extra_check(RequireCountRxnRate("dat/03-surface/b20_rxn_out.dat", values= [5.0e4] * 1 + [2.5e4] * 3, tolerances=[1.0e4] * 1 + [0.5e4] * 3, min_time=5e-3, base_time=0.0, header=True)) t.invoke(get_output_dir()) def test_surface_with_surface_class(self): t = McellTest("reactions", "04-surface.mdl", ["-quiet"]) t.add_extra_check(RequireCountConstraints("dat/04-surface/V_out.dat", [(0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), # 0 /* S_b1 == S_b2 */ (0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), # 0 /* S_b3 == S_b4 */ (0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), # 0 /* S_bt1 == S_bt2 */ (0, 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), # 0 /* S_bt3 == S_bt4 */ (0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), # 0 /* V_b1 == S_vb2 */ (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), # 0 /* V_bt1 == S_vbt2 */ (0, 0, 0, 0, 0, 0, 0, 0, 0,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, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1)], # 1000 /* V_bt3 + B_vbt2 == 1000 */ [0]*8 + [1000]*9, header=True)) t.add_extra_check(RequireCountEquilibrium("dat/04-surface/V_out.dat", [500] * 26, [25] * 26, header=True)) t.add_extra_check(RequireCountRxnRate("dat/04-surface/rxn_out.dat", values= [1e5] * 18, tolerances=[1.5e4] * 18, min_time=5e-3, base_time=0.0, header=True)) t.add_extra_check(RequireCountEquilibrium("dat/04-surface/b13_u_out.dat", [500] * 2, [50] * 2, header=True)) t.add_extra_check(RequireCountRxnRate("dat/04-surface/b13_u_rxn_out.dat", values= [3.3e4] * 6, tolerances=[0.99e4] * 6, min_time=5e-3, base_time=0.0, header=True)) t.add_extra_check(RequireCountEquilibrium("dat/04-surface/b14_u_out.dat", [1000] * 2, [50] * 2, header=True)) t.add_extra_check(RequireCountRxnRate("dat/04-surface/b14_u_rxn_out.dat", values= [8.0e4]*2 + [4.0e4]*2 + [2.4e4]*2, tolerances=[2.4e4]*2 + [1.2e4]*2 + [0.72e4]*2, min_time=5e-3, base_time=0.0, header=True)) t.add_extra_check(RequireCountEquilibrium("dat/04-surface/b15_u_out.dat", [1000] * 2, [50] * 2, header=True)) t.add_extra_check(RequireCountRxnRate("dat/04-surface/b15_u_rxn_out.dat", values= [2.4e4]*2 + [4.0e4]*2 + [8.0e4]*2, tolerances=[0.72e4]*2 + [1.2e4]*2 + [2.4e4]*2, min_time=5e-3, base_time=0.0, header=True)) t.add_extra_check(RequireCountRxnRate("dat/04-surface/b16_b_rxn_out.dat", values= [5.1e4] * 3, tolerances=[1.02e4] * 3, min_time=5e-3, base_time=0.0, header=True)) t.add_extra_check(RequireCountRxnRate("dat/04-surface/b17_b_rxn_out.dat", values= [7.26e4] + [3.63e4] + [2.18e4], tolerances=[1.04e4] + [0.73e4] + [0.44e4], min_time=5e-3, base_time=0.0, header=True)) t.invoke(get_output_dir()) def test_region_borders_cube(self): # The test is done on the cube with simple region border geometry. # Region r1 borders are REFLECTIVE for molecule A, ABSORPTIVE for B, # and TRANSPARENT for C. Initially we place 100 molecules of each type # inside region r1. We check that all molecules A are contained # within r1 and there are none of them in the surrounding region r2. # Because B has high diffusion coefficient, they all get absorbed # at the border, and after some time we should register none of them # inside either r1 or r2. The total count of C as sum across regions # r1 and r2 is constant over the simulation. # Region r3 borders are REFLECTIVE for molecules D and E. We place # 100 molecules D there that also undergo unimolecular reaction # D @ surface_class -> E[rate]. We check that total sum of D and E # within the region r3 is equal to 100. t = McellTest("reactions", "07-region_borders.mdl", ["-quiet"]) t.add_extra_check(RequireCounts("dat/07-region_borders/box_1_A.dat", [(f*1e-6,100,0) for f in range(0,101)], "# Seconds r1_A r2_A")) t.add_extra_check(RequireCounts("dat/07-region_borders/box_1_B.dat", [(f*1e-6,0,0) for f in range(70,101)], "# Seconds r1_B r2_B")) t.add_extra_check(RequireCountConstraints("dat/07-region_borders/box_1_C.dat", constraints=[(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1), (1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1), (1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1), (1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1), (1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1), (1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1), (1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1), (1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1), (1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1), (1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1)], totals = [100,100,100,100,100,100,100,100,100,100, 100,100,100,100,100,100,100,100,100,100, 100,100,100,100,100,100,100,100,100,100, 100,100,100,100,100,100,100,100,100,100, 100,100,100,100,100,100,100,100,100,100, 100,100,100,100,100,100,100,100,100,100, 100,100,100,100,100,100,100,100,100,100, 100,100,100,100,100,100,100,100,100,100, 100,100,100,100,100,100,100,100,100,100, 100,100,100,100,100,100,100,100,100,100], header=True)) t.add_extra_check(RequireCountConstraints("dat/07-region_borders/box_1_r3.dat", constraints=[(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1), (1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1), (1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1), (1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1), (1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1), (1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1), (1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1), (1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1), (1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1), (1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1)], totals = [100,100,100,100,100,100,100,100,100,100, 100,100,100,100,100,100,100,100,100,100, 100,100,100,100,100,100,100,100,100,100, 100,100,100,100,100,100,100,100,100,100, 100,100,100,100,100,100,100,100,100,100, 100,100,100,100,100,100,100,100,100,100, 100,100,100,100,100,100,100,100,100,100, 100,100,100,100,100,100,100,100,100,100, 100,100,100,100,100,100,100,100,100,100, 100,100,100,100,100,100,100,100,100,100], header=True)) t.add_extra_check(RequireCounts("dat/07-region_borders/box_2_r4.dat", [(f*1e-6,0) for f in range(70,101)], "# Seconds r4_A")) t.add_extra_check(RequireCountsPositive("dat/07-region_borders/box_2_A.dat","# Seconds r2_A r3_A")) t.add_extra_check(RequireCounts("dat/07-region_borders/box_3_r5.dat", [(f*1e-6,200) for f in range(70,101)], "# Seconds r5_A")) t.add_extra_check(RequireCounts("dat/07-region_borders/box_3_r6.dat", [(f*1e-6,0) for f in range(70,101)], "# Seconds r6_A")) t.invoke(get_output_dir()) def test_region_borders_sphere(self): # The test is done on the sphere with complex region border geometry. # Region r1 boundary crosses the apex of the sphere. # Region r1 borders are REFLECTIVE for molecule A, ABSORPTIVE for B, # and TRANSPARENT for C. Initially we place 100 molecules of each type # inside region r1. We check that all molecules A are contained # within r1 and there are none of them in the surrounding region r2. # Because B has high diffusion coefficient, they all get absorbed # at the border, and after some time we should register none of them # inside either r1 or r2. The total count of C as sum across regions # r1 and r2 is constant over the simulation. # Region r3 borders are REFLECTIVE for molecules D and E. We place # 100 molecules D there that also undergo unimolecular reaction # D @ surface_class -> E[rate]. We check that total sum of D and E # within the region r3 is equal to 100. # Also TRIGGER statements are checked. t = McellTest("reactions", "08-region_borders.mdl", ["-quiet"]) t.add_extra_check(RequireCounts("dat/08-region_borders/A.dat", [(f*1e-6,100,0) for f in range(0,101)], "# Seconds r1_A r2_A")) t.add_extra_check(RequireCounts("dat/08-region_borders/B.dat", [(f*1e-6,0,0) for f in range(99,101)], "# Seconds r1_B r2_B")) t.add_extra_check(RequireCountConstraints("dat/08-region_borders/C.dat", constraints=[(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1), (1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1), (1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1), (1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1), (1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1), (1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1), (1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1), (1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1), (1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1), (1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1)], totals = [100,100,100,100,100,100,100,100,100,100, 100,100,100,100,100,100,100,100,100,100, 100,100,100,100,100,100,100,100,100,100, 100,100,100,100,100,100,100,100,100,100, 100,100,100,100,100,100,100,100,100,100, 100,100,100,100,100,100,100,100,100,100, 100,100,100,100,100,100,100,100,100,100, 100,100,100,100,100,100,100,100,100,100, 100,100,100,100,100,100,100,100,100,100, 100,100,100,100,100,100,100,100,100,100], header=True)) t.add_extra_check(RequireCountConstraints("dat/08-region_borders/r2.dat", constraints=[(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1), (1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1), (1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1), (1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1), (1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1), (1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1), (1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1), (1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1), (1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1), (1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1),(1,1)], totals = [100,100,100,100,100,100,100,100,100,100, 100,100,100,100,100,100,100,100,100,100, 100,100,100,100,100,100,100,100,100,100, 100,100,100,100,100,100,100,100,100,100, 100,100,100,100,100,100,100,100,100,100, 100,100,100,100,100,100,100,100,100,100, 100,100,100,100,100,100,100,100,100,100, 100,100,100,100,100,100,100,100,100,100, 100,100,100,100,100,100,100,100,100,100, 100,100,100,100,100,100,100,100,100,100], header=True)) t.add_extra_check(RequireHitsCrossRelations("dat/08-region_borders/A_hits_C_cross.dat", "# Seconds A_fr_hits A_back_hits A_all_hits C_fr_cross C_back_cross C_all_cross")) t.add_extra_check(RequireValidTriggerOutput("dat/08-region_borders/C_trigger_fr_hits.dat", 1, False, None, None, xrange=(-10,10),yrange=(-10,10),zrange=(-10,10))) t.add_extra_check(RequireValidTriggerOutput("dat/08-region_borders/C_trigger_back_hits.dat", 1, False, None, None, xrange=(-10,10),yrange=(-10,10),zrange=(-10,10))) t.add_extra_check(RequireValidTriggerOutput("dat/08-region_borders/C_trigger_all_hits.dat", 1, False, None, None, xrange=(-10,10),yrange=(-10,10),zrange=(-10,10))) t.add_extra_check(RequireValidTriggerOutput("dat/08-region_borders/C_trigger_fr_cross.dat", 1, False, None, None, xrange=(-10,10),yrange=(-10,10),zrange=(-10,10))) t.add_extra_check(RequireValidTriggerOutput("dat/08-region_borders/C_trigger_back_cross.dat", 1, False, None, None, xrange=(-10,10),yrange=(-10,10),zrange=(-10,10))) t.add_extra_check(RequireValidTriggerOutput("dat/08-region_borders/C_trigger_all_cross.dat", 1, False, None, None, xrange=(-10,10),yrange=(-10,10),zrange=(-10,10))) t.invoke(get_output_dir()) def test_region_borders_cube_all_molecules(self): # The test is done on the six cubes with simple region # border geometry. # Region r1 is TOP, and region r2 consist of all other sides. # For each of the above cubes region r1 is assigned surface class # that has properties such TRANSPARENT/REFLECTIVE/ABSORPTIVE # for ALL_MOLECULES or ALL_SURFACE_MOLECULES. # Initially we place surface molecules A and B in the amount of # 100 molecules of each type inside region r1. # We count molecules A and B in the regions r1 and r2. t = McellTest("reactions", "09-region_borders.mdl", ["-quiet"]) t.add_extra_check(RequireCounts("dat/09-region_borders/refl_all_mols.dat", [(f*1e-6,100,100,0,0) for f in range(0,101)], "# Seconds r1_A r1_B r2_A r2_B")) t.add_extra_check(RequireCounts("dat/09-region_borders/refl_all_surface_mols.dat", [(f*1e-6,100,100,0,0) for f in range(0,101)], "# Seconds r1_A r1_B r2_A r2_B")) t.add_extra_check(RequireCounts("dat/09-region_borders/absorb_all_mols.dat", [(f*1e-6,0,0,0,0) for f in range(90,101)], "# Seconds r1_A r1_B r2_A r2_B")) t.add_extra_check(RequireCounts("dat/09-region_borders/absorb_all_surface_mols.dat", [(f*1e-6,0,0,0,0) for f in range(90,101)], "# Seconds r1_A r1_B r2_A r2_B")) t.add_extra_check(RequireCountConstraints("dat/09-region_borders/transp_all_mols.dat", constraints=[(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1), (1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1), (1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1), (1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1), (1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1), (1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1), (1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1), (1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1), (1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1), (1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1)], totals = [200,200,200,200,200,200,200,200,200,200, 200,200,200,200,200,200,200,200,200,200, 200,200,200,200,200,200,200,200,200,200, 200,200,200,200,200,200,200,200,200,200, 200,200,200,200,200,200,200,200,200,200, 200,200,200,200,200,200,200,200,200,200, 200,200,200,200,200,200,200,200,200,200, 200,200,200,200,200,200,200,200,200,200, 200,200,200,200,200,200,200,200,200,200, 200,200,200,200,200,200,200,200,200,200], header=True)) t.add_extra_check(RequireCountConstraints("dat/09-region_borders/transp_all_surface_mols.dat", constraints=[(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1), (1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1), (1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1), (1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1), (1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1), (1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1), (1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1), (1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1), (1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1), (1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1),(1,1,1,1)], totals = [200,200,200,200,200,200,200,200,200,200, 200,200,200,200,200,200,200,200,200,200, 200,200,200,200,200,200,200,200,200,200, 200,200,200,200,200,200,200,200,200,200, 200,200,200,200,200,200,200,200,200,200, 200,200,200,200,200,200,200,200,200,200, 200,200,200,200,200,200,200,200,200,200, 200,200,200,200,200,200,200,200,200,200, 200,200,200,200,200,200,200,200,200,200, 200,200,200,200,200,200,200,200,200,200], header=True)) t.invoke(get_output_dir()) def test_surf_properties_all_molecules(self): # The test is done on the collection of two cubes, one enclosed inside # the another. The outer cube has REFLECTIVE mesh for ALL_MOLECULES. # The properties of inner cubes change from REFLECTIVE to TRANSPARENT # to ABSORPTIVE for ALL_MOLECULES as we move from one collection # to another. Volume molecules A,B,C are released inside the inner cube. # We count molecules in the space between the cubes. t = McellTest("reactions", "10-surf_properties_all_molecules.mdl", ["-quiet"]) t.add_extra_check(RequireCounts("dat/10-surf_properties_all_molecules/refl.dat", [(f*1e-6,0,0,0) for f in range(0,101)], "# Seconds A_diff B_diff C_diff")) t.add_extra_check(RequireCounts("dat/10-surf_properties_all_molecules/absorp.dat", [(f*1e-6,0,0,0) for f in range(0,101)], "# Seconds A_diff B_diff C_diff")) t.add_extra_check(RequireCountsPositive("dat/10-surf_properties_all_molecules/transp.dat","# Seconds A_diff B_diff C_diff")) t.invoke(get_output_dir()) def test_surf_properties_all_volume_molecules(self): # The test is done on the collection of two cubes, one enclosed inside # the another. The outer cube has REFLECTIVE mesh for ALL_VOLUME_MOLECULES. # The properties of inner cubes change from REFLECTIVE to TRANSPARENT # to ABSORPTIVE for ALL_VOLUME_MOLECULES as we move from one collection # to another. Volume molecules A,B,C are released inside the inner cube. # We count molecules in the space between the cubes. t = McellTest("reactions", "11-surf_properties_all_volume_molecules.mdl", ["-quiet"]) t.add_extra_check(RequireCounts("dat/11-surf_properties_all_volume_molecules/refl.dat", [(f*1e-6,0,0,0) for f in range(0,101)], "# Seconds A_diff B_diff C_diff")) t.add_extra_check(RequireCounts("dat/11-surf_properties_all_volume_molecules/absorp.dat", [(f*1e-6,0,0,0) for f in range(0,101)], "# Seconds A_diff B_diff C_diff")) t.add_extra_check(RequireCountsPositive("dat/11-surf_properties_all_volume_molecules/transp.dat","# Seconds A_diff B_diff C_diff")) t.invoke(get_output_dir()) def test_all_enclosed(self): # The test is done on the collection of two cubes, one enclosed inside # the another. The grid molecules A are placed on the surfaces of # both cubes. The statement COUNT[A,outer[whole_mesh], ALL_ENCLOSED] # counts number of molecules A on the "inner" cube. # # Failure: The count of molecules A is incorrect. # Success: The count of molecules A is correct. t = McellTest("reactions", "12-all_enclosed_test.mdl", ["-quiet"]) t.add_extra_check(RequireCounts("dat/12-all_enclosed_test/A.dat", [(f*1e-6,100) for f in range(0,101)])) t.invoke(get_output_dir()) def test_restricted_borders_reactions(self): # The test is done on five cubes with simple region border geometry. # For bimolecular reaction molecules b_A are placed on the RIGHT # side of the cubes, and molecules b_B are placed on the TOP side. # For trimolecular reaction molecules t_A and t_B are placed # on RIGHT side of the cube and molecules t_C are placed on # TOP side of the cube. We declare the region # border between TOP and RIGHT restrictive in several different # ways. There should be no reactions and therefore no reaction # products D for boxes 1-4. For box_5 the region border is not # restrictive and so reactions happened and reaction products # are created. t = McellTest("reactions", "13-restricted_border_reaction.mdl", ["-quiet"]) t.add_extra_check(RequireCounts("dat/13-restricted_border_reaction/box_1.dat", [(f*1e-6,0) for f in range(0,101)], "# Seconds D")) t.add_extra_check(RequireCounts("dat/13-restricted_border_reaction/box_2.dat", [(f*1e-6,0) for f in range(0,101)], "# Seconds D")) t.add_extra_check(RequireCounts("dat/13-restricted_border_reaction/box_3.dat", [(f*1e-6,0) for f in range(0,101)], "# Seconds D")) t.add_extra_check(RequireCounts("dat/13-restricted_border_reaction/box_4.dat", [(f*1e-6,0) for f in range(0,101)], "# Seconds D")) t.add_extra_check(RequireCounts("dat/13-restricted_border_reaction/box_6.dat", [(f*1e-6,0) for f in range(0,101)], "# Seconds D")) t.add_extra_check(RequireCounts("dat/13-restricted_border_reaction/box_7.dat", [(f*1e-6,0) for f in range(0,101)], "# Seconds D")) t.add_extra_check(RequireCountsPositive("dat/13-restricted_border_reaction/box_5.dat", [(f*1e-6,0) for f in range(90,101)])) t.add_extra_check(RequireCountsPositive("dat/13-restricted_border_reaction/box_8.dat", [(f*1e-6,0) for f in range(90,101)])) def test_restricted_borders_product_placement(self): # The test is done on 19 cubes with simple region border geometry. # Unimolecular reaction is tested on the boxes 1 and 2, bimolecular # reaction is tested on boxes 3 and 4, and trimolecular reaction # on boxes 5 and 6. For these boxes we define region border properties # as restrictive for some reaction products and in some cases # for the reactant(s). For boxes 1, 3, and 5 there should be # no products outside restrictive region r1 boundary. # For boxes 2, 4, and 6 products F and G should be placed # outside region r1 since its borders are not restrictive # for them. t = McellTest("reactions", "14-restricted_border_product_placement.mdl", ["-quiet"]) t.add_extra_check(RequireCountsPositive("dat/14-restricted_border_product_placement/box_1_r1.dat", "# Iteration_# r1_D r1_E r1_F r1_G")) t.add_extra_check(RequireCounts("dat/14-restricted_border_product_placement/box_1_r3.dat", [(f,0,0,0,0) for f in range(90,101)], "# Iteration_# r3_D r3_E r3_F r3_G")) t.add_extra_check(RequireCounts("dat/14-restricted_border_product_placement/box_2_r2.dat", [(f,0,0,0,0) for f in range(90,101)], "# Iteration_# r2_D r2_E r2_F r2_G")) t.add_extra_check(RequireCountsPositive("dat/14-restricted_border_product_placement/box_2_r3.dat", "# Iteration_# r3_D r3_E r3_F r3_G")) t.add_extra_check(RequireCountsPositive("dat/14-restricted_border_product_placement/box_3_r1.dat", "# Iteration_# r1_D r1_E r1_F r1_G")) t.add_extra_check(RequireCountsPositive("dat/14-restricted_border_product_placement/box_3_r2.dat", "# Iteration_# r2_D r2_E r2_F r2_G")) t.add_extra_check(RequireCountsPositive("dat/14-restricted_border_product_placement/box_4_r1.dat", "# Iteration_# r1_D r1_E r1_F r1_G")) t.add_extra_check(RequireCounts("dat/14-restricted_border_product_placement/box_4_r2.dat", [(f,0,0,0,0) for f in range(90,101)], "# Iteration_# r2_D r2_E r2_F r2_G")) t.add_extra_check(RequireCountsPositive("dat/14-restricted_border_product_placement/box_5_r3.dat", "# Iteration_# r3_D r3_E r3_F r3_G")) t.add_extra_check(RequireCounts("dat/14-restricted_border_product_placement/box_5_r4.dat", [(f,0,0,0,0) for f in range(90,101)], "# Iteration_# r4_D r4_E r4_F r4_G")) t.add_extra_check(RequireCountsPositive("dat/14-restricted_border_product_placement/box_6_r1.dat", "# Iteration_# r1_D r1_E r1_F r1_G")) t.add_extra_check(RequireCounts("dat/14-restricted_border_product_placement/box_6_r5.dat", [(f,0,0,0,0) for f in range(90,101)], "# Iteration_# r5_D r5_E r5_F r5_G")) t.add_extra_check(RequireCountsPositive("dat/14-restricted_border_product_placement/box_7_r1.dat", "# Iteration_# r1_D r1_E r1_F r1_G")) t.add_extra_check(RequireCounts("dat/14-restricted_border_product_placement/box_7_r3.dat", [(f,0,0,0,0) for f in range(90,101)], "# Iteration_# r3_D r3_E r3_F r3_G")) t.add_extra_check(RequireCountsPositive("dat/14-restricted_border_product_placement/box_8_r1.dat", "# Iteration_# r1_D r1_E r1_F r1_G")) t.add_extra_check(RequireCounts("dat/14-restricted_border_product_placement/box_8_r4.dat", [(f,0,0,0,0) for f in range(90,101)], "# Iteration_# r4_D r4_E r4_F r4_G")) t.add_extra_check(RequireCountsPositive("dat/14-restricted_border_product_placement/box_9_r1.dat", "# Iteration_# r1_D r1_E r1_F r1_G")) t.add_extra_check(RequireCounts("dat/14-restricted_border_product_placement/box_9_r2.dat", [(f,0,0,0,0) for f in range(90,101)], "# Iteration_# r2_D r2_E r2_F r2_G")) t.add_extra_check(RequireCountsPositive("dat/14-restricted_border_product_placement/box_10_r1.dat", "# Iteration_# r1_D r1_E r1_F r1_G")) t.add_extra_check(RequireCountsPositive("dat/14-restricted_border_product_placement/box_10_r2.dat", "# Iteration_# r2_D r2_E r2_F r2_G")) t.add_extra_check(RequireCountsPositive("dat/14-restricted_border_product_placement/box_11_r1.dat", "# Iteration_# r1_D r1_E r1_F r1_G r1_K r1_L")) t.add_extra_check(RequireCounts("dat/14-restricted_border_product_placement/box_11_r2.dat", [(f,0,0,0,0,0,0) for f in range(90,101)], "# Iteration_# r2_D r2_E r2_F r2_G r2_K r2_L")) t.add_extra_check(RequireCountsPositiveOrZero("dat/14-restricted_border_product_placement/box_12_r5.dat", "# Iteration_# r5_D r5_E r5_F r5_G r5_K r5_L")) t.add_extra_check(RequireCounts("dat/14-restricted_border_product_placement/box_12_r6.dat", [(f,0,0,0,0,0,0) for f in range(90,101)], "# Iteration_# r6_D r6_E r6_F r6_G r6_K r6_L")) t.add_extra_check(RequireCountsPositive("dat/14-restricted_border_product_placement/box_13_r1.dat", "# Iteration_# r1_D r1_E r1_F r1_G r1_K r1_L")) t.add_extra_check(RequireCounts("dat/14-restricted_border_product_placement/box_13_r3.dat", [(f,0,0,0,0,0,0) for f in range(90,101)], "# Iteration_# r3_D r3_E r3_F r3_G r3_K r3_L")) t.add_extra_check(RequireCountsPositive("dat/14-restricted_border_product_placement/box_14_r1.dat", "# Iteration_# r1_D r1_E r1_F r1_G r1_K r1_L")) t.add_extra_check(RequireCounts("dat/14-restricted_border_product_placement/box_14_r3.dat", [(f,0,0,0,0,0,0) for f in range(90,101)], "# Iteration_# r3_D r3_E r3_F r3_G r3_K r3_L")) t.add_extra_check(RequireCountsPositive("dat/14-restricted_border_product_placement/box_15_r1.dat", "# Iteration_# r1_D r1_E r1_F r1_G r1_K r1_L")) t.add_extra_check(RequireCounts("dat/14-restricted_border_product_placement/box_15_r2.dat", [(f,0,0,0,0,0,0) for f in range(90,101)], "# Iteration_# r2_D r2_E r2_F r2_G r2_K r2_L")) t.add_extra_check(RequireCountsPositive("dat/14-restricted_border_product_placement/box_16_r1.dat", "# Iteration_# r1_D r1_E r1_F r1_G r1_K r1_L")) t.add_extra_check(RequireCounts("dat/14-restricted_border_product_placement/box_16_r2.dat", [(f,0,0,0,0,0,0) for f in range(90,101)], "# Iteration_# r2_D r2_E r2_F r2_G r2_K r2_L")) t.add_extra_check(RequireCountsPositive("dat/14-restricted_border_product_placement/box_17_r1.dat", "# Iteration_# r1_D r1_E r1_F r1_G r1_K r1_L")) t.add_extra_check(RequireCounts("dat/14-restricted_border_product_placement/box_17_r2.dat", [(f,0,0,0,0,0,0) for f in range(90,101)], "# Iteration_# r2_D r2_E r2_F r2_G r2_K r2_L")) t.add_extra_check(RequireCountsPositive("dat/14-restricted_border_product_placement/box_18_r1.dat", "# Iteration_# r1_D r1_E r1_F r1_G r1_K r1_L")) t.add_extra_check(RequireCounts("dat/14-restricted_border_product_placement/box_18_r2.dat", [(f,0,0,0,0,0,0) for f in range(90,101)], "# Iteration_# r2_D r2_E r2_F r2_G r2_K r2_L")) t.add_extra_check(RequireCountsPositive("dat/14-restricted_border_product_placement/box_19_r1.dat", "# Iteration_# r1_D r1_E r1_F r1_G r1_K r1_L")) t.add_extra_check(RequireCounts("dat/14-restricted_border_product_placement/box_19_r2.dat", [(f,0,0,0,0,0,0) for f in range(90,101)], "# Iteration_# r2_D r2_E r2_F r2_G r2_K r2_L")) t.invoke(get_output_dir()) def test_restricted_borders_reactions(self): # The test is done is done on sphere with three overlapping regions. # Here we test the surface products placement that should follow # the established policy. t = McellTest("reactions", "15-overlappingSRs.mdl", ["-quiet"]) t.add_extra_check(RequireCountsPositive("dat/15-overlappingSRs/r4.dat", "# Iteration_# r4_B r4_C r4_D")) t.add_extra_check(RequireCounts("dat/15-overlappingSRs/r5.dat", [(f,0,0,0) for f in range(90,101)], "# Iteration_# r5_B r5_C r5_D")) t.invoke(get_output_dir()) def test_surface_products_replace_reactants(self): # The test is done is done on the number of cubes # Here we test how surface products replace surface reactants # that should follow the established policy. # Mostly here we look into product generation and no segfaults # during simulation. t = McellTest("reactions", "16-surf_products_replace_reactants.mdl", ["-quiet"]) t.add_extra_check(RequireCountsPositive("dat/16-surf_products_replace_reactants/box_1.dat")) t.add_extra_check(RequireCountsPositive("dat/16-surf_products_replace_reactants/box_2.dat")) t.add_extra_check(RequireCountsPositive("dat/16-surf_products_replace_reactants/box_3.dat")) t.add_extra_check(RequireCountsPositive("dat/16-surf_products_replace_reactants/box_4_I.dat")) t.add_extra_check(RequireCountsPositive("dat/16-surf_products_replace_reactants/box_4_b_A3.dat")) t.add_extra_check(RequireCountsPositive("dat/16-surf_products_replace_reactants/box_5.dat")) t.add_extra_check(RequireCountsPositive("dat/16-surf_products_replace_reactants/box_6.dat")) t.add_extra_check(RequireCountsPositive("dat/16-surf_products_replace_reactants/box_7.dat")) t.add_extra_check(RequireCountsPositive("dat/16-surf_products_replace_reactants/box_8.dat")) t.add_extra_check(RequireCountsPositive("dat/16-surf_products_replace_reactants/box_9.dat")) t.add_extra_check(RequireCountsPositive("dat/16-surf_products_replace_reactants/box_10.dat")) t.add_extra_check(RequireCountsPositive("dat/16-surf_products_replace_reactants/box_11.dat")) t.add_extra_check(RequireCountsPositive("dat/16-surf_products_replace_reactants/box_12.dat")) t.invoke(get_output_dir()) ################################################################### # Generate a test suite for all numeric tests ################################################################### def numericsuite(): return unittest.makeSuite(TestReactionsNumeric, "test") ################################################################### # Default use of this file will invoke all tests ################################################################### if __name__ == "__main__": cleandir(get_output_dir()) unittest.main()