A photoactive molecular triad as a nanoscale power supply for a supramolecular machine.