By Jack Treado, Yale University, 2021
The main file that runs the simulation is the function activeBrownianCrawler.m.
The code can be tuned from directed, pseudopod motion (left) to random, focal adhesion-like motion (right).
The main function is defined as follows:
function activeBrownianCrawler(NV,calA0,Kl,Kb,v0,Dr,Ds,NT,dt,NFRAMES,seed,savestr)
NV: integer number of vertices that make up the deformable particle (DP)calA0: initial preferred shape parameterKl: mechanical constant for perimeterKb: mechanical constant for curvaturev0: crawling speedDr: cell-based director diffusion coefficientDs: "foot size", spread of velocity distribution to nearby verticesNT: number of time steps to simulatedt: time step size- Note that total time will be
ttotal = NT * dt
- Note that total time will be
NFRAMES: total number of "frames" to be saved during simulation.- Frame count rounds down, i.e. if there are
NT = 8time steps and you ask forNFRAMES = 3, you will only print out2frames total
- Frame count rounds down, i.e. if there are
seed: integer seed for random number generator, must be integer > 0.savestr: string variable, path to file with saved data from simulation. Data saved in.matfile format, see MATLAB documentation on MAT-files.
All simulation data is saved in the file named in the savestr variable. See this section for a detailed list of outputs.
To run locally on your machine, call the MATLAB function from the MATLAB command line with relevant inputs. The left example was run with
>> activeBrownianCrawler(32, 1.3, 1.0, 0.0, 0.05, 0.01, 0.2, 1e6, 0.005, 200, 1, 'test.mat');and the right-hand example with
>> activeBrownianCrawler(32, 1.3, 1.0, 0.0, 0.05, 0.1, 0.1, 1e6, 0.005, 200, 1, 'test.mat');To draw the simulation frame-by-frame, see the script abc_draw.m. The simulation code is replicated exactly, but the shape of the deformable particle is drawn in a figure window. An animated simulation can be saved to a .gif file if the makeAMovie variable on line 79 is set to 1.
Section in progress...
Data in the MAT-file named in the savestr can be either loaded into the workspace using
load(savestr);or loaded into a struct using
outputStruct = load(savestr);The saved data can then be accessed as struct member variables using the . operator, e.g. outputStruct.NV.
All inputs to the function are saved in the MAT-file with their same name. Other variables are:
frameList: time step of each frame.- Note: time (in simulation units) of each frame is
frameList(tt) * dt.
- Note: time (in simulation units) of each frame is
cList: center-of-mass position at each framefList: center-of-mass net force at each framevList: center-of-mass velocity at each frameUList: shape energy at each framecalAList: shape parameter at each frameabpCList: position of active brownian particle with steps drawn from ABC ensembleabpVList: velocity of active brownian particle with steps drawn from ABC ensemble

