A chemical or biochemical system based a set of reacting molecules enclosed in compartments that mimic cell structure and behavior.