  Accurate interaction potentials between microscopic components such as
colloidal particles or cells are crucial to understanding a range of processes,
including colloidal crystallization, bacterial colony formation, and cancer
metastasis. Even in systems where the precise interaction mechanisms are
unknown, effective interactions can be measured to inform simulation and
design. However, these measurements are difficult and time-intensive, and often
require conditions that are drastically different from in situ conditions of
the system of interest. Moreover, existing methods of measuring interparticle
potentials rely on constraining a small number of particles at equilibrium,
placing limits on which interactions can be measured. We introduce a method for
inferring interaction potentials directly from trajectory data of interacting
particles. We explicitly solve the equations of motion to find a form of the
potential that maximizes the probability of observing a known trajectory. Our
method is valid for systems both in and out of equilibrium, is well-suited to
large numbers of particles interacting in typical system conditions, and does
not assume a functional form of the interaction potential. We apply our method
to infer the interactions of colloidal spheres from experimental data,
successfully extracting the range and strength of a depletion interaction from
the motion of the particles.
