  Using large deviation theory and principles of stochastic optimal control, we
show that rare molecular dynamics trajectories conditioned on assembling a
specific target structure encode a set of interactions and external forces that
lead to enhanced stability of that structure. Such a relationship can be
formulated into a variational principle, for which we have developed an
associated optimization algorithm and have used it to determine optimal forces
for targeted self-assembly within nonequilibrium steady-states. We illustrate
this perspective on inverse design in a model of colloidal cluster assembly
within linear shear flow. We find that colloidal clusters can be assembled with
high yield using specific short-range interactions of tunable complexity. Shear
decreases the yields of rigid clusters, while small values of shear increase
the yields of nonrigid clusters. The enhancement or suppression of the yield
due to shear is rationalized with a generalized linear response theory. By
studying 21 unique clusters made of 6, 7 or 8 particles, we uncover basic
design principles for targeted assembly out of equilibrium.
