Two-dimensional molecularly imprinted photonic crystal sensor for highly efficient tetracycline detection A two-dimensional (2D) molecularly imprinted photonic crystal (MIPC) sensor for the detection of tetracycline in foods was fabricated. The MIPC were prepared by a thermal polymerization method with polystyrene 2D photonic crystal (2D-PC) as template, tetracycline as template molecule, acrylamide as functional monomer, and ethylene glycol dimethacrylate as crosslinking agent.