Constrained Program Generation for 3D Reaction Animation with a 0.8B Model
Hongyuan Wang, Daming Luo, Nico Pietroni, Christy Liang, Andrew McDonagh
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.
Create a lesson
Related papers
ARS-Avatar: Animatable and Relightable Surfel Avatars with Learnable Ambient Occlusion
Jiateng Liu, Hao Gao, Junxin Sun et al.
SsgCaps: A controlled dataset for the evaluation of sound scene generation algorithms
Modan Tailleur, Junwon Lee, Laurie M Heller et al.
MoSAT: Human Motion Generation from Spatial Audio and Textual Description
Shuyang Xu, Zhiyang Dou, Yiduo Hao et al.
Edge-centric Brain Transformer: An Edge-centric Functional Connectivity Learning Framework for fMRI-based Brain Disorder Diagnosis
Dengyi Zhao, Zhiheng Zhou, Mengyao Zhou et al.
Physically Based Rendering in the Latent Space
Vuk Radovanovic, Vishesh Gupta, Adrien Gruson et al.
S4R: Scaling for Rigid-Body Interpenetration Resolution
Zhiyang Dou, Ang Zhao, Chen Peng et al.