# Comments on Comments: Where Code Review and Documentation Meet

Nikitha Rao<EMAIL_ADDRESS>Carnegie Mellon UniversityUnited States ,
Jason Tsay<EMAIL_ADDRESS>IBM ResearchUnited States ,  Martin Hirzel
<EMAIL_ADDRESS>IBM ResearchUnited States and  Vincent J. Hellendoorn
<EMAIL_ADDRESS>Carnegie Mellon UniversityUnited States

###### Abstract.

A central function of code review is to increase understanding; helping
reviewers understand a code change aids in knowledge transfer and finding
bugs. Comments in code largely serve a similar purpose, helping future readers
understand the program. It is thus natural to study what happens when these
two forms of understanding collide. We ask: what documentation-related
comments do reviewers make and how do they affect understanding of the
contribution? We analyze ca. 700K review comments on 2,000 (Java and Python)
GitHub projects, and propose several filters to identify which comments are
likely to be either in response to a change in documentation and/or call for
such a change. We identify 65K such cases. We next develop a taxonomy of the
reviewer intents behind such “comments on comments”. We find that achieving a
shared understanding of the code is key: reviewer comments most often focused
on clarification, followed by pointing out issues to fix, such as typos and
outdated comments. Curiously, clarifying comments were frequently suggested
(often verbatim) by the reviewer, indicating a desire to persist their
understanding acquired during code review. We conclude with a discussion of
implications of our comments-on-comments dataset for research on improving
code review, including the potential benefits for automating code review.

##  1\. Introduction

Code review is an important mechanism for preventing bugs in software projects
(Kemerer and Paulk, 2009). To do so effectively, reviewers focus heavily on
understanding the code and change made to it (Bacchelli and Bird, 2013).
Natural language communication is a key component here: reviewers use comments
to discuss new ideas and to overcome issues (Tsay et al., 2014), as well as
transfer knowledge, social norms and conventions (Dabbish et al., 2012).

Another form of natural language associated with programming is documentation,
in the form of block or in-line comments in the code. Studies have shown that
these help developers better understand code (Tenny, 1988; Woodfield et al.,
1981). Pascarella _et al._ (Pascarella and Bacchelli, 2017) manually annotated
2,000 Java files to develop a taxonomy of code comment types and found that
‘summary’ and ‘usage’ were the most prominent categories implying that
comments mainly serve as a means for transferring knowledge, especially to
end-user developers. Aghajani _et al._ empirically studied 878 documentation-
related artifacts and found that issues related to the correctness of code
comments, such as insufficient or obsolete content, seemed most common
(Aghajani et al., 2019). A survey confirmed that these issues negatively
affected understanding and made it more challenging to use others’ code
(Aghajani et al., 2020).

Given that code review heavily relies on natural language to facilitate
understanding and that code comments serve much the same purpose, we wonder:
do contributors and project maintainers give consideration to documentation
during code review, and, if so, how does documentation factor into the review?
To the best of our knowledge, no prior work has studied this coalescence of
“comments on comments”; thus, in this work we provide a first, data-driven
exploration at the intersection of these two domains.

Specifically, we commence by quantitatively analyzing how often reviewers pay
attention to changes made, and/or request that changes be made, to
documentation in contributed code. We approach this by mining code review data
from the event streams of 1K popular GitHub repositories in Python and Java
each, with 700K review comments between them. We filtered this data to
identify cases that likely represent documentation-related review comments
(Figure 1). We identify three salient types of comments on comments, ordered
by frequency:

  * (CRC)

A revision includes a change to a code comment (C); the reviewer comments on
it (R), following which the developer updates the code comment again (C).

  * (CRN)

A revision included a change to a code comment (C), the reviewer comments on
it (R), but this does not result in a further change (N).

  * (NRC)

A revision did not change (N) a code comment (only the code was modified),
then following a review comment (R) the developer updates a code comment (C).

We next conduct a qualitative analysis of samples from each of these
categories to derive a taxonomy of _intents_ behind reviewer comments (Figure
2). We find that reviewers frequently ask for clarification related to the
code or comment change, indicating that the initial comment revision (or lack
thereof) inadequately captured the change. Interestingly, they often state the
clarification required, regularly verbatim. This highlights a desire for
reviewers to _ensure that their understanding of the code (change) is
persisted,_ for which in-code documentation is a natural fit.

Figure 1. Breakdown of the data collection process leading to the three
categories of comments-on-comments that we identify (see Section 2.2). Note
that the scaling in the first transition has been altered to better emphasize
the subsequent distributions.

Our findings show that code comments are an important consideration in code
review in open-source projects, and that such comments frequently lead to
improved documentation. Besides advancing our understanding of code review, we
expect these findings to support efforts towards improving and automating code
review, where AI-based models (Tufano et al., 2021) have struggled to capture
the full scope of code comments seen in practice (Hellendoorn et al., 2021).
Incorporating information from (changes to) code comments may help these
models better understand reviewing needs. The CommentsOnComments dataset can
be found here - https://doi.org/10.5281/zenodo.5886145

##  2\. Methodology

We collect our data from events stored on the GitHub
Archive.111https://www.gharchive.org/ We focus on events related to pull
request (PRs) belonging to the 1,000 projects with the most review comments in
Java and Python, archived between January 2017 to November 2020. We split each
pull request into a series of “diff chunks” that modify successive line(s),
resulting in ~3.5 million such diffs (ca. 2M from Java and 1.4M from Python).
Following the process outlined by Hellendoorn _et al._ (Hellendoorn et al.,
2021), we then align each code review comment, which comes with an associated
diff at the time of said comment (as in Figure 3), with one of the diff chunks
in the final PR. This gives us a triple of $\langle$initial change, review
comment, final change$\rangle$. Out of the 3.5M total diff chunks, ca. 700K
were aligned with a review comment in this way.222In fairly rare cases, a diff
chunk may be commented on multiple times.

Figure 2. Taxonomy of review comment intents, based on 80 samples from each of
the three comments-on-comments categories. Ca. 56% of these were indeed code-
comment related discussions, of which more than half related to clarification.

###  2.1. Data Pre-Processing

We next apply a series of filters to identify review comments that are likely
documentation-related – we call these “comments on comments”. Following the
flow in Figure 1, we first identify diff chunks with associated review
comments (~700K), and next subset diffs containing changes to in-line or block
code comments (either before or after the reviewer’s comments, ~370K). We
found that the presence of both types of comments alone is rarely indicative
of a code comment-related review comment (diffs can be quite large), so we
apply two filters to find reviewer comments that are likely to be
documentation-related:

