waxmorph.emulator.diffusion_step_differentiable

waxmorph.emulator.diffusion_step_differentiable#

waxmorph.emulator.diffusion_step_differentiable(tape, X, R, c, particle_count, D_emu=0.1, dt=0.01, grid=None)[source]#

Record graph diffusion with concentration gradients.

Positions, radii, and pair discovery remain outside the tape. Each molecule channel diffuses independently over the frozen topology. The caller seeds c_out.grad and replays tape.

Parameters:
  • tape (Tape)

  • X (array)

  • R (array)

  • c (array)

  • particle_count (int)

  • D_emu (float)

  • dt (float)

  • grid (HashGrid | None)

Return type:

array