Example #1
0
def configure_simulation():
    from cc3d.core.XMLUtils import ElementCC3D

    dim = 300
    cc3d = ElementCC3D("CompuCell3D")

    metadata = cc3d.ElementCC3D("Metadata")
    metadata.ElementCC3D("NumberOfProcessors", {}, 4)

    potts = cc3d.ElementCC3D("Potts")
    potts.ElementCC3D("Dimensions", {"x": dim, "y": dim, "z": dim})
    potts.ElementCC3D("Steps", {}, 100)
    potts.ElementCC3D("Temperature", {}, 0)
    potts.ElementCC3D("Flip2DimRatio", {}, 0.0)

    cellType = cc3d.ElementCC3D("Plugin", {"Name": "CellType"})
    cellType.ElementCC3D("CellType", {"TypeName": "Medium", "TypeId": "0"})

    flexDiffSolver = cc3d.ElementCC3D("Steppable",
                                      {"Type": "DiffusionSolverFE"})
    diffusionField = flexDiffSolver.ElementCC3D("DiffusionField")
    diffusionData = diffusionField.ElementCC3D("DiffusionData")
    diffusionData.ElementCC3D("FieldName", {}, "FGF")
    diffusionData.ElementCC3D("DiffusionConstant", {}, 0.10)
    diffusionData.ElementCC3D("DecayConstant", {}, 0.0)
    diffusionData.ElementCC3D("ConcentrationFileName", {},
                              "Simulation/diffusion_3D.pulse.txt")

    CompuCellSetup.setSimulationXMLDescription(cc3d)
    def step(self, mcs):
        print("This function is called every 10 MCS")
        for cell in self.cellList:
            print("CELL ID=", cell.id, " CELL TYPE=", cell.type, " volume=",
                  cell.volume)
        if not (mcs % 20):
            counter = 0
            for cell in self.cellListByType(self.CONDENSING):
                print("BY TYPE CELL ID=", cell.id, " CELL TYPE=", cell.type,
                      " volume=", cell.volume)
                counter += 1
            for cell in self.cellListByType(self.NONCONDENSING):
                print("BY TYPE CELL ID=", cell.id, " CELL TYPE=", cell.type,
                      " volume=", cell.volume)
                counter += 1

            for cell in self.cellListByType(self.CONDENSING,
                                            self.NONCONDENSING):
                print("MULTI TYPE LIST - CELL ID=", cell.id, " CELL TYPE=",
                      cell.type, " volume=", cell.volume)

            print("number of cells in typeInventory=",
                  len(self.cellListByType))
            print("number of cells in the entire cell inventory=",
                  len(self.cellListByType))

        if mcs > 500:
            CompuCellSetup.stopSimulation()
def mainLoop(*args, **kwds):
    """

    :param args:
    :param kwds:
    :return:
    """
    CompuCellSetup.run()
Example #4
0
    def prepareSimulation(self):

        (self.sim,
         self.simthread) = CompuCellSetup.get_core_simulation_objects()

        CompuCellSetup.initialize_simulation_objects(self.sim, self.simthread)
        CompuCellSetup.extra_init_simulation_objects(self.sim, self.simthread)
        self.simulationInitialized = True
        self.callingWidget.sim = self.sim
