mpacts.particles.specialcases. molecularmotor

In order to be able to use this module import it like this:

import mpacts.particles
#or assign it to a shorter name
import mpacts.particles as prt

Head Layout

Particle of type Head:

  • x (Point)
  • r (Scalar)
  • m (Scalar)
  • v (Vector)
  • F (Vector)
  • parentIndex (Index)
  • localIndex (Index)
  • GeometryTag = GeometryTag_Sphere
  • internalState (int)
  • segmentIndex (Index)
  • k_bind (Scalar)
  • k_release (Scalar)
  • positionOnSegment (Vector)
  • polymerFound (int)
  • attachedToPolymer (Index)
  • maximumOverlapIndex (Index)
  • maximumOverlapValue (Scalar)

Supported Commands

On the particle container following list of commands can be invoked.

Note

the pc keyword argument is passed automatically, as well as the parent if the pc is created with a parent.

mypc.ActiveIonFluxCmd()
Computes the net flow rate of ions due to active (ion) pumps [mol/s]. The pumps work as long as the osmotic pressure in the cell is lower than the critical pump pressure. This command should be used for volume regulation at long time scales.
Default location: ‘loop_cmds/pre_integration_cmds’
  • Required keywords:
    • KActive (s^3 . mol . kg^-2 . m^-2) — Rescaled ion permeability constant of active ion pumps: J_a = KActive * (Pi_a - (Pi_{in} - Pi_{out}).
    • MCrit (kg . m^-1 . s^-2) — Critical pumping pressure in Pa: PCrit=Pi_{out}*delta G_A/(R*T)``with ``delta G_A as the free energy gain upon hydrolysis of ATP in physiological conditions in J/mol
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • predicate (default value = None) — Predicate that will decide whether this command is executed for a specific particle, when absent the command is executed for every particle.
  • additional parameters (to quickly choose a gate to be applied):
    • executeOnce: If True, will set the ExecuteOnce gate
    • executeEvery: If given, will execute every “executeEvery” time-steps.
    • executeInterval: If given, will execute every interval seconds (approximate simulation time)
    • executeTimes: If given, will execute at times specified in the list provided (approximated to the nearest discrete time step!)
    • executeEveryPCSizeChange If given, will execute every time a specified particle container changes size.
  • parent: Can be set to ‘False’ or ‘0’ to explicitely prevent the command to be added to the (simulation) commandlist.
mypc.AppliedForceCmd()
Applied user-specified force on a given particle or - if not given - on every particle in an ArrayManager
Default location: ‘loop_cmds/body_force_cmds’
  • Required keywords:
    • force (kg . m . s^-2) — Applied force vector
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • index (default value = -1) — Index of particle to which the force should be applied. If not given, force will be applied to all particles (possibly selected by the predicate)
    • predicate (default value = None) — Predicate that will decide whether this command is executed for a specific particle, when absent the command is executed for every particle.
  • additional parameters (to quickly choose a gate to be applied):
    • executeOnce: If True, will set the ExecuteOnce gate
    • executeEvery: If given, will execute every “executeEvery” time-steps.
    • executeInterval: If given, will execute every interval seconds (approximate simulation time)
    • executeTimes: If given, will execute at times specified in the list provided (approximated to the nearest discrete time step!)
    • executeEveryPCSizeChange If given, will execute every time a specified particle container changes size.
  • parent: Can be set to ‘False’ or ‘0’ to explicitely prevent the command to be added to the (simulation) commandlist.
mypc.CSVWriterCmd()
Writer for CSV files for an arraymanager. The writer acts on the data member given in the constructor, which has to be an arraymanager. By default all arrays are written out, except those who have a disable_CSV_write child.
Default location: ‘loop_cmds/output_cmds’
  • Required keywords:
    • data — The manager of which the data will be written (CSV writer is not recursive!)
    • filename — The base filename of the files that will be written. A number will be appended to differentiate between different timesteps.
  • Optional keywords:
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • write_header (default value = 1) — Decides if a header is added or not.
    • write_index (default value = 0) — The current sequential number of the output file.
    • write_time (default value = 0) — Decides if a comment is added on the first line with the current time on it. (Paraview does not like this!).
  • additional parameters (to quickly choose a gate to be applied):
    • executeOnce: If True, will set the ExecuteOnce gate
    • executeEvery: If given, will execute every “executeEvery” time-steps.
    • executeInterval: If given, will execute every interval seconds (approximate simulation time)
    • executeTimes: If given, will execute at times specified in the list provided (approximated to the nearest discrete time step!)
    • executeEveryPCSizeChange If given, will execute every time a specified particle container changes size.
  • parent: Can be set to ‘False’ or ‘0’ to explicitely prevent the command to be added to the (simulation) commandlist.
mypc.CentralGravityCmd()
A force is exerted on all particles in a given particle container with magnitude F = GMm/r**2 where m is the mass of the particle in the container, and GM is an input parameter representing the gravitational constant, multiplied with the mass of the ‘large’ central pulling body
Default location: ‘loop_cmds/body_force_cmds’
  • Required keywords:
    • GM (m^3 . s^-2) — The multiplicaton of the gravitational constant G and the mass of the central mass M
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • center (m) (default value = 0 0 0) — The location of the central mass
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • predicate (default value = None) — Predicate that will decide whether this command is executed for a specific particle, when absent the command is executed for every particle.
  • additional parameters (to quickly choose a gate to be applied):
    • executeOnce: If True, will set the ExecuteOnce gate
    • executeEvery: If given, will execute every “executeEvery” time-steps.
    • executeInterval: If given, will execute every interval seconds (approximate simulation time)
    • executeTimes: If given, will execute at times specified in the list provided (approximated to the nearest discrete time step!)
    • executeEveryPCSizeChange If given, will execute every time a specified particle container changes size.
  • parent: Can be set to ‘False’ or ‘0’ to explicitely prevent the command to be added to the (simulation) commandlist.
mypc.CentralPullCmd()
CentralPullCommand where a force is exerted on all particles in a given particle container equal to Force in the direction of the center point given.
Default location: ‘loop_cmds/body_force_cmds’
  • Required keywords:
    • force (kg . m . s^-2) — The (constant) force that pulls the particles to the center point.
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • center (m) (default value = 0 0 0) — The center location towards particles are pulled
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • predicate (default value = None) — Predicate that will decide whether this command is executed for a specific particle, when absent the command is executed for every particle.
  • additional parameters (to quickly choose a gate to be applied):
    • executeOnce: If True, will set the ExecuteOnce gate
    • executeEvery: If given, will execute every “executeEvery” time-steps.
    • executeInterval: If given, will execute every interval seconds (approximate simulation time)
    • executeTimes: If given, will execute at times specified in the list provided (approximated to the nearest discrete time step!)
    • executeEveryPCSizeChange If given, will execute every time a specified particle container changes size.
  • parent: Can be set to ‘False’ or ‘0’ to explicitely prevent the command to be added to the (simulation) commandlist.
mypc.ComputeSurfaceTensionCmd()
Computes the corresponding surface tension (stored at the level of individual triangles) for bodies which have a pressure difference over their surface (e.g. a cell with a turgor pressure). The tension is computed from the Young-Laplace equation as: \tau = \frac{1}{2} R \Delta p, in which R is the local value of ‘inverse_curvature’ which must have been computed as this point, and \Delta p is the pressure difference, which must be stored as an array per parent particle. Warning: flat surfaces will naturally have a radius of curvature of infinity, and result in infinite tensions as well. Care should be taken to prevent numerical issues, either by only executing ComputeSurfaceTensionCommand conditionally (for example only at initialization), or by configuring mpacts.commands.geometry.triangle.ComputeCurvatureCommand to prevent too high radii of curvature.
Default location: ‘loop_cmds/body_force_cmds’
  • Required keywords:
    • pc — Particle container on which the command is applied
    • surface_tension — Surface tension of the interface described by the mesh, in the direction of the ‘normal’ array of each node
  • Optional keywords:
    • area (default value = None) — Array with area of each node. If not given, the array ‘area’ will be searched.
    • base_pressure (default value = None) — Array per parent with base_pressure. For example, to have a vesicle of radius ‘R’ in equilibrium, specify: base_pressure=2*surface_tension/R
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • init_base_pressure (default value = 0) — If ‘True’, we will ourselves initialize the base pressure to 2*surface_tension / R for each parent particle where the radius is estimated from the cells equilibrium volume of the parent.
    • predicate (default value = None) — Predicate that will decide whether this command is executed for a specific particle, when absent the command is executed for every particle.
  • additional parameters (to quickly choose a gate to be applied):
    • executeOnce: If True, will set the ExecuteOnce gate
    • executeEvery: If given, will execute every “executeEvery” time-steps.
    • executeInterval: If given, will execute every interval seconds (approximate simulation time)
    • executeTimes: If given, will execute at times specified in the list provided (approximated to the nearest discrete time step!)
    • executeEveryPCSizeChange If given, will execute every time a specified particle container changes size.
  • parent: Can be set to ‘False’ or ‘0’ to explicitely prevent the command to be added to the (simulation) commandlist.
mypc.CountPerParentCmd()
Command which counts how many elements (e.g. nodes) the given child-pc has.
Default location: ‘loop_cmds/pre_body_force_cmds’
  • Required keywords:
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • count (default value = None) — Array in parent where the count is stored, by default made and called “count_“+pc()->name().
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • predicate (default value = None) — Predicate that will decide whether this command is executed for a specific particle, when absent the command is executed for every particle.
  • additional parameters (to quickly choose a gate to be applied):
    • executeOnce: If True, will set the ExecuteOnce gate
    • executeEvery: If given, will execute every “executeEvery” time-steps.
    • executeInterval: If given, will execute every interval seconds (approximate simulation time)
    • executeTimes: If given, will execute at times specified in the list provided (approximated to the nearest discrete time step!)
    • executeEveryPCSizeChange If given, will execute every time a specified particle container changes size.
  • parent: Can be set to ‘False’ or ‘0’ to explicitely prevent the command to be added to the (simulation) commandlist.
mypc.DecayCmd()
Particles in ‘pc’ are randomly killed at a specified rate ‘k’
Default location: ‘loop_cmds/pre_body_force_cmds’
  • Required keywords:
    • k (s^-1) — Decay rate of the particles (In fraction killed / second )
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • predicate (default value = None) — Predicate that will decide whether this command is executed for a specific particle, when absent the command is executed for every particle.
  • additional parameters (to quickly choose a gate to be applied):
    • executeOnce: If True, will set the ExecuteOnce gate
    • executeEvery: If given, will execute every “executeEvery” time-steps.
    • executeInterval: If given, will execute every interval seconds (approximate simulation time)
    • executeTimes: If given, will execute at times specified in the list provided (approximated to the nearest discrete time step!)
    • executeEveryPCSizeChange If given, will execute every time a specified particle container changes size.
  • parent: Can be set to ‘False’ or ‘0’ to explicitely prevent the command to be added to the (simulation) commandlist.
mypc.DiffusionCmd()
Particles in ‘pc’ move according to given Diffusivity in the medium ‘D_medium’. DEPRECATED - check ThermalForceCommand!
Default location: ‘loop_cmds/pre_body_force_cmds’
  • Required keywords:
    • D_medium (m^2 . s^-1) — Diffusivity of the medium
    • pc — Particle container on which the command is applied
    • temperature (K) — Temperature
  • Optional keywords:
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • predicate (default value = None) — Predicate that will decide whether this command is executed for a specific particle, when absent the command is executed for every particle.
  • additional parameters (to quickly choose a gate to be applied):
    • executeOnce: If True, will set the ExecuteOnce gate
    • executeEvery: If given, will execute every “executeEvery” time-steps.
    • executeInterval: If given, will execute every interval seconds (approximate simulation time)
    • executeTimes: If given, will execute at times specified in the list provided (approximated to the nearest discrete time step!)
    • executeEveryPCSizeChange If given, will execute every time a specified particle container changes size.
  • parent: Can be set to ‘False’ or ‘0’ to explicitely prevent the command to be added to the (simulation) commandlist.
mypc.DirectedForceCmd()
Force with fixed magnitude in a direction given by the user-given array ‘direction’
Default location: ‘loop_cmds/body_force_cmds’
  • Required keywords:
    • direction — Array with a direction vector
    • magnitude (kg . m . s^-2) — Magnitude of the applied force
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • normalize (default value = 0) — If ‘True’, the direction vector will first be normalized
    • predicate (default value = None) — Predicate that will decide whether this command is executed for a specific particle, when absent the command is executed for every particle.
    • use_contact_area (default value = 0) — If ‘True’, the contact area array will be used to weight the obtained directed force
  • additional parameters (to quickly choose a gate to be applied):
    • executeOnce: If True, will set the ExecuteOnce gate
    • executeEvery: If given, will execute every “executeEvery” time-steps.
    • executeInterval: If given, will execute every interval seconds (approximate simulation time)
    • executeTimes: If given, will execute at times specified in the list provided (approximated to the nearest discrete time step!)
    • executeEveryPCSizeChange If given, will execute every time a specified particle container changes size.
  • parent: Can be set to ‘False’ or ‘0’ to explicitely prevent the command to be added to the (simulation) commandlist.
mypc.DragForceCmd()
Drag force command: drag force is proportional to the velocity squared and in the opposite direction of the velocity. For example to be used for approximated air drag forces
Default location: ‘loop_cmds/body_force_cmds’
  • Required keywords:
    • c (kg . m^-1) — Drag coefficient c of the particle. Drag force: F = -c v^2
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • predicate (default value = None) — Predicate that will decide whether this command is executed for a specific particle, when absent the command is executed for every particle.
  • additional parameters (to quickly choose a gate to be applied):
    • executeOnce: If True, will set the ExecuteOnce gate
    • executeEvery: If given, will execute every “executeEvery” time-steps.
    • executeInterval: If given, will execute every interval seconds (approximate simulation time)
    • executeTimes: If given, will execute at times specified in the list provided (approximated to the nearest discrete time step!)
    • executeEveryPCSizeChange If given, will execute every time a specified particle container changes size.
  • parent: Can be set to ‘False’ or ‘0’ to explicitely prevent the command to be added to the (simulation) commandlist.
mypc.DynamicMeshUniformizationCmd()
Displaces nodes in a mesh to ‘equalize’ its connected edge lengths in a dynamic way with a given ‘relaxation time’.
Default location: ‘loop_cmds/pre_body_force_cmds’
  • Required keywords:
    • nodeIndexList — Array of std::vector<R3::Index_t> containing list of primitives connected to each node
    • pc — Particle container on which the command is applied
    • relaxation_time — Relaxation time of the uniformization process
    • triangles — Array Manager containing the triangles of the deformable body.
  • Optional keywords:
    • Deff (m^2 . s^-1) (default value = 0) — Effective diffusivity, if given, nodes will (on top of the remeshing) receive a random displacement. The idea is that this would prevent the remeshing of getting stuck in a local minimum. Magnitude of the displacement is given by sqrt(2*D)*dt.
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • predicate (default value = None) — Predicate that will decide whether this command is executed for a specific particle, when absent the command is executed for every particle.
    • weight_with_area (default value = 0) — If ‘true’, the relative ara of one triangle compared to the total ngon’s neighbourhoods area is used to weight the displacement (bigger is more) of the uniformization correction.
  • additional parameters (to quickly choose a gate to be applied):
    • executeOnce: If True, will set the ExecuteOnce gate
    • executeEvery: If given, will execute every “executeEvery” time-steps.
    • executeInterval: If given, will execute every interval seconds (approximate simulation time)
    • executeTimes: If given, will execute at times specified in the list provided (approximated to the nearest discrete time step!)
    • executeEveryPCSizeChange If given, will execute every time a specified particle container changes size.
  • parent: Can be set to ‘False’ or ‘0’ to explicitely prevent the command to be added to the (simulation) commandlist.
mypc.Fixed1DSpringsCmd()
For each particle, a spring is constructed in a given ‘dimension’ with reference position at given array ‘x0’ and a linear force with stiffness ‘k’
Default location: ‘loop_cmds/body_force_cmds’
  • Required keywords:
    • dimension (1) — dimension in which the fixed springs act
    • k (kg . s^-2) — spring stiffness
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • predicate (default value = None) — Predicate that will decide whether this command is executed for a specific particle, when absent the command is executed for every particle.
    • x0 (default value = None) — Array with initial positions. Will be set to x at initialization if not given (make sure that x is completely set and never changes when adding this command without setting x0 explicitely!).
  • additional parameters (to quickly choose a gate to be applied):
    • executeOnce: If True, will set the ExecuteOnce gate
    • executeEvery: If given, will execute every “executeEvery” time-steps.
    • executeInterval: If given, will execute every interval seconds (approximate simulation time)
    • executeTimes: If given, will execute at times specified in the list provided (approximated to the nearest discrete time step!)
    • executeEveryPCSizeChange If given, will execute every time a specified particle container changes size.
  • parent: Can be set to ‘False’ or ‘0’ to explicitely prevent the command to be added to the (simulation) commandlist.
mypc.FixedNormalSpringsCmd()
A spring in the direction of a ‘normal’ array is constructed for each particle, with reference position at a given array ‘x0’. A given array with ‘area’s of the particles will be used to scale the force. F_spring = k * area * dot( x0-x, normal )
Default location: ‘loop_cmds/body_force_cmds’
  • Required keywords:
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • area (default value = None) — Array with ‘areas’ (or submerged areas,...) that will be used to scale the force in the normal direction for each node. If not given, the array named ‘area’ will be searched in ‘pc’.
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • k_array (default value = None) — Optional array that stores ‘stiffness’ values per node (Pa/m). If given, the value provided in property ‘k’ will be ignored.
    • k (kg . m^-2 . s^-2) (default value = -1) — spring ‘stiffness’ (in Pa/m). Should be provided if no ‘k_array’ was passed.
    • max_displacement (default value = 1.7976931348623157e+308) — Max value that the displacement can obtain. Set this to zero if you want only ‘compressive’ forces to be exerted.
    • predicate (default value = None) — Predicate that will decide whether this command is executed for a specific particle, when absent the command is executed for every particle.
    • relaxation_time (s) (default value = -1) — Optional relaxation timescale of the fixed springs. This will change the value of x0.
    • x0_to_be_copied (default value = 0) — If explicitly set to true, will initialize x0 with array ‘x’ the next time the command is executed, whenever that might be.This propery will ALWAYS be changed to ‘false’ after this initialization.
    • x0 (default value = None) — Array with initial positions. Will be set to x at first run if not given. In that case, an array with name ‘x0’ will be added to pc, and the flag property flag ‘x0_to_be_copied’ will be set to ‘true’
  • additional parameters (to quickly choose a gate to be applied):
    • executeOnce: If True, will set the ExecuteOnce gate
    • executeEvery: If given, will execute every “executeEvery” time-steps.
    • executeInterval: If given, will execute every interval seconds (approximate simulation time)
    • executeTimes: If given, will execute at times specified in the list provided (approximated to the nearest discrete time step!)
    • executeEveryPCSizeChange If given, will execute every time a specified particle container changes size.
  • parent: Can be set to ‘False’ or ‘0’ to explicitely prevent the command to be added to the (simulation) commandlist.
mypc.FixedSpringsCmd()
For each particle, a spring is constructed with with reference position at given array ‘x0’ and a linear force with stiffness ‘k’
Default location: ‘loop_cmds/body_force_cmds’
  • Required keywords:
    • k (kg . s^-2) — spring stiffness
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • predicate (default value = None) — Predicate that will decide whether this command is executed for a specific particle, when absent the command is executed for every particle.
    • x0 (default value = None) — Array with initial positions. Will be set to x at initialization if not given (make sure that x is completely set and never changes when adding this command without setting x0 explicitely!).
  • additional parameters (to quickly choose a gate to be applied):
    • executeOnce: If True, will set the ExecuteOnce gate
    • executeEvery: If given, will execute every “executeEvery” time-steps.
    • executeInterval: If given, will execute every interval seconds (approximate simulation time)
    • executeTimes: If given, will execute at times specified in the list provided (approximated to the nearest discrete time step!)
    • executeEveryPCSizeChange If given, will execute every time a specified particle container changes size.
  • parent: Can be set to ‘False’ or ‘0’ to explicitely prevent the command to be added to the (simulation) commandlist.
mypc.FrictionOnAreaCmd()
Command to add to a given ‘ContactMatrixDiagonal’ array a friction term proportional to a given ‘area’ array, with proportionality ‘gamma_normal’ in the direction of a ‘normal’ (with this name) array, and ‘gamma_tangential’ orthogonal to this direction.
Default location: ‘loop_cmds/body_force_cmds’
  • Required keywords:
    • area — Array containing ‘area’ (or ‘submerged_area’) for each particle. Friction will be scalled with this.
    • gamma_normal — Friction coefficient (in Ns/m^3) in direction of the ‘normal’ array.
    • gamma_tangential — Friction coefficient (in Ns/m^3) orthogonal to the ‘normal’ array.
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • diagonals_name (default value = ContactMatrixDiagonal) — Name of the diagonals array that will be ADDED TO (default: “ContactMatrixDiagonal”).
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • predicate (default value = None) — Predicate that will decide whether this command is executed for a specific particle, when absent the command is executed for every particle.
  • additional parameters (to quickly choose a gate to be applied):
    • executeOnce: If True, will set the ExecuteOnce gate
    • executeEvery: If given, will execute every “executeEvery” time-steps.
    • executeInterval: If given, will execute every interval seconds (approximate simulation time)
    • executeTimes: If given, will execute at times specified in the list provided (approximated to the nearest discrete time step!)
    • executeEveryPCSizeChange If given, will execute every time a specified particle container changes size.
  • parent: Can be set to ‘False’ or ‘0’ to explicitely prevent the command to be added to the (simulation) commandlist.
mypc.GravityCmd()
Gravitation command. Computes a force F=m*g, with ‘m’ a mass array and ‘g’ the gravitational acceleration vector. Note that this command implicitly assumes that the center of gravity is (0,0,0) in body frame coordinates, and therefore does not apply a gravitational moment.
Default location: ‘loop_cmds/body_force_cmds’
  • Required keywords:
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • g (m . s^-2) (default value = 0 -9.81 0) — The gravitational vector
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • predicate (default value = None) — Predicate that will decide whether this command is executed for a specific particle, when absent the command is executed for every particle.
  • additional parameters (to quickly choose a gate to be applied):
    • executeOnce: If True, will set the ExecuteOnce gate
    • executeEvery: If given, will execute every “executeEvery” time-steps.
    • executeInterval: If given, will execute every interval seconds (approximate simulation time)
    • executeTimes: If given, will execute at times specified in the list provided (approximated to the nearest discrete time step!)
    • executeEveryPCSizeChange If given, will execute every time a specified particle container changes size.
  • parent: Can be set to ‘False’ or ‘0’ to explicitely prevent the command to be added to the (simulation) commandlist.
mypc.LinearDampingForceCmd()
Linear damping force command: damping force is proportional to and in the opposite direction of the velocity ‘v’.
Default location: ‘loop_cmds/body_force_cmds’
  • Required keywords:
    • c (kg . s^-1) — Linear damping coefficient. Damping force: F = -c v
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • predicate (default value = None) — Predicate that will decide whether this command is executed for a specific particle, when absent the command is executed for every particle.
  • additional parameters (to quickly choose a gate to be applied):
    • executeOnce: If True, will set the ExecuteOnce gate
    • executeEvery: If given, will execute every “executeEvery” time-steps.
    • executeInterval: If given, will execute every interval seconds (approximate simulation time)
    • executeTimes: If given, will execute at times specified in the list provided (approximated to the nearest discrete time step!)
    • executeEveryPCSizeChange If given, will execute every time a specified particle container changes size.
  • parent: Can be set to ‘False’ or ‘0’ to explicitely prevent the command to be added to the (simulation) commandlist.
mypc.NodeVolumeForceCmd()
This command translates a volume pressure which is calculated for a complete deformable body to actual forces (F) on the nodes of the body. For this it makes use of the local normal per node (which should be available and updated) and the ‘area’ of each node, which could be calculated e.g. in the Laplace-Beltrami operator. It is the responsibility of the user to make sure that these properties have been calculated when this command is executed.
Default location: ‘loop_cmds/body_force_cmds’
  • Required keywords:
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • predicate (default value = None) — Predicate that will decide whether this command is executed for a specific particle, when absent the command is executed for every particle.
  • additional parameters (to quickly choose a gate to be applied):
    • executeOnce: If True, will set the ExecuteOnce gate
    • executeEvery: If given, will execute every “executeEvery” time-steps.
    • executeInterval: If given, will execute every interval seconds (approximate simulation time)
    • executeTimes: If given, will execute at times specified in the list provided (approximated to the nearest discrete time step!)
    • executeEveryPCSizeChange If given, will execute every time a specified particle container changes size.
  • parent: Can be set to ‘False’ or ‘0’ to explicitely prevent the command to be added to the (simulation) commandlist.
mypc.NormalizeParentArrayWithChildCountCmd()
Normalizes a parent array with the number of particles per parent: i.e. array_i = array_i / N_children_i. The count array should be provided by the user (see also CountPerParentCommand).
Default location: ‘loop_cmds/pre_body_force_cmds’
  • Required keywords:
    • array_count — Array in which the number of particles per parent is counted
    • array — Array normalize with count array
  • Optional keywords:
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • predicate (default value = None) — Predicate that will decide whether this command is executed for a specific particle, when absent the command is executed for every particle.
  • additional parameters (to quickly choose a gate to be applied):
    • executeOnce: If True, will set the ExecuteOnce gate
    • executeEvery: If given, will execute every “executeEvery” time-steps.
    • executeInterval: If given, will execute every interval seconds (approximate simulation time)
    • executeTimes: If given, will execute at times specified in the list provided (approximated to the nearest discrete time step!)
    • executeEveryPCSizeChange If given, will execute every time a specified particle container changes size.
  • parent: Can be set to ‘False’ or ‘0’ to explicitely prevent the command to be added to the (simulation) commandlist.
mypc.PCStatisticsCmd()
PCStatistics command
Default location: ‘loop_cmds/pre_contact_cmds/Periodic_BC_CopyToGhost_PeriodicBoundary1D’
  • Required keywords:
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • predicate (default value = None) — Predicate that will decide whether this command is executed for a specific particle, when absent the command is executed for every particle.
  • additional parameters (to quickly choose a gate to be applied):
    • executeOnce: If True, will set the ExecuteOnce gate
    • executeEvery: If given, will execute every “executeEvery” time-steps.
    • executeInterval: If given, will execute every interval seconds (approximate simulation time)
    • executeTimes: If given, will execute at times specified in the list provided (approximated to the nearest discrete time step!)
    • executeEveryPCSizeChange If given, will execute every time a specified particle container changes size.
  • parent: Can be set to ‘False’ or ‘0’ to explicitely prevent the command to be added to the (simulation) commandlist.
mypc.PassiveIonFluxCmd()
Computes the net flow rate of ions due to passive mechanosensitive membrane channels [mol/s]. The channels are membrane proteins that can open a pore in response to mechanical stimuli and act as emergency valves. The channels only open if a certain threshold is surpassed. This command should be used for volume regulation at long time scales.
Default location: ‘loop_cmds/pre_integration_cmds’
  • Required keywords:
    • KPassive (s^3 . mol . m^-1 . kg^-2) — Ion permeability of passive mechanosensitive channels: J_p = -KPassive * (P - P_c) * (Pi_{in} - Pi_{out})..
    • pCrit (kg . s^-2) — Critical pressure for opening the passive ion channels``J_p = -KPassive * (P - P_c) * (Pi_{in} - Pi_{out})``.
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • predicate (default value = None) — Predicate that will decide whether this command is executed for a specific particle, when absent the command is executed for every particle.
  • additional parameters (to quickly choose a gate to be applied):
    • executeOnce: If True, will set the ExecuteOnce gate
    • executeEvery: If given, will execute every “executeEvery” time-steps.
    • executeInterval: If given, will execute every interval seconds (approximate simulation time)
    • executeTimes: If given, will execute at times specified in the list provided (approximated to the nearest discrete time step!)
    • executeEveryPCSizeChange If given, will execute every time a specified particle container changes size.
  • parent: Can be set to ‘False’ or ‘0’ to explicitely prevent the command to be added to the (simulation) commandlist.
mypc.RandomForceCmd()
Force in a fully random direction drawn from uniform distribution over unit sphere surface with a magnitude following a normal distribution with given standard deviation sigma. Note: It is not equivalent to the Brownian motion.
Default location: ‘loop_cmds/body_force_cmds’
  • Required keywords:
    • pc — Particle container on which the command is applied
    • sigma — Standard deviation of the Random force magnitude; if sigma<0, we keep a unit-vector.
  • Optional keywords:
    • array_name (default value = F) — Name of the array to operate on (default: ‘F’). Note: this option is kept for legacy reasons. Please use pass property ‘force_array’ instead
    • direction (1) (default value = 0 0 0) — If given, this axis (plus and minus) will be used for the random force, with only its magnitude randomized.
    • force_array (default value = None) — Array to which the force should be added. If not given, array with name ‘array_name’ will be used.
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • predicate (default value = None) — Predicate that will decide whether this command is executed for a specific particle, when absent the command is executed for every particle.
    • restrict_to_plane (1) (default value = 0 0 0) — If a plane normal is given, the command will project its direction in the plane.
  • additional parameters (to quickly choose a gate to be applied):
    • executeOnce: If True, will set the ExecuteOnce gate
    • executeEvery: If given, will execute every “executeEvery” time-steps.
    • executeInterval: If given, will execute every interval seconds (approximate simulation time)
    • executeTimes: If given, will execute at times specified in the list provided (approximated to the nearest discrete time step!)
    • executeEveryPCSizeChange If given, will execute every time a specified particle container changes size.
  • parent: Can be set to ‘False’ or ‘0’ to explicitely prevent the command to be added to the (simulation) commandlist.
mypc.SetContactMatrixDiagonalCmd()
Sets an array with a single value. Used for instance to zero forces and moments every timestep. Properties are ‘value’, and an ‘array’ that needs to be set.
Default location: ‘loop_cmds/pre_body_force_cmds’
  • Required keywords:
    • array — The array that will be set using the given value.
    • value — The value that will be used to set the array.
  • Optional keywords:
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • predicate (default value = None) — Predicate that will decided whether or not the command is executed for a specific particle index (if omitted, the command is executed for all particle indices)
  • additional parameters (to quickly choose a gate to be applied):
    • executeOnce: If True, will set the ExecuteOnce gate
    • executeEvery: If given, will execute every “executeEvery” time-steps.
    • executeInterval: If given, will execute every interval seconds (approximate simulation time)
    • executeTimes: If given, will execute at times specified in the list provided (approximated to the nearest discrete time step!)
    • executeEveryPCSizeChange If given, will execute every time a specified particle container changes size.
  • parent: Can be set to ‘False’ or ‘0’ to explicitely prevent the command to be added to the (simulation) commandlist.
mypc.SetMeanToOriginCmd()
Centers the positions of particles in a particle container to a user specified ‘center’.
Default location: ‘loop_cmds/integration_cmds’
  • Required keywords:
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • center (default value = 0 0 0) — Position at which the x array should be centered
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • omit_axis (default value = -1) — This axis will not be used to center the positions
    • predicate (default value = None) — Predicate that will decide whether this command is executed for a specific particle, when absent the command is executed for every particle.
    • x_centered (default value = None) — Array where the centered positions will be stored. If not provided, the same array as the property ‘x’ will be used
    • x (default value = None) — Array with positions
  • additional parameters (to quickly choose a gate to be applied):
    • executeOnce: If True, will set the ExecuteOnce gate
    • executeEvery: If given, will execute every “executeEvery” time-steps.
    • executeInterval: If given, will execute every interval seconds (approximate simulation time)
    • executeTimes: If given, will execute at times specified in the list provided (approximated to the nearest discrete time step!)
    • executeEveryPCSizeChange If given, will execute every time a specified particle container changes size.
  • parent: Can be set to ‘False’ or ‘0’ to explicitely prevent the command to be added to the (simulation) commandlist.
mypc.SimpleStokesDragCmd()
Command to set the Stokes drag of a cell taking the cell’s volume and number of nodes into account.
Default location: ‘loop_cmds/body_force_cmds’
  • Required keywords:
    • pc — Particle container on which the command is applied
    • visc — Dynamic viscosity of the fluid (e.g. 7e-4 Pa*s for water @37 C)
  • Optional keywords:
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • predicate (default value = None) — Predicate that will decide whether this command is executed for a specific particle, when absent the command is executed for every particle.
  • additional parameters (to quickly choose a gate to be applied):
    • executeOnce: If True, will set the ExecuteOnce gate
    • executeEvery: If given, will execute every “executeEvery” time-steps.
    • executeInterval: If given, will execute every interval seconds (approximate simulation time)
    • executeTimes: If given, will execute at times specified in the list provided (approximated to the nearest discrete time step!)
    • executeEveryPCSizeChange If given, will execute every time a specified particle container changes size.
  • parent: Can be set to ‘False’ or ‘0’ to explicitely prevent the command to be added to the (simulation) commandlist.
mypc.StepIntegration_ForwardEuler_Cmd()
Integration of arrays ‘x’ and ‘dx’ using a user-given array with ‘Scalar’ type steps.
Default location: ‘loop_cmds/pre_body_force_cmds’
  • Required keywords:
    • dx — The value ‘dx’ (usually unit vector) that gets integrated as dest = x + step*dx
    • pc — Particle container on which the command is applied
    • step — The (always Scalar) step size
    • x — The value ‘x’ that needs to be integrated as dest = x+ step*dx
  • Optional keywords:
    • dest (default value = None) — Destination arrray. If not given, ‘x’ will simply be used. Must be same type as x
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • predicate (default value = None) — Predicate that will decide whether this command is executed for a specific particle, when absent the command is executed for every particle.
  • additional parameters (to quickly choose a gate to be applied):
    • executeOnce: If True, will set the ExecuteOnce gate
    • executeEvery: If given, will execute every “executeEvery” time-steps.
    • executeInterval: If given, will execute every interval seconds (approximate simulation time)
    • executeTimes: If given, will execute at times specified in the list provided (approximated to the nearest discrete time step!)
    • executeEveryPCSizeChange If given, will execute every time a specified particle container changes size.
  • parent: Can be set to ‘False’ or ‘0’ to explicitely prevent the command to be added to the (simulation) commandlist.
mypc.StokesDragForceCmd()
Command to compute, given an already computed ‘ContactMatrixDiagonal’ with friction constants (see e.g. ‘LiquidFrictionCommand’), a linear Stokes drag force. velocity can either be the particle’s own velocity (sign should be ‘-1’) or an external ‘driving’ velocity field that is interpolated to the position of the particle (‘sign’ should be 1).
Default location: ‘loop_cmds/body_force_cmds’
  • Required keywords:
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • gamma (default value = None) — Array containing the friction matrices. If not provided first tries to find ‘ContactMatrixDiagonal’ then tries to find ‘gamma’ array.
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • predicate (default value = None) — Predicate that will decide whether this command is executed for a specific particle, when absent the command is executed for every particle.
    • sign (1) (default value = -1) — Sign of the force (-1 or 1) in F=sign*gamma*v. If v is the particle’s own velocity, use -1 (default). If v is an external field, you typically want to use 1. Only 1 and -1 are accepted as valid arguments.
    • v (default value = None) — Array containing the velocity, which is either the particle’s own velocity, or the local interpolation of some external field. If not given, pc[‘v’] will be searched.
    • vorticity (default value = None) — Array with local fluid ‘vorticity’ (vector with angular velocities). If given, a correction force will be added based on the timestep to prevent ‘overshooting’ a flow-line due to discrete time-stepping. Only applicable in case an explicit and non-trivial fluid-field is provided, e.g. from a CFD-computation.
  • additional parameters (to quickly choose a gate to be applied):
    • executeOnce: If True, will set the ExecuteOnce gate
    • executeEvery: If given, will execute every “executeEvery” time-steps.
    • executeInterval: If given, will execute every interval seconds (approximate simulation time)
    • executeTimes: If given, will execute at times specified in the list provided (approximated to the nearest discrete time step!)
    • executeEveryPCSizeChange If given, will execute every time a specified particle container changes size.
  • parent: Can be set to ‘False’ or ‘0’ to explicitely prevent the command to be added to the (simulation) commandlist.
mypc.SumArrayToParentCmd()
Sums up elements in child array and adds them up into the parent array according to the parentParticleIndex map. Warning: Does not Zero the parent array!
Default location: ‘loop_cmds/pre_body_force_cmds’
  • Required keywords:
    • array_parent — Parent array which will keep the sum
    • array — Array to be summed up to parent
    • pc — Particle Container
  • Optional keywords:
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • predicate (default value = None) — Predicate that will decide whether this command is executed for a specific particle, when absent the command is executed for every particle.
    • weights (default value = None) — Weights (scalar) with which ‘array’ will be multiplied before summation.
  • additional parameters (to quickly choose a gate to be applied):
    • executeOnce: If True, will set the ExecuteOnce gate
    • executeEvery: If given, will execute every “executeEvery” time-steps.
    • executeInterval: If given, will execute every interval seconds (approximate simulation time)
    • executeTimes: If given, will execute at times specified in the list provided (approximated to the nearest discrete time step!)
    • executeEveryPCSizeChange If given, will execute every time a specified particle container changes size.
  • parent: Can be set to ‘False’ or ‘0’ to explicitely prevent the command to be added to the (simulation) commandlist.
mypc.TimeIntegration_ForwardEuler_Generic_Cmd()
Time integration for any arrays ‘x’ and ‘dx’ belonging to the same manager, vector or scalar.
Default location: ‘loop_cmds/integration_cmds’
  • Required keywords:
    • dx — The value ‘dx’ that gets integrated as x += dx*dt
    • pc — Particle container on which the command is applied
    • x — The value ‘x’ that needs to be integrated as x += dx*dt
  • Optional keywords:
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • predicate (default value = None) — Predicate that will decide whether this command is executed for a specific particle, when absent the command is executed for every particle.
    • timestep (default value = 0) — timestep used by this time integration command
  • additional parameters (to quickly choose a gate to be applied):
    • executeOnce: If True, will set the ExecuteOnce gate
    • executeEvery: If given, will execute every “executeEvery” time-steps.
    • executeInterval: If given, will execute every interval seconds (approximate simulation time)
    • executeTimes: If given, will execute at times specified in the list provided (approximated to the nearest discrete time step!)
    • executeEveryPCSizeChange If given, will execute every time a specified particle container changes size.
  • parent: Can be set to ‘False’ or ‘0’ to explicitely prevent the command to be added to the (simulation) commandlist.
mypc.TimeIntegration_ForwardEuler_Translation_Cmd()
Time integration
Default location: ‘loop_cmds/integration_cmds’
  • Required keywords:
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • predicate (default value = None) — Predicate that will decide whether this command is executed for a specific particle, when absent the command is executed for every particle.
    • timestep (default value = 0) — timestep used by this time integration command
  • additional parameters (to quickly choose a gate to be applied):
    • executeOnce: If True, will set the ExecuteOnce gate
    • executeEvery: If given, will execute every “executeEvery” time-steps.
    • executeInterval: If given, will execute every interval seconds (approximate simulation time)
    • executeTimes: If given, will execute at times specified in the list provided (approximated to the nearest discrete time step!)
    • executeEveryPCSizeChange If given, will execute every time a specified particle container changes size.
  • parent: Can be set to ‘False’ or ‘0’ to explicitely prevent the command to be added to the (simulation) commandlist.
mypc.TimeIntegration_ForwardEuler_UncoupledOverdampedMatrix_Cmd()
Time integration which sets the velocity based on a prescribed mobility matrix and uses Forward Euler integration to increment the positions
Default location: ‘loop_cmds/integration_cmds’
  • Required keywords:
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • chi (default value = None) — Array with mobility matrices. By default the array ‘chi’ is taken.
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • predicate (default value = None) — Predicate that will decide whether this command is executed for a specific particle, when absent the command is executed for every particle.
    • timestep (default value = 0) — timestep used by this time integration command
  • additional parameters (to quickly choose a gate to be applied):
    • executeOnce: If True, will set the ExecuteOnce gate
    • executeEvery: If given, will execute every “executeEvery” time-steps.
    • executeInterval: If given, will execute every interval seconds (approximate simulation time)
    • executeTimes: If given, will execute at times specified in the list provided (approximated to the nearest discrete time step!)
    • executeEveryPCSizeChange If given, will execute every time a specified particle container changes size.
  • parent: Can be set to ‘False’ or ‘0’ to explicitely prevent the command to be added to the (simulation) commandlist.
mypc.TimeIntegration_ForwardEuler_UncoupledOverdamped_Cmd()
Time integration which sets the velocity based on a prescribed damping coefficient and uses Forward Euler integration to increment the positions
Default location: ‘loop_cmds/integration_cmds’
  • Required keywords:
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • gamma_array (default value = None) — Array with damping symmetric matrices. If given, parameter ‘gamma’ will be ignored
    • gamma (default value = -1) — Scalar damping coefficient
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • predicate (default value = None) — Predicate that will decide whether this command is executed for a specific particle, when absent the command is executed for every particle.
    • set_v_array (default value = 1) — If ‘false’, the positions will be directly set without updating a velocity array
    • timestep (default value = 0) — timestep used by this time integration command
  • additional parameters (to quickly choose a gate to be applied):
    • executeOnce: If True, will set the ExecuteOnce gate
    • executeEvery: If given, will execute every “executeEvery” time-steps.
    • executeInterval: If given, will execute every interval seconds (approximate simulation time)
    • executeTimes: If given, will execute at times specified in the list provided (approximated to the nearest discrete time step!)
    • executeEveryPCSizeChange If given, will execute every time a specified particle container changes size.
  • parent: Can be set to ‘False’ or ‘0’ to explicitely prevent the command to be added to the (simulation) commandlist.
mypc.TimeIntegration_LeapFrog_Translation_Cmd()
Time integration
Default location: ‘loop_cmds/integration_cmds’
  • Required keywords:
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • predicate (default value = None) — Predicate that will decide whether this command is executed for a specific particle, when absent the command is executed for every particle.
    • timestep (default value = 0) — timestep used by this time integration command
  • additional parameters (to quickly choose a gate to be applied):
    • executeOnce: If True, will set the ExecuteOnce gate
    • executeEvery: If given, will execute every “executeEvery” time-steps.
    • executeInterval: If given, will execute every interval seconds (approximate simulation time)
    • executeTimes: If given, will execute at times specified in the list provided (approximated to the nearest discrete time step!)
    • executeEveryPCSizeChange If given, will execute every time a specified particle container changes size.
  • parent: Can be set to ‘False’ or ‘0’ to explicitely prevent the command to be added to the (simulation) commandlist.
mypc.VTKWriterCmd()
Writer of VTK (.vtp/vtu) files. The writer acts on the data member given in the constructor. By default all child array managers are written, but without their additional data arrays (such as for instance ‘r’, ‘v’, ...) this can be changed by invoking the ‘select_all’ member function.
Also individual arrays can be selected by adding a ‘enable_VTK_write’ child (‘ r.add_child( BaseObject(‘enable_VTK_write’)’), or they can be unselected by adding a ‘disable_VTK_write’ child.
Conforming to what ParaView expects, symmetric tensors are written as diagonal values, then upper triangle:
0 3 4
x 1 5
x x 2.
If you write a full matrix, however, the order is as in our c++ code, i.e.:
0 1 2
3 4 5
6 7 8.
Has no default location.
  • Required keywords:
    • data — The root of which the data will be written
    • filename — The base filename of the files that will be written. A number will be appended to differentiate between different timesteps.
  • Optional keywords:
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • select_all (default value = 0) — Determines whether the writer tries to write as much as possible or not (by default false). Note: for legacy reasons there is also a named function for this.
    • start_index (default value = 0) — Index of the next file that will be written. The index of each subsequent file will be incremented by one. Default is zero.
  • additional parameters (to quickly choose a gate to be applied):
    • executeOnce: If True, will set the ExecuteOnce gate
    • executeEvery: If given, will execute every “executeEvery” time-steps.
    • executeInterval: If given, will execute every interval seconds (approximate simulation time)
    • executeTimes: If given, will execute at times specified in the list provided (approximated to the nearest discrete time step!)
    • executeEveryPCSizeChange If given, will execute every time a specified particle container changes size.
  • parent: Can be set to ‘False’ or ‘0’ to explicitely prevent the command to be added to the (simulation) commandlist.
mypc.VolumeRegulationCmd()
This command updates the equilibrium volume and amount of ions in the cells based on the net flows.
Default location: ‘loop_cmds/integration_cmds’
  • Required keywords:
    • MOut (kg . m^-1 . s^-2) — Osmotic pressure of medium
    • T (K) — Temperature in K
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • predicate (default value = None) — Predicate that will decide whether this command is executed for a specific particle, when absent the command is executed for every particle.
  • additional parameters (to quickly choose a gate to be applied):
    • executeOnce: If True, will set the ExecuteOnce gate
    • executeEvery: If given, will execute every “executeEvery” time-steps.
    • executeInterval: If given, will execute every interval seconds (approximate simulation time)
    • executeTimes: If given, will execute at times specified in the list provided (approximated to the nearest discrete time step!)
    • executeEveryPCSizeChange If given, will execute every time a specified particle container changes size.
  • parent: Can be set to ‘False’ or ‘0’ to explicitely prevent the command to be added to the (simulation) commandlist.
mypc.WaterFluxCmd()
Computes the flow rate of water due to membrane permeability and pores [m^3/s].The permeability coefficient can be altered to include aquaporins ect. This command should be used for volume regulation at long time scales. The waterflux has hydrostatic and osmotic pressure contributions.
Default location: ‘loop_cmds/pre_integration_cmds’
  • Required keywords:
    • KWater (kg . s^-3) — cell membrane water permeability: dV_0/dt = -KWater * Area * J_{H_2O}.
    • pc — Particle container on which the command is applied
  • Optional keywords:
    • gate (default value = ET::ChildProperty const*) — Can decide to (temporarily) not execute the command in a CommandList. (Default is ExecuteAlways)
    • predicate (default value = None) — Predicate that will decide whether this command is executed for a specific particle, when absent the command is executed for every particle.
  • additional parameters (to quickly choose a gate to be applied):
    • executeOnce: If True, will set the ExecuteOnce gate
    • executeEvery: If given, will execute every “executeEvery” time-steps.
    • executeInterval: If given, will execute every interval seconds (approximate simulation time)
    • executeTimes: If given, will execute at times specified in the list provided (approximated to the nearest discrete time step!)
    • executeEveryPCSizeChange If given, will execute every time a specified particle container changes size.
  • parent: Can be set to ‘False’ or ‘0’ to explicitely prevent the command to be added to the (simulation) commandlist.

MolecularMotorParticleContainer

class mpacts.particles.specialcases.molecularmotor.MolecularMotorParticleContainer(name, parent=None, call_init=True, without_bending=False, without_virtualForces=False, without_selfavoidance=False, without_nodeForces=False, use_gillespie=False, without_stretching=False)

Bases: mpacts.particles.specialcases.filament.FilamentParticleContainer

MolecularMotorParticleContainer(name, parent, **kwargs)
add_motor(position, velocity, orientation, segment_count, head_count_left, head_count_right=None)
init_contacts()
init_variables()