Co-crystallization of 1,8-naphthalenedicarboxylic acid (1,8-nap) with trans-1,2-bis(n-pyridyl)ethylene (n,n'-bpe) (n = 2 or 4) yields a discrete four-component molecular assembly, 2(n,n'-bpe).2(1,8-nap) 1, that is held together by four O-H...N hydrogen bonds where the dicarboxylic acid, serving as a linear template, directs alignment of olefins in the solid state for [2 + 2] photoreaction.