Attachment 'ChemicalFieldsSteppables.py'
Download 1 from PySteppables import *
2 import CompuCell
3 import sys
4 class ChemicalFieldsSteppable(SteppableBasePy):
5
6 def __init__(self,_simulator,_frequency=1):
7 SteppableBasePy.__init__(self,_simulator,_frequency)
8 def start(self):
9 # iterating over all cells in simulation
10 for cell in self.cellList:
11 cell.targetVolume=25
12 cell.lambdaVolume = 10.0
13
14 def step(self,mcs):
15 field=self.getConcentrationField("GLU")
16
17 for cell in self.cellList:
18 if cell.type == self.TUMOR:
19 print 'self.TUMOR=',self.TUMOR
20 print 'id=',cell.id,' com_conc',\
21 field[int(cell.xCOM),int(cell.yCOM),0]
22
23
24
25
26
27 def finish(self):
28 # Finish Function gets called after the last MCS
29 pass
30
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.