Hi Kevin,
I am moving your questions below to this forum in case others have similar questions or other more experienced users have something to add.
Also, Ryan Tasseff has a tutorial draft posted that covers the sorting example and may be able to incorporate information as we hear about what aspects of the example need further explanation.
I have been modifying parameters within the files "model_define.h" and "sorting.xml" -- let me know if this isn't what I should be doing.
Those are the correct files to be modifying.
In "model_define.h", here are some questions:
1. What's the difference between "domain x,y,z" and output parameter "size_x, size_y, size_z"? Does the latter just scale the simulation to fit the chosen value?
domain x,y,z are the dimensions of the entire simulation grid. You might not want to output data only for some particular rectilinear region, not the entire grid. The output region is defined by the rectilinear region having one corner at the point [start_x,start_y,start_z] and the other at [start_x+size_x,start_y+size_y,start_z+size_z]. In this example, the output is set to be the entire simulation domain: [0,0,0] to [64,64,64].
2. Do I need to worry about parallelism? (i.e. everything in the "optional" section including: system, super_partition, interval)
They are performance parameters. For now, you should be able to ignore them, though you'll get innocuous warning messages. When you're interested in running larger models, we can revisit this.
In "sorting.xml":
1. Is it possible to include more than 2 agents? I see parameters called "CELL_TYPE_A" and "CELL_TYPE_B". Can I introduce "CELL_TYPE_C" and add a third number to the parameters such as "A_CELL_RADIUS[NUM_CELL_TYPES] = {4.0, 4.0, 4.0}"?
Yes. You can look at the source code in model_routine_agent.cpp to see how these are used: there is a loop in ModelRoutine::addSpAgents that iterates i over NUM_CELL_TYPES creating a random number of cells of each type sticking each at a random location in the domain. It also sets for each cell i its type and radius via state.setType(i) and state.setRadius( A_CELL_RADIUS[i]).
Then, later on in ModelRoutine::adjustSpAgent it uses state.getType() to recover the type so that it can determine its radius as A_CELL_RADIUS[state.getType()].
You can mess around by setting the raidii of different cell types to different values in the sorting.xml file or even change the program so that the radius of a cell depends on its index i -- that would require modifications to multiple files, but it's a good way to get to learn how state is associated with each cell, which is something that will be needed to, for example, maintain a different state of contraction for each cell in the platelet model. Examples for maintaining state that is different depending on the type of the cell is illustrated in the yeast model.
2. What does IF_GRID_SPACING do?
Chapter 1 in the manual discusses grid spacing in more detail, but the short of it is that Biocellion imposes a cubic grid on the domain. Rather than having that grid define the units (ie, each cube is the unit cube), Biocellion offers the user the opportunity to define the length of the cube edge as IF_GRID_SPACING ("IF" is short for "interface"). Whatever it is, the cell centers can be anywhere -- they are not restricted to grid locations. Rather, the purpose of the gridding has to do with resolving cell-cell interactions. Biocellion's implicit assumption is that, whatever their shapes, two cells can be interacting physically only if their point locations are in the same or neighboring grid boxes. So, when cells are modeled as spheres (which so far has been true for all models), it's important that IF_GRID_SPACING be larger than the maximum cell diameter in the entire model to ensure no physical cell-cell interactions are missed. Making IF_GRID_SPACING much larger than the typical cell diameter could result in a lot of unnecessary computation: to see what cells a given cell might be touching, every cell whose center is in a box is compared to every other cell whose center is in that same box and in neighboring boxes; if the boxes are large, they may contain many cells, resulting in a lot of (quadratic in the number of cells in the box) comparisons.
3. What does ADHESION_S do?
See ModelRoutine::computeForceSpecialAgent in model_routine_mech_intrct.cpp. There ADHESION_S is used as the adhesive force constant in determining the (exponentially decaying with distance) force exerted on a cell drawing it towards a (non-touching) cell of the same type. Cells that are touching (or squished against each other) exert a repulsive spring force proportional to the deformation of their boundaries.
I understand that once you include this example in the documentation, it will be much more clear, but I hope this helps a little bit.
Sure!