Running forward simulations - Epithelial / Mesenchymal Case Study#
Use the forward simulator for the prescribed epithelial-mesenchymal case study;
the learned emulator supports source-target shape assembly. Values are in model
units; applications may supply external calibration for SI or biological
interpretation.
The active particle prefix can grow to a preallocated max_particles
capacity. The simulation_with_autodiff tutorial walks through a complete run.
Allocate fixed-capacity Warp arrays for centers
X, radiiR, equilibrium radiiR_eq, polaritiesP, activatorA, inhibitorI, and cell typesCT.Relax geometry with
simulator.mech_step_sticky. Themech_step_sticky_implicitvariant uses localwarp.gradfor polarity, thickness, alignment, and optional WNT terms; soft-sphere derivatives remain explicit.Pattern the activator and inhibitor fields by reaction-diffusion with
simulator.chem_step, parameterized bychi(activator diffusivity relative to the inhibitor),gamma(reaction rate), andD_inhib(inhibitor diffusivity).Grow cells with
simulator.growth_step. Radii below their targets increase up to those targets; mesenchymal equilibrium radii are capped atR_maxand epithelial equilibrium radii copy through.Count neighbors and divide cells with
simulator.count_neighbors_step,simulator.division_decision, andsimulator.division_logic.Write frames from the live Warp state with
render.WarpMovieRenderer.write_frame_from_state(see Render trajectories).
Mechanics, chemistry, and growth write caller-supplied next-state arrays; growth also advances mesenchymal RNG keys. Division mutates shared state arrays and reserves unique daughter slots within capacity. Mesenchymal daughter radii conserve half volume; epithelial daughter radii copy.
Tip
Drop the particle count and the number of steps when you are validating a new environment.
For the equations behind these kernels — the soft-sphere force, the graph Laplacian, the activator-inhibitor reaction-diffusion system, the growth Hill function, and the division rules — see Forward and inverse modes and Emulator differentiability.