Design of single-molecular logical devices based on multistable photochromatic spirooxazine