Example #5
0
def configure_simulation():
    from cc3d.core.XMLUtils import ElementCC3D

    cc3d = ElementCC3D("CompuCell3D")
    potts = cc3d.ElementCC3D("Potts")
    potts.ElementCC3D("Dimensions", {"x": 100, "y": 100, "z": 1})
    potts.ElementCC3D("Steps", {}, 1000)
    potts.ElementCC3D("Anneal", {}, 10)
    potts.ElementCC3D("Temperature", {}, 10)
    potts.ElementCC3D("Flip2DimRatio", {}, 1)
    potts.ElementCC3D("NeighborOrder", {}, 2)

    cellType = cc3d.ElementCC3D("Plugin", {"Name": "CellType"})
    cellType.ElementCC3D("CellType", {"TypeName": "Medium", "TypeId": "0"})
    cellType.ElementCC3D("CellType", {"TypeName": "Condensing", "TypeId": "1"})
    cellType.ElementCC3D("CellType", {
        "TypeName": "NonCondensing",
        "TypeId": "2"
    })

    volume = cc3d.ElementCC3D("Plugin", {"Name": "Volume"})
    volume.ElementCC3D("TargetVolume", {}, 25)
    volume.ElementCC3D("LambdaVolume", {}, 2.0)

    contact = cc3d.ElementCC3D("Plugin", {"Name": "Contact"})
    contact.ElementCC3D("Energy", {"Type1": "Medium", "Type2": "Medium"}, 0)
    contact.ElementCC3D("Energy", {
        "Type1": "NonCondensing",
        "Type2": "NonCondensing"
    }, 16)
    contact.ElementCC3D("Energy", {
        "Type1": "Condensing",
        "Type2": "Condensing"
    }, 2)
    contact.ElementCC3D("Energy", {
        "Type1": "NonCondensing",
        "Type2": "Condensing"
    }, 11)
    contact.ElementCC3D("Energy", {
        "Type1": "NonCondensing",
        "Type2": "Medium"
    }, 16)
    contact.ElementCC3D("Energy", {
        "Type1": "Condensing",
        "Type2": "Medium"
    }, 16)
    contact.ElementCC3D("NeighborOrder", {}, 2)

    blobInitializer = cc3d.ElementCC3D("Steppable",
                                       {"Type": "BlobInitializer"})
    blobInitializer.ElementCC3D("Gap", {}, 0)
    blobInitializer.ElementCC3D("Width", {}, 5)
    blobInitializer.ElementCC3D("CellSortInit", {}, "yes")
    blobInitializer.ElementCC3D("Radius", {}, 40)

    CompuCellSetup.setSimulationXMLDescription(cc3d)
