Text this: Physical Insights into Molecular Sensors, Molecular Logic Gates, and Photosensitizers in Photodynamic Therapy