ecoli.processes.environment.multibody_physics

Multibody physics process

class ecoli.processes.environment.multibody_physics.InvokeUpdate(update)[source]

Bases: object

get(timeout=0)[source]
class ecoli.processes.environment.multibody_physics.Multibody(parameters=None)[source]

Bases: Process

Simulates collisions and forces between agent bodies with a multi-body physics engine.

Ports:
  • agents: The store containing all agent sub-compartments. Each agent in

    this store has values for location, angle, length, width, mass, thrust, and torque.

Parameters:
  • initial_parameters (dict) – Accepts the following configuration keys:

  • jitter_force – force applied to random positions along agent bodies to mimic thermal fluctuations. Produces Brownian motion.

  • agent_shape (str) – agents can take the shapes rectangle, segment, or circle.

  • bounds (list) – size of the environment in micrometers, with [x, y].

  • mother_machine (bool) – if set to True, mother machine barriers are introduced.

  • animate (bool) –

    interactive matplotlib option to animate multibody. To run with animation turned on set True, and use the TKAgg matplotlib backend:

    $ MPLBACKEND=TKAgg python vivarium/processes/snapshots.py
    

Notes

  • rotational diffusion in liquid medium with viscosity = 1 mPa.s: \(Dr = 3.5 \pm0.3 rad^{2}/s\) (Saragosti, et al. 2012. Modeling E. coli tumbles by rotational diffusion.)

  • translational diffusion in liquid medium with viscosity = 1 mPa.s: \(Dt = 100 um^{2}/s\) (Saragosti, et al. 2012. Modeling E. coli tumbles by rotational diffusion.)

animate_frame(agents)[source]
defaults: Dict[str, Any]
{   'agent_shape': 'segment',
    'animate': False,
    'boundary_key': 'boundary',
    'bounds': <Quantity([40 40], 'micrometer')>,
    'jitter_force': 0.0001,
    'length_unit': <Unit('micrometer')>,
    'mass_unit': <Unit('femtogram')>,
    'mother_machine': False,
    'seed': 0,
    'velocity_unit': <Unit('micrometer / second')>}
name = 'multibody'
next_update(timestep, states)[source]
ports_schema()[source]
ecoli.processes.environment.multibody_physics.agent_body_config(config)[source]
ecoli.processes.environment.multibody_physics.daughter_locations(value, state)[source]
ecoli.processes.environment.multibody_physics.main()[source]
ecoli.processes.environment.multibody_physics.make_random_position(bounds)[source]
ecoli.processes.environment.multibody_physics.random_body_position(body)[source]
ecoli.processes.environment.multibody_physics.run_growth_division(out_dir='out', animate=True)[source]
ecoli.processes.environment.multibody_physics.single_agent_config(config)[source]