def configure_simulation():
    from cc3d.core.XMLUtils import ElementCC3D

    cc3d = ElementCC3D("CompuCell3D")
    potts = cc3d.ElementCC3D("Potts")
    potts.ElementCC3D("Dimensions", {"x": 100, "y": 100, "z": 1})
    potts.ElementCC3D("Steps", {}, 10000)
    potts.ElementCC3D("Temperature", {}, 5)
    potts.ElementCC3D("NeighborOrder", {}, 2)
    potts.ElementCC3D("Boundary_x", {}, "Periodic")

    cell_type = cc3d.ElementCC3D("Plugin", {"Name": "CellType"})
    cell_type.ElementCC3D("CellType", {"TypeName": "Medium", "TypeId": "0"})
    cell_type.ElementCC3D("CellType", {"TypeName": "Body1", "TypeId": "1"})
    cell_type.ElementCC3D("CellType", {"TypeName": "Body2", "TypeId": "2"})
    cell_type.ElementCC3D("CellType", {"TypeName": "Body3", "TypeId": "3"})

    volume = cc3d.ElementCC3D("Plugin", {"Name": "Volume"})
    volume.ElementCC3D("TargetVolume", {}, 25)
    volume.ElementCC3D("LambdaVolume", {}, 4.0)

    contact = cc3d.ElementCC3D("Plugin", {"Name": "Contact"})
    contact.ElementCC3D("Energy", {"Type1": "Medium", "Type2": "Medium"}, 0)
    contact.ElementCC3D("Energy", {"Type1": "Body1", "Type2": "Body1"}, 16)
    contact.ElementCC3D("Energy", {"Type1": "Body1", "Type2": "Medium"}, 4)
    contact.ElementCC3D("Energy", {"Type1": "Body2", "Type2": "Body2"}, 16)
    contact.ElementCC3D("Energy", {"Type1": "Body2", "Type2": "Medium"}, 4)
    contact.ElementCC3D("Energy", {"Type1": "Body3", "Type2": "Body3"}, 16)
    contact.ElementCC3D("Energy", {"Type1": "Body3", "Type2": "Medium"}, 4)
    contact.ElementCC3D("Energy", {"Type1": "Body1", "Type2": "Body2"}, 16)
    contact.ElementCC3D("Energy", {"Type1": "Body1", "Type2": "Body3"}, 16)
    contact.ElementCC3D("Energy", {"Type1": "Body2", "Type2": "Body3"}, 16)
    contact.ElementCC3D("neighborOrder", {}, 2)

    center_of_mass = cc3d.ElementCC3D("Plugin", {"Name": "CenterOfMass"})

    elasticity_tracker = cc3d.ElementCC3D("Plugin", {"Name": "ElasticityTracker"})
    elasticity_tracker.ElementCC3D("IncludeType", {}, "Body1")
    elasticity_tracker.ElementCC3D("IncludeType", {}, "Body2")
    elasticity_tracker.ElementCC3D("IncludeType", {}, "Body3")

    elasticity_energy = cc3d.ElementCC3D("Plugin", {"Name": "ElasticityEnergy"})
    elasticity_energy.ElementCC3D("Local", {})
    # elasticity_energy.ElementCC3D("LambdaElasticity",{},200.0)
    # elasticity_energy.ElementCC3D("TargetLengthElasticity",{},6)

    external_potential = cc3d.ElementCC3D("Plugin", {"Name": "ExternalPotential"})
    external_potential.ElementCC3D("Lambda", {"x": -10, "y": 0, "z": 0})

    pif_initializer = cc3d.ElementCC3D("Steppable", {"Type": "PIFInitializer"})
    pif_initializer.ElementCC3D("PIFName", {}, "Simulation/elasticitytest.piff")

    CompuCellSetup.setSimulationXMLDescription(cc3d)
    def extract_lattice_description_info(self, file_name: str) -> None:
        """
        Reads the xml that summarizes serialized simulation files
        :param file_name:{str} xml metadata file name
        :return: None
        """
        # lattice data simulation file
        lds_file = os.path.abspath(file_name)
        lds_reader = LatticeDataSummaryReader(lds_file=lds_file)

        self.ldsDir = lds_reader.lds_dir
        self.fieldDim = lds_reader.field_dim
        self.ldsCoreFileName = lds_reader.lds_core_file_name
        self.frequency = lds_reader.frequency
        self.numberOfSteps = lds_reader.number_of_steps
        self.latticeType = lds_reader.lattice_type
        self.typeIdTypeNameDict = lds_reader.type_id_type_name_dict
        self.typeIdTypeNameCppMap = lds_reader.type_id_type_name_cpp_map
        self.ldsFileList = lds_reader.lds_file_list
        self.fieldsUsed = lds_reader.fields_used

        for field_name, custom_vis_script in lds_reader.custom_vis_scripts.items():
            self.customVis = CompuCellSetup.createCustomVisPy(field_name)
            self.customVis.registerVisCallbackFunction(CompuCellSetup.vtkScriptCallback)

            self.customVis.addActor(field_name, "vtkActor")
            # we'll piggyback off the actorsDict
            self.customVis.addActor("customVTKScript", custom_vis_script)
Example #8
0
    def core_init(self, reinitialize_cell_types=True):
        super().core_init(reinitialize_cell_types)

        # Share self
        if self.unique_key is None:
            raise AttributeError("Steppable key not set")
        elif self.unique_key in self.shared_steppable_vars.keys():
            # Handling the occurence where core_init is called multiple times on consecutive runs for some steppables
            return
        else:
            print("Registering nCoVSteppableBase:", self.unique_key)
        self.shared_steppable_vars[self.unique_key] = self
        self._register_base()

        # Register ODEManagerSteppable if necessary
        from cc3d import CompuCellSetup
        steppable_registry = CompuCellSetup.persistent_globals.steppable_registry
        if ODEManagerSteppable.__name__ not in steppable_registry.steppableDict.keys(
        ):
            CompuCellSetup.register_steppable(ODEManagerSteppable(frequency=1))
