Direct Dynamics and On-the-Fly Forces
Computing electronic forces during trajectories and assessing method cost
Lesson 4189 of 4,500 · Potential Energy Surfaces and Reaction Dynamics
Learning objectives
- Explain on-the-fly electronic force evaluation
- Compare direct dynamics with a fitted reactive surface
- Identify computational and electronic-method uncertainties
Introduction
Classical reaction trajectories require forces at every time step. One approach fits a potential-energy function in advance; another computes electronic energy and its gradient at each visited geometry. This second strategy, direct dynamics or on-the-fly molecular dynamics, can follow unexpected bond rearrangements without constructing a global analytic surface first. Its flexibility comes at the cost of many electronic calculations and the risk that an approximate electronic method will be inaccurate precisely where chemistry changes.
Core explanation
In Born–Oppenheimer direct dynamics, an electronic-structure calculation is performed for the current nuclear positions. Its energy E(R) and gradient ∇RE give forces F = −∇RE, which a numerical integrator uses to advance nuclei. The electronic calculation is repeated at the next geometry. The nuclei are usually classical particles on one electronic surface, so “ab initio” or “first-principles” forces do not make nuclear motion fully quantum. Nonadiabatic electronic transitions require an additional treatment.
This differs from a fitted surface , which uses many electronic calculations to build a reusable fast function before trajectories run. A fit is efficient when thousands or millions of force evaluations cover related chemistry, but it can extrapolate badly outside training regions. Direct dynamics avoids a separate global fitting step and visits only geometries needed by its sampled trajectories. However, each force may require an expensive quantum calculation, so trajectory lengths and ensemble sizes can be limited. A short or small ensemble may miss rare channels despite accurate local forces.
Electronic-method choice is central. Density-functional theory, semiempirical methods and wavefunction methods have different cost and accuracy. A method that describes stable minima well may misplace a barrier, charge-transfer state or radical channel. The same approximation is evaluated repeatedly along every trajectory, so systematic error can shape branching or lifetime throughout the simulation. Benchmarking key stationary points and selected snapshots against higher-level calculations can reveal this risk.
Numerical integration also matters. Time steps must resolve fast bond vibrations and conserve energy appropriately for an isolated system. Electronic self-consistency must converge reliably; noisy gradients can create artificial heating. If a trajectory enters a region with near-degenerate electronic states, single-surface Born–Oppenheimer forces may become inadequate. A seemingly unusual product path might reflect real nonadiabatic chemistry or simply a failed electronic-state calculation; diagnostics are necessary.
Direct dynamics can reveal chemistry not anticipated by a static path search. Trajectories launched near a transition structure may recross, form a short-lived intermediate or bifurcate to several products. A thermally prepared ensemble can explore spontaneous reactions, but rare events may not appear within feasible simulation time. Researchers sometimes use elevated temperature or biased forces to observe transformations, yet those conditions alter probabilities and must not be interpreted as ordinary laboratory kinetics without correction.
Hybrid strategies are common. Direct trajectories can collect high-value geometries for fitting a machine-learned reactive potential, and the faster fit can then provide extensive sampling. Uncertainty estimates or active learning can flag regions requiring new electronic calculations. Conversely, a fitted-surface trajectory that reaches a surprising region can be checked by on-the-fly recalculation. This combination uses direct dynamics for local fidelity and fitting for statistical scale.
Direct-dynamics conclusions require both numerical and statistical validation. Energy conservation and force convergence check numerical integrity; repeated initial conditions and uncertainty intervals check ensemble estimates; higher-level electronic comparisons check physical accuracy. Passing one of these does not substitute for the others.
Step-by-step reasoning
Choose an electronic method suitable for bonds and charge states along the proposed reaction. Select starting positions and velocities that represent the intended beam, thermal or saddle-launched ensemble. At each time step, calculate electronic energy and gradient, integrate nuclear motion and monitor energy drift and electronic convergence. Classify products under predeclared criteria, repeat enough trajectories for uncertainty estimates, and benchmark representative structures. If trajectories reach poorly described or multistate regions, upgrade the model or qualify the result.
Visual explanation
Draw a loop: nuclear geometry → electronic calculation → energy and force → numerical motion step → new geometry. Beside it draw the fitted-surface workflow: many reference points → fitted potential → inexpensive repeated force queries. A bar chart can compare fewer costly direct trajectories with many cheap fitted-surface trajectories, while marking that either route needs accuracy checks.
Real-world analogy
Using a fitted surface is like consulting a detailed map made before a trip; direct dynamics is like surveying the terrain at every step. Surveying avoids relying on a map in unfamiliar areas but is slow. The analogy misses an important chemical issue: the survey instrument itself, an approximate electronic method, can give systematically wrong heights and slopes.
Real-world example
Direct-dynamics trajectories have been used to study the fragmentation of formaldehyde and to predict how energy partitions among products. More recent work follows complicated reactive paths and product branching without a pre-fitted global surface. In each case, trajectory results depend on electronic-method accuracy and initial-condition preparation; agreement in one product distribution is stronger when accompanied by correct rates or scattering observables.
Why?
Why compute forces during the run? The trajectory can enter unanticipated geometries not covered by a pre-fitted surface. Why are ensembles expensive? Every small integration step needs an electronic gradient calculation. Why monitor energy drift? Numerical or electronic convergence errors can fake heating and reaction. Why benchmark snapshots? Systematic force errors can bias mechanisms even if numerical integration is flawless.
Common misconception
“On the fly” does not mean exact quantum reaction dynamics. Nuclear motion is often classical and the electronic method approximate. Nor does avoiding a fitted potential remove all model uncertainty: it exchanges fit error for repeated electronic-calculation error and higher computational cost.
Worked example
Question: A direct-dynamics trajectory uses a 0.5 fs step for 2 ps and calculates one electronic gradient per step. Approximately how many gradient evaluations does one trajectory need? What would 200 such trajectories require?
Reasoning: Convert 2 ps to 2000 fs. Dividing by 0.5 fs gives 4000 steps, so approximately 4000 gradients per trajectory, aside from start-up or extra integrator evaluations. For 200 trajectories, the baseline is about 800,000 gradients. This explains why electronic method cost strongly limits ensemble size. A smaller time step or more sophisticated integrator could change the count.
Answer: About 4,000 gradients for one trajectory and 800,000 for 200 trajectories under the one-gradient-per-step assumption.
Quick check
1. What is recalculated at each geometry in ordinary on-the-fly Born–Oppenheimer dynamics? Answer: The electronic energy and its nuclear gradient, which supplies the force for propagation.
Exam focus
Contrast direct dynamics with a pre-fitted PES in force cost and extrapolation risk. State that classical nuclei and an approximate electronic surface remain. Mention time-step, gradient-convergence and ensemble checks, and recognise near-degenerate electronic states as a warning for single-surface propagation.
Advanced insight
Adaptive machine-learned potentials can use direct-dynamics configurations to improve coverage iteratively, but uncertainty scores must be calibrated to reaction-relevant regions rather than only equilibrium data. Pathological electronic convergence near bond rupture can inject nonphysical energy into trajectories. A multireference electronic region may need a qualitatively different method, not just tighter numerical tolerance. Long-time rate estimates also require rare-event sampling because direct nanosecond trajectories may still miss a reaction with an hours-long timescale.
Summary
Direct dynamics evaluates electronic forces at the geometries actually visited during nuclear trajectories. It avoids building a global fitted surface but is costly and inherits electronic-method and classical-nuclear limits. Reliable results require stable numerical integration, representative initial-condition ensembles, benchmarks and special treatment of multistate regions. Direct and fitted approaches can complement each other.
Practice questions
1. What advantage does direct dynamics have over a poorly trained fitted potential? Answer: It evaluates electronic forces at newly visited geometries instead of extrapolating a pre-fitted function there.
2. What is the main computational cost of on-the-fly trajectories? Answer: Repeated electronic energy and gradient calculations at many small time steps.
3. Does a small energy drift prove the electronic method is chemically accurate? Answer: No. It tests numerical consistency, not whether the approximate surface has correct barriers or states.
4. Why can rare reactions remain unseen in many direct trajectories? Answer: Available trajectory time and sample size may be far smaller than the reaction timescale requires.
Sources: Accounts of Chemical Research, ab initio direct dynamics; Journal of Physical Chemistry A, direct-dynamics trajectories; Journal of Physical Chemistry A, reaction-network exploration.