  Using an optical tweezers apparatus, we demonstrate three-dimensional control
of nanodiamonds in solution with simultaneous readout of ground-state
electron-spin resonance (ESR) transitions in an ensemble of diamond
nitrogen-vacancy (NV) color centers. Despite the motion and random orientation
of NV centers suspended in the optical trap, we observe distinct peaks in the
measured ESR spectra qualitatively similar to the same measurement in bulk.
Accounting for the random dynamics, we model the ESR spectra observed in an
externally applied magnetic field to enable d.c. magnetometry in solution. We
estimate the d.c. magnetic field sensitivity based on variations in ESR line
shapes to be ~50 microTesla/Hz^1/2. This technique may provide a pathway for
spin-based magnetic, electric, and thermal sensing in fluidic environments and
biophysical systems inaccessible to existing scanning probe techniques.