def configure_simulation():
    from cc3d.core.XMLUtils import ElementCC3D

    cc3d = ElementCC3D("CompuCell3D")
    potts = cc3d.ElementCC3D("Potts")
    potts.ElementCC3D("Dimensions", {"x": 42, "y": 42, "z": 1})
    potts.ElementCC3D("Steps", {}, 10000)
    potts.ElementCC3D("Anneal", {}, 10)
    potts.ElementCC3D("Temperature", {}, 10)
    potts.ElementCC3D("NeighborOrder", {}, 2)
    potts.ElementCC3D("Boundary_x", {}, "Periodic")
    potts.ElementCC3D("Boundary_y", {}, "Periodic")

    cellType = cc3d.ElementCC3D("Plugin", {"Name": "CellType"})
    cellType.ElementCC3D("CellType", {"TypeName": "Medium", "TypeId": "0"})
    cellType.ElementCC3D("CellType", {"TypeName": "TypeA", "TypeId": "1"})

    contact = cc3d.ElementCC3D("Plugin", {"Name": "Contact"})
    contact.ElementCC3D("Energy", {"Type1": "Medium", "Type2": "Medium"}, 0)
    contact.ElementCC3D("Energy", {"Type1": "Medium", "Type2": "TypeA"}, 5)
    contact.ElementCC3D("Energy", {"Type1": "TypeA", "Type2": "TypeA"}, 5)
    contact.ElementCC3D("NeighborOrder", {}, 4)

    vp = cc3d.ElementCC3D("Plugin", {"Name": "Volume"})
    vp.ElementCC3D("TargetVolume", {}, 49)
    vp.ElementCC3D("LambdaVolume", {}, 5)

    ntp = cc3d.ElementCC3D("Plugin", {"Name": "NeighborTracker"})

    uipd = cc3d.ElementCC3D("Steppable", {"Type": "UniformInitializer"})
    region = uipd.ElementCC3D("Region")
    region.ElementCC3D("BoxMin", {"x": 0, "y": 0, "z": 0})
    region.ElementCC3D("BoxMax", {"x": 42, "y": 42, "z": 1})
    region.ElementCC3D("Types", {}, "TypeA")
    region.ElementCC3D("Width", {}, 7)

    CompuCellSetup.setSimulationXMLDescription(cc3d)
