Quantum probe and design for a chemical compass with magnetic nanostructures.