コード例 #1
0
def setup(sim):
    # Set biophysics, signalling, and regulation models
    biophys = CLBacterium(sim, jitter_z=False)
 
    # add the planes to set physical  boundaries of cell growth
    biophys.addPlane((0,-16,0), (0,1,0), 1)
    biophys.addPlane((0,16,0), (0,-1,0), 1)

    sig = GridDiffusion(sim, 1, grid_dim, grid_size, grid_orig, [10.0])
    integ = CLCrankNicIntegrator(sim, 1, 3, max_cells, sig, boundcond='reflect')

    # use this file for reg too
    regul = ModuleRegulator(sim, sim.moduleName)	
    # Only biophys and regulation
    sim.init(biophys, regul, sig, integ)

    # Specify the initial cell and its location in the simulation
    sim.addCell(cellType=0, pos=(-10.0,0,0))  #Add
    sim.addCell(cellType=1, pos=(10.0,0,0)) #Add

    if sim.is_gui:
        # Add some objects to draw the models
        from CellModeller.GUI import Renderers
        therenderer = Renderers.GLBacteriumRenderer(sim)
        sim.addRenderer(therenderer)
        sigrend = Renderers.GLGridRenderer(sig, integ) # Add
        sim.addRenderer(sigrend) #Add

    sim.pickleSteps = 10
コード例 #2
0
ファイル: Tutorial_3.py プロジェクト: WMXgg/CellModeller
def setup(sim):
    # Set biophysics, signalling, and regulation models
    biophys = CLBacterium(sim, jitter_z=False)
    sig = GridDiffusion(sim, n_signals, grid_dim, grid_size, grid_orig, [1.0, 1.0])
    integ = CLCrankNicIntegrator(sim, n_signals, n_species, max_cells, sig)
    
    # use this file for reg too
    regul = ModuleRegulator(sim, sim.moduleName)
    # Only biophys and regulation
    sim.init(biophys, regul, sig, integ)
    
    # Specify the initial cell and its location in the simulation
    sim.addCell(cellType=0, pos=(-3.0,0,0))  #Add
    sim.addCell(cellType=1, pos=(3.0,0,0)) #Add
    
    # Add some objects to draw the models
    therenderer = Renderers.GLBacteriumRenderer(sim)
    sim.addRenderer(therenderer)
    sigrend = Renderers.GLGridRenderer(sig, integ) # Add
    sim.addRenderer(sigrend) #Add
    
    sim.pickleSteps = 20
コード例 #3
0
def setup(sim):
    sig = GridDiffusion(sim, 1, grid_dim, grid_size, grid_orig, [10.0])
    integ = CLCrankNicIntegrator(sim,
                                 1,
                                 5,
                                 max_cells,
                                 sig,
                                 boundcond='reflect')
    biophys = CLBacterium(sim, max_cells=max_cells, jitter_z=False)
    biophys.addPlane((0, -16, 0), (0, 1, 0), 1)
    biophys.addPlane((0, 16, 0), (0, -1, 0), 1)
    reg = ModuleRegulator(sim)

    sim.init(biophys, reg, sig, integ)

    sim.addCell(cellType=1, pos=(-20.0, 0, 0), len=2.0)
    sim.addCell(cellType=0, pos=(20.0, 0, 0), len=2.0)

    sigrend = Renderers.GLGridRenderer(sig, integ)
    therend = Renderers.GLBacteriumRenderer(sim)
    sim.addRenderer(sigrend)
    sim.addRenderer(therend)

    sim.pickleSteps = 10
コード例 #4
0
def setup(sim):
    # Set biophysics, signalling, and regulation models
    '''
    biophys = CLBacterium(sim, \
                            max_substeps=8, \
                            max_cells=max_cells, \
                            max_contacts=32, \
                            max_sqs=192**2, \
                            jitter_z=False, \
                            reg_param=2, \
                            gamma=10)
 
    # add the planes to set physical  boundaries of cell growth
    biophys.addPlane((0,-16,0), (0,1,0), 1)
    biophys.addPlane((0,16,0), (0,-1,0), 1)
    '''
    biophys = CLFixedPosition(sim, max_cells=max_cells)

    sig = GridDiffusion(sim, 1, grid_dim, grid_size, grid_orig, [10.0])
    integ = CLCrankNicIntegrator(sim, 1, 1, max_cells, sig, boundcond='mirror')

    # use this file for reg too
    regul = ModuleRegulator(sim, sim.moduleName)
    # Only biophys and regulation
    sim.init(biophys, regul, sig, integ)

    # Specify the initial cell and its location in the simulation
    sim.addCell(cellType=0, pos=(0, 0, 0))

    # Add some objects to draw the models
    #    therenderer = Renderers.GLBacteriumRenderer(sim)
    #    sim.addRenderer(therenderer)
    sigrend = Renderers.GLGridRenderer(sig, integ)  # Add
    sim.addRenderer(sigrend)  #Add

    sim.pickleSteps = 10