Computational Photophysics in the Presence of an Environment.