Abstract: Visualizing a chemical reaction requires making its molecular changes visible while keeping the animation faithful to the stated chemistry. Equations, structural diagrams and molecular viewers provide complementary descriptions, but assembling an interactive three-dimensional explanation still requires specifying the changes and checking their consistency. We present ChemXRG, a domain-specific language (DSL) framework that addresses this gap by representing a reaction animation as an executable program. Persistent atom identifiers and explicit bond, charge and grouping operations connect the symbolic reaction to the displayed transformation. This shared representation lets generation, verification and rendering operate on the same account of what changes. Given known, atom-mapped reactant and product structures, reaction-grounded constraints fix input-determined facts and restrict action choices; execution checks validate the resulting transformation before geometry and frames are constructed. We implement this paradigm with a reaction-program corpus and ChemQwen, a trained 0.8B DSL generator. Paired and component evaluations show improved compiler acceptance and normalized full-program agreement under input-conditioned constraints, while identifying remaining failures that require execution checks. A public browser application demonstrates the connection from symbolic reaction descriptions to inspectable programs and interactive 3D animations.