Experiment

class Experiment.Experiment(templatefile)[source]

The class Experiments holds the data for a CC3D experiment as an xml object. This objects is created from a template xml file. Elements that are already present in the template can be changed or removed and new elements can be added. When the xml is written to file all unchanged content of the template, including commented xml, is written to the new file.

addStatistics(freq, basename)[source]

Edit statistics save options

Parameters:
  • freq – save frequency
  • basename – basename for files (full path)
deletePlugin(name)[source]

Delete plugin

Parameters:name – plugin name
deletePottsProperty(tagname)[source]

Remove element from the Potts element

Parameters:tagname – name of element
deleteSteppable(type)[source]

Delete steppable

Parameters:type – steppable type
setChemotaxis(celltype, towards, lam)[source]

Set chemotaxis for cell type

Parameters:
  • celltype – name of the cell type
  • towards – cell type towards chemotaxis occurs
  • lam – chemotactic strength
setContact(_type1, _type2, J)[source]

Edit contact energy

Parameters:
  • type1 – name of the first cell type
  • type2 – name of the second cell type
  • J – contact energy between type1 and type2
setDebugFrequencyInMeta(freq)[source]

Set debug frequency

Parameters:frequency – frequency
setGenericPlugin(name, elements=[])[source]

Set generic plugin. If the plugin is already in the template, it is updated. If not, the plugin is added to the model. This function does not support multi-level xml elements.

Parameters:
  • name – plugin name
  • elements – list of elements described by a dictionary: {‘name’:name,’value’:val,’attributes’:{}}
setGenericSteppable(type, freq=None, elements=[])[source]

Set generic steppable. If the steppable is already in the template, it is updated. If not, the plugin is added to the model. This function does not support multi-level xml elements.

Parameters:
  • type – steppable type
  • freq – frequency
  • elements – list of elements described by a dictionary with keys name, value and attributes
setMCS(mcs)[source]

Set number of Monte Carlo steps

Parameters:mcs – number of MCS (note that mcs+1 appears in the xml)
setMotility(celltype, T)[source]

Edit motility parameters per cell type

Parameters:
  • celltype – name of the cell type
  • T – motility
setMultiCore(threads=1, cores=1)[source]

Set number of threads and cores for a simulation

Parameters:
  • threads – number of threads per core
  • cores – number of cores
setPottsProperty(tagname, attributes={}, value=None)[source]

General function to set a parameter in the Potts element

Parameters:
  • tagname – name of the element
  • attributes – dictionary with attribute names as key and attribute values as values.
  • value – element value
setSecretion(celltype, s, solver='FastDiffusionSolver2DFE')[source]

Set secretion coefficient for specific cell type

Parameters:
  • celltype – name of the cell type
  • s – secretion coefficient
  • solver – solver name
setSeed(seed)[source]

Set simulation seed

Parameters:seed – random seed
setTemp(T)[source]

Set temperature tag

Parameters:T – temperature
setVolume(celltype, vol, lam)[source]

Set volume per cell type

Parameters:
  • celltype – cell type name
  • vol – target volume
  • lam – lambda volume
write(filename)[source]

Save xml to file

Parameters:filename – filename of new xml

Previous topic

CC3DPipeline

This Page