Jessica Crawshaw, James M. Osborne, Ellen M. Quardokus, Richard K. Plemper, James A. Glazier,
"A modular framework for multiscale, multicellular, spatiotemporal modeling of acute primary viral infection and
immune response in epithelial tissues and its application to drug therapy timing and effectiveness",
PLoS Comput Biol 16(12): e1008451. https://doi.org/10.1371/journal.pcbi.1008451
"""

import os
from ViralInfectionVTMModelInputs import __file__ as f
sys.path.append(os.path.dirname(os.path.dirname(f)))
os.environ["ViralInfectionVTM"] = os.path.dirname(os.path.dirname(f))

from cc3d import CompuCellSetup

from Models.SegoAponte2020.ViralInfectionVTMSteppables import ViralReplicationSteppable

CompuCellSetup.register_steppable(steppable=ViralReplicationSteppable(frequency=1))

from Models.SegoAponte2020.ViralInfectionVTMSteppables import ViralInternalizationSteppable

CompuCellSetup.register_steppable(steppable=ViralInternalizationSteppable(frequency=1))

from Models.RandomSusceptibility.SusceptibilitySteppables import RandomSusceptibilitySteppable
steppable = RandomSusceptibilitySteppable(frequency=1)
steppable.track_susc = True
CompuCellSetup.register_steppable(steppable=steppable)

from Models.SegoAponte2020.ViralInfectionVTMSteppables import CellsInitializerSteppable

CompuCellSetup.register_steppable(steppable=CellsInitializerSteppable(frequency=1))

from Models.SegoAponte2020.ViralInfectionVTMSteppables import ViralSecretionSteppable
###############################################################################################################
# To cite this model please use the following:
#
# Josua Aponte-Serrano, T.J. Sego, Juliano F. Gianlupi, James A. Glazier,
# "Model of Viral Tissue Infection"
# https://github.com/covid-tissue-models/covid-tissue-response-models/tree/master/CC3D/Models/BiocIU/SARSCoV2MultiscaleVTM
###############################################################################################################

from cc3d import CompuCellSetup

from CoronavirusSteppables import CellsInitializerSteppable
CompuCellSetup.register_steppable(steppable=CellsInitializerSteppable(frequency=1))
 
from CoronavirusSteppables import Viral_ReplicationSteppable
CompuCellSetup.register_steppable(steppable=Viral_ReplicationSteppable(frequency=1))

from CoronavirusSteppables import Viral_SecretionSteppable
CompuCellSetup.register_steppable(steppable=Viral_SecretionSteppable(frequency=1))

from CoronavirusSteppables import ImmuneCellKillingSteppable
CompuCellSetup.register_steppable(steppable=ImmuneCellKillingSteppable(frequency=1))

from CoronavirusSteppables import ChemotaxisSteppable
CompuCellSetup.register_steppable(steppable=ChemotaxisSteppable(frequency=1))

from CoronavirusSteppables import RecoverySteppable
CompuCellSetup.register_steppable(steppable=RecoverySteppable(frequency=1))

from CoronavirusSteppables import ImmuneCellSeedingSteppable
CompuCellSetup.register_steppable(steppable=ImmuneCellSeedingSteppable(frequency=1))
from cc3d import CompuCellSetup
from .MomentOfInertiaSteppables import MomentOfInertiaPrinter

CompuCellSetup.register_steppable(steppable=MomentOfInertiaPrinter(
    frequency=10))

CompuCellSetup.run()
from cc3d import CompuCellSetup

from cellsort_2D_hexSteppables import cellsort_2D_hexSteppable

CompuCellSetup.register_steppable(steppable=cellsort_2D_hexSteppable(frequency=1))

CompuCellSetup.run()
Example #14
0
from cc3d import CompuCellSetup

from diffusion_steady_state_ext_potential_3DSteppables import diffusion_steady_state_ext_potential_3DSteppable

CompuCellSetup.register_steppable(
    steppable=diffusion_steady_state_ext_potential_3DSteppable(frequency=1))

CompuCellSetup.run()
Example #15
0
from cc3d import CompuCellSetup
from SBMLSolverAntimony2Steppables import SBMLSolverSteppable
from SBMLSolverAntimony2Steppables import IdFieldVisualizationSteppable
from SBMLSolverAntimony2Steppables import SecretionSteppable

CompuCellSetup.register_steppable(steppable=SBMLSolverSteppable(frequency=1))

CompuCellSetup.register_steppable(steppable=IdFieldVisualizationSteppable(
    frequency=1))

CompuCellSetup.register_steppable(steppable=SecretionSteppable(frequency=1))

CompuCellSetup.run()
Example #16
0
from cc3d import CompuCellSetup

from cellsort_2D_box_watcherSteppables import cellsort_2D_box_watcherSteppable

CompuCellSetup.register_steppable(steppable=cellsort_2D_box_watcherSteppable(
    frequency=1))

CompuCellSetup.run()
from cc3d import CompuCellSetup
from .ContactLocalProductExampleModules import ContactLocalProductSteppable
from .ContactLocalProductExampleModules import ContactSpecVisualizationSteppable

clp_steppable = ContactLocalProductSteppable(frequency=10)
clp_steppable.set_type_contact_energy_table({0: 0.0, 1: 20, 2: 30})

# alternative call when we select random number for adhesion molecules form the specified interval e.g. [20,30]
# clp_steppable.set_type_contact_energy_table({0:0.0 , 1:[20,30], 2:[30,50]})

CompuCellSetup.register_steppable(steppable=clp_steppable)
CompuCellSetup.register_steppable(steppable=ContactSpecVisualizationSteppable(
    frequency=50))

CompuCellSetup.run()
Example #18
0
from cc3d import CompuCellSetup
from .cellsort_2D_steppables_info_printer import InfoPrinterSteppable

CompuCellSetup.register_steppable(steppable=InfoPrinterSteppable(frequency=1))

CompuCellSetup.run()
Example #19
0
from cc3d import CompuCellSetup
from .scientificPlotsMultipleAxesSteppables import ExtraPlotSteppable

CompuCellSetup.register_steppable(steppable=ExtraPlotSteppable(frequency=1))

CompuCellSetup.run()

Example #20
0
from cc3d import CompuCellSetup

from .amoeba_2DSteppables import amoeba_2DSteppable

CompuCellSetup.register_steppable(steppable=amoeba_2DSteppable(frequency=1))

CompuCellSetup.run()
Example #21
0
from cc3d import CompuCellSetup
from .SteppableCommunicationSteppables import CommunicationSteppable
from .SteppableCommunicationSteppables import ExtraSteppable

CompuCellSetup.register_steppable(steppable=CommunicationSteppable(
    frequency=1))
CompuCellSetup.register_steppable(steppable=ExtraSteppable(frequency=1))

CompuCellSetup.run()
from cc3d import CompuCellSetup

from randomBlobInitializerSteppables import randomBlobInitializerSteppable

CompuCellSetup.register_steppable(steppable=randomBlobInitializerSteppable(frequency=1))

CompuCellSetup.run()
from cc3d import CompuCellSetup
from .elongationFlexSteppables import ElongationFlexSteppable

CompuCellSetup.register_steppable(steppable=ElongationFlexSteppable(
    frequency=50))

CompuCellSetup.run()
Example #24
0
import cc3d.CompuCellSetup as CompuCellSetup
from .SBMLSolverOscilatorDemoSteppables import SBMLSolverOscilatorDemoSteppable

CompuCellSetup.register_steppable(steppable=SBMLSolverOscilatorDemoSteppable(
    frequency=1))

CompuCellSetup.run()

# 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()
#
# CompuCellSetup.initializeSimulationObjects(sim,simthread)
# #Add Python steppables here
# steppableRegistry=CompuCellSetup.getSteppableRegistry()
#
# from SBMLSolverOscilatorDemoSteppables import SBMLSolverOscilatorDemoSteppable
# steppableInstance=SBMLSolverOscilatorDemoSteppable(sim,_frequency=1)
# steppableRegistry.registerSteppable(steppableInstance)
#
# CompuCellSetup.mainLoop(sim,simthread,steppableRegistry)
#
#
    cellType.ElementCC3D("CellType", {"TypeName": "TypeA", "TypeId": "1"})

    contact = cc3d.ElementCC3D("Plugin", {"Name": "Contact"})
    contact.ElementCC3D("Energy", {"Type1": "Medium", "Type2": "Medium"}, 0)
    contact.ElementCC3D("Energy", {"Type1": "Medium", "Type2": "TypeA"}, 5)
    contact.ElementCC3D("Energy", {"Type1": "TypeA", "Type2": "TypeA"}, 5)
    contact.ElementCC3D("NeighborOrder", {}, 4)

    vp = cc3d.ElementCC3D("Plugin", {"Name": "Volume"})
    vp.ElementCC3D("TargetVolume", {}, 49)
    vp.ElementCC3D("LambdaVolume", {}, 5)

    ntp = cc3d.ElementCC3D("Plugin", {"Name": "NeighborTracker"})

    uipd = cc3d.ElementCC3D("Steppable", {"Type": "UniformInitializer"})
    region = uipd.ElementCC3D("Region")
    region.ElementCC3D("BoxMin", {"x": 0, "y": 0, "z": 0})
    region.ElementCC3D("BoxMax", {"x": 42, "y": 42, "z": 1})
    region.ElementCC3D("Types", {}, "TypeA")
    region.ElementCC3D("Width", {}, 7)

    CompuCellSetup.setSimulationXMLDescription(cc3d)


CompuCellSetup.register_steppable(steppable=DeltaNotchClass(frequency=1))
CompuCellSetup.register_steppable(steppable=ExtraFields(frequency=1))

configure_simulation()

CompuCellSetup.run()
from cc3d import CompuCellSetup


def configure_simulation():
    from cc3d.core.XMLUtils import ElementCC3D

    cc3d = ElementCC3D("CompuCell3D")
    potts = cc3d.ElementCC3D("Potts")
    potts.ElementCC3D("Dimensions", {"x": 55, "y": 55, "z": 1})
    potts.ElementCC3D("Steps", {}, 1000)
    potts.ElementCC3D("Temperature", {}, 0)
    potts.ElementCC3D("Flip2DimRatio", {}, 0.0)

    cellType = cc3d.ElementCC3D("Plugin", {"Name": "CellType"})
    cellType.ElementCC3D("CellType", {"TypeName": "Medium", "TypeId": "0"})

    flexDiffSolver = cc3d.ElementCC3D("Steppable", {"Type": "DiffusionSolverFE"})
    diffusionField = flexDiffSolver.ElementCC3D("DiffusionField")
    diffusionData = diffusionField.ElementCC3D("DiffusionData")
    diffusionData.ElementCC3D("FieldName", {}, "FGF")
    diffusionData.ElementCC3D("DiffusionConstant", {}, 0.10)
    diffusionData.ElementCC3D("DecayConstant", {}, 0.0)
    diffusionData.ElementCC3D("ConcentrationFileName", {}, "Simulation/diffusion_2D.pulse.txt")

    CompuCellSetup.setSimulationXMLDescription(cc3d)

configure_simulation()

CompuCellSetup.run()
from cc3d import CompuCellSetup

from diffusion_3D_ADESteppables import diffusion_3D_ADESteppable

CompuCellSetup.register_steppable(steppable=diffusion_3D_ADESteppable(
    frequency=1))

CompuCellSetup.run()
Example #28
0
from cc3d import CompuCellSetup

from DiffusionSolverFE_OpenCL_3DSteppables import DiffusionSolverFE_OpenCL_3DSteppable

CompuCellSetup.register_steppable(
    steppable=DiffusionSolverFE_OpenCL_3DSteppable(frequency=1))

CompuCellSetup.run()
Example #29
0
from cc3d import CompuCellSetup

from cellsort_3D_open_mpSteppables import cellsort_3D_open_mpSteppable

CompuCellSetup.register_steppable(steppable=cellsort_3D_open_mpSteppable(
    frequency=1))

CompuCellSetup.run()
    contact.ElementCC3D("neighborOrder", {}, 2)

    center_of_mass = cc3d.ElementCC3D("Plugin", {"Name": "CenterOfMass"})

    elasticity_tracker = cc3d.ElementCC3D("Plugin", {"Name": "ElasticityTracker"})
    elasticity_tracker.ElementCC3D("IncludeType", {}, "Body1")
    elasticity_tracker.ElementCC3D("IncludeType", {}, "Body2")
    elasticity_tracker.ElementCC3D("IncludeType", {}, "Body3")

    elasticity_energy = cc3d.ElementCC3D("Plugin", {"Name": "ElasticityEnergy"})
    elasticity_energy.ElementCC3D("Local", {})
    # elasticity_energy.ElementCC3D("LambdaElasticity",{},200.0)
    # elasticity_energy.ElementCC3D("TargetLengthElasticity",{},6)

    external_potential = cc3d.ElementCC3D("Plugin", {"Name": "ExternalPotential"})
    external_potential.ElementCC3D("Lambda", {"x": -10, "y": 0, "z": 0})

    pif_initializer = cc3d.ElementCC3D("Steppable", {"Type": "PIFInitializer"})
    pif_initializer.ElementCC3D("PIFName", {}, "Simulation/elasticitytest.piff")

    CompuCellSetup.setSimulationXMLDescription(cc3d)


configure_simulation()

CompuCellSetup.register_steppable(steppable=ElasticityLocalSteppable(frequency=50))


CompuCellSetup.run()