Mechanica Models Python API Reference

This is the API Reference page for the module: mechanica.models

Cell Polarity

This is the API Reference page for the module: mechanica.models.center.cell_polarity. For details on the mathematics and modeling concepts, see the Cell Polarity Module Documentation.

mechanica.models.center.cell_polarity.CellPolarity

alias of _CellPolarity

class mechanica.models.center.cell_polarity._CellPolarity
static getVectorAB(pId: int const &, current: bool const & = True) MxVector3f

Gets the AB polarity vector of a cell

Parameters
  • pId (int) – particle id

  • current (boolean) – current value flag; default true

Return type

MxVector3f

Returns

MxVector3f

static getVectorPCP(pId: int const &, current: bool const & = True) MxVector3f

Gets the PCP polarity vector of a cell

Parameters
  • pId (int) – particle id

  • current (boolean) – current value flag; default true

Return type

MxVector3f

Returns

MxVector3f

static setVectorAB(pId: int const &, pVec: MxVector3f, current: bool const & = True, init: bool const & = False) void

Sets the AB polarity vector of a cell

Parameters
  • pId (int) – particle id

  • pVec (MxVector3f) – vector value

  • current (boolean) – current value flag; default true

  • init (boolean) – initialization flag; default false

static setVectorPCP(pId: int const &, pVec: MxVector3f, current: bool const & = True, init: bool const & = False) void

Sets the PCP polarity vector of a cell

Parameters
  • pId (int) – particle id

  • pVec (MxVector3f) – vector value

  • current (boolean) – current value flag; default true

  • init (boolean) – initialization flag; default false

static registerParticle(ph: MxParticleHandle) void

Registers a particle as polar.

This must be called before the first integration step. Otherwise, the engine will not know that the particle is polar and will be ignored.

Parameters

ph (MxParticleHandle) – handle of particle

static unregister(ph: MxParticleHandle) void

Unregisters a particle as polar.

Parameters

ph (MxParticleHandle) – handle of particle

static registerType(*args, **kwargs) void

Registers a particle type as polar.

This must be called on a particle type before any other type-specific operations.

Parameters
  • pType (MxParticleType) – particle type

  • initMode (string) – initialization mode for particles of this type

  • initPolarAB (MxVector3f) – initial value of AB polarity vector; only used when initMode=”value”

  • initPolarPCP (MxVector3f) – initial value of PCP polarity vector; only used when initMode=”value”

static getInitMode(pType: MxParticleType) std::string const

Gets the name of the initialization mode of a type

Parameters

pType (MxParticleType) – a type

Return type

string

Returns

const std::string

static setInitMode(pType: MxParticleType, value: std::string const &) void

Sets the name of the initialization mode of a type

Parameters
  • pType (MxParticleType) – a type

  • value (string) – initialization mode

static getInitPolarAB(pType: MxParticleType) MxVector3f const

Gets the initial AB polar vector of a type

Parameters

pType (MxParticleType) – a type

Return type

MxVector3f

Returns

const MxVector3f

static setInitPolarAB(pType: MxParticleType, value: MxVector3f) void

Sets the initial AB polar vector of a type

Parameters
  • pType (MxParticleType) – a type

  • value (MxVector3f) – initial AB polar vector

static getInitPolarPCP(pType: MxParticleType) MxVector3f const

Gets the initial PCP polar vector of a type

Parameters

pType (MxParticleType) – a type

Return type

MxVector3f

Returns

const MxVector3f

static setInitPolarPCP(pType: MxParticleType, value: MxVector3f) void

Sets the initial PCP polar vector of a type

Parameters
  • pType (MxParticleType) – a type

  • value (MxVector3f) – initial PCP polar vector

static forcePersistent(sensAB: float const & = 0.0, sensPCP: float const & = 0.0) PolarityForcePersistent *

Creates a persistent polarity force.

Parameters
  • sensAB (float) – sensitivity to AB vector

  • sensPCP (float) – sensitivity to PCP vector

Return type

PolarityForcePersistent

Returns

PolarityForcePersistent*

static setDrawVectors(_draw: bool const &) void

Toggles whether polarity vectors are rendered

Parameters

_draw (boolean) – rendering flag; vectors are rendered when true

static setArrowColors(colorAB: std::string const &, colorPCP: std::string const &) void

Sets rendered polarity vector colors.

Applies to subsequently created vectors and all current vectors.

Parameters
  • colorAB (string) – name of AB vector color

  • colorPCP (string) – name of PCP vector color

static setArrowScale(_scale: float const &) void

Sets scale of rendered polarity vectors.

Applies to subsequently created vectors and all current vectors.

Parameters

_scale (float) – scale of rendered vectors

static setArrowLength(_length: float const &) void

Sets length of rendered polarity vectors.

Applies to subsequently created vectors and all current vectors.

Parameters

_length (float) – length of rendered vectors

static load() void

Runs the polarity model along with a simulation. Must be called before doing any operations with this module.

static potentialContact(*args, **kwargs) MxCellPolarityPotentialContact *

Creates a contact-mediated polarity potential

Parameters
  • cutoff (float) – cutoff distance

  • mag (float) – magnitude of force

  • rate (float) – rate of state vector dynamics

  • distanceCoeff (float) – distance coefficient

  • couplingFlat (float) – flat coupling coefficient

  • couplingOrtho (float) – orthogonal coupling coefficient

  • couplingLateral (float) – lateral coupling coefficient

  • contactType (string) – type of contact; available are regular, isotropic, anisotropic

  • bendingCoeff (float) – bending coefficient

Return type

MxCellPolarityPotentialContact

Returns

MxCellPolarityPotentialContact*

class mechanica.models.center.cell_polarity.MxCellPolarityPotentialContact

Bases: MxPotential

Defines polarity state dynamics and anisotropic adhesion

couplingFlat

Flat interaction coefficient

couplingOrtho

Orthogonal interaction coefficient

couplingLateral

Lateral interaction coefficient

distanceCoeff

Distance coefficient

cType

Contact type (e.g., normal, isotropic or anisotropic)

mag

Magnitude of force due to potential

rate

State vector dynamics rate due to potential

bendingCoeff

Bending coefficient

class mechanica.models.center.cell_polarity.PolarityForcePersistent

Bases: MxForce

Defines a force due to polarity state

sensAB

Proportionality of force to AB vector

sensPCP

Proportionality of force to PCP vector