Exemple #1
0
import pymcell as m

# Make a world
world = m.make_mcell_world()

# Set timestep
world.dt = 0.1

###
# Box
###

# Create a box
box = m.create_simple_object(name="My box",
                             type="CUBE",
                             center=[0, 0, 0],
                             radius=[1, 1, 1])

# Add it to the mcell world
world.obj_list.append(box)

###
# Species
###

mol_A = m.create_species(name="A", dc=1)
world.species_list.append(mol_A)

mol_B = m.create_species(name="B", dc=1)
world.species_list.append(mol_B)
Exemple #2
0
import pymcell as m

# Make a world
world = m.make_mcell_world()

# Set timestep
world.dt = 0.1

###
# Cylinder
###

# Create a cylinder
cylinder = m.create_simple_object(name="My Cylinder", type="CYLINDER", center=[0,0,0], radius=[0.1,0.1,100])

# Add it to the mcell world
world.obj_list.append(cylinder)

###
# To release the mols, also make a thin box
###

# Create a box
box = m.create_simple_object(name="My Box", type="CUBE", center=[0,0,0], radius=[0.1,0.1,0.01])

# Add it to the mcell world
world.obj_list.append(box)

###
# Species
###