By Jack Treado, Yale University
You can download this whole repository to get access to the code.
The code is all located in the src directory. You can only run the code while the src directory is your working directory in MATLAB.
The main file that runs the simulation is the function runMesoCellExtension.m. This is a MATLAB function that you can run from the command
line in the MATLAB editor screen.
There is another function, vertexFIREPinnedVerts.m, included in the src directory. This is needed during the simulation, so make sure it always stays in the same working directory as
runMesoCellExtension.m.
The main function is defined as follows:
function [hList, xList, yList, shapeList, calAList] = runMesoCellExtension(NV,NPINS,calA0Init,Kl,KbInit,cL,cB,cKb,plotIt,movieFileStr)
NV: integer number of vertices that make up the deformable particle (DP)NPINS: integer number of pins to force the DP to change shape during extension- NOTE: MUST be at least less than
NV
- NOTE: MUST be at least less than
calA0Init: initial preferred shape parameter, will change if you makecLgreater than 0.- Note that
calA0Initshould be greater than or equal to 1 always.
- Note that
Kl: mechanical constant for perimeterKbInit: mechanical constant for curvature- NOTE:
KbInitwill change if parametercKb > 0.
- NOTE:
cL: rate constant for growth/decay of the preferred shape parametercalA0based on the instantaneous shape parametercalAcB: rate constant for growth of preferred anglesth0during stretching simulationcKb: rate constant for change in bending energy, currently updates based on magnitude of angleplotIt: Binary var. to either draw (1) or not draw (0) cells during simulation
movieFileStr: If included, save animation to movie file.- NOTE: File string must end with the
.mp4extension, currently does not support other formats.
- NOTE: File string must end with the
hList: List of pin stretch steps parametrized by variable.
- NOTE: h is unitless, defined as the distance travelled outside of the original perimeter divided by the vertex radius.
xList: x-coordinates of all cell vertices at each stretch stepyList: y-coordinates of all cell vertices at each stretch step- NOTE: Coordinates are stored as MATLAB
cellvariables. To access at stepii, use syntaxx{ii}ory{ii}.
- NOTE: Coordinates are stored as MATLAB
shapeList: List of relevant shape information during simulation. Column 1 iscalA0(double), column 2 isKb(array), column 3 is preferred anglesth0(array)calAList: Instantaneous shape parameterduring stretching simulation.
To run the code on the command line, simply use
>> [hList, xList, yList, shapeList, calAList] = runMesoCellExtension(NV,NPINS,calA0Init,Kl,KbInit,cL,cB,cKb,plotIt,movieFileStr);
You can use values instead of variable names for the inputs. If you want to use variables, make sure they are defined in the MATLAB workspace. Remember that you do not need to include movieFileStr.
End of README.md