We describe a flexible and broadly applicable energy refinement method, "nebterpolation," for identifying and characterizing the reaction events in a molecular dynamics (MD) simulation. The new method is applicable to ab initio simulations with hundreds of atoms containing complex and multimolecular reaction events. A key aspect of nebterpolation is smoothing of the reactive MD trajectory in internal coordinates to initiate the search for the reaction path on the potential energy surface. We apply nebterpolation to analyze the reaction events in an ab initio nanoreactor simulation that discovers new molecules and mechanisms, including a C-C coupling pathway for glycolaldehyde synthesis. We find that the new method, which incorporates information from the MD trajectory that connects reactants with products, produces a dramatically distinct set of minimum energy paths compared to existing approaches that start from information for the reaction end points alone. The energy refinement method described here represents a key component of an emerging simulation paradigm where molecular dynamics simulations are applied to discover the possible reaction mechanisms.