Attachment 'cellsort2D_negative_J.py'

Download

   1 def configureSimulation(sim):
   2    import CompuCellSetup
   3    from XMLUtils import ElementCC3D
   4 
   5    cc3d=ElementCC3D("CompuCell3D")
   6    potts=cc3d.ElementCC3D("Potts")
   7    potts.ElementCC3D("Dimensions",{"x":100,"y":100,"z":1})
   8    potts.ElementCC3D("Steps",{},1000000)
   9    potts.ElementCC3D("Anneal",{},10)
  10    potts.ElementCC3D("Temperature",{},10)
  11    potts.ElementCC3D("Flip2DimRatio",{},1)
  12    potts.ElementCC3D("NeighborOrder",{},2)
  13 
  14    cellType=cc3d.ElementCC3D("Plugin",{"Name":"CellType"})
  15    cellType.ElementCC3D("CellType", {"TypeName":"Medium", "TypeId":"0"})
  16    cellType.ElementCC3D("CellType", {"TypeName":"Condensing", "TypeId":"1"})
  17    cellType.ElementCC3D("CellType", {"TypeName":"NonCondensing", "TypeId":"2"})
  18 
  19    volume=cc3d.ElementCC3D("Plugin",{"Name":"Volume"})
  20    volume.ElementCC3D("TargetVolume",{},25)
  21    volume.ElementCC3D("LambdaVolume",{},5.0)
  22 
  23    volume=cc3d.ElementCC3D("Plugin",{"Name":"Surface"})
  24    volume.ElementCC3D("TargetSurface",{},25)
  25    volume.ElementCC3D("LambdaSurface",{},5.0)
  26 
  27    centerOfMass=cc3d.ElementCC3D("Plugin",{"Name":"CenterOfMass"})
  28 
  29    contact=cc3d.ElementCC3D("Plugin",{"Name":"Contact"})
  30    contact.ElementCC3D("Energy", {"Type1":"Medium", "Type2":"Medium"},0)
  31    contact.ElementCC3D("Energy", {"Type1":"NonCondensing", "Type2":"NonCondensing"},-3)
  32    contact.ElementCC3D("Energy", {"Type1":"Condensing", "Type2":"Condensing"},-10)
  33    contact.ElementCC3D("Energy",{"Type1":"NonCondensing", "Type2":"Condensing"},-2)
  34    contact.ElementCC3D("Energy", {"Type1":"NonCondensing", "Type2":"Medium"},1)
  35    contact.ElementCC3D("Energy", {"Type1":"Condensing", "Type2":"Medium"},1)
  36    contact.ElementCC3D("NeighborOrder", {}, 2)
  37    
  38    chemotaxis=cc3d.ElementCC3D("Plugin",{"Name":"Chemotaxis"})
  39    chemicalField=chemotaxis.ElementCC3D("ChemicalField", {"Source":"FlexibleDiffusionSolverFE", "Name":"FGF"})
  40    chemicalField.ElementCC3D("ChemotaxisByType", {"Type":"Condensing" ,"Lambda":3})
  41 
  42    flexDiffSolver=cc3d.ElementCC3D("Steppable",{"Type":"FlexibleDiffusionSolverFE"})
  43    diffusionField=flexDiffSolver.ElementCC3D("DiffusionField")
  44    diffusionData=diffusionField.ElementCC3D("DiffusionData")
  45    diffusionData.ElementCC3D("FieldName",{},"FGF")
  46    diffusionData.ElementCC3D("DiffusionConstant",{},0.2)
  47    diffusionData.ElementCC3D("DecayConstant",{},0.01)
  48    secretionData=diffusionField.ElementCC3D("SecretionData")
  49    secretionData.ElementCC3D("Secretion",{"Type":"Condensing"},0.0)
  50 
  51 
  52    uniform = cc3d.ElementCC3D("Steppable",{"Type":"UniformInitializer"})                                            
  53    region = uniform.ElementCC3D("Region")
  54    region.ElementCC3D("BoxMin",{"x":0,  "y":0,  "z":0})                                                
  55    region.ElementCC3D("BoxMax",{"x":100,  "y":100,  "z":1})                                          
  56    region.ElementCC3D("Types",{}, "NonCondensing,Condensing")                                                                     
  57    region.ElementCC3D("Width", {}, 5)
  58 
  59 
  60    CompuCellSetup.setSimulationXMLDescription(cc3d)
  61    
  62 import sys
  63 from os import environ
  64 import string
  65 sys.path.append(environ["PYTHON_MODULE_PATH"])
  66    
  67 import CompuCellSetup
  68 
  69 sim,simthread = CompuCellSetup.getCoreSimulationObjects()
  70 
  71 #Create extra player fields here or add attributes
  72 pyAttributeAdder,listAdder=CompuCellSetup.attachListToCells(sim)
  73 
  74 configureSimulation(sim)
  75 
  76 CompuCellSetup.initializeSimulationObjects(sim,simthread)
  77 
  78 
  79 from PySteppables import SteppableRegistry
  80 steppableRegistry=SteppableRegistry()
  81 from CellDiffusionCalculatorSteppable import *
  82 CellDiffusionCalculator=CellDiffusionCalculatorSteppable(_simulator=sim,_frequency=50)
  83 steppableRegistry.registerSteppable(CellDiffusionCalculator)
  84 
  85 CompuCellSetup.mainLoop(sim,simthread,steppableRegistry)

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.
  • [get | view] (2011-08-17 14:42:10, 320.0 KB) [[attachment:Adhesion Parameter Values.doc]]
  • [get | view] (2011-08-17 14:46:22, 9560.3 KB) [[attachment:CNV-P-T1-T2 .pptx]]
  • [get | view] (2011-08-17 14:36:43, 8.4 KB) [[attachment:CellDiffusionCalculatorSteppable.py]]
  • [get | view] (2011-09-10 20:31:09, 2273.1 KB) [[attachment:CellDraw_1.5.0_presentation_2011.pdf]]
  • [get | view] (2011-08-08 22:09:40, 6.5 KB) [[attachment:Heiko3_O2_ps.zip]]
  • [get | view] (2011-08-18 17:51:04, 57547.3 KB) [[attachment:MergingCC3DandSBWSBML.pdf]]
  • [get | view] (2011-08-18 17:51:42, 2724.4 KB) [[attachment:MergingCC3DandSBWSBML.pptx]]
  • [get | view] (2011-08-18 17:52:58, 43497.5 KB) [[attachment:MergingCC3DandSBWSBML.zip]]
  • [get | view] (2011-08-17 20:57:30, 3.4 KB) [[attachment:RountreeInitializerPresentation.py]]
  • [get | view] (2011-08-17 20:57:05, 8.2 KB) [[attachment:RountreeSteppablePresentation.py]]
  • [get | view] (2011-08-18 17:57:53, 0.2 KB) [[attachment:SimpleOscillator.jan]]
  • [get | view] (2011-08-18 17:58:00, 4.0 KB) [[attachment:SimpleOscillator.sbml]]
  • [get | view] (2011-08-17 14:36:27, 3.7 KB) [[attachment:cellsort2D_negative_J.py]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.