============================================================================ ---------------README file for the agent-based modeling setup--------------- ============================================================================ Agent-based modeling of diffusion via 2D random walks is implemented here. - Set basal step size limit in the box. Can be uniform ('default') or gradient ('stepwise'/'linear') - Set if particles can interact with each other via neighbour sensing - Set viscous regions (in the script, they comprise the variable termed xyHoney) - Can be a single rectangular viscous region or a set of circular viscous granules - Set where, in the simulation zone, are particles initialized (xyStartFigure) - Control how long do start boundaries, viscous zones last - Run simulation for the desired number of frames. regbox_run.m - main simulation file. Use it to run the diffusion simulations as per desired parameters. Output file - .mat file comprising AllCoords - m x 2 (or 3) x k array of coordinates for mparticles across k frames Typical workflow: 1. Run regbox_run.m with desired parameters. 2. Call AllCoords_DisplayGifParticles to visualise a timelapse of frames/an individual frame from the run. 3. Call AllCoords_SmoothDensity to obtain the distribution of particles. Sample workflow run: 1. regbox_run.m 2. AllCoords_DisplayGifParticles(ScriptVar, AllCoords,'tryoutput', [1 50]) 3. AllCoords_SmoothDensity(ScriptVar, AllCoords, 'trytry', 1, [1 100 250 500], 500, 100) Makes use of: InitialiseParticles.m - for generating the initial set of coordinates NextSetCoords.m - for generating each succesive frame MakeStep.m - Make a step for a particle (interactions between particles considered) MakeStep_NoSensing.m - Make a step for a particle (interactions between particles ignored, that is, sensing is not implemented) StepLimBasal.m - Determining basal step size based on explicit encoding of viscous zones StepLimFunction.m - Determining step size limit based on implicit viscosity gradient (if present) StayWithinBounds.m - Ensures that the generated step is within box bounds Other ancillary functions: ParticleTypeCalculator.m - Calculate the type belonged to by the particle in question IsParticleInsideFigure.m - Checks if the particle(s) is/are inside the input bounds Viscous granules: GenerateGranules.m - Generate viscous granules as per cubic close packing, shuffle them about incrementally (to be used if the granule generation algorithm in regbox_run.m fails - occurs for packing density >= 0.6) AreaFraction.m - Computes packing density, void fraction for viscous granules in the simulation region MinDistToWall.m - Computes minimum distance of the viscous granules to the wall to check if the granules lie within the simulation region Clustering analysis: AllCoords_LocalDensity.m - Computes the local density for each particle For MSD analysis: AllCoords_ComputeSD.m - Compute squared displacements to be used further in determining mean squared displacements FRAP analysis: InSilicoFRAP_sepC - Performs in silico FRAP for the given simulation run (AllCoords, ScriptVar pair) FRAP_biexpfit.m - Computes t1/2 as per bi-exp fit (for normalization, use a uniform viscosity simulation with the same number of particles as the test run. Uniform viscosity value should be the bulk viscosity in the test run). AllCoords_DwellTimeSpent.m - Compute dwell time within granules