Tutorials › Quantitative Systems Pharmacology (QSP) › Lattice-Based and Off-Lattice Cell Models

Spatial and Agent-Based Approaches · Tutorial 231 of 799

Lattice-Based and Off-Lattice Cell Models

Learn how lattice spacing, cell geometry, and contact rules shape model behavior, and how to select and diagnose a lattice or off-lattice representation.

Advanced 11 min read

What You'll Learn

  • Define lattice sites and off-lattice cell positions in physical coordinates.
  • Compare neighborhood-based contact with geometry-based contact.
  • Calculate movement distances and cell contact from model coordinates.
  • Recognize grid anisotropy, resolution limits, overlap, and crowding artifacts.
  • Select a representation using the tissue geometry and movement constraints.

Why Position Representation Matters

A cell model needs a precise account of where each cell is and what counts as movement or contact. A lattice model assigns positions to sites on a grid; an off-lattice model assigns positions in continuous space. These are not merely alternative data formats. They define which locations are available, which moves can occur, and how the model recognizes neighboring cells. Those choices can affect simulated cell trajectories, clustering, and local interactions.

The relevant choice depends on the biological question. If cells occupy a regular arrangement and interactions are adequately described by a fixed set of neighboring sites, a lattice may be efficient and interpretable. If cell shape, irregular spacing, or movement through crowded space is central, a continuous-position representation may preserve important geometry. Earlier material on tissue geometry and microenvironments provides context for defining the physical domain; here the focus is how the cell positions within it are represented.

Definition: In a lattice-based cell model, cell positions are represented by sites on a discrete spatial grid. The grid spacing \(h\) is the physical distance between adjacent sites. In an off-lattice cell model, each cell has a position in continuous physical coordinates, usually a center position, and its geometry or interaction region is defined around that position. A contact rule specifies when two cells count as neighbors or are eligible to interact.

Lattice Positions, Neighborhoods, and Movement

For a square lattice in two dimensions, a site can be indexed by integers \((i,j)\). Its physical coordinate is \(x=(ih,jh)\), where \(h\) is the spacing in, for example, micrometers. A common occupancy assumption is that each site is either empty or occupied by one cell. This is an exclusion rule: a cell cannot move into a site already occupied by another cell. Other lattice models permit multiple cells per site, but then the rule must specify what that occupancy means biologically.

A model also defines which sites are neighbors. Under a four-neighbor, or von Neumann, convention, a site has neighbors at offsets \((1,0),(-1,0),(0,1),(0,-1)\). Under an eight-neighbor, or Moore, convention, the four diagonal sites are included as well. On a square grid, an orthogonal step has physical length \(h\), but a diagonal step has length \(h\sqrt{2}\). Thus, treating every allowed move as one equal-length step gives different physical movement distances in different directions.

Lattice movement is straightforward to implement: a cell changes its site index according to an allowed move rule, subject to occupancy and boundary constraints. The grid can make adjacency and exclusion simple to calculate. However, the grid also restricts positions and directions. If only four-neighbor moves are allowed, the cell can move only along grid axes in a single move. Allowing diagonal moves adds directions but does not make the grid rotationally symmetric; the model still has a preferred set of directions.

Worked Example: Converting Lattice Moves to Physical Distances

Consider a square lattice with spacing \(h=25\ \mu\mathrm{m}\). A cell may move to any of the eight Moore-neighbor sites. What physical distances correspond to an orthogonal move and a diagonal move?

For an orthogonal move, the index changes by one unit along one axis, so the distance is \(h\):

$$ d_{\mathrm{orthogonal}}=25\ \mu\mathrm{m}. $$

For a diagonal move, the displacement is \(25\ \mu\mathrm{m}\) in each coordinate direction. By the Euclidean distance formula,

$$ d_{\mathrm{diagonal}}=\sqrt{(25\ \mu\mathrm{m})^2+(25\ \mu\mathrm{m})^2} =25\sqrt{2}\ \mu\mathrm{m} \approx 35.36\ \mu\mathrm{m}. $$

The diagonal move is about \(10.36\ \mu\mathrm{m}\) longer than the orthogonal move. If the model interprets each move as the same elapsed time, the corresponding speeds differ. That may be appropriate if the rule is simply “choose a neighboring site,” but it is not equivalent to fixed-distance movement. A model that requires a specified physical speed must account for the different move lengths or choose another movement representation.

Off-Lattice Positions, Geometry, and Contact

In an off-lattice model, a cell center can take any coordinate within the domain. For a circular-cell approximation in two dimensions, cell \(i\) can be represented by center \(x_i\) and radius \(r_i\). Its distance from cell \(j\) is \(d_{ij}=\|x_i-x_j\|\). The circles touch when \(d_{ij}=r_i+r_j\), and overlap geometrically when \(d_{ij}<r_i+r_j\). A model may define contact at exact touching, or use a specified interaction distance when signaling or adhesion acts before physical boundaries meet.

