Structural effects on the solid-state photodimerization of 5-chloro and 5-nitro-2(1H)-pyridone in molecular compounds