Documentation-related comment. This filter identifies cases where reviewers
explicitly mention documentation. We look for both the following documentation
related keywords: {documentation, docstring, javadoc, comment, todo} and for
review comments containing code suggestions (a commonly used feature on
GitHub, see Figure 3(c)) that involve changes to inline comments (i.e.,
containing one of  //, /*, */ for Java and #, ”””, “‘ for Python). We
constructed the list of keywords based on a manual analysis of random samples
from the aforementioned 370K subset in which we iteratively added keywords
that were used to refer to code comments until no new words appear.  To
elaborate, we started with the keywords “comment” and “documentation”, from
which one annotator used snowballing to construct the final list across 3
iterations with 60 diff chunks each (not included in 240 final samples used in
Section 2.3). The annotator added new keywords that predominantly occurred in
reviewer comments on documentation-related samples identified via the initial
set of keywords. This occasionally yields false positives; e.g., reviewers
sometimes use the keyword ‘comment’ to refer to another/previous review
comments (e.g., ‘Please refer to my previous comment’).

Comment near comment. We expect that a reviewer comment placed ‘near’ a code
comment is likely to relate to it. Due to GitHub’s UI design, which typically
shows three or more lines preceding the line being commented on, reviewer
comments often refer to lines of code placed above them within that window.
Thus, we mark a review comment as ‘near’ a code comment if the latter is
present in that window. This is especially useful in filtering out false
positives in large diff chunks with multiple review comments.

As Figure 1 shows, the first filter yields the most cases (81K). These filters
are also fairly disjoint, yielding 110K samples in their union, thus reducing
the naive alignment by around 70%. While Java had more documentation related
comments, Python had more comments near comments, so both languages contribute
roughly evenly to this filtered set (ca. 60K and 50K respectively).

Evaluation of filters. We compute the recall and precision scores for the
filters used using the labels obtained from the manual annotation performed in
Section 2.3. The documentation-related comments filter has a recall of 79.7%
and precision of 66.7% whereas the comments-near-comments filter has a recall
of 46.7% and a precision of 43.9%. Note that these scores do not impact our
findings in RQ2 and RQ3.

###  2.2. Comments On Comments Dataset

We categorize the resulting documentation-related review comments based on the
preceding and subsequent changes to the corresponding documentation. We
consider three cases: two in which the review comments are likely to be a
response to a change in documentation (CRC & CRN, depending on what happens
next), and one in which it likely called for such a change (NRC). To
elaborate:

CRC \- Changed code comment (C) followed by review comment (R), and then
another change to the code comment (C).

CRN \- Changed code comment (C), then review comment (R), no further changed
code comment (N). The reviewer comment lead to no change at all or the changes
were directed only towards the code.

NRC \- In this case, the initial revision affected some code but not (N) its
nearby comment. The reviewer comment (R) then triggers a further change, this
time involving the nearby code comment (C).

Note that we omit a fourth scenario in which no change was made to a code
comment both before and after a review comment, since we found reviews in such
cases to be rarely related to documentation in a preliminary analysis. As
shown in Figure 1, these categories comprise the majority of the 110K samples
filtered earlier, with the CRC category the most common.

###  2.3. Qualitative Analysis & Taxonomy

Based on a casual inspection of 30 randomly chosen samples from the comments
on comments data (10 per category), we observed that reviewers talked about
documentation in several different ways. To derive a more formal taxonomy of
reviewer intents, we randomly choose 40 samples from each of the three cases
(CRC, CRN and NRC) for both Java and Python and distribute the resulting 240
samples across three annotators. For each datapoint, the annotator was
required to look at both the review comment and the diff chunk before and
after the review comment was placed, and note the following: (i) whether the
review comment was documentation-_relevant_ ; i.e. it directly discussed
documentation and/or triggered a change to documentation, (ii) the high-level
reviewer _intent_ for the review comment, and (iii) any additional notes
capturing finer details or sub-intents.  Additionally, annotators were asked
to make a note of any ambiguous samples. Note that each annotator looked at a
distinct subset due to the lack of ambiguity in this task. For (ii), the goal
was to summarize the purpose of the comment in one or a few words; annotators
were not constrained to a fixed vocabulary, but were given several examples,
such as “clarification” and “fix issue”, based on a preliminary annotation for
reference.  Note that the reference captured common trends seen during the
exploratory analysis. While this reference included several examples of
reviewer comments with different intents, it did not serve as an exhaustive
set of intents for annotators to consider – several categories including “Add
TODO” emerged during annotation. We observed that there was a significant
overlap in the intent categories derived by each annotator, with an exception
of a few rare corner cases.  Less than 3% (7/240) were marked ambiguous; these
were resolved by discussion with all three annotators with 100% negotiated
agreement (2/7 samples were assigned multiple intents). This was followed by a
discussion among the annotators which resulted in a coordinated taxonomy of
intent categories and (for the largest categories) sub-intents. We did not
observe any noticeable differences in the intent categories found for Java and
Python. Figure 2 summarizes the distribution of intents in the annotated data.

##  3\. Results

We seek to answer three research questions using our data set.

RQ1: How often do review comments concern code comments?
We ground our discussion in an analysis of the prevalence and characteristics
of code comment related review comments. First, out of the 700K diffs that
receive review comments, we identify ca. 370K that contain code comments. It
is worth noting that only ca. 29% (~1M out of 3.5M) of the initial set of
diffs (commented on or not) contained documentation, implying that such diffs
are relatively more likely to be commented on (370K/1M = 37% vs. 330K/2.4M =
14%).333This need not be a causal relationship; more complex code may simply
require both more documentation and reviewer attention. Based on the filters
applied in Section 2, we find that 15.8% (110K/700K) of the diffs with
reviewer comments are plausibly being commented on in relation to
documentation. Breaking this down further, 11.6% (81K) of the reviewer
comments explicitly talked about documentation and 5.4% (38K) of the reviewer
comments are near code comments (leaving a 0.8% overlap between these cases).

We further dissected these 110K samples based on the three scenarios described
in Section 2.2. We find that reviewers are much more likely to comment on a
diff chunk when the contributor had already made some change to a code comment
(50.8%) compared to diff chunks that only made changes to the code (15.8%).
Extrapolating from the manual annotation performed in RQ3, we find that our
estimate of 55.8% of samples being documentation-relevant, i.e. the comment
discussed documentation and/or triggered a change to documentation, comes with
a 95% confidence interval of 6.5% using the Clopper-Pearson exact method. This
indicates that between 32,133 and 40,554 of the complete set of samples is
likely to be documentation-relevant.

Finding: Reviewers frequently consider documentation when reviewing code. They
are more likely to comment when contributors updated code comments initially.

RQ2: Do reviewer comments affect the documentation of contributed code?
Within the 65K “comments on comments” cases, where a review comment is either
in response to a change in code comment or a call for such a change, we find
that a review comment in response to a change made to the code comment lead to
the code comment getting updated (CRC) 76.4% (46K/61K) of the time, with less
than a quarter of reviewer comments resulting in no further change to the code
comments (CRN). In comparison, review comments on code changes that previously
did not change a comment only resulted in the code comment getting updated
(NRC) in 26.8% of cases. We also observed that reviewer comments were more
likely to lead to a comment getting updated in Python compared to Java.  More
specifically, following an initial change in documentation and review comment
(CRC vs. CRN), the odds ratio of a further change in documentation in Python
vs. Java is 2.02 ($\pm$0.08, 95% confidence interval). In contrast, the odds
ratio irrespective of an initial documentation change (CRC+NRC vs. CRN) is
1.25 ($\pm$0.05, 95% confidence interval).

Finding: Review comments in response to a code comment change often result in
the code comment getting updated.

RQ3: What are the intents of reviewing documentation?
We next conduct a qualitative analysis of review comments from each category
based on our manual annotation following the protocol described in Section
2.3. This results in the taxonomy of reviewer intents for changes made to code
comments that is visualized in Figure 2. We found that _clarification_ was the
most common goal (70/134 documentation-relevant comments) of a review comment,
where some change needed to be made to the documentation to help understand
the updated code. This type of change was often initiated by the reviewer,
either as a _request_ (28/70) to elaborate on a change, or a (regularly
verbatim) _suggestion_ (34/70) of what to comment to help clarify the new code
for others. Figure 3(a) shows such a case, in which a reviewer encourages the
author to document the need for the added try/catch block by prescribing what
that comment should say. Less commonly, the author would either _respond_
(6/70) with clarification to a comment or code change suggested by the
reviewer or preemptively _initiate_ (2/70) a discussion related to the change.
Figure 3(b) illustrates the latter case, in which an author reviewed their own
code after submission and later added an informative code comment reflecting
the one seen here.

The next-most common intent was _fix issue_ (31/134), where reviewers mostly
asked to _fix typos_ (10/31), update comments that were _inaccurate/ambiguous_
(7/31), remove comments that were _redundant_ (7/31), or update newly-
_outdated_ comments (6/31). We also identified several other, less common
intent categories, including where reviewers asked to make a _style_ related
change (10/134, e.g. adjusting capitalization), or to add either a
_Javadoc/Docstring_ (7/134), a _to-do_ statement (6/134), or a link to the
corresponding GitHub _issue_ (5/134), or requested a _refactoring_ (4/134)
such as moving the comment to a different location. Figure 3(c) shows an
example of both a typo fix and issue link addition being recommended through
GitHub’s “suggested change” option.  We found little difference in intent
distributions between Python and Java. For example, the clarification intent
prevalence was 52.7% in Python and 51.6% in Java; the “fix issue” ratios were
25% and 20% respectively. The largest difference was in the relevance of
samples for the CRN case (67.5% for Python and 35% for Java).

Finding: Most reviewer comments seek some form of clarification to increase or
enshrine their understanding of the change made to the code, followed by
fixing issues in the comments themselves.

(a) NRC + intents: clarification - reviewer suggested
(github.com/elastic/elasticsearch/pull/64744)

(b) CRC + intents: clarification - author initiated
(github.com/getsentry/sentry/pull/17267)

(c) CRC case, intents: fix issue - typo, link issue
(github.com/dask/distributed/pull/3689)

Figure 3. Examples of comments on comments with annotations.

##  4\. Discussion

Our work at the intersection of code review and documentation highlights that
achieving a shared understanding of code is vital in open source project
maintenance. Previous work established that code review is a key mechanism for
transferring knowledge and reviewers spend much of their time on understanding
a contribution (Bacchelli and Bird, 2013) for which they rely on discussions
and during which they impart their knowledge of the project to the contributor
in turn (Dabbish et al., 2012). The results from our analysis suggest that
when reviewers and authors discuss documentation, it is mostly to clarify the
code or documentation changes. We observe that this facilitates understanding
not only for reviewers but also often for contributors.

Code review discussions often explicitly or implicitly involve third party
stakeholders in the “audience” (Tsay et al., 2014). Our results clearly show
that discussing documentation not only helps to achieve a shared understanding
between reviewers and authors, but also benefits the understanding of other,
future readers. For instance, reviewers frequently demonstrated that they
personally understood a change, but also suggested documentation changes to
ensure that future readers would share that understanding. Our dataset is
well-suited towards better understanding the nuances behind this understanding
process by aligning actual changes in code comments to related review
discussions. For example, 74.3% of the clarification discussions mentioned
above resulted in subsequent revisions to the relevant documentation. This
suggests at least some success in achieving a shared understanding of the
code.

Our results also show that reviewers are spending considerable attention and
effort on documentation, as evidenced by their higher response rate when
documentation is updated in a revision and by the many cases of review
comments triggering documentation changes. Given that achieving understanding
of a code contribution is particularly time consuming for reviewers (Bacchelli
and Bird, 2013), and that recent efforts have shown significant challenges in
automating code review using AI (Tufano et al., 2021; Hellendoorn et al.,
2021), our findings may offer a path forward for supporting tool-based
understanding of code changes. Namely, such tools should both earnestly
consider relevant documentation while also expecting it to be often at least
somewhat flawed. And they should perhaps take a cue from real-life reviewers
and learn to ask for (or suggest) clarification. Such dialogue-like agents are
scarce in software engineering practice, but our results hint at the potential
importance of this ability.

#### Threats to Validity

We designed several filters to identify 65K comments that are plausibly
documentation-related. Some of these filters are conservative: the list of
keywords used to identify documentation-related comments was fairly short, so
our analysis may miss some cases. Vice versa, our manual annotation showed
that these filters also include around 44% non-documentation relevant
comments, which may impact the absolute tallies in our quantitative analysis.
Encouragingly, we did not find that any language or comments on comments
category was significantly less likely to be relevant than others, so we
expect our relative trends to hold. Our taxonomy was derived based on an even
sampling of the three types of comments-on-comments, so the distributions of
intents in the taxonomy may not be representative of those in the wild. This
was an intentional decision, as we wanted the taxonomy to cover a broad span
of motivations. While sample sizes are too small to run statistical tests, we
did not notice a strong bias of intents towards certain cases.444We did notice
a slight, and intuitively plausible, preference for clarification comments to
originate from reviewers unprompted by a comment change (NRC) and for “fix
issue” comments to occur in the CRC case. Future work may study this effect in
more detail. Lastly, we limit our study to only changes made to inline
comments (and not block comments unless they have a documentation related
reviewer comment associated with it) for the 3 cases.

##  5\. Conclusion

We present the first data-driven study at the intersection of code review
comments and in-code documentation comments. We find these to be a relatively
common topic of discussion during code reviews among a large number of GitHub
projects, in particular when the initially submitted changeset affected
documentation comments to begin with. Review comments in such locations
frequently spurred further revisions to documentation, most commonly to add
clarifications for the benefit of future readers, highlighting that reviewers
are concerned with persisting their understanding of code changes. Our
quantitative and qualitative analysis highlights the important role of
documentation in the discussion of code contributions. We release our data to
benefit further studies.

## References

  * (1)
  * Aghajani et al. (2020) Emad Aghajani, Csaba Nagy, Mario Linares-Vásquez, Laura Moreno, Gabriele Bavota, Michele Lanza, and David C. Shepherd. 2020.  Software Documentation: The Practitioners’ Perspective. In _2020 IEEE/ACM 42nd International Conference on Software Engineering (ICSE)_. 590–601.
  * Aghajani et al. (2019) Emad Aghajani, Csaba Nagy, Olga Lucero Vega-Márquez, Mario Linares-Vásquez, Laura Moreno, Gabriele Bavota, and Michele Lanza. 2019\.  Software Documentation Issues Unveiled. In _2019 IEEE/ACM 41st International Conference on Software Engineering (ICSE)_. 1199–1210.  https://doi.org/10.1109/ICSE.2019.00122
  * Bacchelli and Bird (2013) Alberto Bacchelli and Christian Bird. 2013.  Expectations, outcomes, and challenges of modern code review. In _2013 35th International Conference on Software Engineering (ICSE)_. IEEE, 712–721.
  * Dabbish et al. (2012) Laura Dabbish, Colleen Stuart, Jason Tsay, and Jim Herbsleb. 2012\.  Social coding in GitHub: transparency and collaboration in an open software repository. In _CSCW_. 1277–1286.
  * Hellendoorn et al. (2021) Vincent J Hellendoorn, Jason Tsay, Manisha Mukherjee, and Martin Hirzel. 2021.  Towards automating code review at scale. In _Proceedings of the 29th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering_. 1479–1482.
  * Kemerer and Paulk (2009) Chris F Kemerer and Mark C Paulk. 2009.  The Impact of Design and Code Reviews on Software Quality: An Empirical Study Based on PSP Data.  _IEEE Transactions on Software Engineering_ 35, 4 (jul 2009), 534–550.
  * Pascarella and Bacchelli (2017) Luca Pascarella and Alberto Bacchelli. 2017.  Classifying Code Comments in Java Open-Source Software Systems. In _2017 IEEE/ACM 14th International Conference on Mining Software Repositories (MSR)_. 227–237.  https://doi.org/10.1109/MSR.2017.63
  * Tenny (1988) T. Tenny. 1988.  Program readability: procedures versus comments.  _IEEE Transactions on Software Engineering_ 14, 9 (1988), 1271–1279.  https://doi.org/10.1109/32.6171
  * Tsay et al. (2014) Jason Tsay, Laura Dabbish, and James Herbsleb. 2014\.  Let’s talk about it: evaluating contributions through discussion in GitHub. In _Proceedings of the 22nd ACM SIGSOFT international symposium on foundations of software engineering_. 144–154.
  * Tufano et al. (2021) Rosalia Tufano, Luca Pascarella, Michele Tufano, Denys Poshyvanyk, and Gabriele Bavota. 2021\.  Towards Automating Code Review Activities. In _ICSE_.
  * Woodfield et al. (1981) Scott N Woodfield, Hubert E Dunsmore, and Vincent Yun Shen. 1981.  The effect of modularization and comments on program comprehension. In _Proceedings of the 5th international conference on Software engineering_. 215–223.


# Direct Imaging of Contacts and Forces in Colloidal Gels

Jun Dong  H.H. Wills Physics Laboratory, Tyndall Ave., Bristol, BS8 1TL, UK
Centre for Nanoscience and Quantum Information, Tyndall Avenue, Bristol BS8
1FD, UK  Bayer AG, Alfred Nobel Str. 50, 40789 Monheim, Germany  Francesco
Turci  H.H. Wills Physics Laboratory, Tyndall Ave., Bristol, BS8 1TL, UK
Centre for Nanoscience and Quantum Information, Tyndall Avenue, Bristol BS8
1FD, UK  Robert L. Jack  Department of Chemistry, University of Cambridge,
Lensfield Road, Cambridge CB2 1EW, United Kingdom  Department of Applied
Mathematics and Theoretical Physics, University of Cambridge, Wilberforce
Road, Cambridge CB3 0WA, United Kingdom  Malcolm A. Faers  Bayer AG, Alfred
Nobel Str. 50, 40789 Monheim, Germany  C. Patrick Royall  Gulliver UMR CNRS
7083, ESPCI Paris, Université PSL, 75005 Paris, France.  School of Chemistry,
Cantock’s Close, University of Bristol, BS8 1TS, UK  Centre for Nanoscience
and Quantum Information, Tyndall Avenue, Bristol BS8 1FD, UK  H.H. Wills
Physics Laboratory, Tyndall Ave., Bristol, BS8 1TL, UK

###### Abstract

Colloidal dispersions are prized as model systems to understand basic
properties of materials, and are central to a wide range of industries from
cosmetics to foods to agrichemicals. Among the key developments in using
colloids to address challenges in condensed matter is to resolve the particle
coordinates in 3D, allowing a level of analysis usually only possible in
computer simulation. However in amorphous materials, relating mechanical
properties to microscopic structure remains problematic. This makes it rather
hard to understand, for example, mechanical failure. Here we address this
challenge by studying the _contacts_ and the _forces_ between particles, as
well as their positions. To do so, we use a colloidal model system (an
emulsion) in which the interparticle forces and local stress can be linked to
the microscopic structure. We demonstrate the potential of our method to
reveal insights into the failure mechanisms of soft amorphous solids by
determining local stress in a colloidal gel. In particular, we identify “force
chains” of load–bearing droplets, and local stress anisotropy, and investigate
their connection with locally rigid packings of the droplets.

##  I Introduction

A longstanding aim for studies of soft solids is to understand the mechanisms
by which they fail or yield, either due to internal stresses or to imposed
shear or other external fields Cipelletti and Ramos (2005); Fielding (2014);
Divoux  _et al._ (2016); Bonn  _et al._ (2017); Nicolas  _et al._ (2018);
Datta  _et al._ (2011). Theoretical approaches can be limited since these
materials are often far–from–equilibrium and their properties depend on the
details of the preparation protocol and mechanical history. This is
problematic because yielding processes are often heterogeneous and in tackling
this challenge it is useful to think of localised irreversible (or plastic)
rearrangement events driven by stress at the microscopic scale Bonn  _et al._
(2017); van der Vaart  _et al._ (2013); Nicolas  _et al._ (2018). On the
micro-scale, the stress is a fluctuating quantity that is intrinsically linked
to the packing of the particles i.e. the local structure. However, on passing
to the macro-scale, the fluctuations in stress are no longer apparent, and the
system obeys a constitutive relation that relates applied forces (stress) and
material response (strain).

An important class of soft solids is colloidal gels Royall  _et al._ (2021),
which are encountered in numerous foods Ubbink (2012), cosmetics, coatings,
crop protection suspensions and pharmaceutical formulations. In addition to
colloidal systems, a wide range of materials also exhibit gelation including
proteins McManus  _et al._ (2016); Cheng  _et al._ (2021) phase-demixing
oxides Bouttes  _et al._ (2014), and metallic glassformers Baumer and
Demkowicz (2013). The spatial inhomogeneity in colloidal gels means that
gravitational stresses can become important, leading the system to collapse
under its own weight Harich  _et al._ (2016). This last effect is an important
determinant of the shelf-life of industrial products such as agri-chemicals.
Among the most challenging aspects of gel collapse is that prior to collapse,
the elastic modulus of the gel _increases_ , so it becomes harder before it
fails Bartlett, Teece, and Faers (2012).

A promising way to address phenomena such as gel failure is to use
particle–resolved studies where the coordinates of individual particles are
tracked Royall  _et al._ (2021); Hunter and Weeks (2012). In soft amorphous
solids such as colloidal glasses, this technique has been used to image local
re–arrangements of colloidal particles which may be precursors to large–scale
failure Schall, Weitz, and Spaepen (2007); Besseling  _et al._ (2007). In
colloidal gels, particle resolved studies have revealed the rich nature of
their local structure Dinsmore and Weitz (2002); Gao and Kilfoil (2007);
Royall  _et al._ (2015); Dibble, Kogan, and Solomon (2006); Whitaker  _et al._
(2019). So far, while investigations of gel failure have related yielding to
local crystallization Smith  _et al._ (2007) and ingenious combinations of
rheological methods and simulation and scattering have revealed the role of
local plasticity van Doorn  _et al._ (2017) and bulk two–point structure Aime,
Ramos, and Cipelletti (2018), direct imaging of particle rearrangements have
largely focussed on colloidal glasses Schall, Weitz, and Spaepen (2007);
Besseling  _et al._ (2007); Royall  _et al._ (2021) rather than gels Lindstrom
_et al._ (2012).

However, rather than imaging of particle coordinates, an alternative route to
understanding gel failure is to consider the local stress, as one expects that
regions of high stress are where failure may occur. Now the local stress is
manifested in the _forces_ between the particles. While using
particle–resolved studies to obtain the coordinates of the particles is useful
Royall  _et al._ (2021); Besseling  _et al._ (2007); Schall, Weitz, and
Spaepen (2007), it is clear that a major development would be some means to
determine the force that each particle is under. This is in principle possible
from measurement of the coordinates and knowledge of the interaction potential
between the particles. While the latter can be estimated to a good
approximation Ivlev, A. and L\”{o}wen, H and Morfill, G. E. and Royall, C. P.
(2012); Royall  _et al._ (2021), the inevitable errors in determination of
particle positions and polydispersity of the particles mean that it is very
hard to convert the distance between two particles into a potential energy or
force. This means that this kind of measurement has hitherto only been
possible in very special circumstances where the force varies slowly as a
function of particle separation and the particles are far apart such that
their positions, relative to the lengthscale over which the force varies can
be very accurately determined Assoud  _et al._ (2009). Thus from coordinate
data only, stress correlations are typically inferred _indirectly_ Hassani
_et al._ (2018). Computer simulations of course also provide access to
coordinate data and to the forces between particles Bouzid  _et al._ (2017).
Often similar data is obtained to that of particle–resolved experiments
Royall, Williams, and Tanaka (2018), particularly if hydrodynamic interactions
are included Furukawa and Tanaka (2010); Royall  _et al._ (2015); de Graaf
_et al._ (2019). However for phenomena pertinent to failure in colloidal gels
Aime, Ramos, and Cipelletti (2018) and particularly delayed collapse Bartlett,
Teece, and Faers (2012), the timescales and system sizes lie beyond those
accessible to particulate simulation.

In granular systems, forces have been characterized for particles with
diameters of at least $10\mu$m Brujić  _et al._ (2003, 2007); Desmond  _et
al._ (2013); Jorjadze  _et al._ (2011); Jorjadze, Pontani, and Brujić (2013)
(and often cm Majmudar and Behringer (2005); Brodu, Dijksman, and Behringer
(2015)) and potential has been demonstrated for a scaled up version of a
popular colloidal model system Suhina  _et al._ (2015). Unlike athermal
granular systems, the thermal motion exhibited by colloids leads to a
multitude of new phenomena, such as the emergence of long–lived networks in
the colloidal gels that we are interested in here. Identifying contacts and
forces in colloidal systems is challenging due to sub-resolution length scales
relevant to obtain forces between colloids. Here we take a first step to
address this challenge, by investigating interparticle contacts and forces in
colloidal gels via high–resolution optical microscopy. We use an emulsion
system with a _solvatochromic_ dye, which is sensitive to the compressive
forces between droplets Brujić  _et al._ (2007). In this way, we obtain force
contacts between droplets, and measures of the local stress. These we
correlate via structural quantities and compare with computer simulation. We
find that droplets in local structures associated with rigidity are more
likely to be under higher pressure.

This paper is organized as follows. In section II, we explain our experimental
protocol to identify contacts between particles, and proceed to describe how
we may determine a local measure of compressive stress and how these are
connected to form force chains. We detail the computer simulation methodology
that we use to validate our experimental results. In our results section III
we compare the experimental results for the number of contacts per droplet and
their coordination, with simulation. We go on to consider the distribution of
compressive forces. We then investigate the length of force chains and compare
these with computer simulation. Finally, we consider correlations between some
of the quantities we have investigated. We discuss our findings in section IV.

Figure 1: Visualising contacts and forces in emulsion gels. (a) Schematic of
distribution and fluorescence of solvatochromic dye two droplets $\alpha$ and
$\beta$ at contact in an emulsion gel. The region shaded in pink
$A_{\alpha\beta}$ is related to the force between droplets $f_{\alpha\beta}$.
(b,c) Separate channels showing droplets (green) and contacts (red). (d)
Combined two–channel image of gel with $\phi_{c}=0.29$ and
$c_{p}/c_{p}^{\mathrm{gel}}=1.50$. (e) Contacts and particle coordinates
identified in a gel. Rendered coordinates with compressive contacts indicated
as pink sticks.

##  II Methods

Figure 2: The interaction potential used in the numerical simulations (Eq. 8)
and taken for the experiments (Eq. 3) evaluated at criticality
($B_{2}^{*}=-3/2$). Here $\beta=1/k_{B}T$.

###  II.1 Emulsion Preparation

Colloidal polydimethylsiloxane (PDMS) emulsion droplets were synthesized
following Elbers et al Elbers  _et al._ (2015). Sodium dodecylbenzenesulfonate
(SDBS) surfactant (2 mM) and potassium chloride salt solution (20 mM) were
added in order to stabilize PDMS emulsions and screen charges on droplet
surfaces, respectively. The solvatochromic dye Nile Red was employed to
fluorescently label PDMS emulsions. Glycerol is then added to obtain a
refractive index matched emulsion with a weight ratio of water to glycerol
around 51% : 49%. The droplets have mean diameter of $d=$3.2$\mu$m, which is
determined from the first peak of the radial distribution function obtained
from particle tracking. The Brownian time to diffuse a diameter

$\tau_{B}=\frac{\pi\eta d^{3}}{8k_{B}T}\approx 19\mathrm{s}$ (1)

where $\eta$ is the solvent viscosity and $k_{B}T$ is the thermal energy.

###  II.2 Colloid-Polymer Mixture Preparation

The non-absorbing polymer utilised to induce depletion attraction is
hydroxyethyl cellulose (Natrosol HEC 250 G Ashland–Aqualon) with molecular
weight $3\times 10^{5}$ g mol-1. Colloid-polymer mixtures are prepared by
adding stock solutions of HEC polymers (10 gl-1) to concentrated emulsions
with volume fractions around random close packing which we take to be
$\phi_{\mathrm{rcp}}\approx 0.64$. All colloid-polymer mixture samples are
observed under confocal microscope at about 16 $\tau_{B}$ after loading the
sample cell. Our system is not density matched between droplets and solvent.
In particular, colloidal systems, including depletion gels, are known to
undergo batch settling (or, here, creaming) such that the local volume
fraction in the bulk of the system is largely unaffected at short times
Russel, Saville, and Schowalter (1989); Royall  _et al._ (2007); Secchi,
Buzzaccaro, and Piazza (2014); Razali  _et al._ (2017). We ensure that we
analyze data from the bulk of the sample where little change in volume
fraction due to sedimentation is observed. Further sample details are listed
in the Appendix.

Figure 3: Local stress measure and force chains. (a) Schematic of
contributions to the stress tensor from contacts $c_{i}$ and forces
$\boldsymbol{f}_{i}$ of neighboring particles $[p_{1},p_{2},p_{3}]$ of the
particle of interest $p_{0}$. (b) Schematic of our definition for force
chains. Brightly colored particles [1,2,3] form part of a force chain.
Particle 5 and 6 are not a member of the force chain because their centers lie
more than $\theta$ away from the principal stress axis of particles 1 and 3
(indicated by the grey arrows). The centre of particle 6 _does_ lie within
$\theta$ of the principal stress axis of particle 3, but its own principal
stress axis lies at an angle greater than $\theta$ from that of particle 3, so
it is not part of the force chain.

###  II.3 Confocal imaging, particle and contact tracking

We used a Leica SP8 confocal microscope with a continuously tuneable white
light laser. We use two–channel imaging with excitations 514 nm and 580 nm
which correspond approximately to the absorption peaks of nile red in a
non–aqueous and aqueous environment respectively. Nile red emits at differing
frequencies in non–aqueous and aqueous environments with peaks of 545 and 645
nm respectively. We exclude particles whose centres are closer than one
diameter to the edge of the image to mitigate boundary effects.

To obtain information on the interdroplet contacts and forces we developed a
method to mitigate the challenges resulting from the limited spatial
resolution of the microscope. Previous work Brujić  _et al._ (2003, 2007)
considered much larger droplets, but here we must contend with the challenge
to optical microscopy posed by rather smaller colloidal droplets. The size of
the contacts and in particular their separation from one another is comparable
to the resolution of the microscope. We proceed by tracking the droplet
coordinates Leocmach and Tanaka (2013) in the _droplet_ images [green channel
in Fig. 1(b)]. Since our system is reasonably monodisperse (polydispersity
$\approx 8$ %), we know that the contacts should be approximately equidistant
between the centers of two neighboring droplets. The set of midpoints between
neighboring droplets thus gives a trial set of candidate force–bearing
contacts. Each of these is populated with a sphere, which we term a blob. From
this we determine the magnitude of the force in the image by comparing with
the number of pixels within this spherical volume and their intensity in the
_contact image_ [red pixels in Fig. 1(c)].

To obtain a measure of the force, we threshold the contact image. The contacts
are identified on the basis of the number of pixels in the contact image that
correspond to the “blobs” which are potential contacts. Our analysis gives a
measure of the relative magnitude of the compressive force at contact points
on each droplet. We compare our results to which are approximately matched to
the experimental system. Further details of our analysis are given in the
Appendix.

###  II.4 Characterization of the droplet interactions

The interaction between emulsion droplets is complex and depends on the local
geometry Lacasse, Grest, and Levin (1996). Here we seek an estimate of the
energy scales involved. Now the surface tension $\gamma=9.2$ mNm-1 Brujić  _et
al._ (2003), which amounts to a energetic cost comparable to the thermal
energy for a _microscopic_ change of surface area of the droplet. Therefore,
in the case of our mesoscopic droplets, we expect deformations to be small.
For such small deformations, we assume that two interacting droplets are
deformed such that the surface in contact between them is a circle and
determine the change in surface area with respect to two undeformed droplets
of the same total volume. To leading order, the interaction energy

$u_{\mathrm{drop}}(r)\approx\frac{\pi}{2}\gamma(d-r)^{2}$ (2)

for $r\leq d$. Here $\beta=1/k_{B}T$. For our parameters, we expect that very
small deformations around 0.1% are sufficient to result in an interaction
energy of many times that of the thermal energy (Fig. 2). Our droplets,
therefore, approximate closely hard spheres Royall, Poon, and Weeks (2013).
Note that some other emulsion systems exhibit rather lower surface tension and
therefore more deformation is found Desmond  _et al._ (2013).

The polymer size is much smaller than that of the droplets, such that our
system is towards the “sticky sphere” limit of short–ranged attraction
strength. We presume that the effective attractions between the droplets are
of the Asakura–Oosawa form,

$\beta u_{\mathrm{AO}}(r)=\begin{cases}\infty&$for $r<d\\\
u_{\mathrm{drop}}(r)+\beta\frac{\pi(2R_{g})^{3}z_{p}^{r}}{6}\frac{(1+q)^{3}}{q^{3}}\left[1-\frac{3r}{2(1+q)d}+\frac{r^{3}}{2(1+q)^{3}d}\right]&$for
$d\leq r<d+(2R_{g})\\\ 0&$for $r\geq d+(2R_{g})\\\ \end{cases}$

Here $q=2R_{g}/d$ is the polymer–colloid size ratio and $z_{p}^{r}$ is the
polymer fugacity in a reservoir in thermodynamic equilibrium with the
colloid–polymer mixture, which we assume to be equal to the polymer number
density in the reservoir, as would be the case for ideal polymers. Here
$R_{g}$ is the radius of gyration of the polymer. We neglect the contributions
from electrostatics due to the Debye screening length which we estimate as 2nm
which is much smaller than the range of the depletion attraction. Furthermore,
using DLVO theory, we arrive at a contact potential due to electrostatic
interactions between two droplets less than $k_{B}T$. To estimate the
interactions between the droplets, we assume that the attractive interaction
remains for small compressions of the droplets $r<d$.

$\beta u_{\mathrm{exp}}(r)=\begin{cases}\beta u_{\mathrm{drop}}(r)+\beta
u_{\mathrm{AO}}(d)&\text{if }r\leq d\\\ \beta u_{\mathrm{AO}}(r)&\text{if
}d\leq r.\end{cases}.$ (3)

The interaction potential is plotted in Fig. 2, where it is seen that the AO
attraction is swiftly overwhelmed by the strong repulsion
$u_{\mathrm{drop}}(r)$.

To proceed, we require the polymer radius of gyration and this we estimate
from the gelation boundary. The phase diagram of our system is given in the
Appendix in Fig. 9 in the polymer reservoir representation Lekkerkerker  _et
al._ (1992). We map our experimental values of the polymer concentration to
the reservoir representation using Widom particle insertion Lekkerkerker  _et
al._ (1992). The polymer reservoir concentration corresponding to gelation
$c_{p}^{\mathrm{r,gel}}$ is then 0.71$\pm 0.1$ $gl^{-1}$. We express the
polymer concentration as a ratio of this value. The polymer radius of gyration
is then fixed by requiring that the reduced second Virial coefficient at the
gelation boundary $B_{2}^{*}=-3/2$ Noro and Frenkel (2000). While this holds
for criticality, in fact for gels undergoing arrested spinodal decomposition
(as is the case for colloid–polymer mixtures Royall  _et al._ (2021)), such
short–ranged attractions lead to a very flat liquid–gas spinodal Royall
(2018); Royall, Williams, and Tanaka (2018), such that the polymer
concentration for gelation varies very little across a wide range of colloid
volume fraction. In this way, we arrive a polymer $R_{g}=21.2$ nm and
polymer–colloid size ratio $q=0.013$. This is close to the value quoted for
HEC 250 G in the literature Zhang  _et al._ (2013). The resulting effective
droplet–droplet interaction potential is shown in Fig. 2. We are interested in
the compressive forces between the droplets. We thus interpret these as
$-d[\beta u_{\mathrm{exp}}(r)]/dr$ for $r\leq d$.

###  II.5 Stress computation

We now outline our method to obtain a measure of the local stress. Consider a
reference particle $\boldsymbol{p}_{0}$, for example with three neighbors
$\boldsymbol{p}_{1}$, $\boldsymbol{p}_{2}$ and $\boldsymbol{p}_{3}$ that touch
through contacts $\boldsymbol{c}_{1}$, $\boldsymbol{c}_{2}$ and
$\boldsymbol{c}_{3}$, as shown in Fig. 3(a). The compressive force from
particle $\boldsymbol{p}_{1}$ is $\boldsymbol{f}^{1}$, with magnitude $f^{1}$,
which is determined from the size of contact $c^{1}$. Our single–particle
stress measurement, $\boldsymbol{\sigma}$ of a particle is calculated by
summing stress contributions from each neighbor on all element axes, indicated
in Eq. 4. Our single particle stress measurement is a 3x3 matrix
$\boldsymbol{\sigma}$ whose elements are denoted by $\sigma_{ij}$, where $i,j$
label Cartesian components. Similarly $\boldsymbol{f}^{c}_{i}$ is the $i$th
Cartesian component of the force on particle $c$:

$\sigma_{ij}=\sum_{c=1}^{n^{c}}\boldsymbol{f}_{i}^{c}\boldsymbol{r}_{j}^{c}$
(4)

where $n^{c}$ is the number of contacts of $\boldsymbol{p}_{0}$. Dividing this
quantity by a suitable volume gives the Cauchy stress tensor, but here
assigning the volume presents a challenge. As Fig. 1 shows, gels are
heterogenous materials. Thus partitioning space according to a Voronoi
decomposition leads to unphysically large separations. On the other hand,
using the droplet volume does not fill space, as the volume fraction
$\phi_{c}<1$. Here, we consider normalized quantities in reduced units where
the mean particle diameter is set to unity. We shall therefore refer to
$\boldsymbol{\sigma}$ as a reduced stress tensor, noting that we apply it at
the single–particle level. For each particle, we obtain $\boldsymbol{\sigma}$
by analogy to the stress tensor, diagonalization generates three eigenvalues
and eigenvectors, which represent principal stresses and principal directions
respectively. After diagonalization,  the sum of all principal stresses

$\mathrm{tr}(\boldsymbol{\sigma})=\sigma_{xx}+\sigma_{yy}+\sigma_{zz}.$ (5)

Note that the quantity $-\mathrm{tr}(\boldsymbol{\sigma})$ is analogous to the
local pressure.

###  II.6 Force chain determination

Here, to identify force chains, we consider a quasilinear assembly of at least
three particles where stress is concentrated Peters  _et al._ (2005). Based on
this definition, a method was developed by Peters et al. Peters  _et al._
(2005), which we illustrate schematically in Fig. 3(b). If the minor principal
stress of a particle is larger than the average compressive stress in the
system, these particles are candidates for force chains. After selecting these
particles with large stresses, we require that the particles with concentrated
stresses should be quasilinear allowing only small amounts of rotation. Given
a reference particle $1$, from its centre, we define a region that deviates of
an angle of $\pm\theta$ from the direction of the stress
$\boldsymbol{\sigma}_{A}$. Here, we set $\theta=\pi/4$, we also require that
the direction of symmetry on the second particle to be within $\theta$.

Figure 4: Renderings of quantities of interest with each denoted underneath.
(a) Number of contacts per particle. Maximum value (yellow)
$n_{c}^{\mathrm{max}}=6$. (b) Local anisotropy of the reduced stress tensor
Maximum value (yellow) 0.5. (c) Negative trace of the reduced stress tensor.
Maximum value (yellow) $-\mathrm{tr}(\boldsymbol{\sigma})^{\mathrm{max}}=2.0$.
(d) Number of tetrahedra a particle participates in. Maximum value (yellow)
$n_{\mathrm{tet}}^{\mathrm{max}}=10$. (e) Number of particles in force chains.
Particles in force chains of $l=3$ or less are rendered small and grey.
Maximum value (yellow) $l^{\mathrm{max}}=10$. (f-j) Same data as (a-e), but a
slice of thickness around one diameter $d$ is rendered instead, except (j)
where a slice of thickness around $4d$ is rendered. All renderings are for
experimental data with

$c_{p}^{\mathrm{r}}/c_{p}^{\mathrm{r,gel}}=1.5.$

###  II.7 Computer Simulation

As noted above, to verify and calibrate our experimental data, we perform
Brownian dynamics computer simulations. We use point particles interacting via
a spherically-symmetric potential with Hertzian repulsive forces and a short-
ranged attractive term, which we shift and truncate at a range
$r_{\mathrm{cut}}$. The repulsive Hertzian contribution to the potential is

$\beta u_{R}(r)=\beta A(1-r/d)^{5/2},$ (6)

while the attractive term is

$\beta
u_{A}(r)=\dfrac{\beta\varepsilon}{2}\tanh\left(\dfrac{r/d-1}{\delta}\right)$
(7)

so that the full potential is

$\beta u_{\mathrm{sim}}(r)=\begin{cases}\beta u_{R}(r)+\beta u_{A}(r)&\\\
-\beta u_{A}(r_{\mathrm{cut}})&\text{if $r<d$}\\\ \beta u_{A}(r)-\beta
u_{A}(r_{\mathrm{cut}})&\text{if $d<r<r_{\mathrm{cut}}$}\end{cases}$ (8)

The resulting $u_{\mathrm{sim}}(r)$ is plotted in Fig. 2.

To accurately model the short ranged, highly repulsive interaction between the
droplets of the experiment, is highly challenging for conventional computer
simulations. While novel methods have been developed for Monte Carlo
simulations Miller and Frenkel (2003), here we are interested in dynamical
behavior. We therefore set $\beta A=1000,\delta=0.02$ and
$r_{\mathrm{cut}}=1.3d$ which results in a very short range attraction with a
soft core, see Fig. 2. The interaction strength $\varepsilon$ and the number
density of the system $\rho$ characterize the state points. Using the
Barker–Henderson effective hard sphere diameter

$d_{\mathrm{eff}}=\int_{0}^{\infty}dr[1-e^{-\beta u_{R}(r)}],$ (9)

we map number densities to effective volume fractions $\phi_{\mathrm{eff}}=\pi
d_{\mathrm{eff}}^{3}\rho/6$. We presume that the effective volume fraction
corresponds to the absolute droplet volume fraction in the experiments.

Simulations are performed in the isothermal-isochoric ensemble (NVT) solving
the Langevin dynamics

$m\dot{v}_{i}=-\nabla_{i}u-\gamma{v}_{i}+\sqrt{2\gamma/\beta}{\xi}_{i}$ (10)

for particles of equal mass $m$ in the presence of a zero-mean, unit-variance
random force $\xi$. To this purpose, we employ a suitably modified version of
the LAMMPS molecular dynamics package.

We use a velocity–Verlet integrator with timestep $dt=0.001\tau_{0}$ with
$\tau_{0}=\sqrt{m\beta}d$. Fluctuations of the temperature are allowed to damp
on a relatively short timescale of $\tau_{d}=100dt=0.1\sqrt{m\beta}d$, a setup
for which results are similar to the overdamped limit Razali  _et al._ (2017).
This timescale also sets the Brownian time $\tau_{B}=\gamma
d^{2}/24k_{B}T=\tau_{0}^{2}/24\tau_{d}$, which allows us to compare the
numerical results with the experiments via Eq. 1.

As non–equilibrium systems, gels coarsen over time Royall  _et al._ (2021);
Manley  _et al._ (2005). Now there is a significant difference in this
coarsening process between experiments and Brownian dynamics simulations, due
to hydrodynamic interactions in the former which are not fully accounted for
in the latter Furukawa and Tanaka (2010); Royall  _et al._ (2015); Varga and
Swan (2016); de Graaf  _et al._ (2019). Therefore, even if a precise matching
of timescales were to be carried out, in fact one would still expect
considerable differences between experiment and simulation, as has been found
previously Royall  _et al._ (2015). For our purposes, then, we select a point
in the time–evolution of the simulations of $12\tau_{B}$, in which we find
that a number of time–dependent properties are comparable to those in the
experiments (see section III). We set the volume fraction
$\phi_{\mathrm{eff}}=0.2$, and to compare the interaction strength with the
experiments, we scale by the value corresponding to gelation
$\varepsilon^{\mathrm{gel}}$. Following the experiments, we set
$\varepsilon^{\mathrm{gel}}$ as that at which the reduced second virial
coefficient $B_{2}^{*}=-3/2$ Noro and Frenkel (2000); Royall, Williams, and
Tanaka (2018). Given that the interaction potential in the simulations is also
rather softer than that of the experiments, we regard comparison between our
two approaches to be semi–quantitatively, rather than the simulations being an
accurate reproduction of the experiments.

##  III Results

We organize our results section as follows. We begin by discussing the
structural properties, the number of neighbors and the contacts. We then move
on to consider the forces between droplets inferred from the contacts, leading
to quantities such as the reduced stress tensor. We then consider force
chains. Throughout, we compare our experimental results with those from
computer simulation.

Figure 5: Local coordination and contacts. Distribution of of number of
nearest neighbors within the first coordination shell $Z$ in experiments (a)
and simulations (c). Number of contacts $n_{c}$ in experiments (b) and
simulations (d). The experimental data is shown at various
$c_{p}/c_{p}^{\mathrm{r,gel}}$ and simulation at
$\varepsilon/\varepsilon^{\mathrm{gel}}$. The line colors in (a,b) and (c,d)
are common and are used throughout the remainder of this article.

###  III.1 Neighbors and Contacts

We consider, schematically, the imaging methodology and method for
interparticle force extraction in Fig. 1(a). Representative data of each
fluorescent channel is shown in Figs. 1(b, c), and their combination in 1(d).
We render the droplets actual size and, following the identification of
contact analysis outlined in section II.3 and described in more detail in the
Appendix, the contacts as pink sticks in Fig. 1(e). This constitutes our basic
data. Having demonstrated the principles of our method, we consider quantities
of interest.

We proceed to show renderings of properties of particular interest in Fig. 4
for a polymer concentration of $c_{p}/c_{p}^{\mathrm{r,gel}}=1.5$. Other gel
state points appear similar. We show the number of contacts for each particle
$n_{c}$, which appears to be rather heterogeneous throughout the system.
Before considering the other quantities, we move to a quantitative discussion
of the coordination and the number of contacts around Fig. 5.

In Fig. 5(a), we show the distribution of the number of neighbours, $Z$, which
are defined as being closer than $1.2d$, which is close to the first minimum
of the radial distribution function $g(r)$. The number of neighbors requires
knowledge of only the droplet coordinates and thus comparison can be made to
other work with particle–resolved studies, and indeed similar behavior can be
found, e.g. in Fig. 2 of ref. Ohtsuka, Royall, and Tanaka (2008). The number
of contacts $n_{c}$ for the same data points is shown in Fig. 5(b). This has a
smaller value to the number of neighbors. The distributions of neighbors and
contacts in our simulations show very similar behavior, as shown in Fig.
5(c,d). In the simulations, the $\varepsilon/\varepsilon^{\mathrm{gel}}=1.3$
state point has fewer neighbors and contacts than the others we have shown.
However, it is worth nothing that this is rather closer to the gelation
boundary than the others (the next closest being the experimental state point
at $c_{p}/c_{p}^{\mathrm{r,gel}}=1.5$), which could account for the
difference.

###  III.2 Forces

We can estimate the relative compressive forces on each droplet. At the level
of our analysis, we determine the number of pixels in the contact image within
a “blob” (see Appendix and Fig. 11). We take the sum of these contact pixels
as a measure of the contact volume $v_{c}$, which we plot in Fig. 6. For
granular systems, the force has been identified with the contact area Brujić
_et al._ (2003); Jorjadze, Pontani, and Brujić (2013), which should scale as
$v_{c}^{2/3}$. We therefore plot the distribution of $v_{c}^{2/3}$ in Fig.
6(b). This is much sharper than the distribution of volumes. In our
simulations, we have direct access to the compressive forces, and these we
plot in Fig. 6(c). The distribution from the simulations is rather broader.
Indeed, except for the smallest forces, the experimental data is roughly
compatible with a Gaussian distribution. However there is some evidence in the
simulations for an exponential decay [black line in Fig. 6(c)]. As noted
above, although the time–evolution in the experiments and simulations differs,
the structural quantities in Fig. 5 are rather similar across the two systems.
Therefore, it is possible that the difference in the interaction potential
between the two (Fig. 2) may underlie the difference between the force
distributions that we obtain. Since the measured contact volumes also depend
on the particle dynamics and the imaging process, it is likely that they do
not respond to very fast force fluctuations. This would mean that the force
inferred from the contact size corresponds to a time-averaged version of the
interparticle force. The time-averaging will act to suppress force
fluctuations. This suppression is absent from simulations, where the
(instantaneous) microscopic force is measured directly.

A further possibility is that the contacts in the experiments are imaged over
a certain period, which in fact corresponds to several $\tau_{B}$ per particle
(imaged in the $z$ direction, $xy$ planes are acquired rather more quickly).
Therefore, there is some averaging of the experimental data, which is absent
from that shown in the simulations which correspond to a single snapshot.

Figure 6: Distribution of forces. Comparison between experiments and
simulations for the distributions of contact volumes $v_{c}$ (a) and
$v_{c}^{2/3}$ (b) for the experiments and repulsive forces for the simulations
(c) Here the angle brackets denote the mean of the distribution. The
experimental data is shown at various $c_{p}/c_{p}^{\mathrm{r,gel}}$ and
simulation at $\varepsilon/\varepsilon^{\mathrm{gel}}$. Dashed grey lines are
Gaussian plots, and the black dashed line in (c) $\sim\exp(-1.7\langle
f\rangle)$.

Identification of the forces associated with each contact allows us to
investigate the reduced stress tensor $\boldsymbol{\sigma}$, Eq. 4. In Fig.
4(b), we show the _local anisotropy_ , which is the difference between largest
and smallest eigenvalues of $\boldsymbol{\sigma}$. Although it may appear from
visual inspection that this quantity has some spatial correlation, we have
investigated such correlations and find that these are indistinguishable from
the (short–ranged) density correlations expressed via the radial distribution
function. We then plot the negative trace of the reduced stress tensor
$-\mathrm{tr}(\boldsymbol{\sigma})$ which is analogous to the local pressure
in Fig. 4(c). Like the number of contacts [Fig. 4(a)], this is rather
heterogeneous. The trace is correlated with the number of neighbors, with
higher pressure corresponding to a larger number neighbors [Fig. 7(a)]. Here
the Pearson correlation coefficient is 0.709.

Colloidal gels have been subjected to structural analysis, in particular
clusters which are local energy minima have been identified with rigidity
Royall  _et al._ (2008, 2021). Now the local structure changes over time,
leading to larger and more complex local structure Royall and Malins (2012);
Royall, Williams, and Tanaka (2018), and at early stages like the gels of
interest here the dominant local structure is the tetrahedron Royall  _et al._
(2015). It is possible to classify the particles according to the _number_ of
local structures in which they participate, which can reveal the degree of
local ordering Dunleavy  _et al._ (2015); Hallett, Turci, and Royall (2020).
Here therefore, we count the number of tetrahedra in which each particle
participates, as shown by the rendering in Fig. 4(d). Visual inspection
suggests that there is some correlation between the number of tetrahedra the
particles participate in, and the trace $-\mathrm{tr}(\boldsymbol{\sigma})$
[Fig. 4(c).]. This is indeed the case [Fig. 7(b)] with the correlation
coefficient being 0.455.

###  III.3 Force Chains

We implement the measurement of force chains outlined in section II.6. In this
way, we obtain the distribution of force chain lengths $P(l)$ in our system.
We note that there is no reason _a priori_ to expect that these would span the
system, as is the case for granular materials in compression Majmudar and
Behringer (2005). In fact the majority of particles are found in force chains
of a single particle. Longer force chains are rendered in Fig. 4(e). When we
plot the distribution of force chain lengths $l$ in Fig. 8, we find that in
both simulation and experiment, that the effect of interaction strength is
weak. The force chains in experiment are rather longer. Our data are
compatible with an exponential distribution, with a decay length of $3$ and
$3/4$ in experiment and simulation respectively.

Note that here we may cut some force chains at the image boundaries. Although
we neglect contributions closer than a diameter $d$ to the boundary, it is
hard to remove possibly boundary effects from the force chain distribution for
images or the size that we acquire here. However, we may observe that in Fig.
4(e), the force chains are rather smaller than the imaging volume and thus we
expect any boundary effects to be reasonably small, and in any case, these
will tend to reduce the apparent chain length, so such boundary effects are
unlikely to be the cause of the difference between the experiments and
simulation that we see. Given that hydrodynamic interactions are associated
with more linear structures Furukawa and Tanaka (2010); Royall  _et al._
(2015); de Graaf  _et al._ (2019), it is tempting to suppose that these are
part of the reason for the longer chains that we find in the experiments.

Figure 7: Correlations between some quantities of interest. (a) Heat map of
the number of neighbors $Z$ and negative trace
$-\mathrm{tr}(\boldsymbol{\sigma})$. (b) Heat map of
$-\mathrm{tr}(\boldsymbol{\sigma})$ and the number of particles participating
in tetrahedra $n_{\mathrm{tet}}$. Data are shown for an experimental system
with $c_{p}^{\mathrm{r}}/c_{p}^{\mathrm{r,gel}}=1.5.$ Figure 8: Force chain
length. Distribution of force chain lengths for experiment and simulation.
State points are indicated for experiment as $c_{p}/c_{p}^{\mathrm{gel}}$ and
simulation as $\varepsilon/\varepsilon^{\mathrm{gel}}$. Dashed grey and black
lines exponentials with decay lengths indicated.

##  IV Discussion and Conclusions

We have characterized the interparticle contacts in a colloidal gel of
emulsion droplets. We have further investigated compressive forces between
droplets related to these contacts, and have semi–quantitatively benchmarked
our results against computer simulation. We have fewer contacts and particles
with large numbers of contacts are not strongly correlated in space.

Turning towards the forces, these we infer from the number of pixels in the
blobs in the contact image which measures the spatial distribution of
solvatochromic dye. The change in droplet surface area due to deformation of
the mesoscopic emulsion droplets incurs a high energetic cost, as the surface
tension is of the order of the thermal energy for a microscopic (molecular)
change in surface area. Under the depletion forces due to the polymer, we
therefore expect very weak deformation of the droplets. We believe that the
contact volume inferred from the images of the solvatochromic dye is larger
than the true contact area. Further investigations in this direction are
clearly desirable, perhaps using systems with lower surface tension whose
droplets would be deformed rather more Desmond  _et al._ (2013). Nevertheless,
the normalized force distributions that we obtain are comparable to our
simulations. The somewhat broader distribution in the simulations might be
related to the softer interaction potential that we have used. This width
could be (somewhat) narrowed towards that assumed for the experiments to
investigate if this is the cause of the difference.

We have obtained a measure for the local pressure from the reduced stress.
Like the number of contacts, this is not strongly correlated in space.
However, it is quite well correlated with the number of neighbors and also
with the local structure, as expressed by the number of tetrahedra that a
droplet participates in.

The force chains that we find in this thermal system are rather shorter than
those encountered in granular systems with repulsive interactions Majmudar and
Behringer (2005). Again, we encounter similar behavior in simulation, although
the force chains are somewhat longer in our experiments, which may be related
to hydrodynamic interactions in the latter which are largely neglected in the
former. The effect of HI would thus be interesting to probe in the future.
While granular systems with attractive interactions have been investigated,
there the focus lay more towards the contacts Jorjadze  _et al._ (2011). Given
the much higher volume fraction investigated in that work, direct comparison
is hard, not to mention the differences between the thermal and athermal
nature of the systems. It would nevertheless be most attractive to explore the
force chain distribution in attractive jammed materials, such as granular gels
Li  _et al._ (2014). Granular systems with repulsive interactions are by their
nature found at high volume fraction, and force chains typically percolate to
form force networks. Nevertheless, there is some evidence for an exponential
distribution in community sizes Bassett  _et al._ (2015) in force networks,
the same scaling as we find the much shorter linear chains.

Thus we present a colloidal version of a model system for characterizing
contacts and interdroplet forces. By considering perturbation such as shear,
this system may be used to obtain a knowledge of local stress that may prove
useful in understanding failure in soft solids such as colloidal glasses and
gels.

Acknowledgements

We thank Paul Bartlett, Jasna Brujić and Jens Eggers for helpful discussions
and Yushi Yang his valiant assistance with the TCC analysis. CPR acknowledges
the Royal Society for support, JD, FT and CPR acknowledge European Research
Council (ERC Consolidator Grant NANOPRS for support, project number 617266).
JD acknowledges Bayer AG for support.  RLJ and CPR acknowledge EPSRC for
support via EP/T031247/1. EPSRC grant code EP/ H022333/1 is acknowledged for
provision of the confocal microscope used in this work.

## References

  * Cipelletti and Ramos (2005) L. Cipelletti and L. Ramos, “Slow dynamics in glassy soft matter,” J. Phys.: Condens. Matter 17, R253–R285 (2005).
  * Fielding (2014) S. M. Fielding, “Shear banding in soft glassy materials,” Rep. Prog. Phys. 77, 102601 (2014).
  * Divoux  _et al._ (2016) T. Divoux, M. A. Fardin, S. Manneville, and S. Lerouge, “Shear banding of complex fluids,” Ann. Rev. Fluid Mech. 48, 81–103 (2016).
  * Bonn  _et al._ (2017) D. Bonn, M. M. Denn, L. Berthier, T. Divoux, and S. Manneville, “Yield stress materials in soft condensed matter,” Rev. Mod. Phys. 89, 035005 (2017).
  * Nicolas  _et al._ (2018) A. Nicolas, E. E. Ferrero, K. Martens, and J.-L. Barrat, “Deformation and flow of amorphous solids: Insights from elastoplastic models,” Rev. Mod. Phys. 90, 045006 (2018).
  * Datta  _et al._ (2011) S. S. Datta, D. D. Gerrard, T. S. Rhodes, T. G. Mason, and D. A. Weitz, “Rheology of attractive emulsions,” Phys. Rev. E 84, 041404 (2011).
  * van der Vaart  _et al._ (2013) K. van der Vaart, Y. Rahmani, R. Zargar, Z. Hu, D. Bonn, and P. Schall, “Rheology of concentrated soft and hard-sphere suspensions,” Journal of Rheology 57, 1195–1209 (2013).
  * Royall  _et al._ (2021) C. P. Royall, M. A. Faers, S. Fussell, and J. Hallett, “Real space analysis of colloidal gels: Triumphs, challenges and future directions,” J. Phys.: Condens. Matter 33, 453002 (2021).
  * Ubbink (2012) J. Ubbink, “Soft matter approaches to structured foods: From “cook-and-look” to rational food design?” Faraday Discuss. 158, 9 (2012).
  * McManus  _et al._ (2016) J. J. McManus, P. Charbonneau, E. Zaccarelli, and N. Asherie, “The physics of protein self-assembly,” Current Opinion in Colloid & Interface Science 22, 73–79 (2016).
  * Cheng  _et al._ (2021) R. Cheng, I. Rios de Anda, T. W. C. Taylor, M. A. Faers, J. L. R. Anderson, A. M. Seddon, and C. P. Royall, “Protein–polymer mixtures in the colloid limit: Aggregation, sedimentation,” J. Chem. Phys. 155, 114901 (2021).
  * Bouttes  _et al._ (2014) D. Bouttes, E. Gouillart, E. Boller, D. Dalmas, and D. Vandembroucq, “Fragmentation and Limits to Dynamical Scaling in Viscous Coarsening: An Interrupted _in situ_ X-Ray Tomographic Study,” Phys. Rev. Lett. 112, 245701 (2014).
  * Baumer and Demkowicz (2013) R. E. Baumer and M. J. Demkowicz, “Glass Transition by Gelation in a Phase Separating Binary Alloy,” Phys. Rev. Lett. 110, 145502 (2013).
  * Harich  _et al._ (2016) R. Harich, T. W. Blythe, M. Hermes, E. Zaccarelli, L. F. Sederman, A. J. Gladden, and W. C. K. Poon, “Gravitational collapse of depletion-induced colloidal gels,” Soft Matter 12, 4300–4308 (2016).
  * Bartlett, Teece, and Faers (2012) P. Bartlett, L. J. Teece, and M. A. Faers, “Sudden collapse of a colloidal gel,” Phys. Rev. E 85, 021404 (2012).
  * Hunter and Weeks (2012) G. L. Hunter and E. R. Weeks, “The physics of the colloidal glass transition,” Rep. Prog. Phys. 75, 066501 (2012).
  * Schall, Weitz, and Spaepen (2007) P. Schall, D. A. Weitz, and F. Spaepen, “Structural Rearrangements That Govern Flow in Colloidal Glasses,” Science 318, 1895–1899 (2007).
  * Besseling  _et al._ (2007) R. Besseling, E. R. Weeks, A. B. Schofield, and W. C. K. Poon, “Three-Dimensional Imaging of Colloidal Glasses under Steady Shear,” Phys. Rev. Lett. 99, 028301 (2007).
  * Dinsmore and Weitz (2002) A. D. Dinsmore and D. A. Weitz, “Direct imaging of three-dimensional structure and topology of colloidal gels,” J. Phys.: Condens. Matter 14, 7581–7597 (2002).
  * Gao and Kilfoil (2007) Y. Gao and M. L. Kilfoil, “Direct Imaging of Dynamical Heterogeneities near the Colloid-Gel Transition,” Phys. Rev. Lett. 99, 078301 (2007).
  * Royall  _et al._ (2015) C. P. Royall, J. Eggers, A. Furukawa, and H. Tanaka, “Probing Colloidal Gels at Multiple Length Scales: The Role of Hydrodynamics,” Phys. Rev. Lett. 114, 258302 (2015).
  * Dibble, Kogan, and Solomon (2006) C. J. Dibble, M. Kogan, and M. J. Solomon, “Structure and dynamics of colloidal depletion gels: Coincidence of transitions and heterogeneity,” Phys. Rev. E. 74, 041403 (2006).
  * Whitaker  _et al._ (2019) K. A. Whitaker, Z. Varga, L. C. Hsiao, M. J. Solomon, J. W. Swan, and E. Furst, “Colloidal gel elasticity arises from the packing of locally glassy clusters,” Nature Comm. 10, 2237 (2019).
  * Smith  _et al._ (2007) P. A. Smith, G. Petekidis, S. U. Egelhaaf, and W. C. K. Poon, “Yielding and crystallization of colloidal gels under oscillatory shear,” Phys. Rev. E 76, 041402 (2007).
  * van Doorn  _et al._ (2017) J. M. van Doorn, J. Bronkhorst, R. Higler, T. van de Laar, and J. Sprakel, “Linking Particle Dynamics to Local Connectivity in Colloidal Gels,” Phys. Rev. Lett. 118, 188001 (2017).
  * Aime, Ramos, and Cipelletti (2018) S. Aime, L. Ramos, and L. Cipelletti, “Microscopic dynamics and failure precursors of a gel under mechanical load,” PNAS 115, 3587–3592 (2018).
  * Lindstrom  _et al._ (2012) S. B. Lindstrom, T. E. Kodger, J. Sprakel, and D. A. Weitz, “Structures, stresses, and fluctuations in the delayed failure of colloidal gels,” Soft Matter 8, 3657–3664 (2012).
  * Ivlev, A. and L\”{o}wen, H and Morfill, G. E. and Royall, C. P. (2012) Ivlev, A. and Löwen, H and Morfill, G. E. and Royall, C. P.,  _Complex Plasmas and Colloidal Dispersions: Particle-Resolved Studies of Classical Liquids and Solids_ (World Scientific Publishing Co., Singapore Scientific, Singapore, 2012).
  * Assoud  _et al._ (2009) L. Assoud, F. Ebert, P. Keim, R. Messina, G. Maret, and H. Löwen, “Ultrafast Quenching of Binary Colloidal Suspensions in an External Magnetic Field,” Phys. Rev. Lett. 102, 238301 (2009).
  * Hassani  _et al._ (2018) M. Hassani, E. M. Zirdehi, K. Kok, P. Schall, M. Fuchs, and F. Varnik, “Long-range strain correlations in 3D quiescent glass forming liquids,” EPL 124, 18003 (2018).
  * Bouzid  _et al._ (2017) M. Bouzid, J. Colombo, L. Vieira Barbosa, and E. Del Gado, “Elastically driven intermittent microscopic dynamics in soft solids,” Nature Comm. 8, 15846 (2017).
  * Royall, Williams, and Tanaka (2018) C. P. Royall, S. R. Williams, and H. Tanaka, “Vitrification and gelation in sticky spheres,” J. Chem. Phys. 148, 044501 (2018).
  * Furukawa and Tanaka (2010) A. Furukawa and H. Tanaka, “Key role of hydrodynamic interactions in colloidal gelation,” Phys. Rev. Lett. 104, 245702 (2010).
  * de Graaf  _et al._ (2019) J. de Graaf, W. C. K. Poon, M. J. Haughey, and M. Hermes, “Hydrodynamics strongly affect the dynamics of colloidal gelation but not gel structure,” Soft Matter 15, 10–16 (2019).
  * Brujić  _et al._ (2003) J. Brujić, S. F. Edwards, D. V. Grinev, I. Hopkinson, D. Brujić, and H. A. Makse, “3D bulk measurements of the force distribution in a compressed emulsion system,” Faraday Disc. 123, 207–220 (2003).
  * Brujić  _et al._ (2007) J. Brujić, C. Song, P. Wang, C. Briscoe, G. Marty, and H. A. Makse, “Measuring the Coordination Number and Entropy of a 3D Jammed Emulsion Packing by Confocal Microscopy,” Phys. Rev. Lett. 98, 248001 (2007).
  * Desmond  _et al._ (2013) K. W. Desmond, P. J. Young, D. Chen, and E. R. Weeks, “Experimental study of forces between quasi-two-dimensional emulsion droplets near jamming,” Soft Matter 9, 3424 (2013).
  * Jorjadze  _et al._ (2011) I. Jorjadze, L.-L. Pontani, K. A. Newhall, and J. Brujić, “Attractive emulsion droplets probe the phase diagram of jammed granular matter,” Proc. Nat. Acad. Sci. 108, 4286–4291 (2011).
  * Jorjadze, Pontani, and Brujić (2013) I. Jorjadze, L.-L. Pontani, and J. Brujić, “Microscopic approach to the nonlinear elasticity of compressed emulsions,” Phys. Rev. Lett. 110, 0483 (2013).
  * Majmudar and Behringer (2005) T. S. Majmudar and R. P. Behringer, “Contact force measurements and stress-induced anisotropy in granular materials,” Nature 435, 1079–1082 (2005).
  * Brodu, Dijksman, and Behringer (2015) N. Brodu, J. A. Dijksman, and R. P. Behringer, “Spanning the scales of granular materials through microscopic force imaging,” Nature Comm. 6, 6361 (2015).
  * Suhina  _et al._ (2015) T. Suhina, B. Weber, C. E. Carpentier, K. Lorincz, P. Schall, D. Bonn, and A. M. Brouwer, “Fluorescence microscopy visualization of contacts between objects,” Angew. Chem. Int. Ed. 127, 3759–3762 (2015).
  * Elbers  _et al._ (2015) N. A. Elbers, J. Jose, A. Imhof, and A. van Blaaderen, “Bulk Scale Synthesis of Monodisperse PDMS Droplets above 3 $M$m and Their Encapsulation by Elastic Shells,” Chem. Mater. 27, 1709–1719 (2015).
  * Russel, Saville, and Schowalter (1989) W. Russel, D. Saville, and W. Schowalter,  _Colloidal Dispersions_ (Cambridge Univ. Press, Cambridge,, 1989).
  * Royall  _et al._ (2007) C. P. Royall, J. Dzubiella, M. Schmidt, and A. van Blaaderen, “Nonequilibrium sedimentation of colloids on the particle scale,” Phys. Rev. Lett. 98, 188304 (2007).
  * Secchi, Buzzaccaro, and Piazza (2014) E. Secchi, S. Buzzaccaro, and R. Piazza, “Time-evolution scenarios for short-range depletion gels subjected to the gravitational stress,” Soft Matter 10, 5296–5310 (2014).
  * Razali  _et al._ (2017) A. Razali, C. J. Fullerton, F. Turci, J. Hallett, R. L. Jack, and C. P. Royall, “Effects of vertical confinement on gelation and sedimentation of colloids,” Soft Matter 13, 3230 (2017).
  * Leocmach and Tanaka (2013) M. Leocmach and H. Tanaka, “A novel particle tracking method with individual particle size measurement and its application to ordering in glassy hard sphere colloids,” Soft Matter 9, 1447–1457 (2013).
  * Lacasse, Grest, and Levin (1996) M.-D. Lacasse, G. S. Grest, and D. Levin, “Deformation of small compressed droplets,” Phys. Rev. E 54, 5436–5446 (1996).
  * Royall, Poon, and Weeks (2013) C. P. Royall, W. C. K. Poon, and E. R. Weeks, “In search of colloidal hard spheres,” Soft Matter 9, 17–27 (2013).
  * Lekkerkerker  _et al._ (1992) H. N. W. Lekkerkerker, W. C. K. Poon, P. N. Pusey, A. Stroobants, and P. B. Warren, “Phase-behavior of colloid plus polymer mixtures,” Europhys. Lett. 20, 559–564 (1992).
  * Noro and Frenkel (2000) M. G. Noro and D. Frenkel, “Extended corresponding-states behavior for particles with variable range attractions,” J. Chem. Phys. 113, 2941–2944 (2000).
  * Royall (2018) C. P. Royall, “Kinetic crystallisation instability in liquids with short-ranged attractions,” Mol. Phys. 116, 3076 (2018), special Edition in Honour of Daan Frenkel.
  * Zhang  _et al._ (2013) I. Zhang, C. P. Royall, M. A. Faers, and P. Bartlett, “Phase separation dynamics in colloid–polymer mixtures: The effect of interaction range,” Soft Matter 9, 2076 (2013).
  * Peters  _et al._ (2005) J. F. Peters, M. Muthuswamy, J. Wibowo, and A. Tordesillas, “Characterization of force chains in granular material,” Phys. Rev. E 72, 041307 (2005).
  * Miller and Frenkel (2003) M. Miller and D. Frenkel, “Competition of percolation and phase separation in a fluid of adhesive hard spheres,” Phys. Rev. Lett. 90, 135702 (2003).
  * Manley  _et al._ (2005) S. Manley, J. M. Skotheim, L. Mahadevan, and D. A. Weitz, “Gravitational Collapse of Colloidal Gels,” Phys. Rev. Lett. 94, 218302 (2005).
  * Varga and Swan (2016) Z. Varga and J. Swan, “Hydrodynamic interactions enhance gelation in dispersions of colloids with short-ranged attraction and long-ranged repulsion,” Soft Matter 12, 7670–7681 (2016).
  * Ohtsuka, Royall, and Tanaka (2008) T. Ohtsuka, C. P. Royall, and H. Tanaka, “Local structure and dynamics in colloidal fluids and gels,” Europhys. Lett. 84, 46002 (2008).
  * Royall  _et al._ (2008) C. P. Royall, S. R. Williams, T. Ohtsuka, and H. Tanaka, “Direct observation of a local structural mechanism for dynamic arrest,” Nature Mater. 7, 556 (2008).
  * Royall and Malins (2012) C. P. Royall and A. Malins, “The role of quench rate in colloidal gels,” Faraday Discuss. 158, 301–311 (2012).
  * Dunleavy  _et al._ (2015) A. J. Dunleavy, K. Wiesner, R. Yamamoto, and C. P. Royall, “Mutual information reveals multiple structural relaxation mechanisms in a model glassformer,” Nature Communications 6, 6089 (2015).
  * Hallett, Turci, and Royall (2020) J. E. Hallett, F. Turci, and C. P. Royall, “The devil is in the details: pentagonal bipyramids and dynamic arrest,” J. Stat. Mech.: Theory and Experiment , 014001 (2020).
  * Li  _et al._ (2014) J. Li, Y. Cao, C. Xia, B. Kou, X. Xiao, K. Fezzaa, and Y. Wang, “Similarity of wet granular packing to gels,” Nat Commun 5, 5014 (2014).
  * Bassett  _et al._ (2015) D. S. Bassett, E. T. Owens, M. A. Porter, M. L. Manning, and K. E. Daniels, “Extraction of force–chain network architecture in granular materials using community detection,” Soft Matter 11, 2731–2744 (2015).
  * Otsu (1979) N. Otsu, “A Threshold Selection Method from Gray-Level Histograms,” IEEE Transsactions Syst. 9, 62–66 (1979).

*

##  Appendix A Details of the Acquisition and Analysis of the Experimental
Data

To image the system with confocal microscopy, we employed two excitation
lasers with wavelengths of 514 nm and 580 nm and two HyD hybrid detectors with
detection wavelengths of 520–575 nm and 585 –640 nm. These two lasers and
detectors are applied to detect fluorescent signals from bulk of the PDMS oil
droplets and the contacts between the droplets, respectively. We refer to the
images generated by these two channels as the _droplet image_ and _contact
image_ respectively. We equalized the image histograms as a function of depth
to compensate for any attenuation due to imperfect refractive index matching
between emulsion droplets and solvent. To reduce the noise of the captured
images, we applied line averaging of 32 to each frame and deconvolved the
images with the Huygens software. Droplet centres were detected in the droplet
image using colloids tracking package Leocmach and Tanaka (2013).

Figure 9:  Experimental phase diagram in the colloid volume fraction – polymer
reservoir concentration plane. Figure 10:  Schematic of the image processing
for the enhancement of contact images by the use of two Otsu thresholds.

### Tracking of interparticle contacts

Here the smaller lengthscale with respect to previous work with much larger
droplets Brujić  _et al._ (2003) necessitates a method to segregate connected
contacts, determine centres and sizes of contacts. Having obtained the droplet
centres, we proceed by processing the contact images. We use two Otsu
thresholds (which is a threshold based on weighted variances of intensities of
pixels corresponding to features and background Otsu (1979)). As schematically
shown in Fig. 10, we apply two Otsu thresholds to the contact images. The
first distinguishes droplets (with contacts) from the solvent background. The
second separates contacts (foreground) from bulk droplets (background).

Edge enhancement — To remove any contacts erroneously identified due to
residual intensity in the interior of the droplets, we use a Sobel filter to
enhance the droplet edges. However applying the Sobel filter directly to the
droplet image means that the edges of each particle are not always well
defined because some droplets are in contact with one another. Therefore
instead we generate an image from the particle coordinates we have determined
and apply the Sobel filter to each particle.

Figure 11: Identifying contacts. (a) Positioning of “blobs” at potential
contact points, defined as the weighted middle points between droplets.
Weighted middle points of the black lines connecting droplet centers are then
potential contacts, as identfied with blue spheres and numbered. (b) Blobs are
expanded to include all contact area. (c) Blobs are dilated to remove
overlaps. The combination of (b) and (c) then contains the information of
contacts labels and, by reference to the contact image, contact volumes.

Weighted middle points between particles —  After thresholding images such as
Fig. 1(c), we find that the contacts are frequently merged. In order to
separate such connected contacts, our strategy is to add a spatial boundary to
each contact. The first step is to find the weighted middle points between a
reference particle and its neighbors, which are possible locations of contact
centers. To determine the weighted middle points $\mathbf{m}_{ij}$ between two
neighboring droplets $i,j$, first $\mathbf{m}_{ij}$ needs to be located on the
line connecting the centers of droplets $i$ and $j$ and the distances between
$\mathbf{m}_{ij}$ and the two neighboring particles $b_{i}$ and $b_{j}$ are
proportional to particle radii $a_{ij}$, i.e. $b_{i}/b_{j}=a_{i}/a_{j}$.
Therefore a binary mask of the same size of the contact image is built, where
the positions of weighted middle points $\mathbf{m}_{ij}$ have a value of 1
while the rest of the mask is 0.

Positioning blobs on middle points —  Based on centers of middle points,
spherical blobs were created by dilating a binary kernel in three dimensions.
The blobs were constructed as large as possible but without overlapping with
each other. The purpose of building blobs is to contain true contacts as much
as possible and build an upper boundary for the contacts to separate them from
each other if they are overlapping after the thresholding. Because blobs are
created in between neighboring particles (which are not necessarily in
contact), so the number of blobs generated is greater than the number of true
contacts.

After the initial placement of blobs [Fig. 11(a)], some are connected when we
try to maximize their size as shown in [Fig. 11(b)]. By looking at the
distribution of blob volumes, it is clear that connected blobs have noticeably
larger volumes than isolated blobs, the binary mask with all blobs was
separated into two masks: a well separated blob mask [Fig. 11(b), blob “1”]
and a connected blob mask [Fig. 11(b), blob “2,3,4”], In the mask with
connected blobs, we eroded the mask in order to separate these blobs [Fig.
11(c)]. Next, an eroded mask [Fig. 11(c)] and non-connected blob mask [Fig.
11(b), blob “1”] were combined into a final binary mask. This mask effectively
sets bounds for contacts and can be used to segregate connected contacts. At
this point, we have identified the contacts. However, we now seek to to
determine their size, from which we can infer the force related to each
contact.

Centres and sizes of contacts —  Three masks are generated in order to
correctly detect the positions and sizes of contacts. The first mask, [Fig.
11(a)], is the binary mask of spheres that are placed between particles. This
mask segregates some contacts that are connected after the Otsu thresholding
of the contact image. It is possible that some pixels which are located in the
middle of particles remain after the thresholding. Therefore a second mask
which contains edges of all particles is desired, in order to set constraints
to contact positions. This means contacts can only be located at edges of
particles but not inside particles. The third mask is the thresholded contact
image, which is obtained by applying the Otsu threshold to the contact image
[Fig. 10]. By convolving these three masks, the remaining pixels are the
contacts between droplets. Each contact is then labelled with an index, and by
counting the number of pixels in each contact then gives the volume of the
contact. The contact centre is determined by finding the geometrical centre or
maximum intensity pixel in the contact.

Allocation of contacts to particles —  After particle and contact tracking,
both coordinates and sizes are obtained. The coordinates of particles and
contacts are $\boldsymbol{p}_{i}$ and $\boldsymbol{c}_{j}$ respectively. The
distances between each particle and contact are computed, and stored in a
$i\times j$ 2d matrix $\boldsymbol{s}_{ij}$.

$\boldsymbol{s}_{ij}=\\{i\in N_{p},j\in
N_{c}\mid\mid\boldsymbol{p}_{i}-\boldsymbol{c}_{j}\mid\\}$ (11)

where $N_{p}$ and $N_{c}$ are the number of particles and contacts
respectively. For a contact $\boldsymbol{c}_{j}$, the closest two particles
$\boldsymbol{p}_{a}$ and $\boldsymbol{p}_{b}$ are detected by searching for
the first two minimum values $s_{aj}$ and $s_{bj}$ in $\boldsymbol{s}_{ij}$.
These two particles are then in contact through $\boldsymbol{c}_{j}$. For each
contact, we find two neighbor particles, in turn we can determine neighbour
contacts for each particle, and this gives the number of contacts $n_{c}$.