def _run(self):
        """
        Start the simulation.
        """
        self.execConfig.parameterStore.addObj(self)
        for cellType in self.cellTypes:
            self.execConfig.parameterStore.addObj(cellType)

        CompuCellSetup.setSimulationXMLDescription(self._configureSimulation())
        CompuCellSetup.initializeSimulationObjects(self.sim, self.simthread)

        pyAttributeDictionaryAdder, dictAdder = CompuCellSetup.attachDictionaryToCells(self.sim)

        # Add Python steppables here:
        steppableRegistry = CompuCellSetup.getSteppableRegistry()
        for steppable in self._getSteppables():
            steppableRegistry.registerSteppable(steppable)

        CompuCellSetup.mainLoop(self.sim, self.simthread, steppableRegistry)
Example #2
0
from os import getcwd
import string

sys.path.append(environ["PYTHON_MODULE_PATH"])

import CompuCellSetup

# path for Win (path for Mac may need full path)
CompuCellSetup.setSimulationXMLFileName("Simulation/BlHet.xml")

#add additional
sim, simthread = CompuCellSetup.getCoreSimulationObjects()

#add additional attributes
# add extra attributes here
pyAttributeDictionaryAdder, dictAdder = CompuCellSetup.attachDictionaryToCells(
    sim)

CompuCellSetup.initializeSimulationObjects(sim, simthread)

#notice importing CompuCell to main script has to be done after call to getCoreSimulationObjects()
import CompuCell

#add lattice monitors here
#### changeWatcherREgistry is also initialized at start of Python steppables
#### CC3D crashes when changeWatcherRegistry in one of these lines is not commented out;
changeWatcherRegistry = CompuCellSetup.getChangeWatcherRegistry(sim)
stepperRegistry = CompuCellSetup.getStepperRegistry(sim)

#Add Python steppables here
from PySteppablesExamples import SteppableRegistry
#### changeWatcherREgistry is also initialized at start of lattice monitors
Example #3
0
import sys
from os import environ
from os import getcwd
import string
sys.path.append(environ["PYTHON_MODULE_PATH"])
import CompuCellSetup
sim, simthread = CompuCellSetup.getCoreSimulationObjects()
# add extra attributes here
pyAttributeDictionaryAdder, dictAdder = CompuCellSetup.attachDictionaryToCells(
    sim)
CompuCellSetup.initializeSimulationObjects(sim, simthread)
# Definitions of additional Python-managed fields go here
#Add Python steppables here
steppableRegistry = CompuCellSetup.getSteppableRegistry()
from bistabSwitch2Steppables import EMT_switch1Steppable
steppableInstance = EMT_switch1Steppable(sim, _frequency=100)
steppableRegistry.registerSteppable(steppableInstance)
CompuCellSetup.mainLoop(sim, simthread, steppableRegistry)

Example #4
0
## MUST INITIALIZE EXTERNAL POTENTIAL PLUGIN
   extPotential=cc3d.ElementCC3D("Plugin",{"Name":"ExternalPotential"})   
   
## Initialize cell field from piff file:
   piffinit = cc3d.ElementCC3D("Steppable",{"Type":"PIFInitializer"})
   piffinit.ElementCC3D("PIFName",{},pifName)
  
   CompuCellSetup.setSimulationXMLDescription(cc3d)
   
import CompuCellSetup
sim,simthread = CompuCellSetup.getCoreSimulationObjects()
configureSimulation(sim)

import CompuCell
CompuCellSetup.initializeSimulationObjects(sim,simthread)
pyAttributeAdder,dictAdder=CompuCellSetup.attachDictionaryToCells(sim)

#Add Python steppables here
steppableRegistry=CompuCellSetup.getSteppableRegistry()
changeWatcherRegistry=CompuCellSetup.getChangeWatcherRegistry(sim)
stepperRegistry=CompuCellSetup.getStepperRegistry(sim)

from GZ_motility_steppables import InitVolSur
initVolSur=InitVolSur(_simulator=sim,_frequency=1,_LamV=lambda_V,_LamS=lambda_S,_tV=target_V,_tS=target_S)
steppableRegistry.registerSteppable(initVolSur)

# from GZ_motility_steppables import CellCounts
# cellCounts=CellCounts(_simulator=sim,_frequency=100)
# steppableRegistry.registerSteppable(cellCounts)

# from GZ_genesis_steppables import CellGrowth
Example #5
0

import sys
from os import environ
from os import getcwd
import string
## sys.path.append(environ["PYTHON_MODULE_PATH"])

import CompuCellSetup

# Initialize core CompuCell3D simulation objects
sim, simthread = CompuCellSetup.getCoreSimulationObjects()
#Create extra player fields here or add attributes
pyAttributeAdder,listAdder=CompuCellSetup.attachDictionaryToCells(sim)

CompuCellSetup.initializeSimulationObjects(sim,simthread)

from OscillatingContactEnergiesFlexSteppables import *

# Create instances of required steppables
oscillatingContactEnergiesSteppable = OscillatingContactEnergiesSteppable( sim )

# Add steppables to the steppable registry
steppableRegistry = CompuCellSetup.getSteppableRegistry()
steppableRegistry.registerSteppable( oscillatingContactEnergiesSteppable )

CompuCellSetup.mainLoop(sim, simthread, steppableRegistry)



Example #6
0
import sys
from os import environ
from os import getcwd
import string
sys.path.append(environ["PYTHON_MODULE_PATH"])

import CompuCellSetup

sim,simthread = CompuCellSetup.getCoreSimulationObjects()
            
# add extra attributes here
        
pyAttributeDictionaryAdder,dictAdder=CompuCellSetup.attachDictionaryToCells(sim)
            
CompuCellSetup.initializeSimulationObjects(sim,simthread)
# Definitions of additional Python-managed fields go here
        
#Add Python steppables here
steppableRegistry=CompuCellSetup.getSteppableRegistry()
        
from bistabSwitch2Steppables import EMT_switch1Steppable
steppableInstance=EMT_switch1Steppable(sim,_frequency=100)
steppableRegistry.registerSteppable(steppableInstance)
        
CompuCellSetup.mainLoop(sim,simthread,steppableRegistry)
        
        
from os import environ
from os import getcwd
import string

sys.path.append(environ["PYTHON_MODULE_PATH"])


import CompuCellSetup
CompuCellSetup.setSimulationXMLFileName("2D_vasculogenesis_control.xml")

sim,simthread = CompuCellSetup.getCoreSimulationObjects()
CompuCellSetup.initializeSimulationObjects(sim,simthread)
import CompuCell #notice importing CompuCell to main script has to be done after call to getCoreSimulationObjects()

pyAttributeAdder,listAdder=CompuCellSetup.attachListToCells(sim)          ####Assigns a list to each cell in the cellList inventory. List elements are later attached to each cell.
pyAttributeAdderDict,dictAdder=CompuCellSetup.attachDictionaryToCells(sim)      ####Assigns a dictionary to each cell in the cellList inventory. Dictionary elements are later attached to each cell.

#Add Python steppables here
from PySteppablesExamples import SteppableRegistry
steppableRegistry=SteppableRegistry()

from steppableBasedMitosisSteppables_control import VolumeParamSteppable
volumeParamSteppable=VolumeParamSteppable(sim,10)
steppableRegistry.registerSteppable(volumeParamSteppable)

from steppableBasedMitosisSteppables_control import MitosisSteppable
mitosisSteppable=MitosisSteppable(sim,10)
steppableRegistry.registerSteppable(mitosisSteppable)

# from steppableBasedMitosisSteppables import ProteinExpression
# proteinExpression=ProteinExpression(sim,10)