Positions alone do not prevent overlap. The movement and interaction rules must state how the model handles it. For example, a hard-exclusion rule can prohibit an update that would create overlap; a soft constraint can permit some overlap but apply a restoring displacement or force. These are distinct assumptions, not automatic consequences of using continuous coordinates. Likewise, a circular approximation is not adequate when elongated or irregular cell shape directly determines which cells can touch. More detailed shapes can be represented explicitly, at a greater computational and implementation cost.

Continuous positions allow movement in arbitrary directions and can represent irregular spacing. But they require explicit geometric calculations, including distances to neighboring cells and possibly boundaries. A contact threshold also matters: changing it changes which cell pairs count as interacting, even if their positions are unchanged. When cell shape or interaction radius varies, those quantities should be stated per cell or per interaction rather than hidden in a single unspecified cutoff.

Worked Example: Checking Contact and Correcting an Overlap

Two hypothetical cells are represented by circles. Cell A has center \((10,10)\ \mu\mathrm{m}\) and radius \(7\ \mu\mathrm{m}\); cell B has center \((22,19)\ \mu\mathrm{m}\) and radius \(9\ \mu\mathrm{m}\). Determine whether they overlap. If the model uses an equal, symmetric correction along the line between centers, calculate corrected centers that just remove the overlap.

The center displacement is \((22-10,19-10)=(12,9)\ \mu\mathrm{m}\), so the center distance is

$$ d_{AB}=\sqrt{12^2+9^2}\ \mu\mathrm{m}=15\ \mu\mathrm{m}. $$

The sum of the radii is \(7+9=16\ \mu\mathrm{m}\). Since \(15<16\), the circles overlap by \(16-15=1\ \mu\mathrm{m}\). The unit vector from A to B is \((12/15,9/15)=(0.8,0.6)\). Moving each center half the overlap distance in opposite directions gives a displacement of \(0.5(0.8,0.6)=(0.4,0.3)\ \mu\mathrm{m}\) for each center.

The corrected centers are therefore

$$ x_A'=(10,10)-(0.4,0.3)=(9.6,9.7)\ \mu\mathrm{m}, \qquad x_B'=(22,19)+(0.4,0.3)=(22.4,19.3)\ \mu\mathrm{m}. $$

Their new displacement is \((12.8,9.6)\ \mu\mathrm{m}\), with length \(\sqrt{12.8^2+9.6^2}=16\ \mu\mathrm{m}\), exactly the sum of the radii. This calculation describes one possible geometric correction; it does not establish that such a correction is biologically appropriate. A model may instead reject the proposed move or use a different mechanical rule.

Choosing a Representation for the Question

The representation should preserve the positional features that matter for the intended outputs. A lattice is a natural candidate when the tissue is organized around repeated sites, cell occupancy is well described by site exclusion, and local interactions depend on a chosen neighborhood. It can also be useful when a regular spatial discretization aligns with other model components. The main trade-off is that cell positions, move directions, and contact relationships inherit the grid geometry.

Off-lattice positions are more suitable when cell centers are irregularly distributed, directions of movement should not be restricted to a small set of grid directions, or cell size and shape determine contact. A continuous representation is not automatically more realistic: its realism depends on the geometry and movement rules, and its additional detail may not be identifiable or needed for the question. Both approaches can misrepresent biology if their spatial scale or contact definition is poorly chosen.

Model featureLattice-based representationOff-lattice representation
PositionDiscrete sites separated by grid spacing \(h\)Continuous coordinates within the domain
MovementMoves between permitted sites; direction and distance depend on the gridContinuous displacement; direction is not restricted by grid axes
ContactOften defined by site occupancy or a neighborhood ruleOften defined using cell shape, center distance, or an interaction threshold
CrowdingCan be enforced through site exclusion or specified occupancy limitsRequires an explicit overlap, collision, or packing rule
Typical concernGrid-scale artifacts and directional biasGeometric complexity and dependence on interaction thresholds

Worked Example: Selecting a Framework for Crowded Cells

Suppose a hypothetical two-dimensional tissue patch is \(1000\ \mu\mathrm{m}\) by \(600\ \mu\mathrm{m}\), with 600 cells. Each cell is approximated as a circle of radius \(10\ \mu\mathrm{m}\). The question is whether a lattice or off-lattice representation is more suitable when elongated cell shape and the geometry of cell-cell contact are the main outcomes.

The domain area is \(1000\times600=600{,}000\ \mu\mathrm{m}^2\). The approximate total area of the circular cells is

$$ 600\pi(10\ \mu\mathrm{m})^2 =600\pi(100\ \mu\mathrm{m}^2) \approx188{,}496\ \mu\mathrm{m}^2. $$

The approximate area fraction is \(188{,}496/600{,}000\approx0.3142\), or \(31.42\%\). If a lattice spacing of \(20\ \mu\mathrm{m}\) is used, there are \(1000/20=50\) sites along the first dimension and \(600/20=30\) along the second, for 1500 sites. With one cell per site, 600 cells occupy \(600/1500=0.4000\), or \(40.00\%\), of the sites.

These two fractions are not expected to match: the first uses circular cell areas, while the second is a site-occupancy fraction. More importantly, a one-cell-per-site lattice with \(20\ \mu\mathrm{m}\) spacing cannot directly represent elongation or the detailed boundary between differently shaped cells. Because the stated outcomes depend on those features, an off-lattice model with explicit cell shape is the better starting representation. If the question instead concerned only coarse occupancy patterns and neighborhood counts, a lattice might be adequate and simpler. The choice follows the required outputs, not which fraction appears more plausible.

Diagnostics, Failure Modes, and Limitations

A representation should be checked for artifacts that arise from its geometry rather than from the biological rules. For lattice models, compare results after rotating the initial configuration relative to the grid or changing the grid spacing while keeping the physical domain fixed. Strong changes in directional migration, contact counts, or clustering can indicate grid bias or inadequate spatial resolution. Also verify that the chosen neighborhood matches the intended physical interaction range: with spacing \(h\), orthogonal neighbors are \(h\) apart and diagonal neighbors are \(h\sqrt{2}\) apart.

For off-lattice models, inspect distributions of pairwise distances, overlaps, cell shapes, and distances to boundaries. A large number of unintended overlaps may indicate that the movement rule does not enforce the stated geometry. Conversely, an unexpectedly low contact count may result from an interaction threshold that is too small relative to cell size or the modeled spacing. Check that cell dimensions and interaction distances use consistent physical units, and test whether modest changes in a threshold alter the conclusions.

Neither representation removes the need for a scale argument. A lattice spacing that is too coarse can merge spatial distinctions relevant to contact; an extremely fine grid can increase computational cost without adding supported biological detail. An off-lattice model can represent continuous positions but may still oversimplify cells as circles or use a contact radius that ignores real shape. A useful diagnostic is to ask whether the conclusions of interest persist under reasonable changes to representational choices.

  • Grid bias: If movement or interaction patterns depend on the orientation of a lattice, the grid may be imposing a preferred direction.
  • Ambiguous contact: “Neighboring cells” is not a complete rule. State whether it means adjacent sites, touching shapes, or centers within a specified distance.
  • Unstated exclusion: Continuous positions permit overlap unless the model explicitly prevents or resolves it.
  • False precision: Fine spatial coordinates do not make the model accurate when cell geometry or movement constraints are poorly known.
Key takeaway: Choose the representation that preserves the spatial features needed by the question. Lattices make discrete occupancy and neighborhood rules direct, but impose a grid. Off-lattice models allow continuous positions and explicit geometry, but require clear contact and overlap rules. In either case, state the physical scale and test for artifacts of the representation.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions.

  1. A lattice has spacing \(12\ \mu\mathrm{m}\). What are the lengths of one orthogonal move and one diagonal move?
  2. Two circular cells have radii \(5\ \mu\mathrm{m}\) and \(8\ \mu\mathrm{m}\), with centers \(14\ \mu\mathrm{m}\) apart. Are they touching, separated, or overlapping? By how much?
  3. Why can an eight-neighbor lattice still have directional bias?
  4. A model’s main outcome is the number of occupied sites in a fixed neighborhood. Give one reason a lattice could be appropriate and one diagnostic to perform.
  5. A model uses continuous cell centers but no rule for overlapping cells. What assumption is missing?

Solutions: (1) The orthogonal distance is \(12\ \mu\mathrm{m}\); the diagonal distance is \(12\sqrt{2}\approx16.97\ \mu\mathrm{m}\). (2) The sum of radii is \(5+8=13\ \mu\mathrm{m}\). Since \(14>13\), they are separated by \(1\ \mu\mathrm{m}\); they are not touching or overlapping. (3) The allowed directions remain tied to a finite set of grid directions, and diagonal moves are longer than orthogonal moves. (4) A lattice directly represents site occupancy and local neighborhoods. A useful diagnostic is to rotate the initial configuration or change grid spacing and check whether the relevant occupancy result changes substantially. (5) The model needs an explicit rule for whether overlap is prohibited, allowed, or resolved, such as rejecting a move or applying a correction.

Clinical Biostats