<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Simulation on Hunter Heidenreich | Senior AI Research Scientist</title><link>https://hunterheidenreich.com/tags/simulation/</link><description>Recent content in Simulation on Hunter Heidenreich | Senior AI Research Scientist</description><image><title>Hunter Heidenreich | Senior AI Research Scientist</title><url>https://hunterheidenreich.com/img/avatar.webp</url><link>https://hunterheidenreich.com/img/avatar.webp</link></image><generator>Hugo -- 0.163.3</generator><language>en-US</language><copyright>2026 Hunter Heidenreich</copyright><lastBuildDate>Sat, 01 Aug 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://hunterheidenreich.com/tags/simulation/index.xml" rel="self" type="application/rss+xml"/><item><title>Lagrangian Neural Networks for Physics</title><link>https://hunterheidenreich.com/notes/machine-learning/model-architectures/lagrangian-neural-networks/</link><pubDate>Tue, 07 Apr 2026 00:00:00 +0000</pubDate><guid>https://hunterheidenreich.com/notes/machine-learning/model-architectures/lagrangian-neural-networks/</guid><description>LNNs parameterize arbitrary Lagrangians with neural networks, learning energy-conserving dynamics without requiring canonical coordinates.</description><content:encoded><![CDATA[<h2 id="a-method-for-learning-arbitrary-lagrangians">A Method for Learning Arbitrary Lagrangians</h2>
<p>This is a <strong>Method</strong> paper that introduces Lagrangian Neural Networks (LNNs), a neural network architecture that parameterizes arbitrary Lagrangians to learn energy-conserving dynamics from data. The key contribution is showing that neural networks can learn Lagrangian functions directly, and that the Euler-Lagrange equation can be solved numerically using automatic differentiation to produce physically consistent dynamics. The approach is strictly more general than prior methods: it does not require canonical coordinates (unlike Hamiltonian Neural Networks) and does not restrict the functional form of kinetic energy (unlike Deep Lagrangian Networks).</p>
<h2 id="why-standard-neural-networks-fail-at-conservation-laws">Why Standard Neural Networks Fail at Conservation Laws</h2>
<p>Neural networks struggle to learn fundamental symmetries and conservation laws from data. A standard neural network trained on trajectories of a <a href="https://en.wikipedia.org/wiki/Double_pendulum">double pendulum</a> will gradually dissipate energy over long rollouts, producing physically implausible behavior. This happens because unconstrained function approximators have no inductive bias toward conservation.</p>
<p>Hamiltonian Neural Networks (HNNs) addressed this by learning a Hamiltonian function, which automatically enforces energy conservation. However, the <a href="https://en.wikipedia.org/wiki/Hamiltonian_mechanics">Hamiltonian formalism</a> requires inputs in <a href="https://en.wikipedia.org/wiki/Canonical_coordinates">canonical coordinates</a> $(q, p)$ satisfying strict <a href="https://en.wikipedia.org/wiki/Poisson_bracket">Poisson bracket</a> relations:</p>
<p>$$
p_i \equiv \frac{\partial \mathcal{L}}{\partial \dot{q}_i} \quad \Longleftrightarrow \quad {q_i, q_j} = 0, \quad {p_i, p_j} = 0, \quad {q_i, p_j} = \delta_{ij}
$$</p>
<p>In many real-world settings, the canonical momenta are unknown or difficult to compute. For example, in special relativity the canonical momentum $\dot{q}(1 - \dot{q}^2)^{-3/2}$ is a complex nonlinear function of velocity. Deep Lagrangian Networks (DeLaNs) partially addressed this by learning Lagrangians, but they assumed kinetic energy takes the rigid-body form $T = \dot{q}^T M \dot{q}$, which excludes relativistic and other non-standard systems.</p>
<h2 id="solving-euler-lagrange-for-a-black-box-lagrangian">Solving Euler-Lagrange for a Black-Box Lagrangian</h2>
<p>The core innovation of LNNs is a method for computing accelerations from a neural network that represents an arbitrary Lagrangian $\mathcal{L}(q, \dot{q})$. Starting from the <a href="https://en.wikipedia.org/wiki/Euler%E2%80%93Lagrange_equation">Euler-Lagrange equation</a>:</p>
<p>$$
\frac{d}{dt} \nabla_{\dot{q}} \mathcal{L} = \nabla_{q} \mathcal{L}
$$</p>
<p>The authors expand the time derivative using the chain rule, yielding:</p>
<p>$$
\left(\nabla_{\dot{q}} \nabla_{\dot{q}}^{\top} \mathcal{L}\right) \ddot{q} + \left(\nabla_{q} \nabla_{\dot{q}}^{\top} \mathcal{L}\right) \dot{q} = \nabla_{q} \mathcal{L}
$$</p>
<p>Solving for the accelerations gives:</p>
<p>$$
\ddot{q} = \left(\nabla_{\dot{q}} \nabla_{\dot{q}}^{\top} \mathcal{L}\right)^{-1} \left[ \nabla_{q} \mathcal{L} - \left(\nabla_{q} \nabla_{\dot{q}}^{\top} \mathcal{L}\right) \dot{q} \right]
$$</p>
<p>This requires computing the Hessian of the neural network with respect to $\dot{q}$ and then inverting it (using a pseudoinverse for numerical stability). JAX&rsquo;s automatic differentiation makes this feasible in just a few lines of code, despite the seemingly complex chain of second-order derivatives. The matrix inverse scales as $\mathcal{O}(d^3)$ with the number of coordinates $d$.</p>
<p>A critical implementation detail is the choice of activation function. Since the method takes second-order derivatives of the network, ReLU is unsuitable (its second derivative is zero everywhere). After a hyperparameter search over ReLU$^2$, ReLU$^3$, tanh, sigmoid, and softplus, the authors found <a href="https://en.wikipedia.org/wiki/Softplus">softplus</a> performed best.</p>
<p>The authors also developed a custom initialization scheme, using symbolic regression to find initialization variances that maintain well-conditioned gradients through the Hessian computation:</p>
<p>$$
\sigma = \frac{1}{\sqrt{n}} \begin{cases} 2.2 &amp; \text{First layer} \\ 0.58i &amp; \text{Hidden layer } i \\ n &amp; \text{Output layer} \end{cases}
$$</p>
<h2 id="extension-to-graphs-and-continuous-systems">Extension to Graphs and Continuous Systems</h2>
<p>LNNs extend naturally to graph-structured and continuous systems via Lagrangian <a href="/notes/machine-learning/model-architectures/relational-inductive-biases-deep-learning-graph-networks/">Graph Networks</a>. For a system with $n$ gridpoints, the total Lagrangian is decomposed into local densities:</p>
<p>$$
\mathcal{L} = \sum_{i=1}^{n} \mathcal{L}_i, \quad \text{where} \quad \mathcal{L}_i = \mathcal{L}_{\text{density}}\left({\phi_j, \dot{\phi}_j}_{j \in \mathcal{I}_i}\right)
$$</p>
<p>Here $\mathcal{I}_i$ defines the neighborhood of node $i$ (e.g., ${i-1, i, i+1}$ for a 1D grid). The Lagrangian density is modeled as an MLP. The resulting Hessian matrix is sparse, with non-zero entries only at &ldquo;neighbor of neighbor&rdquo; positions, enabling efficient computation: in 1D, only 5 forward-over-backward autodiff passes are needed, and the tridiagonal inverse runs in linear time.</p>
<h2 id="experiments-double-pendulum-relativity-and-waves">Experiments: Double Pendulum, Relativity, and Waves</h2>
<p>All models used 4-layer MLPs with 500 hidden units, softplus activations, a decaying learning rate starting at $10^{-3}$, and batch size 32.</p>
<h3 id="double-pendulum">Double Pendulum</h3>
<p>The LNN and baseline achieved similar instantaneous acceleration losses ($7.3$ vs. $7.4 \times 10^{-2}$). The key difference appeared in long-term energy conservation: averaged over 40 random initial conditions with 100 time steps, the mean energy discrepancy was 8% of max potential energy for the baseline but only 0.4% for the LNN.</p>
<h3 id="relativistic-particle">Relativistic Particle</h3>
<p>For a particle with Lagrangian $\mathcal{L} = ((1 - \dot{q}^2)^{-1/2} - 1) + gq$, the canonical momenta $\dot{q}(1 - \dot{q}^2)^{-3/2}$ are non-trivial. An HNN trained on non-canonical coordinates $(q, \dot{q})$ failed to learn the dynamics. The LNN succeeded using the same non-canonical coordinates, matching the performance of an HNN given the correct canonical coordinates.</p>
<h3 id="1d-wave-equation">1D Wave Equation</h3>
<p>The Lagrangian Graph Network learned the wave equation dynamics ($\ddot{\phi} = \frac{\partial^2 \phi}{\partial x^2}$ with $c = 1$) on a 100-gridpoint domain with periodic boundary conditions. The network learned the Lagrangian density corresponding to the continuum form $\mathcal{L} = \int (\dot{\phi}^2 - (\partial \phi / \partial x)^2) dx$, accurately modeling wave propagation and conserving energy across the material.</p>
<table>
	<thead>
			<tr>
					<th>Experiment</th>
					<th>Model</th>
					<th>Energy Error (% of max PE)</th>
					<th>Canonical Coords Required</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td>Double Pendulum</td>
					<td>Baseline</td>
					<td>8%</td>
					<td>N/A</td>
			</tr>
			<tr>
					<td>Double Pendulum</td>
					<td>LNN</td>
					<td>0.4%</td>
					<td>No</td>
			</tr>
			<tr>
					<td>Relativistic Particle</td>
					<td>HNN (non-canonical)</td>
					<td>Failed</td>
					<td>Yes</td>
			</tr>
			<tr>
					<td>Relativistic Particle</td>
					<td>HNN (canonical)</td>
					<td>Succeeded</td>
					<td>Yes</td>
			</tr>
			<tr>
					<td>Relativistic Particle</td>
					<td>LNN</td>
					<td>Succeeded</td>
					<td>No</td>
			</tr>
			<tr>
					<td>1D Wave Equation</td>
					<td>LGN</td>
					<td>Energy conserved</td>
					<td>No</td>
			</tr>
	</tbody>
</table>
<h2 id="findings-and-comparison-to-prior-approaches">Findings and Comparison to Prior Approaches</h2>
<p>LNNs combine several desirable properties that no single prior method offers:</p>
<table>
	<thead>
			<tr>
					<th>Property</th>
					<th>Neural Net</th>
					<th>Neural ODE</th>
					<th>HNN</th>
					<th>DeLaN</th>
					<th>LNN</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td>Models dynamical systems</td>
					<td>Yes</td>
					<td>Yes</td>
					<td>Yes</td>
					<td>Yes</td>
					<td>Yes</td>
			</tr>
			<tr>
					<td>Learns differential equations</td>
					<td></td>
					<td>Yes</td>
					<td>Yes</td>
					<td>Yes</td>
					<td>Yes</td>
			</tr>
			<tr>
					<td>Learns exact conservation laws</td>
					<td></td>
					<td></td>
					<td>Yes</td>
					<td>Yes</td>
					<td>Yes</td>
			</tr>
			<tr>
					<td>Learns from arbitrary coordinates</td>
					<td>Yes</td>
					<td>Yes</td>
					<td></td>
					<td>Yes</td>
					<td>Yes</td>
			</tr>
			<tr>
					<td>Learns arbitrary Lagrangians</td>
					<td></td>
					<td></td>
					<td></td>
					<td></td>
					<td>Yes</td>
			</tr>
	</tbody>
</table>
<p>The main limitation is computational cost: the Hessian computation and inversion scale as $\mathcal{O}(d^3)$ in the number of coordinates. The Lagrangian Graph Network partially mitigates this for spatially extended systems through the sparsity of the resulting Hessian. The method also assumes access to state derivatives ($\dot{q}$) during training, which may not always be directly available from observations.</p>
<hr>
<h2 id="reproducibility-details">Reproducibility Details</h2>
<h3 id="data">Data</h3>
<table>
	<thead>
			<tr>
					<th>Purpose</th>
					<th>Dataset</th>
					<th>Size</th>
					<th>Notes</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td>Training</td>
					<td>Double pendulum</td>
					<td>600,000 random initial conditions</td>
					<td>Simulated with masses and lengths set to 1</td>
			</tr>
			<tr>
					<td>Training</td>
					<td>Relativistic particle</td>
					<td>Random initial conditions and $g$ values</td>
					<td>$c = 1$, mass = 1, uniform potential</td>
			</tr>
			<tr>
					<td>Training</td>
					<td>1D wave equation</td>
					<td>100 gridpoints</td>
					<td>Periodic boundary conditions, $c = 1$</td>
			</tr>
	</tbody>
</table>
<h3 id="algorithms">Algorithms</h3>
<ul>
<li>Forward model: Euler-Lagrange equation solved via Equation 6 using JAX autodiff</li>
<li>Pseudoinverse used for Hessian inversion to handle potential singular matrices</li>
<li>Custom initialization scheme (Equation 16) derived via symbolic regression with eureqa</li>
<li>Softplus activation selected via hyperparameter search</li>
</ul>
<h3 id="models">Models</h3>
<ul>
<li>4-layer MLP with 500 hidden units for all experiments</li>
<li>Softplus activation function</li>
<li>Code: <a href="https://github.com/MilesCranmer/lagrangian_nns">github.com/MilesCranmer/lagrangian_nns</a> (Apache-2.0)</li>
</ul>
<h3 id="evaluation">Evaluation</h3>
<table>
	<thead>
			<tr>
					<th>Metric</th>
					<th>LNN</th>
					<th>Baseline</th>
					<th>Notes</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td>Acceleration loss (double pendulum)</td>
					<td>$7.3 \times 10^{-2}$</td>
					<td>$7.4 \times 10^{-2}$</td>
					<td>Similar short-term accuracy</td>
			</tr>
			<tr>
					<td>Energy error (double pendulum)</td>
					<td>0.4%</td>
					<td>8%</td>
					<td>Percentage of max potential energy</td>
			</tr>
	</tbody>
</table>
<h3 id="hardware">Hardware</h3>
<p>Not specified in the paper. JAX-based implementation supports CPU and GPU execution.</p>
<hr>
<p><strong>Reproducibility Status</strong>: Highly Reproducible</p>
<h2 id="artifacts">Artifacts</h2>
<table>
	<thead>
			<tr>
					<th>Artifact</th>
					<th>Type</th>
					<th>License</th>
					<th>Notes</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td><a href="https://github.com/MilesCranmer/lagrangian_nns">lagrangian_nns</a></td>
					<td>Code</td>
					<td>Apache-2.0</td>
					<td>Official JAX implementation with notebooks for all experiments</td>
			</tr>
			<tr>
					<td>Training data</td>
					<td>Dataset</td>
					<td>N/A</td>
					<td>Generated procedurally; simulation code included in repository</td>
			</tr>
			<tr>
					<td>Trained models</td>
					<td>Model</td>
					<td>N/A</td>
					<td>Not provided</td>
			</tr>
	</tbody>
</table>
<hr>
<h2 id="paper-information">Paper Information</h2>
<p><strong>Citation</strong>: Cranmer, M., Greydanus, S., Hoyer, S., Battaglia, P., Spergel, D., &amp; Ho, S. (2020). Lagrangian Neural Networks. <em>ICLR 2020 Workshop on Integration of Deep Neural Models and Differential Equations</em>. arXiv: <a href="https://arxiv.org/abs/2003.04630">2003.04630</a></p>
<p><strong>Publication</strong>: ICLR 2020 Workshop on Integration of Deep Neural Models and Differential Equations</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-bibtex" data-lang="bibtex"><span style="display:flex;"><span><span style="color:#a6e22e">@misc</span>{cranmer2020lagrangian,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">title</span>=<span style="color:#e6db74">{Lagrangian Neural Networks}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">author</span>=<span style="color:#e6db74">{Cranmer, Miles and Greydanus, Sam and Hoyer, Stephan and Battaglia, Peter and Spergel, David and Ho, Shirley}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">year</span>=<span style="color:#e6db74">{2020}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">eprint</span>=<span style="color:#e6db74">{2003.04630}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">archiveprefix</span>=<span style="color:#e6db74">{arXiv}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">primaryclass</span>=<span style="color:#e6db74">{cs.LG}</span>
</span></span><span style="display:flex;"><span>}
</span></span></code></pre></div>]]></content:encoded></item><item><title>Neural Scaling of Deep Chemical Models</title><link>https://hunterheidenreich.com/notes/chemistry/molecular-representations/encoders/neural-scaling-of-deep-chemical-models/</link><pubDate>Tue, 24 Mar 2026 00:00:00 +0000</pubDate><guid>https://hunterheidenreich.com/notes/chemistry/molecular-representations/encoders/neural-scaling-of-deep-chemical-models/</guid><description>Frey et al. discover neural scaling laws for chemical LLMs and GNN interatomic potentials, showing power-law loss improvements with scale.</description><content:encoded><![CDATA[<h2 id="what-kind-of-paper-is-this">What kind of paper is this?</h2>
<p>This is a <strong>discovery paper</strong> that identifies empirical neural scaling laws in two distinct domains of chemical deep learning: large language models (LLMs) for generative chemistry and graph neural networks (GNNs) for machine-learned interatomic potentials. The paper also introduces training performance estimation (TPE) as a practical tool for accelerating hyperparameter optimization in these domains.</p>
<h2 id="why-scaling-laws-matter-for-chemistry">Why scaling laws matter for chemistry</h2>
<p>Neural scaling laws, first characterized for NLP models by Kaplan et al. (2020), describe how model loss decreases as a power law with increasing model size, dataset size, or compute:</p>
<p>$$
L(R) = \alpha R^{-\beta}
$$</p>
<p>where $\alpha$ is a coefficient, $\beta$ is the scaling exponent, and $R$ is the resource being scaled (parameters, data, or compute). These relationships have guided resource allocation decisions in NLP and computer vision, but their applicability to scientific deep learning was unknown.</p>
<p>Chemical deep learning differs from standard NLP and vision tasks in several key ways. Physics-based priors (like symmetry constraints) may reduce the need for massive scale. The heterogeneity of chemical space and molecular tasks makes general pre-training more challenging. There are no established default architectures, datasets, or training recipes at large scale for chemistry.</p>
<p>This paper asks: do the same scaling behaviors hold for chemical models, and how do physical priors affect them?</p>
<h2 id="training-performance-estimation-for-efficient-scaling">Training performance estimation for efficient scaling</h2>
<p>Before running expensive scaling experiments, the authors needed a way to efficiently select hyperparameters. They introduced TPE, a generalization of training speed estimation (TSE) to new domains. TSE computes the cumulative training loss over the first $T$ epochs:</p>
<p>$$
\text{TSE} = \sum_{t=1}^{T} \left( \frac{1}{B} \sum_{i=1}^{B} \mathcal{L}\left(f_{\theta(t,i)}(\mathbf{X}_i), \mathbf{y}_i\right) \right)
$$</p>
<p>where $B$ is the number of training steps per epoch, $\mathcal{L}$ is the loss function, and $f_{\theta(t,i)}$ is the network at epoch $t$ and mini-batch $i$. A linear regression then predicts converged loss from early-training TSE:</p>
<p>$$
L = m \times \text{TSE} + b
$$</p>
<p>Using only 20% of the total training budget, TPE achieves $R^2 = 0.98$ and Spearman&rsquo;s $\rho = 1.0$ for ChemGPT on the MOSES dataset. For GNNs, it achieves $R^2 \geq 0.86$ and $\rho \geq 0.92$ across SchNet, PaiNN, and SpookyNet. This enables discarding suboptimal configurations early, saving up to 90% of compute.</p>
<h2 id="chemgpt-scaling-chemical-language-models">ChemGPT: scaling chemical language models</h2>
<p>ChemGPT is a GPT-3-style autoregressive transformer for molecular generation. It uses GPT-Neo as its backbone with a SELFIES tokenizer, factorizing the probability of a molecular sequence as:</p>
<p>$$
p(x) = \prod_{i=1}^{n} p\left(s_i \mid s_1, \dots, s_{i-1}\right)
$$</p>
<p>The authors trained ChemGPT models ranging from ~78K to over 1 billion non-embedding parameters on subsets of PubChem10M (up to ~10 million molecules, or ~300 million tokens). Key findings from the scaling experiments:</p>
<ul>
<li><strong>Pre-training loss monotonically improves</strong> with increasing dataset size up to nearly 10 million molecules, with no saturation observed.</li>
<li><strong>For a fixed data budget</strong>, increasing model size provides monotonic improvements until models reach ~1 billion parameters.</li>
<li><strong>The scaling exponent</strong> $\beta = 0.17 \pm 0.01$ for the largest dataset (after excluding the three largest models from the power-law fit), and $\beta = 0.30 \pm 0.01$ for the next largest dataset.</li>
<li><strong>Resolution-limited regimes</strong> appear where the power-law behavior breaks down, indicating either insufficient data for a given model size or vice versa. These regimes shift depending on the data budget.</li>
</ul>
<p>An interesting observation: for small datasets, large models ($10^7$ parameters and above) still provide notable loss improvements, suggesting that scaling up model size helps even when data is limited.</p>
<h2 id="neural-force-field-scaling-with-gnns">Neural force field scaling with GNNs</h2>
<p>For tasks requiring three-dimensional molecular geometry, the authors studied GNN-based neural force fields (NFFs). These models predict energies $\hat{E} = f_\theta(X)$ and derive forces by differentiation:</p>
<p>$$
\hat{F}_{ij} = -\frac{\partial \hat{E}}{\partial r_{ij}}
$$</p>
<p>Training uses an L1 loss over energies and forces:</p>
<p>$$
\mathcal{L} = \frac{1}{N} \sum_{i=1}^{N} \left[ \alpha_E | E_i - \hat{E}_i | + \alpha_F | \mathbf{F}_i - \hat{\mathbf{F}}_i | \right]
$$</p>
<p>Four NFF architectures were studied, spanning a range of physical priors:</p>
<table>
	<thead>
			<tr>
					<th>Model</th>
					<th>Type</th>
					<th>Key Characteristic</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td>SchNet</td>
					<td>E(3) invariant</td>
					<td>Continuous filter convolutions</td>
			</tr>
			<tr>
					<td>PaiNN</td>
					<td>E(3) equivariant</td>
					<td>Equivariant message passing</td>
			</tr>
			<tr>
					<td>Allegro</td>
					<td>E(3) equivariant</td>
					<td>Local, learned many-body functions</td>
			</tr>
			<tr>
					<td>SpookyNet</td>
					<td>E(3) equivariant</td>
					<td>Non-local interactions, empirical corrections</td>
			</tr>
	</tbody>
</table>
<p>Model capacity is parameterized as $c = d \times w$ (depth times width). Models were trained on subsets of the ANI-1x dataset (up to 100,000 geometries, corresponding to ~4.5 million force labels).</p>
<p>Key GNN scaling findings:</p>
<ul>
<li><strong>PaiNN shows monotonic loss improvement</strong> with increasing dataset size and strong correlation between converged loss and model capacity (Spearman&rsquo;s $\rho \geq 0.88$).</li>
<li><strong>Equivariant GNNs (PaiNN, Allegro) show better scaling efficiency</strong> than invariant GNNs (SchNet), with larger $\beta$ values.</li>
<li><strong>The scaling exponent for equivariant GNNs</strong> is $\beta = 0.26$, indicating that physics-based equivariance priors provide greater sample efficiency that persists to much larger and more chemically diverse datasets than previously studied.</li>
<li><strong>A transition at $10^4$ datapoints</strong> shows nearly perfect rank correlation between model capacity and converged loss ($\rho \geq 0.93$), suggesting this may be a threshold where models move from memorization to generalization.</li>
</ul>
<h2 id="results-and-practical-implications">Results and practical implications</h2>
<p>The scaling results provide actionable guidance for resource allocation:</p>
<ul>
<li>For <strong>chemical LLMs with large data budgets</strong>, the greatest loss improvements come from scaling up small models (around $10^5$ parameters).</li>
<li>For <strong>small data budgets</strong>, rapid improvements come from scaling medium-sized models ($10^7$ parameters).</li>
<li>For <strong>NFFs</strong>, low-capacity models show diminishing returns with more data, while high-capacity models show rapid improvements with increasing dataset size.</li>
<li><strong>Neither model type has saturated</strong> with respect to model size, dataset size, or compute, suggesting substantial room for improvement with further scaling.</li>
</ul>
<p>The 300-million-parameter ChemGPT trained on 300 million tokens and the PaiNN model with capacity ~1,000 trained on $10^5$ frames achieved the minimum losses in their respective scaling plots, providing concrete targets for practitioners.</p>
<h2 id="reproducibility-details">Reproducibility Details</h2>
<p><strong>Data:</strong></p>
<ul>
<li>PubChem10M (10M SMILES strings, via DeepChem)</li>
<li>MOSES (2M molecules, for TPE validation)</li>
<li>ANI-1x (5M DFT calculations, via Figshare)</li>
<li>Revised MD-17 (10 small organic molecules, 10,000 frames for TPE)</li>
</ul>
<p><strong>Models:</strong></p>
<ul>
<li>ChemGPT: GPT-Neo backbone, 24 layers, widths from 16 to 2,048, sizes from ~78K to ~1.2B non-embedding parameters</li>
<li>SchNet, PaiNN, Allegro, SpookyNet: widths of 16, 64, 256; depths of 2, 3, 4; 5 Angstrom cutoff</li>
</ul>
<p><strong>Training:</strong></p>
<ul>
<li>ChemGPT: AdamW optimizer, learning rate $2 \times 10^{-5}$, batch size 8 per GPU, 10 epochs, cross-entropy loss</li>
<li>GNNs: Adam optimizer, learning rate scheduler (halved after 30 epochs without improvement), early stopping after 50 stagnant epochs, max 1,000 epochs, L1 loss (force-only training)</li>
</ul>
<p><strong>Hardware:</strong></p>
<ul>
<li>NVIDIA Volta V100 GPUs (32 GB), 2 GPUs per node</li>
<li>PyTorch with distributed data parallel (DDP), PyTorch Lightning, LitMatter</li>
</ul>
<p><strong>Code:</strong> <a href="https://github.com/ncfrey/litmatter">LitMatter repository</a></p>
<h2 id="paper-information">Paper Information</h2>
<p><strong>Citation:</strong> Frey, N.C., Soklaski, R., Axelrod, S. et al. Neural scaling of deep chemical models. <em>Nat Mach Intell</em> <strong>5</strong>, 1297-1305 (2023).</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-bibtex" data-lang="bibtex"><span style="display:flex;"><span><span style="color:#a6e22e">@article</span>{frey2023neural,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">title</span>=<span style="color:#e6db74">{Neural scaling of deep chemical models}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">author</span>=<span style="color:#e6db74">{Frey, Nathan C. and Soklaski, Ryan and Axelrod, Simon and Samsi, Siddharth and G{\&#39;o}mez-Bombarelli, Rafael and Coley, Connor W. and Gadepally, Vijay}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">journal</span>=<span style="color:#e6db74">{Nature Machine Intelligence}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">volume</span>=<span style="color:#e6db74">{5}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">number</span>=<span style="color:#e6db74">{11}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">pages</span>=<span style="color:#e6db74">{1297--1305}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">year</span>=<span style="color:#e6db74">{2023}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">publisher</span>=<span style="color:#e6db74">{Nature Publishing Group}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">doi</span>=<span style="color:#e6db74">{10.1038/s42256-023-00740-3}</span>
</span></span><span style="display:flex;"><span>}
</span></span></code></pre></div>]]></content:encoded></item><item><title>Tartarus: Realistic Inverse Molecular Design Benchmarks</title><link>https://hunterheidenreich.com/notes/chemistry/molecular-design/generation/evaluation/tartarus-inverse-molecular-design/</link><pubDate>Mon, 23 Mar 2026 00:00:00 +0000</pubDate><guid>https://hunterheidenreich.com/notes/chemistry/molecular-design/generation/evaluation/tartarus-inverse-molecular-design/</guid><description>Tartarus provides physics-based benchmark tasks for inverse molecular design spanning materials, drugs, and reactions with algorithm-domain dependencies.</description><content:encoded><![CDATA[<h2 id="a-resource-for-realistic-molecular-design-evaluation">A Resource for Realistic Molecular Design Evaluation</h2>
<p>This is a <strong>Resource</strong> paper. Its primary contribution is Tartarus, a modular benchmarking platform for inverse molecular design that provides physically grounded evaluation tasks across four application domains: organic photovoltaics, organic emitters, protein ligands, and chemical reaction substrates. Each task pairs a curated reference dataset with a computational simulation workflow that evaluates proposed molecular structures using established methods from computational chemistry (<a href="https://en.wikipedia.org/wiki/Force_field_(chemistry)">force fields</a>, semi-empirical quantum chemistry, <a href="https://en.wikipedia.org/wiki/Density_functional_theory">density functional theory</a>, and <a href="https://en.wikipedia.org/wiki/Docking_(molecular)">molecular docking</a>).</p>
<h2 id="the-problem-with-existing-molecular-design-benchmarks">The Problem with Existing Molecular Design Benchmarks</h2>
<p>Inverse molecular design, the challenge of crafting molecules with specific optimal properties, is central to drug, catalyst, and materials discovery. Many algorithms have been proposed for this task, but the benchmarks used to evaluate them have significant limitations:</p>
<ul>
<li><strong>Penalized logP</strong>, one of the most common benchmarks, depends heavily on molecule size and chain composition, limiting its informativeness.</li>
<li><strong>QED maximization</strong> has reached saturation, with numerous models achieving near-perfect scores.</li>
<li><strong><a href="/notes/chemistry/molecular-design/generation/evaluation/guacamol-benchmarking-de-novo-molecular-design/">GuacaMol</a></strong> often yields near-perfect scores across models, obscuring meaningful performance differences. <a href="/notes/chemistry/molecular-design/generation/evaluation/pmo-sample-efficient-molecular-optimization/">Gao et al. (2022)</a> traced this to unlimited property evaluations, with imposed limits revealing much larger disparities.</li>
<li><strong>MOSES</strong> evaluates distribution-matching ability, but the emergence of <a href="/notes/chemistry/molecular-representations/notations/selfies/">SELFIES</a> and simple algorithms has made these tasks relatively straightforward.</li>
<li><strong>Molecular docking</strong> benchmarks are gaining popularity, but tend to favor reactive or unstable molecules and typically cover only drug design.</li>
</ul>
<p>These benchmarks share a common weakness: they rely on cheap, approximate property estimators (often QSAR models or simple heuristics) rather than physics-based simulations. This makes them poor proxies for real molecular design campaigns, where properties must be validated through computational or experimental workflows. Tartarus addresses this by providing benchmark tasks grounded in established simulation methods.</p>
<h2 id="physics-based-simulation-workflows-as-benchmark-oracles">Physics-Based Simulation Workflows as Benchmark Oracles</h2>
<p>The core innovation in Tartarus is the use of computational chemistry simulation pipelines as objective functions for benchmarking. Rather than relying on learned property predictors, each benchmark task runs a full simulation workflow to evaluate proposed molecules:</p>
<ol>
<li><strong>Organic Photovoltaics (OPV)</strong>: Starting from a <a href="/notes/chemistry/molecular-representations/notations/smiles/">SMILES</a> string, the workflow generates 3D coordinates with Open Babel, performs conformer search with CREST at the GFN-FF level, optimizes geometry at GFN2-xTB, and computes <a href="https://en.wikipedia.org/wiki/HOMO_and_LUMO">HOMO/LUMO</a> energies. Power conversion efficiency (PCE) is estimated via the Scharber model for single-junction <a href="https://en.wikipedia.org/wiki/Organic_solar_cell">organic solar cells</a>. HOMO and LUMO energies are calibrated against DFT results from the Harvard Clean Energy Project Database using <a href="https://en.wikipedia.org/wiki/Theil%E2%80%93Sen_estimator">Theil-Sen regression</a>:</li>
</ol>
<p>$$
E_{\text{HOMO, calibrated}} = E_{\text{HOMO, GFN2-xTB}} \cdot 0.8051 + 2.5377 \text{ eV}
$$</p>
<p>$$
E_{\text{LUMO, calibrated}} = E_{\text{LUMO, GFN2-xTB}} \cdot 0.8788 + 3.7913 \text{ eV}
$$</p>
<ol start="2">
<li>
<p><strong>Organic Emitters (OLED)</strong>: The workflow uses conformer search via CREST, geometry optimization at GFN0-xTB, and TD-DFT single-point calculations at the B3LYP/6-31G* level with PySCF to extract singlet-triplet gaps, <a href="https://en.wikipedia.org/wiki/Oscillator_strength">oscillator strengths</a>, and vertical excitation energies.</p>
</li>
<li>
<p><strong>Protein Ligands</strong>: The workflow generates 3D coordinates, applies structural filters (<a href="https://en.wikipedia.org/wiki/Lipinski%27s_rule_of_five">Lipinski&rsquo;s Rule of Five</a>, reactive moiety checks), and performs molecular docking using QuickVina2 with re-scoring via smina against three protein targets: 1SYH (ionotropic glutamate receptor), 6Y2F (<a href="https://en.wikipedia.org/wiki/3C-like_protease">SARS-CoV-2 main protease</a>), and 4LDE (beta-2 adrenoceptor).</p>
</li>
<li>
<p><strong>Chemical Reaction Substrates</strong>: The workflow models the intramolecular double hydrogen transfer in syn-sesquinorbornenes using the SEAM force field approach at the GFN-FF/GFN2-xTB level to compute activation and reaction energies.</p>
</li>
</ol>
<p>Each benchmark also includes a curated reference dataset for training generative models and a standardized evaluation protocol: train on 80% of the dataset, use 20% for hyperparameter optimization, then optimize structures starting from the best reference molecule with a constrained budget of 5,000 proposed compounds, a 24-hour runtime cap, and five independent repetitions.</p>
<h2 id="benchmark-tasks-datasets-and-model-comparisons">Benchmark Tasks, Datasets, and Model Comparisons</h2>
<h3 id="models-evaluated">Models Evaluated</h3>
<p>Eight generative models spanning major algorithm families were tested:</p>
<ul>
<li><strong>VAEs</strong>: SMILES-VAE and SELFIES-VAE</li>
<li><strong>Flow models</strong>: MoFlow</li>
<li><strong>Reinforcement learning</strong>: <a href="/notes/chemistry/molecular-design/generation/rl-tuned/reinvent-deep-rl-molecular-design/">REINVENT</a></li>
<li><strong>LSTM-based hill climbing</strong>: SMILES-LSTM-HC and SELFIES-LSTM-HC</li>
<li><strong>Genetic algorithms</strong>: <a href="/notes/chemistry/molecular-design/generation/search-based/graph-based-genetic-algorithm-chemical-space/">GB-GA</a> and JANUS</li>
</ul>
<h3 id="organic-photovoltaics-results">Organic Photovoltaics Results</h3>
<p>The reference dataset (CEP_SUB) contains approximately 25,000 molecules from the Harvard Clean Energy Project Database. Two objectives combine PCE with synthetic accessibility (SAscore):</p>
<table>
	<thead>
			<tr>
					<th>Model</th>
					<th>PCE_PCBM - SAscore</th>
					<th>PCE_PCDTBT - SAscore</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td>Dataset</td>
					<td>7.57</td>
					<td>31.71</td>
			</tr>
			<tr>
					<td>SMILES-VAE</td>
					<td>7.44 +/- 0.28</td>
					<td>10.23 +/- 11.14</td>
			</tr>
			<tr>
					<td>SELFIES-VAE</td>
					<td>7.05 +/- 0.66</td>
					<td>29.24 +/- 0.65</td>
			</tr>
			<tr>
					<td>MoFlow</td>
					<td>7.08 +/- 0.31</td>
					<td>29.81 +/- 0.37</td>
			</tr>
			<tr>
					<td>SMILES-LSTM-HC</td>
					<td>6.69 +/- 0.40</td>
					<td>31.79 +/- 0.15</td>
			</tr>
			<tr>
					<td>SELFIES-LSTM-HC</td>
					<td>7.40 +/- 0.41</td>
					<td>30.71 +/- 1.20</td>
			</tr>
			<tr>
					<td>REINVENT</td>
					<td>7.48 +/- 0.11</td>
					<td>30.47 +/- 0.44</td>
			</tr>
			<tr>
					<td>GB-GA</td>
					<td>7.78 +/- 0.02</td>
					<td>30.24 +/- 0.80</td>
			</tr>
			<tr>
					<td>JANUS</td>
					<td>7.59 +/- 0.14</td>
					<td>31.34 +/- 0.74</td>
			</tr>
	</tbody>
</table>
<p>GB-GA achieves the best score on the first task (7.78), while SMILES-LSTM-HC leads on the second (31.79). Most models can marginally improve PCE but struggle to simultaneously improve PCE and reduce SAscore.</p>
<h3 id="organic-emitters-results">Organic Emitters Results</h3>
<p>The reference dataset (GDB-13_SUB) contains approximately 380,000 molecules filtered for conjugated pi-systems from <a href="/notes/chemistry/datasets/gdb-13/">GDB-13</a>. Three objectives target singlet-triplet gap minimization, oscillator strength maximization, and a combined multi-objective:</p>
<table>
	<thead>
			<tr>
					<th>Model</th>
					<th>Delta E(S1-T1)</th>
					<th>f12</th>
					<th>Multi-objective</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td>Dataset</td>
					<td>0.020</td>
					<td>2.97</td>
					<td>-0.04</td>
			</tr>
			<tr>
					<td>SMILES-VAE</td>
					<td>0.071 +/- 0.003</td>
					<td>0.50 +/- 0.27</td>
					<td>-0.57 +/- 0.33</td>
			</tr>
			<tr>
					<td>SELFIES-VAE</td>
					<td>0.016 +/- 0.001</td>
					<td>0.36 +/- 0.31</td>
					<td>0.17 +/- 0.10</td>
			</tr>
			<tr>
					<td>MoFlow</td>
					<td>0.013 +/- 0.001</td>
					<td>0.81 +/- 0.11</td>
					<td>-0.04 +/- 0.06</td>
			</tr>
			<tr>
					<td>GB-GA</td>
					<td>0.012 +/- 0.002</td>
					<td>2.14 +/- 0.45</td>
					<td>0.07 +/- 0.03</td>
			</tr>
			<tr>
					<td>JANUS</td>
					<td>0.008 +/- 0.001</td>
					<td>2.07 +/- 0.16</td>
					<td>0.02 +/- 0.05</td>
			</tr>
	</tbody>
</table>
<p>Only JANUS, GB-GA, and SELFIES-VAE generate compounds comparable to or improving upon the best training molecules. JANUS achieves the lowest singlet-triplet gap (0.008 eV), while SELFIES-VAE achieves the highest multi-objective fitness (0.17). Some proposed structures contain reactive moieties, likely because stability is not explicitly penalized in the objective functions.</p>
<h3 id="protein-ligand-results">Protein Ligand Results</h3>
<p>The reference dataset contains approximately 152,000 molecules from the DTP Open Compound Collection, filtered for drug-likeness. Docking is performed against three protein targets using both QuickVina2 and smina re-scoring:</p>
<table>
	<thead>
			<tr>
					<th>Model</th>
					<th>1SYH (smina)</th>
					<th>6Y2F (smina)</th>
					<th>4LDE (smina)</th>
					<th>SR (1SYH)</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td>Dataset</td>
					<td>-10.2</td>
					<td>-8.2</td>
					<td>-13.1</td>
					<td>100.0%</td>
			</tr>
			<tr>
					<td>SMILES-VAE</td>
					<td>-10.4 +/- 0.6</td>
					<td>-8.9 +/- 0.8</td>
					<td>-11.1 +/- 0.4</td>
					<td>12.3%</td>
			</tr>
			<tr>
					<td>SELFIES-VAE</td>
					<td>-10.9 +/- 0.3</td>
					<td>-10.1 +/- 0.4</td>
					<td>-11.9 +/- 0.2</td>
					<td>34.8%</td>
			</tr>
			<tr>
					<td>REINVENT</td>
					<td>-12.1 +/- 0.2</td>
					<td>-11.4 +/- 0.3</td>
					<td>-13.7 +/- 0.5</td>
					<td>77.8%</td>
			</tr>
			<tr>
					<td>GB-GA</td>
					<td>-12.0 +/- 0.2</td>
					<td>-11.0 +/- 0.2</td>
					<td>-13.8 +/- 0.4</td>
					<td>72.6%</td>
			</tr>
			<tr>
					<td>JANUS</td>
					<td>-11.9 +/- 0.2</td>
					<td>-11.9 +/- 0.4</td>
					<td>-13.6 +/- 0.5</td>
					<td>68.4%</td>
			</tr>
	</tbody>
</table>
<p>No single model consistently achieves the best docking score across all three targets. REINVENT leads on 1SYH, JANUS on 6Y2F, and GB-GA on 4LDE. Both VAE models show low success rates for structural filter compliance (12-39%), while REINVENT, GAs, and LSTMs achieve 68-78%.</p>
<h3 id="chemical-reaction-substrates-results">Chemical Reaction Substrates Results</h3>
<p>The reference dataset (SNB-60K) contains approximately 60,000 syn-sesquinorbornene derivatives generated via <a href="/notes/chemistry/molecular-design/generation/search-based/stoned-selfies-chemical-space-exploration/">STONED-SELFIES</a> mutations. Four objectives target activation energy, reaction energy, and two combined metrics:</p>
<table>
	<thead>
			<tr>
					<th>Model</th>
					<th>Delta E(activation)</th>
					<th>Delta E(reaction)</th>
					<th>Delta E(act) + Delta E(rxn)</th>
					<th>-Delta E(act) + Delta E(rxn)</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td>Dataset</td>
					<td>64.94</td>
					<td>-34.39</td>
					<td>56.48</td>
					<td>-95.25</td>
			</tr>
			<tr>
					<td>SMILES-VAE</td>
					<td>76.81 +/- 0.25</td>
					<td>-10.96 +/- 0.71</td>
					<td>71.01 +/- 0.62</td>
					<td>-90.94 +/- 1.04</td>
			</tr>
			<tr>
					<td>MoFlow</td>
					<td>70.12 +/- 2.13</td>
					<td>-20.21 +/- 4.13</td>
					<td>63.21 +/- 0.69</td>
					<td>-92.82 +/- 3.06</td>
			</tr>
			<tr>
					<td>GB-GA</td>
					<td>56.04 +/- 3.07</td>
					<td>-41.39 +/- 5.76</td>
					<td>45.20 +/- 6.78</td>
					<td>-100.07 +/- 1.35</td>
			</tr>
			<tr>
					<td>JANUS</td>
					<td>47.56 +/- 2.19</td>
					<td>-45.37 +/- 7.90</td>
					<td>39.22 +/- 3.99</td>
					<td>-97.14 +/- 1.13</td>
			</tr>
	</tbody>
</table>
<p>Only JANUS and GB-GA consistently outperform the best reference compounds. Both VAE models fail to surpass the dataset baseline on any objective. JANUS achieves the best single-objective scores for activation energy (47.56) and reaction energy (-45.37), and the best combined score (39.22).</p>
<h2 id="key-findings-and-limitations">Key Findings and Limitations</h2>
<h3 id="central-finding-algorithm-performance-is-domain-dependent">Central Finding: Algorithm Performance is Domain-Dependent</h3>
<p>The most important result from Tartarus is that no single generative model consistently outperforms the others across all benchmark domains. This has several implications:</p>
<ul>
<li><strong>Genetic algorithms (GB-GA and JANUS) show the most consistently strong performance</strong> across benchmarks, despite being among the simplest approaches and requiring minimal pre-conditioning time (seconds vs. hours for deep models).</li>
<li><strong>VAE-based models (SMILES-VAE and SELFIES-VAE) show the weakest overall performance</strong>, often failing to surpass the best molecules in the reference datasets. Their reliance on the available training data appears to limit their effectiveness.</li>
<li><strong>REINVENT performs competitively on protein ligand tasks</strong> but shows weaker performance on other benchmarks.</li>
<li><strong>Representation matters</strong>: SELFIES-based models generally outperform their SMILES-based counterparts (e.g., SELFIES-VAE vs. SMILES-VAE), consistent with SELFIES providing 100% validity guarantees.</li>
</ul>
<h3 id="timing-analysis">Timing Analysis</h3>
<p>Training time varies dramatically across models. Both VAEs require over 9 hours of GPU training, with estimated CPU-only training times of approximately 25 days. REINVENT and MoFlow train in under 1 hour. Both GAs complete pre-conditioning in seconds and require no GPU.</p>
<h3 id="limitations-acknowledged-by-the-authors">Limitations Acknowledged by the Authors</h3>
<ul>
<li>Benchmark domains covered are not comprehensive and need expansion.</li>
<li>3D generative models are not well supported, as proposed conformers are ignored in favor of simulation-derived geometries.</li>
<li>The chemical reaction substrate benchmark requires specialized geometries (reactant, product, transition state) that most 3D generative models cannot produce.</li>
<li>Results depend heavily on both model hyperparameters and benchmark settings (compute budget, number of evaluations).</li>
<li>Objective functions may need revision when undesired structures are promoted.</li>
</ul>
<hr>
<h2 id="reproducibility-details">Reproducibility Details</h2>
<h3 id="data">Data</h3>
<table>
	<thead>
			<tr>
					<th>Purpose</th>
					<th>Dataset</th>
					<th>Size</th>
					<th>Notes</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td>OPV Training</td>
					<td>CEP_SUB (Harvard Clean Energy Project subset)</td>
					<td>~25,000 molecules</td>
					<td>From HIPS/neural-fingerprint repository</td>
			</tr>
			<tr>
					<td>Emitter Training</td>
					<td>GDB-13_SUB (filtered GDB-13)</td>
					<td>~380,000 molecules</td>
					<td>Conjugated pi-system filter applied</td>
			</tr>
			<tr>
					<td>Ligand Training</td>
					<td>DTP Open Compound Collection (filtered)</td>
					<td>~152,000 molecules</td>
					<td>Drug-likeness and structural filters applied</td>
			</tr>
			<tr>
					<td>Reaction Training</td>
					<td>SNB-60K (STONED-SELFIES mutations)</td>
					<td>~60,000 molecules</td>
					<td>Generated from syn-sesquinorbornene core</td>
			</tr>
	</tbody>
</table>
<h3 id="algorithms">Algorithms</h3>
<p>All eight algorithms are implemented in the Tartarus repository with configuration files and installation instructions. The evaluation protocol specifies: 80/20 train/validation split, population size of 5,000, 24-hour runtime cap, five independent runs per model.</p>
<h3 id="models">Models</h3>
<p>Pre-trained model checkpoints are not provided. Training must be performed from scratch using the provided reference datasets and hyperparameter configurations documented in the Supporting Information.</p>
<h3 id="evaluation">Evaluation</h3>
<p>Properties are evaluated through physics-based simulation workflows (not learned surrogates). Each workflow accepts a SMILES string and returns computed properties. Key software dependencies include: Open Babel, CREST, xTB, PySCF, QuickVina2, smina, and RDKit.</p>
<h3 id="hardware">Hardware</h3>
<p>Training and sampling benchmarks were conducted using 24 CPU cores (AMD Rome 7532 @ 2.40 GHz) and a single Tesla A100 GPU. Simulations were run on the Beluga, Narval, Niagara, Cedar, and Sherlock supercomputing clusters.</p>
<table>
	<thead>
			<tr>
					<th>Artifact</th>
					<th>Type</th>
					<th>License</th>
					<th>Notes</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td><a href="https://github.com/aspuru-guzik-group/Tartarus">Tartarus GitHub</a></td>
					<td>Code</td>
					<td>Unknown</td>
					<td>Benchmark tasks, simulation workflows, model configs</td>
			</tr>
			<tr>
					<td><a href="https://doi.org/10.5281/zenodo.8072249">Zenodo Archive</a></td>
					<td>Dataset</td>
					<td>Unknown</td>
					<td>Reference datasets for all four benchmark domains</td>
			</tr>
			<tr>
					<td><a href="https://discord.gg/KypwPXTY2s">Discord Community</a></td>
					<td>Other</td>
					<td>N/A</td>
					<td>Discussion and collaboration channel</td>
			</tr>
	</tbody>
</table>
<hr>
<h2 id="paper-information">Paper Information</h2>
<p><strong>Citation</strong>: Nigam, A., Pollice, R., Tom, G., Jorner, K., Willes, J., Thiede, L. A., Kundaje, A., &amp; Aspuru-Guzik, A. (2023). Tartarus: A Benchmarking Platform for Realistic And Practical Inverse Molecular Design. <em>Advances in Neural Information Processing Systems 36</em>, 3263-3306.</p>
<p><strong>Publication</strong>: NeurIPS 2023</p>
<p><strong>Additional Resources</strong>:</p>
<ul>
<li><a href="https://github.com/aspuru-guzik-group/Tartarus">Tartarus GitHub Repository</a></li>
<li><a href="https://doi.org/10.5281/zenodo.8072249">Zenodo Dataset Archive</a></li>
<li><a href="https://discord.gg/KypwPXTY2s">Discord Community</a></li>
</ul>
<h2 id="citation">Citation</h2>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-bibtex" data-lang="bibtex"><span style="display:flex;"><span><span style="color:#a6e22e">@inproceedings</span>{nigam2023tartarus,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">title</span>=<span style="color:#e6db74">{Tartarus: A Benchmarking Platform for Realistic And Practical Inverse Molecular Design}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">author</span>=<span style="color:#e6db74">{Nigam, AkshatKumar and Pollice, Robert and Tom, Gary and Jorner, Kjell and Willes, John and Thiede, Luca A. and Kundaje, Anshul and Aspuru-Guzik, Al{\&#39;a}n}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">booktitle</span>=<span style="color:#e6db74">{Advances in Neural Information Processing Systems}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">volume</span>=<span style="color:#e6db74">{36}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">pages</span>=<span style="color:#e6db74">{3263--3306}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">year</span>=<span style="color:#e6db74">{2023}</span>
</span></span><span style="display:flex;"><span>}
</span></span></code></pre></div>]]></content:encoded></item><item><title>Neural ODEs: Continuous-Depth Deep Learning Models</title><link>https://hunterheidenreich.com/notes/machine-learning/generative-models/neural-odes/</link><pubDate>Sun, 21 Dec 2025 00:00:00 +0000</pubDate><guid>https://hunterheidenreich.com/notes/machine-learning/generative-models/neural-odes/</guid><description>Introduces ODE-Nets, a continuous-depth neural network model parameterized by ODEs, enabling constant memory backpropagation and adaptive computation.</description><content:encoded><![CDATA[<blockquote>
<p><strong>Key Prerequisites</strong>: Before diving in, note that for the ODE solver to guarantee a unique solution, the neural network $f(h(t), t, \theta)$ parameterizing the dynamics must be <a href="https://en.wikipedia.org/wiki/Lipschitz_continuity">Lipschitz continuous</a>. This ensures the <a href="https://en.wikipedia.org/wiki/Picard%E2%80%93Lindel%C3%B6f_theorem">Picard-Lindelöf theorem</a> holds, preventing trajectories from crossing and guaranteeing a well-defined backward pass.</p>
</blockquote>
<h2 id="what-kind-of-paper-is-this">What kind of paper is this?</h2>
<p>This is primarily a <strong>Method</strong> paper, with a strong secondary <strong>Theory</strong> component.</p>
<ul>
<li><strong>Method</strong>: It proposes a novel family of deep neural network models where the derivative of the hidden state is parameterized by a neural network. It provides specific algorithms (Algorithm 1) for training these models scalably.</li>
<li><strong>Theory</strong>: It derives the adjoint sensitivity method for backpropagating through black-box ODE solvers and proves the &ldquo;Instantaneous Change of Variables&rdquo; theorem (Theorem 1) for continuous normalizing flows.</li>
</ul>
<h2 id="what-is-the-motivation">What is the motivation?</h2>
<p>The authors aim to address limitations in discrete deep learning architectures:</p>
<ul>
<li><strong>Discrete vs. Continuous</strong>: Existing models like Residual Networks build transformations by composing discrete steps, which can be seen as an Euler discretization of a continuous transformation. The authors investigate the limit as step sizes go to zero.</li>
<li><strong>Memory Efficiency</strong>: Backpropagating through deep discrete networks requires storing intermediate activations, leading to linear memory cost in terms of depth, which is a major bottleneck.</li>
<li><strong>Irregular Data</strong>: Recurrent Neural Networks (RNNs) struggle with data arriving at arbitrary times, typically requiring discretization into fixed bins.</li>
<li><strong>Normalizing Flow Costs</strong>: Standard normalizing flows have a bottleneck in computing the determinant of the Jacobian, which is computationally expensive ($O(D^3)$).</li>
</ul>
<h2 id="what-is-the-novelty-here">What is the novelty here?</h2>
<p>The core contribution is the <strong>Neural ODE</strong> formulation:
$$\frac{dh(t)}{dt} = f(h(t), t, \theta)$$
where the output is computed using a black-box differential equation solver.</p>
<p>Key technical innovations include:</p>
<ol>
<li><strong>Adjoint Sensitivity Method for Backprop</strong>: The authors treat the solver as a black box and compute gradients by solving a second, augmented ODE backwards in time. This allows for <strong>constant memory cost</strong> regardless of depth.</li>
<li><strong>Adaptive Computation</strong>: The model uses modern ODE solvers that adapt evaluation steps based on error tolerance, allowing the model to trade precision for speed explicitly.</li>
<li><strong>Continuous Normalizing Flows (CNF)</strong>: By moving to continuous time, the change of variables formula simplifies from a log-determinant (cubic cost) to a trace operation (linear cost), enabling scalable generative modeling.</li>
<li><strong>Latent ODEs</strong>: A generative time-series model that represents time-series as latent trajectories determined by a local initial state and global shared dynamics, handling irregular sampling naturally.</li>
</ol>
<h2 id="what-experiments-were-performed">What experiments were performed?</h2>
<p>The authors validated the method across three distinct domains:</p>
<ol>
<li><strong>Supervised Learning (MNIST)</strong>:
<ul>
<li>Compared <strong>ODE-Net</strong> against a standard <strong>ResNet</strong> and a Runge-Kutta network (<strong>RK-Net</strong>).</li>
<li>Measured test error, parameter count, and memory usage.</li>
<li>Analyzed the trade-off between numerical precision (tolerance) and speed (NFE).</li>
</ul>
</li>
<li><strong>Continuous Normalizing Flows (Generative)</strong>:
<ul>
<li>Compared CNF against standard Normalizing Flows (NF) on density matching and maximum likelihood estimation tasks using toy 2D datasets (Two Circles, Two Moons, and other target distributions).</li>
<li>Evaluated training loss (KL divergence) and maximum likelihood estimation.</li>
</ul>
</li>
<li><strong>Time-Series Modeling (Latent ODE)</strong>:
<ul>
<li>Tested on a dataset of bi-directional spirals with irregular timestamps and Gaussian noise.</li>
<li>Compared Latent ODEs against an RNN baseline on predictive RMSE. A second RNN variant with time-difference concatenation was also trained.</li>
</ul>
</li>
</ol>
<h2 id="what-outcomesconclusions">What outcomes/conclusions?</h2>
<ul>
<li><strong>Efficiency</strong>: ODE-Nets achieved roughly equivalent accuracy to ResNets on MNIST (0.42% vs 0.41% error) but with <strong>constant memory cost</strong> ($O(1)$) compared to ResNet&rsquo;s linear cost ($O(L)$).</li>
<li><strong>Adaptive Depth</strong>: The number of function evaluations (NFE) in ODE-Nets increases with training epoch, suggesting the model adapts its complexity as it learns. The backward pass NFE is roughly half the forward pass NFE, indicating that the adjoint method is also more computationally efficient than direct backpropagation through the integrator.</li>
<li><strong>Generative Performance</strong>: Continuous Normalizing Flows (CNF) achieved lower KL divergence loss than standard Normalizing Flows (NF), trained with only 10,000 iterations (Adam) compared to 500,000 iterations (RMSprop) for NF. Note that the two models used different optimizers, so the comparison is not fully controlled. CNF can also expand capacity by increasing width ($M$) without architectural constraints.</li>
<li><strong>Irregular Time-Series</strong>: Latent ODEs significantly outperformed RNNs across all observation counts on irregular spiral data. The advantage is most pronounced with sparse observations (0.1642 vs 0.3937 RMSE at 30 obs), and the model learns interpretable latent trajectories that switch direction smoothly.</li>
</ul>
<hr>
<h2 id="reproducibility-details">Reproducibility Details</h2>
<h3 id="data">Data</h3>
<ul>
<li><strong>MNIST</strong>: Standard handwritten digit dataset used for supervised learning benchmarks.</li>
<li><strong>Toy 2D Densities</strong>: &ldquo;Two Circles&rdquo; and &ldquo;Two Moons&rdquo; distributions used for visualizing normalizing flows.</li>
<li><strong>Bi-directional Spirals</strong>: A generated dataset of 1,000 2D spirals (half clockwise, half counter-clockwise). Each spiral is sampled at 100 equally-spaced timesteps with added Gaussian noise. For training, each spiral is then subsampled without replacement to $n \in {30, 50, 100}$ irregularly-spaced observations, simulating realistic missing data.</li>
</ul>
<h3 id="algorithms">Algorithms</h3>
<p><strong>1. Adjoint Sensitivity Method (Backpropagation)</strong></p>
<p>To optimize the parameters of the ODE-Net, the authors use the adjoint sensitivity method to compute gradients. Standard backpropagation would require storing the activations at every step of the ODE solver, incurring a high memory cost that scales linearly with the number of steps.</p>
<p>Instead, this method treats the ODE solver as a &ldquo;black box&rdquo; and computes gradients by solving a second, <strong>augmented ODE</strong> backwards in time from the final state $t_1$ to the initial state $t_0$.</p>
<p>The augmented state contains three components that are solved simultaneously:</p>
<ol>
<li><strong>The State</strong>: The original hidden state $z(t)$, which is reconstructed backwards.</li>
<li><strong>The Adjoint</strong>: The sensitivity of the loss with respect to the state, $a(t) = \partial L / \partial z(t)$.</li>
<li><strong>The Gradient</strong>: The accumulating gradients with respect to parameters, $\partial L / \partial \theta$.</li>
</ol>
<p>The dynamics of this augmented system are defined as:
$$\frac{d}{dt}\begin{bmatrix} z(t) \ a(t) \ \partial L/\partial \theta \end{bmatrix} = \begin{bmatrix} f(z(t), t, \theta) \ -a(t)^T \frac{\partial f}{\partial z} \ -a(t)^T \frac{\partial f}{\partial \theta} \end{bmatrix}$$</p>
<p>Using this approach, the vector-Jacobian products (e.g., $a(t)^T \frac{\partial f}{\partial z}$) are evaluated efficiently using automatic differentiation.</p>
<blockquote>
<p><strong>Why:</strong> Reconstructing $z(t)$ backwards avoids storing the forward pass, enabling <strong>constant memory cost</strong> ($O(1)$) regardless of depth.</p>
<p><strong>Origin:</strong> Adapted from Pontryagin&rsquo;s maximum principle (1962) for optimal control.</p>
</blockquote>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-python" data-lang="python"><span style="display:flex;"><span><span style="color:#f92672">import</span> torch
</span></span><span style="display:flex;"><span><span style="color:#f92672">import</span> torch.nn <span style="color:#66d9ef">as</span> nn
</span></span><span style="display:flex;"><span><span style="color:#f92672">from</span> torchdiffeq <span style="color:#f92672">import</span> odeint_adjoint
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">class</span> <span style="color:#a6e22e">ODEFunc</span>(nn<span style="color:#f92672">.</span>Module):
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">def</span> <span style="color:#a6e22e">__init__</span>(self, dim):
</span></span><span style="display:flex;"><span>        super(ODEFunc, self)<span style="color:#f92672">.</span><span style="color:#a6e22e">__init__</span>()
</span></span><span style="display:flex;"><span>        self<span style="color:#f92672">.</span>net <span style="color:#f92672">=</span> nn<span style="color:#f92672">.</span>Sequential(
</span></span><span style="display:flex;"><span>            nn<span style="color:#f92672">.</span>Linear(dim, <span style="color:#ae81ff">50</span>),
</span></span><span style="display:flex;"><span>            nn<span style="color:#f92672">.</span>Tanh(),
</span></span><span style="display:flex;"><span>            nn<span style="color:#f92672">.</span>Linear(<span style="color:#ae81ff">50</span>, dim),
</span></span><span style="display:flex;"><span>        )
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">def</span> <span style="color:#a6e22e">forward</span>(self, t, y):
</span></span><span style="display:flex;"><span>        <span style="color:#75715e"># Defines dy/dt = f(y, t)</span>
</span></span><span style="display:flex;"><span>        <span style="color:#66d9ef">return</span> self<span style="color:#f92672">.</span>net(y)
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># Usage with adjoint method for O(1) memory backprop</span>
</span></span><span style="display:flex;"><span>func <span style="color:#f92672">=</span> ODEFunc(dim<span style="color:#f92672">=</span><span style="color:#ae81ff">2</span>)
</span></span><span style="display:flex;"><span>y0 <span style="color:#f92672">=</span> torch<span style="color:#f92672">.</span>tensor([[<span style="color:#ae81ff">1.</span>, <span style="color:#ae81ff">0.</span>]]) <span style="color:#75715e"># Initial state</span>
</span></span><span style="display:flex;"><span>t <span style="color:#f92672">=</span> torch<span style="color:#f92672">.</span>linspace(<span style="color:#ae81ff">0.</span>, <span style="color:#ae81ff">1.</span>, <span style="color:#ae81ff">10</span>) <span style="color:#75715e"># Time points to solve for</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># &#39;odeint_adjoint&#39; automatically handles the augmented state backward pass</span>
</span></span><span style="display:flex;"><span>out <span style="color:#f92672">=</span> odeint_adjoint(func, y0, t, method<span style="color:#f92672">=</span><span style="color:#e6db74">&#39;dopri5&#39;</span>)
</span></span></code></pre></div><p><strong>2. Instantaneous Change of Variables (CNF)</strong></p>
<p>For generative modeling, the authors introduce <strong>Continuous Normalizing Flows (CNF)</strong>. In discrete normalizing flows, the probability density of a transformed variable is calculated using the change of variables theorem, which requires computing the log-determinant of the Jacobian: $\log p(z_1) = \log p(z_0) - \log |\det \frac{\partial z_1}{\partial z_0}|$. This operation is computationally expensive ($O(D^3)$) and often restricts model architectures to ensure the Jacobian is easy to compute (e.g., triangular).</p>
<p>Moving to continuous time simplifies this requirement. The paper proves that if the transformation is defined by an ODE, the change in log-probability follows a differential equation determined by the <strong>trace</strong> of the Jacobian:
$$\frac{\partial \log p(z(t))}{\partial t} = -\text{tr}\left( \frac{\partial f}{\partial z(t)} \right)$$</p>
<p>The total change in log-density is obtained by integrating this value over time.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-python" data-lang="python"><span style="display:flex;"><span><span style="color:#66d9ef">def</span> <span style="color:#a6e22e">get_trace</span>(y, f):
</span></span><span style="display:flex;"><span>    <span style="color:#e6db74">&#34;&#34;&#34;
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">    Computes trace of Jacobian df/dy.
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">    For high dimensions, use Hutchinson&#39;s trace estimator (approximate).
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">    &#34;&#34;&#34;</span>
</span></span><span style="display:flex;"><span>    tr <span style="color:#f92672">=</span> <span style="color:#ae81ff">0.</span>
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">for</span> i <span style="color:#f92672">in</span> range(y<span style="color:#f92672">.</span>size(<span style="color:#ae81ff">1</span>)):
</span></span><span style="display:flex;"><span>        <span style="color:#75715e"># Gradients of f&#39;s i-th component w.r.t y&#39;s i-th component</span>
</span></span><span style="display:flex;"><span>        tr <span style="color:#f92672">+=</span> torch<span style="color:#f92672">.</span>autograd<span style="color:#f92672">.</span>grad(f[:, i]<span style="color:#f92672">.</span>sum(), y, create_graph<span style="color:#f92672">=</span><span style="color:#66d9ef">True</span>)[<span style="color:#ae81ff">0</span>][:, i]
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">return</span> tr
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># In the ODE function:</span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># d(log_p)/dt = -trace(df/dy)</span>
</span></span></code></pre></div><blockquote>
<p><strong>Why:</strong> The trace operator has <strong>linear cost</strong> ($O(D)$), whereas the determinant has cubic cost ($O(D^3)$). This allows for unrestricted, &ldquo;wide&rdquo; architectures that are automatically bijective.</p>
<p><strong>Origin:</strong> This is the &ldquo;Instantaneous Change of Variables&rdquo; theorem (Theorem 1), derived in Appendix A of the paper.</p>
</blockquote>
<h3 id="models">Models</h3>
<p><strong>ODE-Net (MNIST Classification)</strong>:</p>
<ul>
<li><strong>Input</strong>: Downsamples input twice.</li>
<li><strong>Core</strong>: 6 standard residual blocks replaced by a single <strong>ODESolve</strong> module.</li>
<li><strong>Output</strong>: Global average pooling + Fully connected layer.</li>
<li><strong>Solver</strong>: Implicit Adams method.</li>
</ul>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-python" data-lang="python"><span style="display:flex;"><span><span style="color:#66d9ef">class</span> <span style="color:#a6e22e">ODEBlock</span>(nn<span style="color:#f92672">.</span>Module):
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">def</span> <span style="color:#a6e22e">__init__</span>(self, odefunc):
</span></span><span style="display:flex;"><span>        super(ODEBlock, self)<span style="color:#f92672">.</span><span style="color:#a6e22e">__init__</span>()
</span></span><span style="display:flex;"><span>        self<span style="color:#f92672">.</span>odefunc <span style="color:#f92672">=</span> odefunc
</span></span><span style="display:flex;"><span>        self<span style="color:#f92672">.</span>integration_time <span style="color:#f92672">=</span> torch<span style="color:#f92672">.</span>tensor([<span style="color:#ae81ff">0</span>, <span style="color:#ae81ff">1</span>])<span style="color:#f92672">.</span>float()
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">def</span> <span style="color:#a6e22e">forward</span>(self, x):
</span></span><span style="display:flex;"><span>        self<span style="color:#f92672">.</span>integration_time <span style="color:#f92672">=</span> self<span style="color:#f92672">.</span>integration_time<span style="color:#f92672">.</span>type_as(x)
</span></span><span style="display:flex;"><span>        <span style="color:#75715e"># Returns [x(t0), x(t1)]; we only want final state x(t1)</span>
</span></span><span style="display:flex;"><span>        out <span style="color:#f92672">=</span> odeint_adjoint(self<span style="color:#f92672">.</span>odefunc, x, self<span style="color:#f92672">.</span>integration_time)
</span></span><span style="display:flex;"><span>        <span style="color:#66d9ef">return</span> out[<span style="color:#ae81ff">1</span>]
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># ResNet-like architecture with ODE block</span>
</span></span><span style="display:flex;"><span>model <span style="color:#f92672">=</span> nn<span style="color:#f92672">.</span>Sequential(
</span></span><span style="display:flex;"><span>    nn<span style="color:#f92672">.</span>Conv2d(<span style="color:#ae81ff">1</span>, <span style="color:#ae81ff">64</span>, <span style="color:#ae81ff">3</span>, <span style="color:#ae81ff">1</span>),
</span></span><span style="display:flex;"><span>    nn<span style="color:#f92672">.</span>ReLU(inplace<span style="color:#f92672">=</span><span style="color:#66d9ef">True</span>),
</span></span><span style="display:flex;"><span>    ODEBlock(ODEFunc(<span style="color:#ae81ff">64</span>)), <span style="color:#75715e"># Continuous-depth layer replacement</span>
</span></span><span style="display:flex;"><span>    nn<span style="color:#f92672">.</span>BatchNorm2d(<span style="color:#ae81ff">64</span>),
</span></span><span style="display:flex;"><span>    nn<span style="color:#f92672">.</span>AdaptiveAvgPool2d((<span style="color:#ae81ff">1</span>, <span style="color:#ae81ff">1</span>)),
</span></span><span style="display:flex;"><span>    nn<span style="color:#f92672">.</span>Flatten(),
</span></span><span style="display:flex;"><span>    nn<span style="color:#f92672">.</span>Linear(<span style="color:#ae81ff">64</span>, <span style="color:#ae81ff">10</span>)
</span></span><span style="display:flex;"><span>)
</span></span></code></pre></div><p><strong>Latent ODE (Time-Series)</strong>:</p>
<ul>
<li><strong>Encoder</strong>: RNN with 25 hidden units processing data backwards to produce $q(z_0|x)$. It runs backwards so the final RNN state summarizes the entire sequence at $t_0$, parameterizing the initial latent state $z_0$ for the forward-running ODE.</li>
<li><strong>Latent Space</strong>: 4-dimensional latent state $z_0$.</li>
<li><strong>Dynamics ($f$)</strong>: Neural network with one hidden layer of 20 units.</li>
<li><strong>Decoder</strong>: Neural network with one hidden layer of 20 units computing $p(x_{t_i}|z_{t_i})$.</li>
<li><strong>Likelihood</strong>: Gaussian log-likelihood for the spiral reconstruction task. The paper also describes an optional Poisson process likelihood $\lambda(z(t))$ for event-time data (e.g., medical records), but this is not used in the spiral experiment.</li>
</ul>
<h3 id="evaluation">Evaluation</h3>
<table>
	<thead>
			<tr>
					<th>Experiment</th>
					<th>Metric</th>
					<th>Baseline (ResNet/RNN)</th>
					<th>ODE Model</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td>MNIST</td>
					<td>Test Error</td>
					<td>0.41%</td>
					<td>0.42%</td>
			</tr>
			<tr>
					<td>MNIST</td>
					<td>Parameters</td>
					<td>0.60 M</td>
					<td>0.22 M</td>
			</tr>
			<tr>
					<td>MNIST</td>
					<td>Memory</td>
					<td>$O(L)$</td>
					<td>$O(1)$</td>
			</tr>
			<tr>
					<td>Spirals (30 obs)</td>
					<td>RMSE</td>
					<td>0.3937</td>
					<td><strong>0.1642</strong></td>
			</tr>
			<tr>
					<td>Spirals (50 obs)</td>
					<td>RMSE</td>
					<td>0.3202</td>
					<td><strong>0.1502</strong></td>
			</tr>
			<tr>
					<td>Spirals (100 obs)</td>
					<td>RMSE</td>
					<td>0.1813</td>
					<td><strong>0.1346</strong></td>
			</tr>
	</tbody>
</table>
<h3 id="hardware">Hardware</h3>
<ul>
<li><strong>Implementation</strong>: Hidden state dynamics evaluated on GPU using <strong>TensorFlow</strong>.</li>
<li><strong>Solvers</strong>: Fortran ODE solvers (LSODE, VODE) from <code>scipy.integrate</code> were used for the actual integration.</li>
<li><strong>Note</strong>: While the original paper used TensorFlow/Scipy, the authors later released <code>torchdiffeq</code> (PyTorch), which has become the standard implementation for this architecture. The code samples above reflect this modern standard.</li>
<li><strong>Interface</strong>: Python&rsquo;s <code>autograd</code> framework bridged the TensorFlow dynamics and Scipy solvers.</li>
</ul>
<h3 id="limitations">Limitations</h3>
<p>The paper identifies several practical limitations of Neural ODEs:</p>
<ul>
<li><strong>Minibatching</strong>: Batching requires concatenating states of each batch element into a combined ODE of dimension $D \times K$. Controlling error on all batch elements together can require more evaluations than solving each system individually, though in practice this overhead was not substantial.</li>
<li><strong>Tolerance tuning</strong>: Users must choose error tolerances for both the forward and reverse passes. The paper used 1.5e-8 for sequence modeling, 1e-3 for classification, and 1e-5 for density estimation.</li>
<li><strong>Backward trajectory reconstruction</strong>: Running the dynamics backwards to reconstruct the forward state trajectory can introduce extra numerical error if the reconstructed trajectory diverges from the original. Checkpointing (storing intermediate states) can address this, though the authors did not find it necessary in practice.</li>
<li><strong>Uniqueness requirements</strong>: The neural network $f$ must be Lipschitz continuous (e.g., using tanh or ReLU activations with finite weights) to guarantee a unique solution via Picard&rsquo;s existence theorem.</li>
</ul>
<h3 id="artifacts">Artifacts</h3>
<table>
	<thead>
			<tr>
					<th>Artifact</th>
					<th>Type</th>
					<th>License</th>
					<th>Notes</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td><a href="https://github.com/rtqichen/torchdiffeq">torchdiffeq</a></td>
					<td>Code</td>
					<td>MIT</td>
					<td>Official PyTorch implementation with GPU-based ODE solvers</td>
			</tr>
	</tbody>
</table>
<hr>
<h2 id="paper-information">Paper Information</h2>
<p><strong>Citation</strong>: Chen, R. T. Q., Rubanova, Y., Bettencourt, J., &amp; Duvenaud, D. (2018). Neural ordinary differential equations. <em>Proceedings of the 32nd International Conference on Neural Information Processing Systems</em>, 6572-6583.</p>
<p><strong>Publication</strong>: NeurIPS 2018</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-bibtex" data-lang="bibtex"><span style="display:flex;"><span><span style="color:#a6e22e">@inproceedings</span>{chen2018neural,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">title</span>=<span style="color:#e6db74">{Neural ordinary differential equations}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">author</span>=<span style="color:#e6db74">{Chen, Ricky T. Q. and Rubanova, Yulia and Bettencourt, Jesse and Duvenaud, David}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">booktitle</span>=<span style="color:#e6db74">{Proceedings of the 32nd International Conference on Neural Information Processing Systems}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">pages</span>=<span style="color:#e6db74">{6572--6583}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">year</span>=<span style="color:#e6db74">{2018}</span>
</span></span><span style="display:flex;"><span>}
</span></span></code></pre></div><p><strong>Additional Resources</strong>:</p>
<ul>
<li><a href="https://github.com/rtqichen/torchdiffeq">Official PyTorch Implementation</a></li>
</ul>
]]></content:encoded></item><item><title>MOFFlow: Flow Matching for MOF Structure Prediction</title><link>https://hunterheidenreich.com/notes/chemistry/molecular-simulation/ml-potentials/mofflow/</link><pubDate>Sat, 20 Dec 2025 00:00:00 +0000</pubDate><guid>https://hunterheidenreich.com/notes/chemistry/molecular-simulation/ml-potentials/mofflow/</guid><description>A Riemannian flow matching framework for generating Metal-Organic Framework structures by treating building blocks as rigid bodies.</description><content:encoded><![CDATA[<h2 id="methodological-contribution-mofflow-architecture">Methodological Contribution: MOFFlow Architecture</h2>
<p>This is a <strong>Methodological Paper</strong> ($\Psi_{\text{Method}}$).</p>
<p>It introduces <strong>MOFFlow</strong>, a generative architecture and training framework designed specifically for the structure prediction of Metal-Organic Frameworks (MOFs). The paper focuses on the algorithmic innovation of decomposing the problem into rigid-body assembly on a Riemannian manifold, validates this through comparison against existing baselines, and performs ablation studies to justify architectural choices. While it leverages the theory of flow matching, its primary contribution is the application-specific architecture and the handling of modular constraints.</p>
<h2 id="motivation-scaling-limits-of-atom-level-generation">Motivation: Scaling Limits of Atom-Level Generation</h2>
<p>The primary motivation is to overcome the scalability and accuracy limitations of existing methods for MOF structure prediction.</p>
<ul>
<li><strong>Computational Cost of DFT:</strong> Conventional approaches rely on <em>ab initio</em> calculations (DFT) combined with random search, which are computationally prohibitive for large, complex systems like MOFs.</li>
<li><strong>Failure of General CSP:</strong> Existing deep generative models for general Crystal Structure Prediction (CSP) operate on an atom-by-atom basis. They fail to scale to MOFs, which often contain hundreds or thousands of atoms per unit cell, and do not exploit the inherent modular nature (building blocks) of MOFs.</li>
<li><strong>Tunability:</strong> MOFs have applications in carbon capture and drug delivery due to their tunable porosity, making automated design tools valuable.</li>
</ul>
<h2 id="core-innovation-rigid-body-flow-matching-on-se3">Core Innovation: Rigid-Body Flow Matching on SE(3)</h2>
<p>MOFFlow introduces a <strong>hierarchical, rigid-body flow matching framework</strong> tailored for MOFs.</p>
<ul>
<li><strong>Rigid Body Decomposition:</strong> MOFFlow treats metal nodes and organic linkers as rigid bodies, reducing the search space from $3N$ (atoms) to $6M$ (roto-translation of $M$ blocks) compared to atom-based methods.</li>
<li><strong>Riemannian Flow Matching on $SE(3)$:</strong> It is the first end-to-end model to jointly generate block-level rotations ($SO(3)$), translations ($\mathbb{R}^3$), and lattice parameters using <a href="/notes/machine-learning/generative-models/flow-matching-for-generative-modeling/">Riemannian flow matching</a>.</li>
<li><strong>MOFAttention:</strong> A custom attention module designed to encode the geometric relationships between building blocks, lattice parameters, and rotational constraints.</li>
<li><strong>Constraint Handling:</strong> It incorporates domain knowledge by operating on a mean-free system for translation invariance and using canonicalized coordinates for rotation invariance.</li>
</ul>
<h2 id="experimental-setup-and-baselines">Experimental Setup and Baselines</h2>
<p>The authors evaluated MOFFlow on structure prediction accuracy, physical property preservation, and scalability.</p>
<ul>
<li><strong>Dataset:</strong> The <strong>Boyd et al. (2019)</strong> dataset consisting of 324,426 hypothetical MOF structures, decomposed into building blocks using the <strong>MOFid</strong> algorithm. Filtered to structures with &lt;200 blocks, yielding 308,829 structures (247,066 train / 30,883 val / 30,880 test). Structures contain up to approximately 2,400 atoms per unit cell.</li>
<li><strong>Baselines:</strong>
<ul>
<li><em>Optimization-based:</em> Random Search (RS) and Evolutionary Algorithm (EA) using CrySPY and CHGNet.</li>
<li><em>Deep Learning:</em> DiffCSP (deep generative model for general crystals).</li>
<li><em>Self-Assembly:</em> A heuristic algorithm used in MOFDiff (adapted for comparison).</li>
</ul>
</li>
<li><strong>Metrics:</strong>
<ul>
<li><strong>Match Rate (MR):</strong> Percentage of generated structures matching ground truth within tolerance.</li>
<li><strong>RMSE:</strong> Root mean squared displacement normalized by average free length per atom.</li>
<li><strong>Structural Properties:</strong> Volumetric/Gravimetric Surface Area (VSA/GSA), Pore Limiting Diameter (PLD), Void Fraction, etc., calculated via Zeo++.</li>
<li><strong>Scalability:</strong> Performance vs. number of atoms and building blocks.</li>
</ul>
</li>
</ul>
<h2 id="results-and-generative-performance">Results and Generative Performance</h2>
<p>MOFFlow outperformed all baselines in accuracy and efficiency, particularly for large structures.</p>
<ul>
<li><strong>Accuracy:</strong> With a single sample, MOFFlow achieved a <strong>31.69% match rate</strong> (stol=0.5) and <strong>87.46%</strong> (stol=1.0) on the full test set (30,880 structures). With 5 samples, these rose to <strong>44.75%</strong> (stol=0.5) and <strong>100.0%</strong> (stol=1.0). RS and EA (tested on 100 and 15 samples respectively due to computational cost, generating 20 candidates each) achieved 0.00% MR at both tolerance levels. DiffCSP reached 0.09% (stol=0.5) and 23.12% (stol=1.0) with 1 sample.</li>
<li><strong>Speed:</strong> Inference took <strong>1.94 seconds</strong> per structure, compared to 5.37s for DiffCSP, 332s for RS, and 1,959s for EA.</li>
<li><strong>Scalability:</strong> MOFFlow preserved high match rates across all system sizes, while DiffCSP&rsquo;s match rate dropped sharply beyond 200 atoms.</li>
<li><strong>Property Preservation:</strong> The distributions of physical properties (e.g., surface area, void fraction) for MOFFlow-generated structures closely matched the ground truth. DiffCSP frequently reduced volumetric surface area and void fraction to zero.</li>
<li><strong>Self-Assembly Comparison:</strong> In a controlled comparison where the self-assembly (SA) algorithm received MOFFlow&rsquo;s predicted translations and lattice, MOFFlow (MR=31.69%, RMSE=0.2820) outperformed SA (MR=30.04%, RMSE=0.3084), confirming the value of the learned rotational vector fields. In an extended scalability comparison, SA scaled better for structures with many building blocks, but MOFFlow achieved higher overall match rate (31.69% vs. 27.14%).</li>
<li><strong>Batch Implementation:</strong> A refactored Batch version achieves improved results: <strong>32.73% MR</strong> (stol=0.5), RMSE of 0.2743, inference in <strong>0.19s</strong> per structure (10x faster), and training in roughly 1/3 the GPU hours.</li>
</ul>
<h3 id="limitations">Limitations</h3>
<p>The paper identifies three key limitations:</p>
<ol>
<li><strong>Hypothetical-only evaluation:</strong> All experiments use the Boyd et al. hypothetical database. Evaluation on more challenging real-world datasets remains needed.</li>
<li><strong>Rigid-body assumption:</strong> The model assumes that local building block structures are known, which may be impractical for rare building blocks whose structural information is missing from existing libraries or is inaccurate.</li>
<li><strong>Periodic invariance:</strong> The model is not invariant to periodic transformations of the input. Explicitly modeling periodic invariance could further improve performance.</li>
</ol>
<hr>
<h2 id="reproducibility-details">Reproducibility Details</h2>
<h3 id="data">Data</h3>
<ul>
<li><strong>Source:</strong> MOF dataset by Boyd et al. (2019).</li>
<li><strong>Preprocessing:</strong> Structures were decomposed using the metal-oxo decomposition algorithm from <strong>MOFid</strong>.</li>
<li><strong>Filtering:</strong> Structures with fewer than 200 building blocks were used, yielding 308,829 structures.</li>
<li><strong>Splits:</strong> Train/Validation/Test ratio of 8:1:1 (247,066 / 30,883 / 30,880).</li>
<li><strong>Availability:</strong> Pre-processed dataset is available on <a href="https://zenodo.org/records/15187230">Zenodo</a>.</li>
<li><strong>Representations:</strong>
<ul>
<li><em>Atom-level:</em> Tuple $(X, a, l)$ (coordinates, types, lattice).</li>
<li><em>Block-level:</em> Tuple $(\mathcal{B}, q, \tau, l)$ (blocks, rotations, translations, lattice).</li>
</ul>
</li>
</ul>
<h3 id="algorithms">Algorithms</h3>
<ul>
<li><strong>Framework:</strong> Riemannian Flow Matching.</li>
<li><strong>Objective:</strong> Conditional Flow Matching (CFM) loss regressing to clean data $q_1, \tau_1, l_1$.
$$
\begin{aligned}
\mathcal{L}(\theta) = \mathbb{E}_{t, \mathcal{S}^{(1)}} \left[ \frac{1}{(1-t)^2} \left( \lambda_1 |\log_{q_t}(\hat{q}_1) - \log_{q_t}(q_1)|^2 + \dots \right) \right]
\end{aligned}
$$</li>
<li><strong>Priors:</strong>
<ul>
<li>Rotations ($q$): Uniform on $SO(3)$.</li>
<li>Translations ($\tau$): Standard normal on $\mathbb{R}^3$.</li>
<li>Lattice ($l$): Log-normal for lengths, Uniform(60, 120) for angles (Niggli reduced).</li>
</ul>
</li>
<li><strong>Inference:</strong> ODE solver with <strong>50 integration steps</strong>.</li>
<li><strong>Local Coordinates:</strong> Defined using PCA axes, corrected for symmetry to ensure consistency.</li>
</ul>
<h3 id="models">Models</h3>
<ul>
<li><strong>Architecture:</strong> Hierarchical structure with two key modules.
<ul>
<li><strong>Atom-level Update Layers:</strong> 4-layer EGNN-like structure to encode building block features $h_m$ from atomic graphs (cutoff 5Å).</li>
<li><strong>Block-level Update Layers:</strong> 6 layers that iteratively update $q, \tau, l$ using the <strong>MOFAttention</strong> module.</li>
</ul>
</li>
<li><strong>MOFAttention:</strong> Modified Invariant Point Attention (IPA) that incorporates lattice parameters as offsets to the attention matrix.</li>
<li><strong>Hyperparameters:</strong>
<ul>
<li>Node dimension: 256 (block-level), 64 (atom-level).</li>
<li>Attention heads: 24.</li>
<li>Loss coefficients: $\lambda_1=1.0$ (rot), $\lambda_2=2.0$ (trans), $\lambda_3=0.1$ (lattice).</li>
</ul>
</li>
<li><strong>Checkpoints:</strong> Pre-trained weights and models are openly provided on <a href="https://zenodo.org/records/15187230">Zenodo</a>.</li>
</ul>
<h3 id="evaluation">Evaluation</h3>
<ul>
<li><strong>Metrics:</strong>
<ul>
<li><strong>Match Rate:</strong> Using <code>StructureMatcher</code> from <code>pymatgen</code>. Tolerances: <code>stol=0.5/1.0</code>, <code>ltol=0.3</code>, <code>angle_tol=10.0</code>.</li>
<li><strong>RMSE:</strong> Normalized by average free length per atom.</li>
</ul>
</li>
<li><strong>Tools:</strong> <strong>Zeo++</strong> for structural property calculations (Surface Area, Pore Diameter, etc.).</li>
</ul>
<table>
	<thead>
			<tr>
					<th style="text-align: left">Metric</th>
					<th style="text-align: left">MOFFlow</th>
					<th style="text-align: left">DiffCSP</th>
					<th style="text-align: left">RS (20 cands)</th>
					<th style="text-align: left">EA (20 cands)</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td style="text-align: left">MR (stol=0.5, k=1)</td>
					<td style="text-align: left"><strong>31.69%</strong></td>
					<td style="text-align: left">0.09%</td>
					<td style="text-align: left">0.00%</td>
					<td style="text-align: left">0.00%</td>
			</tr>
			<tr>
					<td style="text-align: left">MR (stol=1.0, k=1)</td>
					<td style="text-align: left"><strong>87.46%</strong></td>
					<td style="text-align: left">23.12%</td>
					<td style="text-align: left">0.00%</td>
					<td style="text-align: left">0.00%</td>
			</tr>
			<tr>
					<td style="text-align: left">MR (stol=0.5, k=5)</td>
					<td style="text-align: left"><strong>44.75%</strong></td>
					<td style="text-align: left">0.34%</td>
					<td style="text-align: left">-</td>
					<td style="text-align: left">-</td>
			</tr>
			<tr>
					<td style="text-align: left">MR (stol=1.0, k=5)</td>
					<td style="text-align: left"><strong>100.0%</strong></td>
					<td style="text-align: left">38.94%</td>
					<td style="text-align: left">-</td>
					<td style="text-align: left">-</td>
			</tr>
			<tr>
					<td style="text-align: left">RMSE (stol=0.5, k=1)</td>
					<td style="text-align: left"><strong>0.2820</strong></td>
					<td style="text-align: left">0.3961</td>
					<td style="text-align: left">-</td>
					<td style="text-align: left">-</td>
			</tr>
			<tr>
					<td style="text-align: left">Avg. time per structure</td>
					<td style="text-align: left"><strong>1.94s</strong></td>
					<td style="text-align: left">5.37s</td>
					<td style="text-align: left">332s</td>
					<td style="text-align: left">1,959s</td>
			</tr>
	</tbody>
</table>
<h3 id="hardware">Hardware</h3>
<ul>
<li><strong>Training Hardware:</strong> 8 $\times$ NVIDIA RTX 3090 (24GB VRAM).</li>
<li><strong>Training Time:</strong>
<ul>
<li><em>TimestepBatch version (main paper):</em> ~5 days 15 hours.</li>
<li><em>Batch version:</em> ~1 day 17 hours (332.74 GPU hours). The authors also release this refactored implementation, which achieves comparable performance with faster convergence.</li>
</ul>
</li>
<li><strong>Batch Size:</strong> 160 (capped by $N^2$ where $N$ is the number of atoms, for memory management).</li>
</ul>
<h3 id="artifacts">Artifacts</h3>
<table>
	<thead>
			<tr>
					<th style="text-align: left">Artifact</th>
					<th style="text-align: left">Type</th>
					<th style="text-align: left">License</th>
					<th style="text-align: left">Notes</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td style="text-align: left"><a href="https://github.com/nayoung10/MOFFlow">MOFFlow (GitHub)</a></td>
					<td style="text-align: left">Code</td>
					<td style="text-align: left">MIT</td>
					<td style="text-align: left">Official implementation built on DiffDock, EGNN, MOFDiff, and protein-frame-flow</td>
			</tr>
			<tr>
					<td style="text-align: left"><a href="https://zenodo.org/records/15187230">Pre-processed dataset and checkpoints (Zenodo)</a></td>
					<td style="text-align: left">Dataset / Model</td>
					<td style="text-align: left">Unknown</td>
					<td style="text-align: left">Includes pre-processed MOF structures and trained model weights</td>
			</tr>
	</tbody>
</table>
<hr>
<h2 id="paper-information">Paper Information</h2>
<p><strong>Citation</strong>: Kim, N., Kim, S., Kim, M., Park, J., &amp; Ahn, S. (2025). MOFFlow: Flow Matching for Structure Prediction of Metal-Organic Frameworks. <em>International Conference on Learning Representations (ICLR)</em>.</p>
<p><strong>Publication</strong>: ICLR 2025</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-bibtex" data-lang="bibtex"><span style="display:flex;"><span><span style="color:#a6e22e">@inproceedings</span>{kimMOFFlowFlowMatching2025,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">title</span>=<span style="color:#e6db74">{MOFFlow: Flow Matching for Structure Prediction of Metal-Organic Frameworks}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">author</span>=<span style="color:#e6db74">{Kim, Nayoung and Kim, Seongsu and Kim, Minsu and Park, Jinkyoo and Ahn, Sungsoo}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">booktitle</span>=<span style="color:#e6db74">{The Thirteenth International Conference on Learning Representations}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">year</span>=<span style="color:#e6db74">{2025}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">url</span>=<span style="color:#e6db74">{https://openreview.net/forum?id=dNT3abOsLo}</span>
</span></span><span style="display:flex;"><span>}
</span></span></code></pre></div><p><strong>Additional Resources</strong>:</p>
<ul>
<li><a href="https://openreview.net/forum?id=dNT3abOsLo">OpenReview Discussion</a></li>
<li><a href="https://github.com/nayoung10/MOFFlow">Official Code Repository</a></li>
</ul>
]]></content:encoded></item><item><title>DynamicFlow: Integrating Protein Dynamics into Drug Design</title><link>https://hunterheidenreich.com/notes/computational-biology/dynamicflow/</link><pubDate>Sat, 20 Dec 2025 00:00:00 +0000</pubDate><guid>https://hunterheidenreich.com/notes/computational-biology/dynamicflow/</guid><description>Flow matching model that co-generates ligands and flexible protein pockets, addressing rigid-receptor limitations in structure-based drug design.</description><content:encoded><![CDATA[<h2 id="what-kind-of-paper-is-this">What kind of paper is this?</h2>
<p>This is primarily a <strong>Methodological Paper</strong> ($\Psi_{\text{Method}}$) with a strong <strong>Resource</strong> ($\Psi_{\text{Resource}}$) component.</p>
<ul>
<li><strong>Method</strong>: It proposes <strong>DynamicFlow</strong>, a novel multiscale architecture combining atom-level SE(3)-equivariant GNNs (SE(3) is the special Euclidean group in 3D: the set of all 3D rotations and translations, and equivariance means predictions transform consistently under those symmetries) and residue-level Transformers within a <a href="/notes/machine-learning/generative-models/flow-matching-for-generative-modeling/">flow matching</a> framework to model the joint distribution of ligand generation and protein conformational change.</li>
<li><strong>Resource</strong>: It curates a significant dataset derived from MISATO, pairing AlphaFold2-predicted apo structures with multiple MD-simulated holo states, specifically filtered for flow matching tasks.</li>
</ul>
<h2 id="what-is-the-motivation">What is the motivation?</h2>
<p>Traditional Structure-Based Drug Design (SBDD) methods typically assume the protein target is rigid, which limits their applicability because proteins are dynamic and undergo conformational changes (induced fit) upon ligand binding.</p>
<ul>
<li><strong>Biological Reality</strong>: Proteins exist as ensembles of states; binding often involves transitions from &ldquo;apo&rdquo; (unbound) to &ldquo;holo&rdquo; (bound) <a href="/posts/geom-conformer-generation-dataset/">conformational changes</a>, sometimes revealing cryptic pockets.</li>
<li><strong>Computational Bottleneck</strong>: <a href="/notes/chemistry/molecular-simulation/">Molecular Dynamics (MD)</a> simulates these changes but incurs high computational costs due to energy barriers.</li>
<li><strong>Gap</strong>: <a href="/notes/machine-learning/generative-models/">Existing generative models</a> for SBDD mostly condition on a fixed pocket structure, ignoring the co-adaptation of the protein and ligand.</li>
</ul>
<h2 id="what-is-the-novelty-here">What is the novelty here?</h2>
<p>The core novelty is the <strong>simultaneous modeling of ligand generation and protein conformational dynamics</strong> using a unified flow matching framework.</p>
<ul>
<li><strong>DynamicFlow Architecture</strong>: A multiscale model that treats the protein as both full-atom (for interaction) and residue-level frames (for large-scale dynamics), utilizing separate flow matching objectives for backbone frames, side-chain torsions, and ligand atoms.</li>
<li><strong>Stochastic Flow (SDE)</strong>: Introduction of a <a href="/notes/machine-learning/generative-models/score-based-generative-modeling-sde/">stochastic variant</a> (DynamicFlow-SDE) that improves robustness and diversity compared to the deterministic ODE flow.</li>
<li><strong>Coupled Generation</strong>: The model learns to transport the <em>apo</em> pocket distribution to the <em>holo</em> pocket distribution while simultaneously denoising the ligand, advancing beyond rigid pocket docking methods.</li>
</ul>
<h2 id="what-experiments-were-performed">What experiments were performed?</h2>
<p>The authors validated the method on a curated dataset of 5,692 protein-ligand complexes.</p>
<ul>
<li><strong>Baselines</strong>: Compared against rigid-pocket SBDD methods: Pocket2Mol, TargetDiff, and IPDiff (adapted as TargetDiff* and IPDiff* for fair comparison of atom numbers). Also compared against conformation sampling baselines (Str2Str).</li>
<li><strong>Metrics</strong>:
<ul>
<li><strong>Ligand Quality</strong>: Vina Score (binding affinity), QED (drug-likeness), SA (synthesizability), Lipinski&rsquo;s rule of 5.</li>
<li><strong>Pocket Quality</strong>: RMSD between generated and ground-truth holo pockets, Cover Ratio (percentage of holo states successfully retrieved), and Pocket Volume distributions.</li>
<li><strong>Interaction</strong>: Protein-Ligand Interaction Profiler (PLIP) to measure specific non-covalent interactions.</li>
</ul>
</li>
<li><strong>Ablations</strong>: Tested the impact of the interaction loss, residue-level Transformer, and SDE vs. ODE formulations.</li>
</ul>
<h2 id="what-outcomesconclusions">What outcomes/conclusions?</h2>
<ul>
<li><strong>Improved Affinity</strong>: DynamicFlow-SDE achieved the best (lowest) Vina scores ($-7.65$) compared to baselines like TargetDiff ($-5.09$) and Pocket2Mol ($-5.50$). Note that Vina scores are a computational proxy and do not directly predict experimental binding affinity. Moreover, Vina score optimization is gameable: molecules can achieve strong computed binding energies while remaining synthetically inaccessible. QED and SA scores, which assess drug-likeness and synthesizability respectively, were reported but were not primary optimization targets in the paper, which limits the strength of this affinity claim.</li>
<li><strong>Realistic Dynamics</strong>: The model successfully generated holo-like pocket conformations with volume distributions and interaction profiles closer to ground-truth MD simulations than the initial apo structures.</li>
<li><strong>Enhancing Rigid Methods</strong>: Holo pockets generated by DynamicFlow served as better inputs for rigid-SBDD baselines (e.g., TargetDiff improved from $-5.09$ to $-9.00$ and IPDiff improved from $-7.55$ to $-11.04$ when using &ldquo;Our Pocket&rdquo;), suggesting the method can act as a &ldquo;pocket refiner&rdquo;.</li>
<li><strong>ODE vs. SDE Trade-off</strong>: The deterministic ODE variant achieves better pocket RMSD, while the stochastic SDE variant achieves better Cover Ratio (diversity of holo states captured) and binding affinity. Neither dominates uniformly.</li>
<li><strong>Conformation Sampling Baseline</strong>: Str2Str, a dedicated conformation sampling baseline, performed worse than simply perturbing the apo structure with noise. One interpretation is that this highlights the difficulty of the apo-to-holo prediction task; another is that Str2Str was not designed specifically for apo-to-holo prediction, making it a limited test of its capabilities.</li>
</ul>
<hr>
<h2 id="reproducibility-details">Reproducibility Details</h2>
<h3 id="data">Data</h3>
<p>The dataset is derived from <strong>MISATO</strong>, which contains MD trajectories for PDBbind complexes.</p>
<table>
	<thead>
			<tr>
					<th>Purpose</th>
					<th>Dataset</th>
					<th>Size</th>
					<th>Notes</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td><strong>Training/Test</strong></td>
					<td>Curated MISATO</td>
					<td>5,692 complexes</td>
					<td>Filtered for valid MD (<a href="/posts/kabsch-algorithm/">RMSD</a> $&lt; 3\text{\AA}$), clustered to remove redundancy. Contains 46,235 holo-ligand conformations total.</td>
			</tr>
			<tr>
					<td><strong>Apo Structures</strong></td>
					<td>AlphaFold2</td>
					<td>N/A</td>
					<td>Apo structures were obtained by mapping PDB IDs to UniProt and retrieving AlphaFold2 predictions, then aligning to MISATO structures.</td>
			</tr>
			<tr>
					<td><strong>Splits</strong></td>
					<td>Standard</td>
					<td>50 test complexes</td>
					<td>50 complexes with no overlap with the training set selected for testing. Note: 50 is a small held-out set; results should be interpreted cautiously.</td>
			</tr>
	</tbody>
</table>
<p><strong>Preprocessing</strong>:</p>
<ul>
<li><strong>Clustering</strong>: Holo-ligand conformations clustered with RMSD threshold $1.0\text{\AA}$; top 10 clusters kept per complex.</li>
<li><strong>Pocket Definition</strong>: Residues within $7\text{\AA}$ of the ligand.</li>
<li><strong>Alignment</strong>: AlphaFold predicted structures (apo) aligned to MISATO holo structures using sequence alignment (Smith-Waterman) to identify pocket residues.</li>
</ul>
<h3 id="algorithms">Algorithms</h3>
<p><strong>Flow Matching Framework</strong>:</p>
<ul>
<li><strong>Continuous Variables</strong> (Pocket translation/rotation/torsions, Ligand positions): Modeled using <strong>Conditional Flow Matching (CFM)</strong>.
<ul>
<li><em>Prior</em>: Apo state for pocket; Normal distribution for ligand positions.</li>
<li><em>Target</em>: Holo state from MD; Ground truth ligand.</li>
<li><em>Interpolant</em>: Linear interpolation for Euclidean variables; Geodesic for rotations ($SO(3)$, the rotation-only subgroup of SE(3) containing all 3D rotations but not translations); Wrapped linear interpolation for torsions (Torus).</li>
</ul>
</li>
<li><strong>Discrete Variables</strong> (Ligand atom/bond types): Modeled using <strong>Discrete Flow Matching</strong> based on Continuous-Time Markov Chains (CTMC).
<ul>
<li><em>Rate Matrix</em>: Interpolates between mask token and data distribution.</li>
</ul>
</li>
<li><strong>Loss Function</strong>: Weighted sum of 7 losses:
<ol>
<li>Translation CFM (Eq 5)</li>
<li>Rotation CFM (Eq 7)</li>
<li>Torsion CFM (Eq 11)</li>
<li>Ligand Position CFM</li>
<li>Ligand Atom Type CTMC (Eq 14)</li>
<li>Ligand Bond Type CTMC</li>
<li><strong>Interaction Loss</strong> (Eq 18): Explicitly penalizes deviations in pairwise distances between protein and ligand atoms for pairs $\leq 3.5\text{\AA}$.</li>
</ol>
</li>
</ul>
<h3 id="models">Models</h3>
<p><strong>Architecture</strong>: <strong>DynamicFlow</strong> is a multiscale model with 15.9M parameters.</p>
<ol>
<li><strong>Atom-Level SE(3)-Equivariant GNN</strong>:
<ul>
<li><em>Input</em>: Complex graph (k-NN) and Ligand graph (fully connected).</li>
<li><em>Layers</em>: 6 EGNN blocks modified to maintain node and edge hidden states.</li>
<li><em>Function</em>: Updates ligand positions and predicts ligand atom/bond types.</li>
</ul>
</li>
<li><strong>Residue-Level Transformer</strong>:
<ul>
<li><em>Input</em>: Aggregated atom features from the GNN + Residue frames/torsions.</li>
<li><em>Layers</em>: 4 Transformer blocks with <strong>Invariant Point Attention (IPA)</strong>.</li>
<li><em>Function</em>: Updates protein residue frames (translation/rotation) and predicts side-chain torsions.</li>
</ul>
</li>
</ol>
<h3 id="evaluation">Evaluation</h3>
<p><strong>Metrics</strong>:</p>
<ul>
<li><strong>Vina Score</strong>: <code>vina_minimize</code> mode used for binding affinity.</li>
<li><strong>RMSD</strong>: Minimum RMSD between generated pocket and ground-truth holo conformations.</li>
<li><strong>Cover Ratio</strong>: % of ground-truth holo conformations covered by at least one generated sample (threshold $1.42\text{\AA}$).</li>
<li><strong>POVME 3</strong>: For pocket volume calculation.</li>
</ul>
<h3 id="hardware">Hardware</h3>
<ul>
<li><strong>Inference Benchmark</strong>: 1x Tesla V100-SXM2-32GB.</li>
<li><strong>Speed</strong>: Generates 10 ligands in ~35-36 seconds (100 NFE), significantly faster than diffusion baselines like Pocket2Mol (980s) or TargetDiff (156s).</li>
</ul>
<h2 id="paper-information">Paper Information</h2>
<p><strong>Citation</strong>: Zhou, X., Xiao, Y., Lin, H., He, X., Guan, J., Wang, Y., Liu, Q., Zhou, F., Wang, L., &amp; Ma, J. (2025). Integrating Protein Dynamics into Structure-Based Drug Design via Full-Atom Stochastic Flows. <em>International Conference on Learning Representations (ICLR)</em>. <a href="https://arxiv.org/abs/2503.03989">https://arxiv.org/abs/2503.03989</a></p>
<p><strong>Publication</strong>: ICLR 2025</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-bibtex" data-lang="bibtex"><span style="display:flex;"><span><span style="color:#a6e22e">@inproceedings</span>{zhouIntegratingProteinDynamics2025,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">title</span> = <span style="color:#e6db74">{Integrating Protein Dynamics into Structure-Based Drug Design via Full-Atom Stochastic Flows}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">author</span> = <span style="color:#e6db74">{Zhou, Xiangxin and Xiao, Yi and Lin, Haowei and He, Xinheng and Guan, Jiaqi and Wang, Yang and Liu, Qiang and Zhou, Feng and Wang, Liang and Ma, Jianzhu}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">booktitle</span> = <span style="color:#e6db74">{International Conference on Learning Representations}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">year</span> = <span style="color:#e6db74">{2025}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">url</span> = <span style="color:#e6db74">{https://arxiv.org/abs/2503.03989}</span>
</span></span><span style="display:flex;"><span>}
</span></span></code></pre></div><p><strong>Additional Resources</strong>:</p>
<ul>
<li><a href="https://arxiv.org/abs/2503.03989">arXiv Page</a></li>
<li>Code: no public repository available at time of writing</li>
</ul>
]]></content:encoded></item><item><title>Stillinger-Weber Potential for Silicon Simulation</title><link>https://hunterheidenreich.com/notes/chemistry/molecular-simulation/classical-methods/stillinger-weber-1985/</link><pubDate>Sun, 14 Dec 2025 00:00:00 +0000</pubDate><guid>https://hunterheidenreich.com/notes/chemistry/molecular-simulation/classical-methods/stillinger-weber-1985/</guid><description>The 1985 paper introducing the Stillinger-Weber potential, a 3-body interaction model for molecular dynamics of tetrahedral semiconductors.</description><content:encoded><![CDATA[<h2 id="core-methodological-contribution">Core Methodological Contribution</h2>
<p>This is a <strong>Method</strong> paper.</p>
<p>Its primary contribution is the formulation of the <strong>Stillinger-Weber potential</strong>, a non-additive potential energy function designed to model tetrahedral semiconductors. The paper also uses molecular dynamics simulation to explore physical properties of silicon in both crystalline and liquid phases, but the methodological contribution (the potential architecture) is what enabled subsequent research on covalent materials.</p>
<h2 id="the-failure-of-pair-potentials-in-silicon">The Failure of Pair Potentials in Silicon</h2>
<p>The authors aimed to simulate the melting and liquid properties of tetrahedral semiconductors (Silicon and Germanium).</p>
<ul>
<li><strong>The Problem:</strong> Standard pair potentials (like Lennard-Jones) favor close-packed structures (12 nearest neighbors) and cannot stabilize the open diamond structure (4 nearest neighbors) of Silicon.</li>
<li><strong>The Gap:</strong> Earlier classical potentials lacked the flexibility to describe the profound structural change where Silicon shrinks upon melting (coordination number increases from 4 to &gt;6) while remaining conductive.</li>
<li><strong>The Goal:</strong> To construct a potential that spans the entire configuration space, describing both the rigid crystal and the diffusive liquid, without requiring quantum mechanical calculations.</li>
</ul>
<h2 id="the-three-body-interaction-novelty">The Three-Body Interaction Novelty</h2>
<p>The core novelty is the introduction of a stabilizing <strong>three-body interaction term</strong> ($v_3$) to the potential energy function.</p>
<ul>
<li><strong>3-Body Term:</strong> Explicitly penalizes deviations from the ideal tetrahedral angle ($\cos \theta_t = -1/3$).</li>
<li><strong>Unified Model:</strong> This potential handles bond breaking and reforming, allowing for the simulation of melting and liquid diffusion. Previous &ldquo;Keating&rdquo; potentials model only small elastic deformations.</li>
<li><strong>Mapping Technique:</strong> The application of &ldquo;steepest-descent mapping&rdquo; to quench dynamical configurations into their underlying &ldquo;inherent structures&rdquo; (local minima), revealing the fundamental topology of the liquid energy landscape.</li>
</ul>
<h2 id="molecular-dynamics-validation">Molecular Dynamics Validation</h2>
<p>The authors performed Molecular Dynamics (MD) simulations using the proposed potential.</p>
<ul>
<li><strong>System:</strong> 216 Silicon atoms in a cubic cell with periodic boundary conditions.</li>
<li><strong>State Points:</strong> Fixed density $\rho = 2.53 \text{ g/cm}^3$ (matching experimental liquid density at melting).</li>
<li><strong>Process:</strong>
<ol>
<li>Start with diamond crystal at low temperature.</li>
<li>Systematically heat to induce spontaneous nucleation and melting.</li>
<li>Equilibrate the liquid.</li>
<li>Periodically map configurations to potential minima (inherent structures) using steepest descent.</li>
</ol>
</li>
</ul>
<h2 id="phase-topology-and-inverse-lindemann-criterion">Phase Topology and Inverse Lindemann Criterion</h2>
<ul>
<li><strong>Validation:</strong> The potential successfully stabilizes the diamond structure as the global minimum at zero pressure.</li>
<li><strong>Liquid Structure:</strong> The simulated liquid pair-correlation function $g(r)$ and structure factor $S(k)$ qualitatively match experimental diffraction data, including the characteristic shoulder on the structure factor peak.</li>
<li><strong>Inherent Structure:</strong> The liquid possesses a temperature-independent inherent structure (amorphous network) hidden beneath thermal vibrations.</li>
<li><strong>Melting/Freezing Criteria:</strong> The study proposes an &ldquo;Inverse Lindemann Criterion&rdquo;: while crystals melt when vibration amplitude exceeds ~0.19 lattice spacings, liquids freeze when atom displacements from their inherent minima drop below ~0.30 neighbor spacings.</li>
</ul>
<h2 id="limitations-and-energy-scale-problem">Limitations and Energy Scale Problem</h2>
<p>The authors acknowledge a quantitative energy scale discrepancy. To match the observed melting temperature of Si ($1410°$C), $\epsilon$ would need to be approximately 42 kcal/mol, considerably less than the 50 kcal/mol required to reproduce the correct cohesive energy of the crystal. The authors suggest this could be resolved either by further optimization of $v_2$ and $v_3$, or by adding position-independent single-particle terms $v_1 \approx -16$ kcal/mol arising from the electronic structure. Adding $v_1$ terms only affects the temperature scale and has no influence on local structure at a given reduced temperature.</p>
<p>The simulated liquid coordination number (8.07) is also higher than the experimentally reported value of approximately 6.4, though the authors note that the experimental definition of &ldquo;nearest neighbors&rdquo; was not precisely stated.</p>
<h2 id="bonding-statistics-in-inherent-structures">Bonding Statistics in Inherent Structures</h2>
<p>Analysis of potential-energy minima (inherent structures) using a bond cutoff of $r/\sigma = 1.40$ reveals the coordination distribution in the liquid:</p>
<table>
	<thead>
			<tr>
					<th style="text-align: left">Coordination Number</th>
					<th style="text-align: left">Fraction of Atoms</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td style="text-align: left">4</td>
					<td style="text-align: left">0.201</td>
			</tr>
			<tr>
					<td style="text-align: left">5</td>
					<td style="text-align: left">0.568</td>
			</tr>
			<tr>
					<td style="text-align: left">6</td>
					<td style="text-align: left">0.205</td>
			</tr>
			<tr>
					<td style="text-align: left">7</td>
					<td style="text-align: left">0.024</td>
			</tr>
	</tbody>
</table>
<p>Five-coordinate atoms dominate the liquid&rsquo;s inherent structure, with four- and six-coordinate atoms each accounting for about 20% of the population. The three-body interactions prevent any occurrence of coordination numbers near 12 that would indicate local close packing.</p>
<hr>
<h2 id="reproducibility-details">Reproducibility Details</h2>
<h3 id="algorithms">Algorithms</h3>
<ul>
<li><strong>Integration:</strong> Equations of motion integrated using a <strong>fifth-order Gear algorithm</strong>.</li>
<li><strong>Time Step:</strong> $\Delta t = 5 \times 10^{-3} \tau$ (approx $3.83 \times 10^{-16}$ s), where $\tau = \sigma(m/\epsilon)^{1/2} = 7.6634 \times 10^{-14}$ s.</li>
<li><strong>Minimization:</strong> Steepest-descent mapping utilized <strong>Newton&rsquo;s method</strong> to find limiting solutions ($\nabla \Phi = 0$).</li>
</ul>
<h3 id="models">Models</h3>
<p>To reproduce this work, one must implement the potential $\Phi = \sum v_2 + \sum v_3$ with the exact functional forms and parameters provided.</p>















<figure class="post-figure center ">
    <img src="/img/notes/chemistry/stillinger-weber-potential.webp"
         alt="Stillinger-Weber potential visualization"
         title="Stillinger-Weber potential visualization"
         
         
         loading="lazy"
         class="post-image">
    
    <figcaption class="post-caption">Left: Two-body radial potential $v_2(r)$ showing the characteristic well at $r_{min} \approx 1.12\sigma$. Right: Three-body angular penalty $h(r_{min}, r_{min}, \theta)$ demonstrating the minimum at the tetrahedral angle (109.5°), which enforces the diamond crystal structure.</figcaption>
    
</figure>

<h4 id="reduced-units">Reduced Units</h4>
<ul>
<li>$\sigma = 0.20951 \text{ nm}$</li>
<li>$\epsilon = 50 \text{ kcal/mol} = 3.4723 \times 10^{-12} \text{ erg}$</li>
</ul>
<h4 id="two-body-term-v_2">Two-Body Term ($v_2$)</h4>
<p>$$
v_2(r_{ij}) = \epsilon A (B r_{ij}^{-p} - r_{ij}^{-q}) \exp[(r_{ij} - a)^{-1}] \quad \text{for } r_{ij} &lt; a
$$</p>
<p><em>(Vanishes for $r \geq a$)</em></p>
<h4 id="three-body-term-v_3">Three-Body Term ($v_3$)</h4>
<p>$$
v_3(r_i, r_j, r_k) = \epsilon [h(r_{ij}, r_{ik}, \theta_{jik}) + h(r_{ji}, r_{jk}, \theta_{ijk}) + h(r_{ki}, r_{kj}, \theta_{ikj})]
$$</p>
<p>where:</p>
<p>$$
h(r_{ij}, r_{ik}, \theta_{jik}) = \lambda \exp[\gamma(r_{ij}-a)^{-1} + \gamma(r_{ik}-a)^{-1}] (\cos\theta_{jik} + \frac{1}{3})^2
$$</p>
<p><em>(Vanishes if distances $\geq a$)</em></p>
<h4 id="parameters">Parameters</h4>
<table>
	<thead>
			<tr>
					<th style="text-align: left">Parameter</th>
					<th style="text-align: left">Value</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td style="text-align: left">$A$</td>
					<td style="text-align: left">$7.049556277$</td>
			</tr>
			<tr>
					<td style="text-align: left">$B$</td>
					<td style="text-align: left">$0.6022245584$</td>
			</tr>
			<tr>
					<td style="text-align: left">$p$</td>
					<td style="text-align: left">$4$</td>
			</tr>
			<tr>
					<td style="text-align: left">$q$</td>
					<td style="text-align: left">$0$</td>
			</tr>
			<tr>
					<td style="text-align: left">$a$</td>
					<td style="text-align: left">$1.80$</td>
			</tr>
			<tr>
					<td style="text-align: left">$\lambda$</td>
					<td style="text-align: left">$21.0$</td>
			</tr>
			<tr>
					<td style="text-align: left">$\gamma$</td>
					<td style="text-align: left">$1.20$</td>
			</tr>
	</tbody>
</table>
<h3 id="evaluation">Evaluation</h3>
<p>The paper evaluates the model against experimental diffraction data.</p>
<table>
	<thead>
			<tr>
					<th style="text-align: left">Metric</th>
					<th style="text-align: left">Simulated Value</th>
					<th style="text-align: left">Experimental Value</th>
					<th style="text-align: left">Notes</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td style="text-align: left"><strong>Melting Point ($T_m^*$)</strong></td>
					<td style="text-align: left">$\approx 0.080$</td>
					<td style="text-align: left">N/A</td>
					<td style="text-align: left">Reduced units. Requires $\epsilon \approx 42$ kcal/mol to match real $T_m = 1410°$C, vs 50 kcal/mol for correct cohesive energy.</td>
			</tr>
			<tr>
					<td style="text-align: left"><strong>Coordination (Liquid)</strong></td>
					<td style="text-align: left">$8.07$</td>
					<td style="text-align: left">$\approx 6.4$</td>
					<td style="text-align: left">Evaluated at first $g(r)$ minimum ($r/\sigma = 1.625$). Simulated value is higher than experiment.</td>
			</tr>
			<tr>
					<td style="text-align: left"><strong>$S(k)$ First Peak</strong></td>
					<td style="text-align: left">$2.53$ $\AA^{-1}$</td>
					<td style="text-align: left">$2.80$ $\AA^{-1}$</td>
					<td style="text-align: left">From Table I.</td>
			</tr>
			<tr>
					<td style="text-align: left"><strong>$S(k)$ Shoulder</strong></td>
					<td style="text-align: left">$3.25$ $\AA^{-1}$</td>
					<td style="text-align: left">$3.25$ $\AA^{-1}$</td>
					<td style="text-align: left">From Table I. Exact match with experiment.</td>
			</tr>
			<tr>
					<td style="text-align: left"><strong>$S(k)$ Second Peak</strong></td>
					<td style="text-align: left">$5.35$ $\AA^{-1}$</td>
					<td style="text-align: left">$5.75$ $\AA^{-1}$</td>
					<td style="text-align: left">From Table I.</td>
			</tr>
			<tr>
					<td style="text-align: left"><strong>$S(k)$ Third Peak</strong></td>
					<td style="text-align: left">$8.16$ $\AA^{-1}$</td>
					<td style="text-align: left">$8.50$ $\AA^{-1}$</td>
					<td style="text-align: left">From Table I.</td>
			</tr>
			<tr>
					<td style="text-align: left"><strong>$S(k)$ Fourth Peak</strong></td>
					<td style="text-align: left">$10.60$ $\AA^{-1}$</td>
					<td style="text-align: left">$11.20$ $\AA^{-1}$</td>
					<td style="text-align: left">From Table I.</td>
			</tr>
			<tr>
					<td style="text-align: left"><strong>Entropy of Melting ($\Delta S / N k_B$)</strong></td>
					<td style="text-align: left">$\approx 3.7$</td>
					<td style="text-align: left">$3.25$</td>
					<td style="text-align: left">Simulated at constant volume; experimental at constant pressure (1 atm).</td>
			</tr>
	</tbody>
</table>
<hr>
<h2 id="paper-information">Paper Information</h2>
<p><strong>Citation</strong>: Stillinger, F. H., &amp; Weber, T. A. (1985). Computer simulation of local order in condensed phases of silicon. <em>Physical Review B</em>, 31(8), 5262-5271. <a href="https://doi.org/10.1103/PhysRevB.31.5262">https://doi.org/10.1103/PhysRevB.31.5262</a></p>
<p><strong>Publication</strong>: Physical Review B, 1985</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-bibtex" data-lang="bibtex"><span style="display:flex;"><span><span style="color:#a6e22e">@article</span>{stillingerComputerSimulationLocal1985,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">title</span> = <span style="color:#e6db74">{Computer Simulation of Local Order in Condensed Phases of Silicon}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">author</span> = <span style="color:#e6db74">{Stillinger, Frank H. and Weber, Thomas A.}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">year</span> = <span style="color:#ae81ff">1985</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">month</span> = apr,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">journal</span> = <span style="color:#e6db74">{Physical Review B}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">volume</span> = <span style="color:#e6db74">{31}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">number</span> = <span style="color:#e6db74">{8}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">pages</span> = <span style="color:#e6db74">{5262--5271}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">publisher</span> = <span style="color:#e6db74">{American Physical Society}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">doi</span> = <span style="color:#e6db74">{10.1103/PhysRevB.31.5262}</span>
</span></span><span style="display:flex;"><span>}
</span></span></code></pre></div>]]></content:encoded></item><item><title>Second-Order Langevin Equation for Field Simulations</title><link>https://hunterheidenreich.com/notes/chemistry/molecular-simulation/classical-methods/second-order-langevin-1987/</link><pubDate>Sun, 14 Dec 2025 00:00:00 +0000</pubDate><guid>https://hunterheidenreich.com/notes/chemistry/molecular-simulation/classical-methods/second-order-langevin-1987/</guid><description>Hyperbolic Algorithm adds second-order derivatives to Langevin dynamics, reducing systematic errors to O(ε²) for lattice field simulations.</description><content:encoded><![CDATA[<h2 id="contribution-and-paper-type">Contribution and Paper Type</h2>
<p>This is a <strong>Methodological Paper</strong> ($\Psi_{\text{Method}}$). It proposes a novel stochastic algorithm, the Hyperbolic Algorithm (HA), and validates its superior efficiency against the existing Langevin Algorithm (LA) through formal error analysis and numerical simulation. It contains significant theoretical derivation (Liouville dynamics) that serves primarily to justify the algorithmic performance claims.</p>
<h2 id="motivation-and-gaps-in-prior-work">Motivation and Gaps in Prior Work</h2>
<p>The standard Langevin Algorithm (LA) for numerical simulation of Euclidean field theories suffers from efficiency bottlenecks. The simplest Euler-discretization of the LA introduces systematic errors of $O(\epsilon)$ (where $\epsilon$ is the step size). To maintain accuracy, $\epsilon$ must be kept small, which increases the sweep-sweep correlation time (autocorrelation time), making simulations computationally expensive.</p>
<h2 id="core-novelty-second-order-dynamics">Core Novelty: Second-Order Dynamics</h2>
<p>The core contribution is the introduction of a <strong>second-order derivative in fictitious time</strong> to the stochastic equation. This converts the parabolic Langevin equation into a hyperbolic equation:</p>
<p>$$
\begin{aligned}
\frac{\partial^{2}\phi}{\partial t^{2}}+\gamma\frac{\partial\phi}{\partial t}=-\frac{\partial S}{\partial\phi}+\eta
\end{aligned}
$$</p>
<h3 id="equation-comparison">Equation Comparison</h3>
<p>The key difference from the standard (first-order) Langevin equation:</p>
<table>
	<thead>
			<tr>
					<th style="text-align: left">Equation Type</th>
					<th style="text-align: left">Formula</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td style="text-align: left"><strong>Hyperbolic (Second Order)</strong></td>
					<td style="text-align: left">$$\frac{\partial^{2}\phi}{\partial t^{2}}+\gamma\frac{\partial\phi}{\partial t}=-\frac{\partial S}{\partial\phi}+\eta$$</td>
			</tr>
			<tr>
					<td style="text-align: left"><strong>Langevin (First Order)</strong></td>
					<td style="text-align: left">$$\frac{\partial\phi}{\partial t}=-\frac{\partial S}{\partial\phi}+\eta$$</td>
			</tr>
	</tbody>
</table>
<p>The standard Langevin equation corresponds to the overdamped limit where the acceleration term is absent. Physically, the Hyperbolic equation can be viewed as microcanonical equations of motion with an added friction term.</p>
<h3 id="key-innovations">Key Innovations</h3>
<ul>
<li><strong>Higher Order Accuracy</strong>: The simplest discretization of this equation leads to systematic errors of only $O(\epsilon^2)$ compared to $O(\epsilon)$ for LA.</li>
<li><strong>Tunable Damping</strong>: The addition of the damping parameter $\gamma$ allows tuning to minimize autocorrelation tails.</li>
<li><strong>Uniform Evolution</strong>: The method evolves structures of different wavelengths more uniformly than LA due to the specific dissipation structure.</li>
</ul>
<h2 id="methodology-and-experiments">Methodology and Experiments</h2>
<p>The author validated the method using the <strong>XY Model</strong> on 2D lattices.</p>
<ul>
<li><strong>System</strong>: Euclidean action $S = -\sum_{x,\mu} \cos(\theta_{x+\mu} - \theta_x)$.</li>
<li><strong>Setup</strong>:
<ul>
<li>Lattice sizes: $15^2$ (helical boundary conditions) and $30^2$.</li>
<li>$\beta$ range: 0.9 to 1.2 (crossing the critical point $\approx 1.0$).</li>
<li>Run length: &gt;100,000 updates in equilibrium.</li>
</ul>
</li>
<li><strong>Metrics</strong>:
<ul>
<li><strong>Autocorrelation time ($\tau$)</strong>: Defined as the number of updates for the time-correlation function to drop to 10% of its initial value.</li>
<li><strong>Systematic Error</strong>: Measured via deviation of average action from Monte Carlo values.</li>
</ul>
</li>
</ul>
<h2 id="results-and-conclusions">Results and Conclusions</h2>
<ul>
<li><strong>Efficiency</strong>: The Hyperbolic Algorithm (HA) is far more efficient. For equal systematic errors, sweep-sweep correlation times are significantly lower than LA.</li>
<li><strong>Error Scaling</strong>: Numerical results confirmed that HA step size $\epsilon_H = 0.1$ yields systematic errors comparable to LA step size $\epsilon_L \approx 0.008$ ($O(\epsilon^2)$ vs $O(\epsilon)$ scaling).</li>
<li><strong>Speedup</strong>: In the disordered phase, HA is roughly $\epsilon_H / \epsilon_L$ times faster (approximately a factor of 12.5 for $\epsilon_H = 0.1$, $\epsilon_L = 0.008$). In the ordered phase, efficiency gains increase with distance scale, reaching factors of 20 or more for long-range correlations.</li>
<li><strong>Optimal Damping</strong>: For the XY model, the optimal damping parameter was found to be $\gamma \approx 0.4$.</li>
</ul>
<hr>
<h2 id="reproducibility-details">Reproducibility Details</h2>
<h3 id="algorithms">Algorithms</h3>
<p><strong>1. The Hyperbolic Algorithm (HA)</strong></p>
<p>The discretized update equations for scalar fields are:</p>
<p>$$
\begin{aligned}
\pi_{t+\epsilon} - \pi_{t} &amp;= -\epsilon\gamma\pi_{t} - \epsilon\frac{\partial S}{\partial\phi_{t}} + \sqrt{2\epsilon\gamma/\beta}\xi_{t} \\
\phi_{t+\epsilon} - \phi_{t} &amp;= \epsilon\pi_{t+\epsilon}
\end{aligned}
$$</p>
<ul>
<li><strong>Variables</strong>: $\phi$ is the field, $\pi$ is the conjugate momentum ($\dot{\phi}$).</li>
<li><strong>Parameters</strong>: $\epsilon$ (step size), $\gamma$ (damping constant).</li>
<li><strong>Noise</strong>: $\xi$ is Gaussian noise with $\langle\xi_x \xi_y\rangle = \delta_{x,y}$.</li>
<li><strong>Storage</strong>: Requires storing both $\phi$ and $\pi$ vectors.</li>
</ul>
<p><strong>2. Non-Abelian Generalization</strong></p>
<p>For Lie group elements $U$ with generators $T^a$:</p>
<p>$$
\begin{aligned}
\pi_{t+\epsilon}^a - \pi_{t}^a &amp;= -\epsilon\gamma\pi_{t}^a - \epsilon\delta^a S[U_t] + \sqrt{2\epsilon\gamma/\beta}\xi_{t}^a \\
U_{t+\epsilon} &amp;= e^{i\epsilon\pi_{t+\epsilon}^a T^a} U_t
\end{aligned}
$$</p>
<h3 id="theoretical-proof-of-oepsilon2-accuracy">Theoretical Proof of $O(\epsilon^2)$ Accuracy</h3>
<p>The derivation relies on the generalized Liouville equation for the probability distribution $P[\phi, \pi; t]$.</p>
<ol>
<li><strong>Transition Probability</strong>: The transition $W$ for one iteration is defined.</li>
<li><strong>Effective Liouville Operator</strong>: The evolution is written as $P(t+\epsilon) = \exp(\epsilon L_{\text{eff}}) P(t)$.</li>
<li><strong>Baker-Hausdorff Expansion</strong>: Using normal ordering of operators, the equilibrium distribution $P_{\text{eq}}$ is derived through $O(\epsilon^2)$:</li>
</ol>
<p>$$
\begin{aligned}
P_{\text{eq}} &amp;= \exp\left\lbrace-\frac{1}{2}\beta_{1}\sum_{x}\pi_{x}^{2} - \beta S[\phi] + \frac{1}{2}\epsilon\beta\sum_{x}\pi_{x}S_{x} + \epsilon^{2}G + O(\epsilon^3)\right\rbrace
\end{aligned}
$$</p>
<p>where $\beta_1 = \beta\left(1 - \frac{1}{2}\epsilon\gamma\right)$.</p>
<ol start="4">
<li><strong>Effective Action</strong>: Integrating out $\pi$ yields the effective action for $\phi$:</li>
</ol>
<p>$$
\begin{aligned}
S_{\text{eff}}[\phi] &amp;= S[\phi] - \frac{1}{8}\epsilon^2 \sum_x S_x^2 + \dots
\end{aligned}
$$</p>
<p>The absence of $O(\epsilon)$ terms proves the higher-order accuracy.</p>
<h3 id="evaluation">Evaluation</h3>
<ul>
<li><strong>Model</strong>: XY Model (2D)</li>
<li><strong>Hamiltonian</strong>: $H = \frac{1}{2}\sum \pi^2 + S[\phi]$ where $S = -\sum \cos(\Delta \theta)$.</li>
<li><strong>Observables</strong>:
<ul>
<li>$\Gamma_n = \cos(\theta_{m+n} - \theta_m)$ (averaged over lattice $m$).</li>
</ul>
</li>
<li><strong>Comparisons</strong>:
<ul>
<li><strong>LA Step</strong>: $\epsilon_L \approx 0.005 - 0.02$.</li>
<li><strong>HA Step</strong>: $\epsilon_H \approx 0.1 - 0.2$.</li>
<li><strong>Equivalence</strong>: $\epsilon_H = 0.1$ matches error of $\epsilon_L \approx 0.008$.</li>
</ul>
</li>
</ul>
<hr>
<h2 id="terminology-note">Terminology Note</h2>
<p>The naming conventions in this paper differ from those commonly used in molecular dynamics (MD). The following table provides a cross-field mapping:</p>
<table>
	<thead>
			<tr>
					<th style="text-align: left">Concept</th>
					<th style="text-align: left"><strong>Field Theory (This Paper)</strong></th>
					<th style="text-align: left"><strong>Molecular Dynamics</strong></th>
					<th style="text-align: left"><strong>Mathematics</strong></th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td style="text-align: left"><strong>Equation 1</strong></td>
					<td style="text-align: left">&ldquo;Langevin Equation&rdquo;</td>
					<td style="text-align: left">Brownian Dynamics (BD)</td>
					<td style="text-align: left">Overdamped Langevin</td>
			</tr>
			<tr>
					<td style="text-align: left"><strong>Equation 2</strong></td>
					<td style="text-align: left">&ldquo;Hyperbolic Equation&rdquo;</td>
					<td style="text-align: left">Langevin Dynamics (LD)</td>
					<td style="text-align: left">Underdamped Langevin</td>
			</tr>
			<tr>
					<td style="text-align: left"><strong>Integrator 1</strong></td>
					<td style="text-align: left">Euler Discretization</td>
					<td style="text-align: left">Euler Integrator</td>
					<td style="text-align: left">Euler-Maruyama</td>
			</tr>
			<tr>
					<td style="text-align: left"><strong>Integrator 2</strong></td>
					<td style="text-align: left">Hyperbolic Algorithm (HA)</td>
					<td style="text-align: left">Velocity Verlet / Leapfrog</td>
					<td style="text-align: left">Quasi-Symplectic Splitting</td>
			</tr>
	</tbody>
</table>
<p><strong>Key insight</strong>: The paper&rsquo;s &ldquo;Hyperbolic Algorithm&rdquo; is mathematically equivalent to Langevin Dynamics with a Leapfrog/Verlet integrator, commonly used in MD. The baseline &ldquo;Langevin Algorithm&rdquo; corresponds to Brownian Dynamics. The term &ldquo;Langevin equation&rdquo; is overloaded: field theorists often use it for overdamped dynamics (no inertia), while chemists assume it includes momentum ($F=ma$).</p>
<h2 id="paper-information">Paper Information</h2>
<p><strong>Citation</strong>: Horowitz, A. M. (1987). The Second Order Langevin Equation and Numerical Simulations. <em>Nuclear Physics B</em>, 280, 510-522. <a href="https://doi.org/10.1016/0550-3213(87)90159-3">https://doi.org/10.1016/0550-3213(87)90159-3</a></p>
<p><strong>Publication</strong>: Nuclear Physics B 1987</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-bibtex" data-lang="bibtex"><span style="display:flex;"><span><span style="color:#a6e22e">@article</span>{horowitzSecondOrderLangevin1987,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">title</span> = <span style="color:#e6db74">{The Second Order {{Langevin}} Equation and Numerical Simulations}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">author</span> = <span style="color:#e6db74">{Horowitz, Alan M.}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">year</span> = <span style="color:#ae81ff">1987</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">month</span> = jan,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">journal</span> = <span style="color:#e6db74">{Nuclear Physics B}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">volume</span> = <span style="color:#e6db74">{280}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">pages</span> = <span style="color:#e6db74">{510--522}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">issn</span> = <span style="color:#e6db74">{05503213}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">doi</span> = <span style="color:#e6db74">{10.1016/0550-3213(87)90159-3}</span>
</span></span><span style="display:flex;"><span>}
</span></span></code></pre></div>]]></content:encoded></item><item><title>Oscillatory CO Oxidation on Pt(110): Temporal Modeling</title><link>https://hunterheidenreich.com/notes/chemistry/molecular-simulation/surface-science/oscillatory-co-oxidation-pt110-1992/</link><pubDate>Sun, 14 Dec 2025 00:00:00 +0000</pubDate><guid>https://hunterheidenreich.com/notes/chemistry/molecular-simulation/surface-science/oscillatory-co-oxidation-pt110-1992/</guid><description>A kinetic model using coupled ODEs to explain temporal self-organization and mixed-mode oscillations in catalytic CO oxidation on Pt(110).</description><content:encoded><![CDATA[<p><strong>Related Work</strong>: This builds on <a href="/notes/chemistry/molecular-simulation/surface-science/kinetic-oscillations-pt100-1985/">Kinetic Oscillations on Pt(100)</a>, which established that surface phase transitions drive oscillatory catalysis. The Pt(110) system exhibits richer dynamics including mixed-mode oscillations and chaos.</p>
<h2 id="method-presentation-modeling-temporal-self-organization">Method Presentation: Modeling Temporal Self-Organization</h2>
<p>This is primarily a <strong>Method</strong> paper, supported by <strong>Theory</strong>.</p>
<ul>
<li><strong>Method</strong>: The authors construct a specific computational architecture, a set of coupled Ordinary Differential Equations (ODEs), to simulate the catalytic oxidation of CO. They systematically &ldquo;ablate&rdquo; the model, starting with 2 variables (bistability only), adding a 3rd (simple oscillations), and finally a 4th (mixed-mode oscillations) to demonstrate the necessity of each physical component.</li>
<li><strong>Theory</strong>: The model is analyzed using formal bifurcation theory (continuation methods) to map the topology of the phase space (Hopf bifurcations, saddle-node loops, etc.).</li>
</ul>
<h2 id="motivation-bridging-microscopic-structure-and-macroscopic-dynamics">Motivation: Bridging Microscopic Structure and Macroscopic Dynamics</h2>
<p>The Pt(110) surface exhibits complex temporal behavior during CO oxidation, including bistability, sustained oscillations, mixed-mode oscillations (MMOs), and chaos. Previous simple models could explain bistability but failed to capture the oscillatory dynamics observed experimentally. There was a need for a &ldquo;realistic&rdquo; model that used physically derived parameters to quantitatively link microscopic surface changes (structural phase transitions) to macroscopic reaction rates.</p>
<h2 id="novelty-coupling-reaction-kinetics-and-surface-phase-transitions">Novelty: Coupling Reaction Kinetics and Surface Phase Transitions</h2>
<p>The core novelty is the <strong>&ldquo;Reconstruction Model&rdquo;</strong>, which couples the chemical kinetics (Langmuir-Hinshelwood mechanism) with the physical structural phase transition of the platinum surface ($1\times1 \leftrightarrow 1\times2$).</p>
<ul>
<li>They treat the surface structure as a dynamic variable ($w$).</li>
<li>They introduce a fourth variable ($z$) representing &ldquo;faceting&rdquo; to explain complex mixed-mode oscillations, identifying the interplay between two negative feedback loops on different time scales as the driver for this behavior.</li>
</ul>
<h2 id="methodology-experimental-parameters-and-bifurcation-topology">Methodology: Experimental Parameters and Bifurcation Topology</h2>
<p>The validation approach involved a tight loop between numerical simulation and physical experiment:</p>
<ol>
<li><strong>Parameter Determination</strong>: They experimentally measured individual rate constants (sticking coefficients, desorption energies) using Surface Science techniques (LEED, TDS) to ground the model in reality.</li>
<li><strong>Bifurcation Analysis</strong>: They used numerical continuation methods (AUTO package) to compute &ldquo;skeleton bifurcation diagrams,&rdquo; mapping the boundaries between stable states, simple oscillations, and chaos in parameter space ($p_{CO}$ vs $p_{O_2}$).</li>
<li><strong>Physical Validation</strong>: These diagrams were compared directly against experimental work function ($\Delta \phi$) measurements and LEED intensity profiles to verify the existence regions of different dynamic regimes.</li>
</ol>
<h2 id="results-and-limitations-mixed-mode-oscillations-vs-spatiotemporal-chaos">Results and Limitations: Mixed-Mode Oscillations vs. Spatiotemporal Chaos</h2>
<ul>
<li><strong>Successes</strong>: The 3-variable model successfully reproduces bistability and simple oscillations (limit cycles). The extended 4-variable model qualitatively captures mixed-mode oscillations (MMOs).</li>
<li><strong>Mechanism</strong>: Oscillations arise from the delay between CO adsorption and the resulting surface phase transition (which changes oxygen sticking probabilities).</li>
<li><strong>Limitations</strong>: The 4-variable model only reproduces one type of MMO; certain experimental patterns (e.g., square-wave forms with small oscillations on both high and low work-function levels) were not obtained. The oscillatory region also does not extend to low temperatures as observed experimentally. More fundamentally, the ODE model fails to predict the period-doubling cascade to chaos or hyperchaos observed in experiments. The authors conclude these are likely spatiotemporal phenomena (involving wave propagation and pattern formation) that require Partial Differential Equations (PDEs).</li>
</ul>
<hr>
<h2 id="reproducibility-details">Reproducibility Details</h2>
<p>The paper provides a complete set of equations and parameters required to reproduce the dynamics.</p>
<h3 id="data-parameters">Data (Parameters)</h3>
<p>The model uses kinetic parameters derived from Pt(110) experiments. Key constants for reproduction:</p>
<table>
	<thead>
			<tr>
					<th style="text-align: left">Parameter</th>
					<th style="text-align: left">Value</th>
					<th style="text-align: left">Description</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td style="text-align: left">$\kappa_c$</td>
					<td style="text-align: left">$3.135 \times 10^5 , s^{-1} \text{mbar}^{-1}$</td>
					<td style="text-align: left">Rate of CO hitting surface</td>
			</tr>
			<tr>
					<td style="text-align: left">$s_c$</td>
					<td style="text-align: left">$1.0$</td>
					<td style="text-align: left">CO sticking coefficient</td>
			</tr>
			<tr>
					<td style="text-align: left">$q$</td>
					<td style="text-align: left">$3$</td>
					<td style="text-align: left">Mobility parameter of precursor adsorption</td>
			</tr>
			<tr>
					<td style="text-align: left">$u_s$</td>
					<td style="text-align: left">$1.0$</td>
					<td style="text-align: left">Saturation coverage ($CO$)</td>
			</tr>
			<tr>
					<td style="text-align: left">$\kappa_o$</td>
					<td style="text-align: left">$5.858 \times 10^5 , s^{-1} \text{mbar}^{-1}$</td>
					<td style="text-align: left">Rate of $O_2$ hitting surface</td>
			</tr>
			<tr>
					<td style="text-align: left">$s_{o,1\times2}$</td>
					<td style="text-align: left">$0.4$</td>
					<td style="text-align: left">$O_2$ sticking coeff ($1\times2$ phase)</td>
			</tr>
			<tr>
					<td style="text-align: left">$s_{o,1\times1}$</td>
					<td style="text-align: left">$0.6$</td>
					<td style="text-align: left">$O_2$ sticking coeff ($1\times1$ phase)</td>
			</tr>
			<tr>
					<td style="text-align: left">$v_s$</td>
					<td style="text-align: left">$0.8$</td>
					<td style="text-align: left">Saturation coverage ($O$)</td>
			</tr>
			<tr>
					<td style="text-align: left">$k_{r}^{0}$</td>
					<td style="text-align: left">$3 \times 10^6 , s^{-1}$</td>
					<td style="text-align: left">Reaction pre-exponential</td>
			</tr>
			<tr>
					<td style="text-align: left">$E_r$</td>
					<td style="text-align: left">$10 , \text{kcal/mol}$</td>
					<td style="text-align: left">Reaction activation energy</td>
			</tr>
			<tr>
					<td style="text-align: left">$k_{d}^{0}$</td>
					<td style="text-align: left">$2 \times 10^{16} , s^{-1}$</td>
					<td style="text-align: left">Desorption pre-exponential</td>
			</tr>
			<tr>
					<td style="text-align: left">$E_d$</td>
					<td style="text-align: left">$38 , \text{kcal/mol}$</td>
					<td style="text-align: left">Desorption activation energy</td>
			</tr>
			<tr>
					<td style="text-align: left">$k_{p}^{0}$</td>
					<td style="text-align: left">$10^2 , s^{-1}$</td>
					<td style="text-align: left">Phase transition pre-exponential</td>
			</tr>
			<tr>
					<td style="text-align: left">$E_p$</td>
					<td style="text-align: left">$7 , \text{kcal/mol}$</td>
					<td style="text-align: left">Phase transition activation energy</td>
			</tr>
			<tr>
					<td style="text-align: left">$k_f$</td>
					<td style="text-align: left">$0.03 , s^{-1}$</td>
					<td style="text-align: left">Rate of facet formation</td>
			</tr>
			<tr>
					<td style="text-align: left">$k_{t}^{0}$</td>
					<td style="text-align: left">$2.65 \times 10^5 , s^{-1}$</td>
					<td style="text-align: left">Thermal annealing pre-exponential</td>
			</tr>
			<tr>
					<td style="text-align: left">$E_t$</td>
					<td style="text-align: left">$20 , \text{kcal/mol}$</td>
					<td style="text-align: left">Thermal annealing activation energy</td>
			</tr>
			<tr>
					<td style="text-align: left">$s_{o,3}$</td>
					<td style="text-align: left">$0.2$</td>
					<td style="text-align: left">Increase of $s_o$ for max faceting ($z=1$)</td>
			</tr>
	</tbody>
</table>
<h3 id="algorithms-the-equations">Algorithms (The Equations)</h3>
<p>The system is defined by a set of coupled Ordinary Differential Equations (ODEs).</p>
<p><strong>1. Basic 3-Variable Model (Reconstruction Model)</strong></p>
<p>The core system is structured as a single mathematical block of coupled variables representing CO coverage ($u$), Oxygen coverage ($v$), and the surface phase fraction ($w$):</p>
<p>$$
\begin{aligned}
\dot{u} &amp;= p_{CO} \kappa_c s_c \left(1 - \left(\frac{u}{u_s}\right)^q \right) - k_d u - k_r u v \\
\dot{v} &amp;= p_{O_2} \kappa_o s_o \left(1 - \frac{u}{u_s} - \frac{v}{v_s}\right)^2 - k_r u v \\
\dot{w} &amp;= k_p (w_{eq}(u) - w)
\end{aligned}
$$</p>
<p><em>Note:</em> The oxygen sticking coefficient $s_o$ dynamically depends on the structure $w$, calculated as $s_o = w \cdot s_{o,1\times1} + (1-w) \cdot s_{o,1\times2}$. The equilibrium function $w_{eq}(u)$ is a polynomial step function that activates the phase transition:</p>
<p>$$
w_{eq}(u) =
\begin{cases}
0 &amp; u \le 0.2 \
\sum_{i=0}^3 r_i u^i &amp; 0.2 &lt; u &lt; 0.5 \
1 &amp; u \ge 0.5
\end{cases}
$$</p>
<p>The polynomial coefficients from Table II are: $r_3 = -1/0.0135$, $r_2 = -1.05 r_3$, $r_1 = 0.3 r_3$, $r_0 = -0.026 r_3$.</p>
<p><strong>2. Extended 4-Variable Model (Faceting)</strong></p>
<p>To reproduce Mixed-Mode Oscillations, the model adds a faceting variable $z$:</p>
<p>$$
\begin{aligned}
s_o &amp;= w \cdot s_{o,1\times1} + (1-w) \cdot s_{o,1\times2} + s_{o,3} z \\
\dot{z} &amp;= k_f \cdot u \cdot v \cdot w \cdot (1-z) - k_t z (1-u)
\end{aligned}
$$</p>
<h3 id="models">Models</h3>
<p>The authors define two distinct configurations:</p>
<ol>
<li><strong>3-Variable (u, v, w)</strong>: Sufficient for bistability and simple oscillations (limit cycles).</li>
<li><strong>4-Variable (u, v, w, z)</strong>: Required for mixed-mode oscillations (small oscillations superimposed on large relaxation spikes).</li>
</ol>
<h3 id="evaluation">Evaluation</h3>
<ul>
<li><strong>Bifurcation Analysis</strong>: The system should be evaluated by computing steady states and detecting Hopf bifurcations as a function of $p_{CO}$ and $p_{O_2}$.</li>
<li><strong>Time Integration</strong>: Stiff ODE solvers (e.g., <code>scipy.integrate.odeint</code> or <code>solve_ivp</code> with &lsquo;Radau&rsquo; or &lsquo;BDF&rsquo; method) are recommended due to the differing time scales of reaction ($u,v$) and reconstruction ($w,z$).</li>
</ul>
<h3 id="hardware">Hardware</h3>
<ul>
<li><strong>Original</strong>: VAX 6800 and VAX station 3100.</li>
<li><strong>Modern Reqs</strong>: Minimal. Can be solved in milliseconds on any modern CPU using standard scientific libraries (Python/Matlab).</li>
</ul>
<h3 id="reference-implementation">Reference Implementation</h3>
<p>The following Python script implements the 3-variable Reconstruction Model described in the paper, replicating the stable oscillations shown in Figure 7 (T=540K):</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-python" data-lang="python"><span style="display:flex;"><span><span style="color:#f92672">import</span> numpy <span style="color:#66d9ef">as</span> np
</span></span><span style="display:flex;"><span><span style="color:#f92672">from</span> scipy.integrate <span style="color:#f92672">import</span> odeint
</span></span><span style="display:flex;"><span><span style="color:#f92672">import</span> matplotlib.pyplot <span style="color:#66d9ef">as</span> plt
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># --- 1. CONSTANTS &amp; PARAMETERS ---</span>
</span></span><span style="display:flex;"><span>R <span style="color:#f92672">=</span> <span style="color:#ae81ff">0.001987</span>
</span></span><span style="display:flex;"><span>k_c, s_c, q <span style="color:#f92672">=</span> <span style="color:#ae81ff">3.135e5</span>, <span style="color:#ae81ff">1.0</span>, <span style="color:#ae81ff">3.0</span>
</span></span><span style="display:flex;"><span>k_o, s_o1, s_o2 <span style="color:#f92672">=</span> <span style="color:#ae81ff">5.858e5</span>, <span style="color:#ae81ff">0.6</span>, <span style="color:#ae81ff">0.4</span>
</span></span><span style="display:flex;"><span>k_d0, E_d <span style="color:#f92672">=</span> <span style="color:#ae81ff">2.0e16</span>, <span style="color:#ae81ff">38.0</span>
</span></span><span style="display:flex;"><span>k_r0, E_r <span style="color:#f92672">=</span> <span style="color:#ae81ff">3.0e6</span>, <span style="color:#ae81ff">10.0</span>
</span></span><span style="display:flex;"><span>k_p0, E_p <span style="color:#f92672">=</span> <span style="color:#ae81ff">100.0</span>, <span style="color:#ae81ff">7.0</span>
</span></span><span style="display:flex;"><span>u_s, v_s <span style="color:#f92672">=</span> <span style="color:#ae81ff">1.0</span>, <span style="color:#ae81ff">0.8</span>
</span></span><span style="display:flex;"><span>T, p_CO, p_O2 <span style="color:#f92672">=</span> <span style="color:#ae81ff">540.0</span>, <span style="color:#ae81ff">3.0e-5</span>, <span style="color:#ae81ff">6.67e-5</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># Calculate Arrhenius rates</span>
</span></span><span style="display:flex;"><span>k_d <span style="color:#f92672">=</span> k_d0 <span style="color:#f92672">*</span> np<span style="color:#f92672">.</span>exp(<span style="color:#f92672">-</span>E_d <span style="color:#f92672">/</span> (R <span style="color:#f92672">*</span> T))
</span></span><span style="display:flex;"><span>k_r <span style="color:#f92672">=</span> k_r0 <span style="color:#f92672">*</span> np<span style="color:#f92672">.</span>exp(<span style="color:#f92672">-</span>E_r <span style="color:#f92672">/</span> (R <span style="color:#f92672">*</span> T))
</span></span><span style="display:flex;"><span>k_p <span style="color:#f92672">=</span> k_p0 <span style="color:#f92672">*</span> np<span style="color:#f92672">.</span>exp(<span style="color:#f92672">-</span>E_p <span style="color:#f92672">/</span> (R <span style="color:#f92672">*</span> T))
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">def</span> <span style="color:#a6e22e">model</span>(y, t):
</span></span><span style="display:flex;"><span>    u, v, w <span style="color:#f92672">=</span> y
</span></span><span style="display:flex;"><span>    s_o <span style="color:#f92672">=</span> w <span style="color:#f92672">*</span> s_o1 <span style="color:#f92672">+</span> (<span style="color:#ae81ff">1</span> <span style="color:#f92672">-</span> w) <span style="color:#f92672">*</span> s_o2
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>    <span style="color:#75715e"># Smooth step function for Equilibrium w</span>
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">if</span> u <span style="color:#f92672">&lt;=</span> <span style="color:#ae81ff">0.2</span>: weq <span style="color:#f92672">=</span> <span style="color:#ae81ff">0.0</span>
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">elif</span> u <span style="color:#f92672">&gt;=</span> <span style="color:#ae81ff">0.5</span>: weq <span style="color:#f92672">=</span> <span style="color:#ae81ff">1.0</span>
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">else</span>:
</span></span><span style="display:flex;"><span>        x <span style="color:#f92672">=</span> (u <span style="color:#f92672">-</span> <span style="color:#ae81ff">0.2</span>) <span style="color:#f92672">/</span> <span style="color:#ae81ff">0.3</span>
</span></span><span style="display:flex;"><span>        weq <span style="color:#f92672">=</span> <span style="color:#ae81ff">3</span><span style="color:#f92672">*</span>x<span style="color:#f92672">**</span><span style="color:#ae81ff">2</span> <span style="color:#f92672">-</span> <span style="color:#ae81ff">2</span><span style="color:#f92672">*</span>x<span style="color:#f92672">**</span><span style="color:#ae81ff">3</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>    r_reac <span style="color:#f92672">=</span> k_r <span style="color:#f92672">*</span> u <span style="color:#f92672">*</span> v
</span></span><span style="display:flex;"><span>    du <span style="color:#f92672">=</span> p_CO <span style="color:#f92672">*</span> k_c <span style="color:#f92672">*</span> s_c <span style="color:#f92672">*</span> (<span style="color:#ae81ff">1</span> <span style="color:#f92672">-</span> (u<span style="color:#f92672">/</span>u_s)<span style="color:#f92672">**</span>q) <span style="color:#f92672">-</span> k_d <span style="color:#f92672">*</span> u <span style="color:#f92672">-</span> r_reac
</span></span><span style="display:flex;"><span>    dv <span style="color:#f92672">=</span> p_O2 <span style="color:#f92672">*</span> k_o <span style="color:#f92672">*</span> s_o <span style="color:#f92672">*</span> (<span style="color:#ae81ff">1</span> <span style="color:#f92672">-</span> u<span style="color:#f92672">/</span>u_s <span style="color:#f92672">-</span> v<span style="color:#f92672">/</span>v_s)<span style="color:#f92672">**</span><span style="color:#ae81ff">2</span> <span style="color:#f92672">-</span> r_reac
</span></span><span style="display:flex;"><span>    dw <span style="color:#f92672">=</span> k_p <span style="color:#f92672">*</span> (weq <span style="color:#f92672">-</span> w)
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">return</span> [du, dv, dw]
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># --- 2. SIMULATION STRATEGY ---</span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># Simulate for 300 seconds to kill transients</span>
</span></span><span style="display:flex;"><span>t_full <span style="color:#f92672">=</span> np<span style="color:#f92672">.</span>linspace(<span style="color:#ae81ff">0</span>, <span style="color:#ae81ff">300</span>, <span style="color:#ae81ff">3000</span>)
</span></span><span style="display:flex;"><span>y0 <span style="color:#f92672">=</span> [<span style="color:#ae81ff">0.1</span>, <span style="color:#ae81ff">0.1</span>, <span style="color:#ae81ff">0.0</span>]
</span></span><span style="display:flex;"><span>solution <span style="color:#f92672">=</span> odeint(model, y0, t_full)
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># --- 3. SLICING FOR FIGURE 7 ---</span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># Only take the last 60 seconds (stable limit cycle)</span>
</span></span><span style="display:flex;"><span>mask <span style="color:#f92672">=</span> (t_full <span style="color:#f92672">&gt;</span> <span style="color:#ae81ff">240</span>) <span style="color:#f92672">&amp;</span> (t_full <span style="color:#f92672">&lt;</span> <span style="color:#ae81ff">300</span>)
</span></span><span style="display:flex;"><span>t_plot <span style="color:#f92672">=</span> t_full[mask]
</span></span><span style="display:flex;"><span><span style="color:#75715e"># Shift time axis to start at 10s (matching Fig 7 style)</span>
</span></span><span style="display:flex;"><span>t_display <span style="color:#f92672">=</span> t_plot <span style="color:#f92672">-</span> t_plot[<span style="color:#ae81ff">0</span>] <span style="color:#f92672">+</span> <span style="color:#ae81ff">10</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>u_plot <span style="color:#f92672">=</span> solution[mask, <span style="color:#ae81ff">0</span>]
</span></span><span style="display:flex;"><span>v_plot <span style="color:#f92672">=</span> solution[mask, <span style="color:#ae81ff">1</span>]
</span></span><span style="display:flex;"><span>w_plot <span style="color:#f92672">=</span> solution[mask, <span style="color:#ae81ff">2</span>]
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># --- 4. VISUALIZATION ---</span>
</span></span><span style="display:flex;"><span>plt<span style="color:#f92672">.</span>figure(figsize<span style="color:#f92672">=</span>(<span style="color:#ae81ff">8</span>, <span style="color:#ae81ff">5</span>))
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># Plot CO (u) and Structure (w) on top (Primary Axis)</span>
</span></span><span style="display:flex;"><span>plt<span style="color:#f92672">.</span>plot(t_display, w_plot, <span style="color:#e6db74">&#39;g--&#39;</span>, label<span style="color:#f92672">=</span><span style="color:#e6db74">&#39;1x1 Fraction (w)&#39;</span>, linewidth<span style="color:#f92672">=</span><span style="color:#ae81ff">1.5</span>)
</span></span><span style="display:flex;"><span>plt<span style="color:#f92672">.</span>plot(t_display, u_plot, <span style="color:#e6db74">&#39;k-&#39;</span>, label<span style="color:#f92672">=</span><span style="color:#e6db74">&#39;CO Coverage (u)&#39;</span>, linewidth<span style="color:#f92672">=</span><span style="color:#ae81ff">2</span>)
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># Plot Oxygen (v) on bottom</span>
</span></span><span style="display:flex;"><span>plt<span style="color:#f92672">.</span>plot(t_display, v_plot, <span style="color:#e6db74">&#39;r-.&#39;</span>, label<span style="color:#f92672">=</span><span style="color:#e6db74">&#39;Oxygen (v)&#39;</span>, linewidth<span style="color:#f92672">=</span><span style="color:#ae81ff">1.5</span>)
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>plt<span style="color:#f92672">.</span>title(<span style="color:#e6db74">&#39;Replication of Figure 7: Stable Oscillations&#39;</span>)
</span></span><span style="display:flex;"><span>plt<span style="color:#f92672">.</span>xlabel(<span style="color:#e6db74">&#39;Time (s)&#39;</span>)
</span></span><span style="display:flex;"><span>plt<span style="color:#f92672">.</span>ylabel(<span style="color:#e6db74">&#39;Coverage [ML]&#39;</span>)
</span></span><span style="display:flex;"><span>plt<span style="color:#f92672">.</span>legend(loc<span style="color:#f92672">=</span><span style="color:#e6db74">&#39;upper center&#39;</span>, ncol<span style="color:#f92672">=</span><span style="color:#ae81ff">3</span>)
</span></span><span style="display:flex;"><span>plt<span style="color:#f92672">.</span>xlim(<span style="color:#ae81ff">10</span>, <span style="color:#ae81ff">60</span>)
</span></span><span style="display:flex;"><span>plt<span style="color:#f92672">.</span>ylim(<span style="color:#ae81ff">0</span>, <span style="color:#ae81ff">1.0</span>)
</span></span><span style="display:flex;"><span>plt<span style="color:#f92672">.</span>grid(<span style="color:#66d9ef">True</span>, alpha<span style="color:#f92672">=</span><span style="color:#ae81ff">0.3</span>)
</span></span><span style="display:flex;"><span>plt<span style="color:#f92672">.</span>show()
</span></span></code></pre></div>














<figure class="post-figure center ">
    <img src="/img/notes/oscillatory-co-pt110-replication.webp"
         alt="Replication of Figure 7 showing stable oscillations in CO oxidation on Pt(110)"
         title="Replication of Figure 7 showing stable oscillations in CO oxidation on Pt(110)"
         
         
         loading="lazy"
         class="post-image">
    
    <figcaption class="post-caption">Output of the reference implementation showing stable oscillations on Pt(110)</figcaption>
    
</figure>

<p>This plot faithfully replicates the stable limit cycle shown in <strong>Figure 7</strong> of the paper:</p>
<ul>
<li><strong>Timeframe</strong>: Shows a 50-second window (labeled 10-60s) after initial transients have died out.</li>
<li><strong>Period</strong>: Regular oscillations with a period of roughly 7-8 seconds.</li>
<li><strong>Phase Relationship</strong>: The surface phase reconstruction ($w$, green dashed) lags slightly behind the CO coverage ($u$, black solid). This delay is the crucial &ldquo;memory&rdquo; effect that enables the oscillation.</li>
<li><strong>Anticorrelation</strong>: The oxygen coverage ($v$, red dash-dot) spikes exactly when the surface is in the active $1\times1$ phase (high $w$) and CO is low, confirming the &ldquo;Langmuir-Hinshelwood&rdquo; reaction mechanism.</li>
</ul>
<hr>
<h2 id="paper-information">Paper Information</h2>
<p><strong>Citation</strong>: Krischer, K., Eiswirth, M., &amp; Ertl, G. (1992). Oscillatory CO oxidation on Pt(110): Modeling of temporal self-organization. <em>The Journal of Chemical Physics</em>, 96(12), 9161-9172. <a href="https://doi.org/10.1063/1.462226">https://doi.org/10.1063/1.462226</a></p>
<p><strong>Publication</strong>: Journal of Chemical Physics 1992</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-bibtex" data-lang="bibtex"><span style="display:flex;"><span><span style="color:#a6e22e">@article</span>{krischerOscillatoryCOOxidation1992,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">title</span> = <span style="color:#e6db74">{Oscillatory {{CO}} Oxidation on {{Pt}}(110): {{Modeling}} of Temporal Self-organization}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">shorttitle</span> = <span style="color:#e6db74">{Oscillatory {{CO}} Oxidation on {{Pt}}(110)}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">author</span> = <span style="color:#e6db74">{Krischer, K. and Eiswirth, M. and Ertl, G.}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">year</span> = <span style="color:#ae81ff">1992</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">month</span> = jun,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">journal</span> = <span style="color:#e6db74">{The Journal of Chemical Physics}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">volume</span> = <span style="color:#e6db74">{96}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">number</span> = <span style="color:#e6db74">{12}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">pages</span> = <span style="color:#e6db74">{9161--9172}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">issn</span> = <span style="color:#e6db74">{0021-9606, 1089-7690}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">doi</span> = <span style="color:#e6db74">{10.1063/1.462226}</span>
</span></span><span style="display:flex;"><span>}
</span></span></code></pre></div>]]></content:encoded></item><item><title>MD Simulation of Self-Diffusion on Metal Surfaces (1994)</title><link>https://hunterheidenreich.com/notes/chemistry/molecular-simulation/surface-science/self-diffusion-metal-surfaces-1994/</link><pubDate>Sun, 14 Dec 2025 00:00:00 +0000</pubDate><guid>https://hunterheidenreich.com/notes/chemistry/molecular-simulation/surface-science/self-diffusion-metal-surfaces-1994/</guid><description>Molecular dynamics simulation of Iridium surface diffusion confirming atomic exchange mechanisms using EAM and many-body potentials.</description><content:encoded><![CDATA[<h2 id="scientific-typology-computational-discovery">Scientific Typology: Computational Discovery</h2>
<p>This is primarily a <strong>Discovery</strong> ($\Psi_{\text{Discovery}}$) paper, with strong supporting contributions as a <strong>Method</strong> ($\Psi_{\text{Method}}$) evaluation. The primary contribution is the validation and mechanistic visualization of the &ldquo;exchange mechanism&rdquo; for surface diffusion using computational methods (Molecular Dynamics with many-body potentials). This physical phenomenon was previously observed in Field Ion Microscope (FIM) experiments but difficult to characterize dynamically. The paper focuses on determining <em>how</em> atoms move, specifically distinguishing between hopping and exchange mechanisms.</p>
<h2 id="the-field-ion-microscope-fim-observation-gap">The Field Ion Microscope (FIM) Observation Gap</h2>
<p>Surface diffusion is critical for understanding phenomena like crystal growth, epitaxy, and catalysis. Experimental evidence from FIM on fcc(001) surfaces (specifically Pt and Ir) suggested an &ldquo;exchange mechanism&rdquo; where an adatom replaces a substrate atom, challenging the conventional wisdom that adatoms migrate by hopping over potential barriers (bridge sites) between binding sites. The authors sought to:</p>
<ol>
<li>Investigate whether this exchange mechanism could be reproduced dynamically in simulation.</li>
<li>Determine which interatomic potentials (EAM, Sutton-Chen, R-G-L) accurately describe these surface behaviors compared to bulk properties.</li>
</ol>
<h2 id="dynamic-visualization-of-atomic-exchange">Dynamic Visualization of Atomic Exchange</h2>
<p>The study provides a direct dynamic visualization of the &ldquo;concerted motion&rdquo; involved in exchange diffusion events, which happens on timescales too fast for experimental imaging. By comparing three different many-body potentials, the authors demonstrate that the choice of potential is critical for capturing surface phenomena; specifically, identifying that &ldquo;bulk&rdquo; derived potentials (like Sutton-Chen) may fail to capture specific surface exchange events that EAM and R-G-L potentials successfully model.</p>
<h2 id="simulation-protocol--evaluated-potentials">Simulation Protocol &amp; Evaluated Potentials</h2>
<p>The authors performed Molecular Dynamics (MD) simulations on Iridium (Ir) surfaces:</p>
<ul>
<li><strong>Surfaces</strong>: Channeled (110), densely packed (111), and loosely packed (001).</li>
<li><strong>Potentials</strong>: Three many-body models were tested: Embedded Atom Method (EAM), Sutton-Chen (S-C), and Rosato-Guillope-Legrand (R-G-L).</li>
<li><strong>Conditions</strong>: Simulations were primarily run at $T=800$ K to ensure sufficient sampling of diffusion events.</li>
<li><strong>Cross-Validation</strong>: The study extended the analysis to Cu, Rh, and Pt systems to verify the universality of the exchange mechanism against experimental data.</li>
</ul>
<h2 id="confirmation-of-concerted-motion-mechanisms">Confirmation of Concerted Motion Mechanisms</h2>
<ul>
<li><strong>Mechanism Confirmation</strong>: The study confirmed that diffusion on Ir(001) proceeds via an atomic exchange mechanism (concerted motion). The activation energy for exchange ($0.77$ eV) was found to be significantly lower than for hopping over bridge sites ($1.57$ eV).</li>
<li><strong>Surface Structure Dependence</strong>:
<ul>
<li><strong>Ir(111)</strong>: Diffusion is rapid (activation energy $V_a = 0.17$ eV from R-G-L Arrhenius plot) and occurs exclusively via hopping; no exchange events were observed due to the close-packed nature of the surface.</li>
<li><strong>Ir(110)</strong>: Diffusion is anisotropic; atoms hop <em>along</em> channels but use the exchange mechanism to move <em>across</em> channels.</li>
</ul>
</li>
<li><strong>Potential Validity</strong>: The R-G-L and EAM potentials successfully reproduced experimental exchange behaviors, whereas the Sutton-Chen potential failed to predict exchange on Ir(001). The authors attribute the S-C failure primarily to the use of &ldquo;bulk&rdquo; potential parameters to describe interactions at the surface.</li>
<li><strong>Cross-System Comparison</strong>: The study extended the analysis to Cu, Rh, and Pt systems. Both S-C and R-G-L potentials correctly predicted the absence of exchange on all three Rh surfaces and on (111) surfaces of Cu and Pt. Exchange events were correctly predicted on Cu(001), Cu(110), Pt(001), and Pt(110) by both potentials. The sole discrepancy was S-C failing to predict exchange on Ir(001), where R-G-L and EAM succeeded in agreement with experiment.</li>
</ul>
<h2 id="reproducibility-details">Reproducibility Details</h2>
<h3 id="algorithms">Algorithms</h3>
<ul>
<li><strong>Integration</strong>: &ldquo;Velocity&rdquo; form of the Verlet algorithm.</li>
<li><strong>Time Step</strong>: $\Delta t = 0.01$ ps ($10^{-14}$ s).</li>
<li><strong>Simulation Protocol</strong>:
<ol>
<li><strong>Quenching</strong>: System relaxed to 0 K by zeroing velocities when $v \cdot F &lt; 0$.</li>
<li><strong>Equilibration</strong>: 5 ps constant-temperature run (renormalizing velocities every step).</li>
<li><strong>Production</strong>: 15 ps constant-energy (microcanonical) run where trajectories are collected.</li>
</ol>
</li>
</ul>
<h3 id="models">Models</h3>
<p>The study relies on three specific many-body potential formulations:</p>
<ol>
<li><strong>Embedded Atom Method (EAM)</strong>:
<ul>
<li>Total energy:
$$U_{tot} = \sum_i F_i(\rho_i) + \frac{1}{2} \sum_{j \neq i} \phi_{ij}(r_{ij})$$</li>
</ul>
</li>
<li><strong>Sutton-Chen (S-C)</strong>:
<ul>
<li>Uses a square root density dependence and power-law pair repulsion $(a/r)^{n}$:
$$F(\rho) \propto \rho^{1/2}$$</li>
</ul>
</li>
<li><strong>Rosato-Guillope-Legrand (R-G-L)</strong>:
<ul>
<li>Born-Mayer type repulsion:
$$\phi_{ij}(r) = A \exp[-p(r/r_0 - 1)]$$</li>
<li>Attractive band energy:
$$F_i(\rho) = -\left(\sum \xi^2 \exp[-2q(r/r_0 - 1)]\right)^{1/2}$$</li>
</ul>
</li>
</ol>
<h3 id="data">Data</h3>
<ul>
<li><strong>System Size</strong>: 648 classical atoms.</li>
<li><strong>Geometry</strong>:
<ul>
<li>Cubic box with fixed volume.</li>
<li>Periodic boundary conditions in $x$ and $y$ (parallel to surface), free motion in $z$.</li>
<li>Substrate depth: 8, 12, or 9 atomic layers depending on orientation [(001), (110), (111)].</li>
</ul>
</li>
<li><strong>Cutoff Radius</strong>: 14 bohr ($\sim 7.4$ Å).</li>
<li><strong>Initial Conditions</strong>: Velocities initialized from a Maxwellian distribution.</li>
</ul>
<h3 id="evaluation">Evaluation</h3>
<ul>
<li><strong>Diffusion Constant ($D$)</strong>: Calculated using the Einstein relation via Mean Square Displacement (MSD):
$$D = \lim_{t \to \infty} \frac{\langle \Delta r^2(t) \rangle}{2td}$$
where $d=2$ for surface diffusion.</li>
<li><strong>Activation Energy ($V_a$)</strong>: Extracted from the slope of Arrhenius plots ($\ln D$ vs $1/T$).</li>
<li><strong>Attempt Frequency ($\nu$)</strong>: Estimated via harmonic approximation: $\nu = \frac{1}{2\pi}\sqrt{c/M}$.</li>
</ul>
<h2 id="paper-information">Paper Information</h2>
<p><strong>Citation</strong>: Shiang, K.-D., Wei, C. M., &amp; Tsong, T. T. (1994). A molecular dynamics study of self-diffusion on metal surfaces. <em>Surface Science</em>, 301(1-3), 136-150. <a href="https://doi.org/10.1016/0039-6028(94)91295-5">https://doi.org/10.1016/0039-6028(94)91295-5</a></p>
<p><strong>Publication</strong>: Surface Science 1994</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-bibtex" data-lang="bibtex"><span style="display:flex;"><span><span style="color:#a6e22e">@article</span>{shiang1994molecular,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">title</span>=<span style="color:#e6db74">{A molecular dynamics study of self-diffusion on metal surfaces}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">author</span>=<span style="color:#e6db74">{Shiang, Keh-Dong and Wei, C.M. and Tsong, Tien T.}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">journal</span>=<span style="color:#e6db74">{Surface Science}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">volume</span>=<span style="color:#e6db74">{301}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">number</span>=<span style="color:#e6db74">{1-3}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">pages</span>=<span style="color:#e6db74">{136--150}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">year</span>=<span style="color:#e6db74">{1994}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">publisher</span>=<span style="color:#e6db74">{Elsevier}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">doi</span>=<span style="color:#e6db74">{10.1016/0039-6028(94)91295-5}</span>
</span></span><span style="display:flex;"><span>}
</span></span></code></pre></div>]]></content:encoded></item><item><title>Kinetic Oscillations in CO Oxidation on Pt(100): Theory</title><link>https://hunterheidenreich.com/notes/chemistry/molecular-simulation/surface-science/kinetic-oscillations-pt100-1985/</link><pubDate>Sun, 14 Dec 2025 00:00:00 +0000</pubDate><guid>https://hunterheidenreich.com/notes/chemistry/molecular-simulation/surface-science/kinetic-oscillations-pt100-1985/</guid><description>Theoretical model using coupled differential equations to explain CO oxidation oscillations via surface phase transitions on platinum.</description><content:encoded><![CDATA[














<figure class="post-figure center ">
    <img src="/img/notes/co-pt100-hollow.webp"
         alt="Carbon monoxide molecule adsorbed on Pt(100) FCC surface in hollow site configuration"
         title="Carbon monoxide molecule adsorbed on Pt(100) FCC surface in hollow site configuration"
         
         
         loading="lazy"
         class="post-image">
    
    <figcaption class="post-caption">CO molecule adsorbed in hollow site on Pt(100) surface. The surface structure and CO binding configurations are central to understanding the oscillatory behavior.</figcaption>
    
</figure>

<h2 id="contribution-theoretical-modeling-of-kinetic-oscillations">Contribution: Theoretical Modeling of Kinetic Oscillations</h2>
<p><strong>Theory ($\Psi_{\text{Theory}}$)</strong>.</p>
<p>This paper derives a microscopic mechanism based on experimental kinetic data to explain observed kinetic oscillations. It relies heavily on <strong>formal analysis</strong>, including a <strong>Linear Stability Analysis</strong> of a simplified model to derive eigenvalues and characterize stationary points (stable nodes, saddle points, and foci) whose appearance and disappearance drive relaxation oscillations. The primary contribution is the mathematical formulation of the surface phase transition.</p>
<h2 id="motivation-explaining-periodicity-in-surface-reactions">Motivation: Explaining Periodicity in Surface Reactions</h2>
<p>Experimental studies had shown that the catalytic oxidation of Carbon Monoxide (CO) on Platinum (100) surfaces exhibits temporal oscillations and spatial wave patterns at low pressures ($10^{-4}$ Torr). While the individual elementary steps (adsorption, desorption, reaction) were known, the mechanism driving the periodicity was not understood. Prior models relied on indirect evidence; this work aimed to ground the theory in new LEED (Low-Energy Electron Diffraction) observations showing that the surface structure itself transforms periodically between a reconstructed <code>hex</code> phase and a bulk-like <code>1x1</code> phase.</p>
<h2 id="novelty-the-surface-phase-transition-model">Novelty: The Surface Phase Transition Model</h2>
<p>The core novelty is the <strong>Surface Phase Transition Model</strong>. The authors propose that the oscillations are driven by the reversible phase transition of the Pt surface atoms, which is triggered by critical adsorbate coverages:</p>
<ol>
<li><strong>State Dependent Kinetics</strong>: The <code>hex</code> and <code>1x1</code> phases have vastly different sticking coefficients for Oxygen (negligible on <code>hex</code>, high on <code>1x1</code>).</li>
<li><strong>Critical Coverage Triggers</strong>: The transition depends on whether local CO coverage exceeds a critical threshold ($U_{a,grow}$) or falls below another ($U_{a,crit}$).</li>
<li><strong>Trapping-Desorption</strong>: The model introduces a &ldquo;trapping&rdquo; term where CO diffuses from the weakly-binding <code>hex</code> phase to the strongly-binding <code>1x1</code> patches, creating a feedback loop.</li>
</ol>
<h2 id="methodology-reaction-diffusion-simulations">Methodology: Reaction-Diffusion Simulations</h2>
<p>As a theoretical paper, the &ldquo;experiments&rdquo; were computational simulations and mathematical derivations:</p>
<ul>
<li><strong>Linear Stability Analysis</strong>: They simplified the 4-variable model to a 3-variable system ($u$, $v$, $a$), then treated the phase fraction $a$ as a slowly varying parameter. This allowed them to perform a 2-variable stability analysis on the $u$-$v$ subsystem, identifying the conditions for oscillations through the appearance and disappearance of stationary points as $a$ varies.</li>
<li><strong>Hysteresis Simulation</strong>: They simulated temperature-programmed variations to match experimental CO adsorption hysteresis loops, fitting the critical coverage parameters ($U_{a,grow} \approx 0.5$).</li>
<li><strong>Reaction-Diffusion Simulation</strong>: They numerically integrated the full set of 4 coupled differential equations over a 1D spatial grid (40 compartments) to reproduce temporal oscillations and propagating wave fronts.</li>
</ul>
<h2 id="results-mechanisms-of-spatiotemporal-self-organization">Results: Mechanisms of Spatiotemporal Self-Organization</h2>
<ul>
<li><strong>Mechanism Validation</strong>: The model successfully reproduced the asymmetric oscillation waveform (a slow plateau followed by a steep breakdown) observed in work function and LEED measurements.</li>
<li><strong>Phase Transition Role</strong>: Confirmed that the &ldquo;slow&rdquo; step driving the oscillation period is the phase transformation, specifically the requirement for CO to build up to a critical level to nucleate the reactive <code>1x1</code> phase.</li>
<li><strong>Spatial Self-Organization</strong>: The addition of diffusion terms allowed the model to reproduce wave propagation, showing that defects at crystal edges can act as &ldquo;pacemakers&rdquo; or triggers for the rest of the surface.</li>
<li><strong>Chaotic Behavior</strong>: Under slightly different conditions (e.g., $T = 470$ K instead of 480 K), the coupled system produces irregular, chaotic work function oscillations. This arises when not every trigger compartment oscillation drives a wave into the bulk because the bulk has not yet recovered from the previous wave front. The authors note that such irregular behavior is the rule rather than the exception in experimental observations.</li>
<li><strong>Quantitative Limitations</strong>: The calculated oscillation periods are at least one order of magnitude shorter than experimental values (1 to 4 min). This discrepancy arises mainly from unrealistically high values of $k_5$ and $k_8$ used to reduce computational time. The model also restricts spatial analysis to a 1D grid, which oversimplifies the true 2D wave patterns seen in experiments. The authors note that microscopic adsorbate-adsorbate interactions and island formation are not included, which would require multi-scale modeling.</li>
</ul>
<hr>
<h2 id="reproducibility-details">Reproducibility Details</h2>
<p>To faithfully replicate this study, one must implement the system of four coupled differential equations. The hardware requirements are negligible by modern standards.</p>
<h3 id="models">Models</h3>
<p>The system tracks four state variables:</p>
<ol>
<li>$u_a$: CO coverage on the <code>1x1</code> phase (normalized to local area $a$)</li>
<li>$u_b$: CO coverage on the <code>hex</code> phase (normalized to local area $b$)</li>
<li>$v_a$: Oxygen coverage on the <code>1x1</code> phase (normalized to local area $a$)</li>
<li>$a$: Fraction of surface in <code>1x1</code> phase ($b = 1 - a$)</li>
</ol>
<p><strong>The Governing Equations:</strong></p>
<p><strong>CO coverage on 1x1 phase:</strong>
$$
\begin{aligned}
\frac{\partial u_a}{\partial t} = k_1 a p_{CO} - k_2 u_a + k_3 a u_b - k_4 u_a v_a / a + k_5 \nabla^2(u_a/a)
\end{aligned}
$$</p>
<p><strong>CO coverage on hex phase:</strong>
$$
\begin{aligned}
\frac{\partial u_b}{\partial t} = k_1 b p_{CO} - k_6 u_b - k_3 a u_b
\end{aligned}
$$</p>
<p><strong>Oxygen coverage on 1x1 phase:</strong>
$$
\begin{aligned}
\frac{\partial v_a}{\partial t} = k_7 a p_{O_2} \left[ \left(1 - 2 \frac{u_a}{a} - \frac{5}{3} \frac{v_a}{a}\right)^2 + \alpha \left(1 - \frac{5}{3}\frac{v_a}{a}\right)^2 \right] - k_4 u_a v_a / a
\end{aligned}
$$</p>
<p><strong>The Phase Transition Logic ($da/dt$):</strong></p>
<p>The growth of the <code>1x1</code> phase ($a$) is piecewise, defined by critical coverages:</p>
<ul>
<li>If $U_a &gt; U_{a,grow}$ and $\partial u_a/\partial t &gt; 0$: island growth with $\partial a/\partial t = (1/U_{a,grow}) \cdot \partial u_a/\partial t$</li>
<li>If $c = U_a/U_{a,crit} + V_a/V_{a,crit} &lt; 1$: decay to hex with $\partial a/\partial t = -k_8 a c$</li>
<li>Otherwise: $\partial a/\partial t = 0$</li>
</ul>
<h3 id="algorithms">Algorithms</h3>
<ul>
<li><strong>Time Integration</strong>: Runge-Kutta-Merson routine.</li>
<li><strong>Spatial Integration</strong>: Crank-Nicholson algorithm for the diffusion term.</li>
<li><strong>Time Step</strong>: $\Delta t = 10^{-4}$ s.</li>
<li><strong>Spatial Grid</strong>: 1D array of 40 compartments, total length 0.4 cm (each compartment 0.01 cm).</li>
<li><strong>Boundary Conditions</strong>: Closed ends (no flux). Defects simulated by setting $\alpha$ higher in the first 3 &ldquo;edge&rdquo; compartments.</li>
</ul>
<h3 id="data">Data</h3>
<p>Replication requires the specific rate constants. Note: $k_3$ and $\alpha$ are fitting parameters.</p>
<table>
	<thead>
			<tr>
					<th>Parameter</th>
					<th>Symbol</th>
					<th>Value (at 480 K)</th>
					<th>Description</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td>CO Stick</td>
					<td>$k_1$</td>
					<td>$2.94 \times 10^5$ ML/s/Torr</td>
					<td>Pre-exponential factor</td>
			</tr>
			<tr>
					<td>CO Desorp (1x1)</td>
					<td>$k_2$</td>
					<td>$1.5$ s$^{-1}$ ($U_a = 0.5$)</td>
					<td>$E_a = 37.3$ (low cov), $33.5$ kcal/mol (high cov)</td>
			</tr>
			<tr>
					<td>Trapping</td>
					<td>$k_3$</td>
					<td>$50 \pm 30$ s$^{-1}$</td>
					<td>Hex to 1x1 diffusion</td>
			</tr>
			<tr>
					<td>Reaction</td>
					<td>$k_4$</td>
					<td>$10^3 - 10^5$ ML$^{-1}$s$^{-1}$</td>
					<td>Langmuir-Hinshelwood</td>
			</tr>
			<tr>
					<td>Diffusion</td>
					<td>$k_5$</td>
					<td>$4 \times 10^{-4}$ cm$^2$/s</td>
					<td>CO surface diffusion (elevated for computational speed; realistic: $10^{-7}$ to $10^{-5}$)</td>
			</tr>
			<tr>
					<td>CO Desorp (hex)</td>
					<td>$k_6$</td>
					<td>$11$ s$^{-1}$</td>
					<td>$E_a = 27.5$ kcal/mol</td>
			</tr>
			<tr>
					<td>O2 Adsorption</td>
					<td>$k_7$</td>
					<td>$5.6 \times 10^5$ ML/s/Torr</td>
					<td>Only on 1x1 phase</td>
			</tr>
			<tr>
					<td>Phase Trans</td>
					<td>$k_8$</td>
					<td>$0.4 - 2.0$ s$^{-1}$</td>
					<td>Relaxation constant</td>
			</tr>
			<tr>
					<td>Defect Coeff</td>
					<td>$\alpha$</td>
					<td>$0.1 - 0.5$</td>
					<td>Fitting param for defects</td>
			</tr>
			<tr>
					<td>Crit Cov (Grow)</td>
					<td>$U_{a,grow}$</td>
					<td>$0.5 \pm 0.1$</td>
					<td>Trigger for hex to 1x1</td>
			</tr>
			<tr>
					<td>Crit Cov (Decay)</td>
					<td>$U_{a,crit}$</td>
					<td>$0.32$</td>
					<td>Trigger for 1x1 to hex (CO)</td>
			</tr>
			<tr>
					<td>Crit O Cov</td>
					<td>$V_{a,crit}$</td>
					<td>$0.4$</td>
					<td>Trigger for 1x1 to hex (O)</td>
			</tr>
	</tbody>
</table>
<h3 id="evaluation">Evaluation</h3>
<p>The model was evaluated by comparing the simulated temporal oscillations and spatial wave patterns against experimental work function measurements and LEED observations.</p>
<h3 id="hardware">Hardware</h3>
<p>The hardware requirements are negligible by modern standards. The original simulations were likely performed on a mainframe or minicomputer of the era. Today, they can be run on any standard personal computer.</p>
<hr>
<h2 id="paper-information">Paper Information</h2>
<p><strong>Citation</strong>: Imbihl, R., Cox, M. P., Ertl, G., Müller, H., &amp; Brenig, W. (1985). Kinetic oscillations in the catalytic CO oxidation on Pt(100): Theory. <em>The Journal of Chemical Physics</em>, 83(4), 1578-1587. <a href="https://doi.org/10.1063/1.449834">https://doi.org/10.1063/1.449834</a></p>
<p><strong>Publication</strong>: The Journal of Chemical Physics 1985</p>
<p><strong>Related Work</strong>: See also <a href="/notes/chemistry/molecular-simulation/surface-science/oscillatory-co-oxidation-pt110-1992/">Oscillatory CO Oxidation on Pt(110)</a> for the same catalytic system on a different crystal face, demonstrating that surface phase transitions drive oscillatory behavior across multiple platinum surfaces.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-bibtex" data-lang="bibtex"><span style="display:flex;"><span><span style="color:#a6e22e">@article</span>{imbihl1985kinetic,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">title</span>=<span style="color:#e6db74">{Kinetic oscillations in the catalytic CO oxidation on Pt(100): Theory}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">author</span>=<span style="color:#e6db74">{Imbihl, R and Cox, MP and Ertl, G and M{\&#34;u}ller, H and Brenig, W}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">journal</span>=<span style="color:#e6db74">{The Journal of Chemical Physics}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">volume</span>=<span style="color:#e6db74">{83}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">number</span>=<span style="color:#e6db74">{4}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">pages</span>=<span style="color:#e6db74">{1578--1587}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">year</span>=<span style="color:#e6db74">{1985}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">publisher</span>=<span style="color:#e6db74">{American Institute of Physics}</span>
</span></span><span style="display:flex;"><span>}
</span></span></code></pre></div>]]></content:encoded></item><item><title>Evans 1986: Thermal Conductivity of Lennard-Jones Fluid</title><link>https://hunterheidenreich.com/notes/chemistry/molecular-simulation/classical-methods/evans-thermal-conductivity-1986/</link><pubDate>Sun, 14 Dec 2025 00:00:00 +0000</pubDate><guid>https://hunterheidenreich.com/notes/chemistry/molecular-simulation/classical-methods/evans-thermal-conductivity-1986/</guid><description>A 1986 validation of the Evans NEMD method for simulating heat flow, identifying long-time tail anomalies near the critical point.</description><content:encoded><![CDATA[<h2 id="methodological-validation-and-physical-discovery">Methodological Validation and Physical Discovery</h2>
<p>This is primarily a <strong>Methodological Paper ($\Psi_{\text{Method}}$)</strong>, with a significant secondary component of <strong>Discovery ($\Psi_{\text{Discovery}}$)</strong>.</p>
<p>It focuses on validating a specific algorithm (the &ldquo;Evans method&rdquo;) for Non-Equilibrium Molecular Dynamics (NEMD) by comparing its results against experimental benchmarks. However, it also uncovers physical anomalies, specifically &ldquo;long-time tails&rdquo; in the heat flux autocorrelation function that deviate significantly from theoretical predictions, marking a discovery about the physics of the Lennard-Jones fluid itself.</p>
<h2 id="flow-gradients-and-boundary-limitations">Flow Gradients and Boundary Limitations</h2>
<p>The primary motivation is to overcome the limitations of simulating heat flow using physical boundaries (e.g., walls at different temperatures), which causes severe interpretive difficulties due to density and temperature gradients.</p>
<p>The &ldquo;Evans method&rdquo; uses a fictitious external field to induce heat flow in a periodic, homogeneous system. This paper serves to:</p>
<ol>
<li>Validate this method across a wide range of state points (temperatures and densities) beyond the triple point.</li>
<li>Investigate the system&rsquo;s behavior near the critical point, where transport properties are known to be anomalous.</li>
</ol>
<h2 id="core-innovations-of-the-evans-algorithm">Core Innovations of the Evans Algorithm</h2>
<p>The core contribution is the rigorous stress-testing of the <strong>homogeneous heat flow algorithm</strong> (Evans method) combined with a <strong>Gaussian thermostat</strong>.</p>
<p>Specific novel insights include:</p>
<ul>
<li><strong>Linearity Validation</strong>: Establishing that, away from phase boundaries, the effective thermal conductivity is a monotonic, virtually linear function of the external field, justifying the extrapolation to zero field.</li>
<li><strong>Critical Anomaly Detection</strong>: Finding that near the critical point, conductivity becomes a non-monotonic function of the field, challenging standard simulation approaches in this regime.</li>
<li><strong>Tail Amplitude Discovery</strong>: Demonstrating that the &ldquo;long-time tails&rdquo; of the heat flux autocorrelation function have amplitudes roughly 6 times larger than those predicted by mode-coupling theory.</li>
</ul>
<h2 id="nemd-simulation-setup">NEMD Simulation Setup</h2>
<p>The author performed <strong>Non-Equilibrium Molecular Dynamics (NEMD)</strong> simulations using the Lennard-Jones potential.</p>
<ul>
<li><strong>System</strong>: Mostly $N=108$ particles, with some checks using $N=256$ to test size dependence.</li>
<li><strong>Thermostat</strong>: A Gaussian thermostat was used to keep the kinetic energy (temperature) constant.</li>
<li><strong>State Points</strong>:
<ul>
<li><strong>Critical Isotherm</strong>: $T=1.35$, varying density.</li>
<li><strong>Supercritical Isotherm</strong>: $T=2.0$.</li>
<li><strong>Freezing Line</strong>: Two points ($T=2.74, \rho=1.113$ and $T=2.0, \rho=1.04$).</li>
</ul>
</li>
<li><strong>Validation</strong>: Results were compared against <strong>experimental data for Argon</strong> (using standard LJ parameters).</li>
<li><strong>Ablation</strong>:
<ul>
<li><strong>Field Strength ($F$)</strong>: Varied to check for linearity/non-linearity.</li>
<li><strong>System Size ($N$)</strong>: Comparison between 108 and 256 particles to rule out finite-size artifacts.</li>
</ul>
</li>
</ul>
<h2 id="linearity-regimes-and-long-time-tail-anomalies">Linearity Regimes and Long-Time Tail Anomalies</h2>
<ul>
<li><strong>Agreement with Experiment</strong>: The Evans method yields thermal conductivities in broad agreement with experimental Argon data for most state points.</li>
<li><strong>Linearity</strong>: Away from the critical point, conductivity is a virtually linear function of the field strength $F$, allowing for accurate zero-field extrapolation.</li>
<li><strong>Critical Region Failure</strong>: Near the critical point ($T=1.35, \rho=0.4$), the method struggles; the conductivity is non-monotonic with respect to $F$, and the zero-field extrapolation underestimates the experimental value by ~11%.</li>
<li><strong>Long-Time Tails</strong>: The decay of the heat flux autocorrelation function follows a $t^{-3/2}$ tail (consistent with mode-coupling theory), but the <strong>amplitude is ~6x larger</strong> than predicted.</li>
<li><strong>Phase Hysteresis</strong>: In high-density regions near the freezing line, the system exhibits hysteresis and bi-stability between solid and liquid phases depending on the field strength.</li>
</ul>
<hr>
<h2 id="reproducibility-details">Reproducibility Details</h2>
<h3 id="data">Data</h3>
<p>The simulation relies on the Lennard-Jones (LJ) potential to model Argon. No external training data is used; the &ldquo;data&rdquo; consists of the physical constants defining the system.</p>
<table>
	<thead>
			<tr>
					<th>Parameter</th>
					<th>Value/Description</th>
					<th>Notes</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td><strong>Potential</strong></td>
					<td>$\Phi(q)=4(q^{-12}-q^{-6})$</td>
					<td>Standard LJ 12-6 potential</td>
			</tr>
			<tr>
					<td><strong>Cutoff</strong></td>
					<td>$r_c = 2.5$</td>
					<td>Truncated at 2.5 distance units</td>
			</tr>
			<tr>
					<td><strong>Comparison</strong></td>
					<td>Argon Experimental Data</td>
					<td>Sourced from NBS recommended values</td>
			</tr>
	</tbody>
</table>
<h3 id="algorithms">Algorithms</h3>
<p>The core algorithm is the <strong>Evans Homogeneous Heat Flow</strong> method. To reproduce this, one must implement the specific Equations of Motion (EOM) derived from linear response theory.</p>
<p><strong>Equations of Motion:</strong></p>
<p>The trajectories are generated by:
$$
\begin{aligned}
\dot{q}_i &amp;= \frac{p_i}{m} \\
\dot{p}_i &amp;= F_i^{\text{inter}} + (E_i - \bar{E})F(t) - \sum_{j} F_{ij} q_{ij} \cdot F(t) + \frac{1}{2N} \sum_{j,k} F_{jk} q_{jk} \cdot F(t) - \alpha p_i
\end{aligned}
$$</p>
<p>Where:</p>
<ul>
<li>$F(t)$ is the fictitious external field driving heat flow.</li>
<li>$E_i$ is the instantaneous energy of particle $i$.</li>
<li>$\alpha$ is the <strong>Gaussian Thermostat multiplier</strong> (calculated at every step to strictly conserve kinetic energy/Temperature):
$$\alpha = \frac{\sum_i [\dots]_{\text{force terms}} \cdot p_i}{\sum_i p_i \cdot p_i}$$</li>
</ul>
<p><strong>Conductivity Calculation:</strong></p>
<p>The zero-frequency limit is extrapolated as:
$$ \lambda = \lim_{F \to 0} \frac{J_Q}{FT} $$</p>
<p>The frequency-dependent conductivity relies on the heat-flux autocorrelation:
$$ \lambda(\omega) = \frac{V}{3k_B T^2} \int_0^\infty dt , e^{i\omega t} \langle J_Q(t) \cdot J_Q(0) \rangle $$</p>
<h3 id="models">Models</h3>
<p>The &ldquo;model&rdquo; here is the physical simulation setup.</p>
<ul>
<li><strong>Particle Count</strong>: $N = 108$ (primary), $N = 256$ (validation).</li>
<li><strong>Boundary Conditions</strong>: Periodic Boundary Conditions (PBC).</li>
<li><strong>Thermostat</strong>: Gaussian Isokinetic (Temperature is a constant of motion).</li>
</ul>
<h3 id="evaluation">Evaluation</h3>
<p>The primary metric is the <strong>Thermal Conductivity</strong> ($\lambda$).</p>
<table>
	<thead>
			<tr>
					<th>Metric</th>
					<th>Definition</th>
					<th>Baseline</th>
					<th>Result</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td><strong>Thermal Conductivity</strong></td>
					<td>Ratio of heat flux $J_Q$ to field $F$ (extrapolated to $F=0$)</td>
					<td>Experimental Argon (NBS Data)</td>
					<td>Good agreement away from critical point</td>
			</tr>
			<tr>
					<td><strong>Tail Amplitude</strong></td>
					<td>Coefficient of the $\omega^{1/2}$ term in frequency-dependent conductivity</td>
					<td>Mode-Coupling Theory ($\approx 0.05$)</td>
					<td>Simulation value $\approx 0.3$ (6x larger)</td>
			</tr>
	</tbody>
</table>
<h3 id="hardware">Hardware</h3>
<ul>
<li><strong>Requirements</strong>: While 1986 hardware is obsolete, reproducing this requires a standard MD code capable of non-conservative forces (NEMD).</li>
<li><strong>Compute Cost</strong>: Low by modern standards. 108 particles for $\sim 10^5$ to $10^6$ steps is trivial on modern CPUs.</li>
</ul>
<h2 id="paper-information">Paper Information</h2>
<p><strong>Citation</strong>: Evans, D. J. (1986). Thermal conductivity of the Lennard-Jones fluid. <em>Physical Review A</em>, 34(2), 1449-1453. <a href="https://doi.org/10.1103/PhysRevA.34.1449">https://doi.org/10.1103/PhysRevA.34.1449</a></p>
<p><strong>Publication</strong>: Physical Review A, 1986</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-bibtex" data-lang="bibtex"><span style="display:flex;"><span><span style="color:#a6e22e">@article</span>{PhysRevA.34.1449,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">title</span> = <span style="color:#e6db74">{Thermal conductivity of the Lennard-Jones fluid}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">author</span> = <span style="color:#e6db74">{Evans, Denis J.}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">journal</span> = <span style="color:#e6db74">{Phys. Rev. A}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">volume</span> = <span style="color:#e6db74">{34}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">number</span> = <span style="color:#e6db74">{2}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">pages</span> = <span style="color:#e6db74">{1449--1453}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">numpages</span> = <span style="color:#e6db74">{0}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">year</span> = <span style="color:#e6db74">{1986}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">month</span> = <span style="color:#e6db74">{Aug}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">publisher</span> = <span style="color:#e6db74">{American Physical Society}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">doi</span> = <span style="color:#e6db74">{10.1103/PhysRevA.34.1449}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">url</span> = <span style="color:#e6db74">{https://link.aps.org/doi/10.1103/PhysRevA.34.1449}</span>
</span></span><span style="display:flex;"><span>}
</span></span></code></pre></div>]]></content:encoded></item><item><title>Embedded-Atom Method: Theory and Applications Review</title><link>https://hunterheidenreich.com/notes/chemistry/molecular-simulation/classical-methods/embedded-atom-method-review-1993/</link><pubDate>Sun, 14 Dec 2025 00:00:00 +0000</pubDate><guid>https://hunterheidenreich.com/notes/chemistry/molecular-simulation/classical-methods/embedded-atom-method-review-1993/</guid><description>Comprehensive 1993 review of the Embedded-Atom Method (EAM), covering theory, parameterization, and applications to metallic systems.</description><content:encoded><![CDATA[<h2 id="systematizing-the-embedded-atom-method">Systematizing the Embedded-Atom Method</h2>
<p>This is a <strong>Systematization (Review)</strong> paper. It consolidates the theoretical development, semi-empirical parameterization, and broad applications of the Embedded-Atom Method (EAM) into a unified framework. The paper systematizes the field by connecting the EAM to related theories (Effective Medium Theory, Finnis-Sinclair, &ldquo;glue&rdquo; models) and organizing phenomenological results across diverse physical regimes (bulk, surfaces, interfaces).</p>
<p>The authors explicitly frame the work as a survey, stating &ldquo;We review here the history, development, and application of the EAM&rdquo; and &ldquo;This review emphasizes the physical insight that motivated the EAM.&rdquo; The paper follows a classic survey structure, organizing the literature by application domains.</p>
<h2 id="the-failure-of-pair-potentials-in-metallic-systems">The Failure of Pair Potentials in Metallic Systems</h2>
<p>The primary motivation is the failure of pair-potential models to accurately describe metallic bonding, particularly at defects and interfaces.</p>
<p><strong>Physics Gap</strong>: Pair potentials assume bond strength is independent of environment, implying cohesive energy scales linearly with coordination ($Z$), whereas in reality it scales roughly as $\sqrt{Z}$.</p>
<p><strong>Empirical Failures</strong>: Pair potentials incorrectly predict the &ldquo;Cauchy relation&rdquo; ($C_{12} = C_{44}$) and predict a vacancy formation energy equal to the cohesive energy, contradicting experimental data for fcc metals.</p>
<p><strong>Practical Need</strong>: First-principles calculations (like DFT) were computationally too expensive for low-symmetry systems like grain boundaries and fracture tips, creating a need for an efficient, semi-empirical many-body potential.</p>
<h2 id="theoretical-unification--core-innovations">Theoretical Unification &amp; Core Innovations</h2>
<p>The paper&rsquo;s core contribution is the synthesis of the EAM as a practical computational tool that captures &ldquo;coordination-dependent bond strength&rdquo; without the cost of ab initio methods.</p>
<p><strong>Theoretical Unification</strong>: It demonstrates that the EAM ansatz can be derived from Density Functional Theory (DFT) by assuming the total electron density is a superposition of atomic densities.</p>
<p><strong>Environmental Dependence</strong>: It explicitly formulates how the &ldquo;effective&rdquo; pair interaction stiffens and shortens as coordination decreases (e.g., at surfaces), a feature naturally arising from the non-linearity of the embedding function.</p>
<p><strong>Broad Validation</strong>: It provides a centralized evaluation of the method across a vast array of metallic properties, establishing it as the standard for atomistic simulations of face-centered cubic (fcc) metals.</p>
<h2 id="validating-eam-across-application-domains">Validating EAM Across Application Domains</h2>
<p>The authors review computational experiments using Energy Minimization, Molecular Dynamics (MD), and Monte Carlo (MC) simulations across several domains:</p>
<p><strong>Bulk Properties</strong>: Calculation of phonon spectra, liquid structure factors, thermal expansion coefficients, and melting points for fcc metals (Ni, Pd, Pt, Cu, Ag, Au).</p>
<p><strong>Defects</strong>: Computation of vacancy formation/migration energies and self-interstitial geometries.</p>
<p><strong>Grain Boundaries</strong>: Calculation of grain boundary structures, energies, and elastic properties for twist and tilt boundaries in Au and Al. Computed structures show good agreement with X-ray diffraction and HRTEM experiments. The many-body interactions in the EAM produce somewhat better agreement than pair potentials, which tend to overestimate boundary expansion.</p>
<p><strong>Surfaces</strong>: Analysis of surface energies, relaxations, reconstructions (e.g., Au(110) missing row), and surface phonons.</p>
<p><strong>Alloys</strong>: Investigation of heat of solution, surface segregation profiles (e.g., Ni-Cu), and order-disorder transitions.</p>
<p><strong>Mechanical Properties</strong>: Simulation of dislocation mobility, pinning by defects (He bubbles), and crack tip plasticity (ductile vs. brittle fracture modes).</p>
<h2 id="key-outcomes-and-the-limits-of-eam">Key Outcomes and the Limits of EAM</h2>
<p><strong>Many-Body Success</strong>: The EAM successfully reproduces the breakdown of the Cauchy relation and the correct ratio of vacancy formation energy to cohesive energy (~0.35) for fcc metals.</p>
<p><strong>Surface Accuracy</strong>: It correctly predicts that surface bonds are shorter and stiffer than bulk bonds due to lower coordination. It accurately predicts surface reconstructions (e.g., Au(110) $(1 \times 2)$).</p>
<p><strong>Alloy Behavior</strong>: The method naturally captures segregation phenomena, including oscillating concentration profiles in Ni-Cu, driven by the embedding energy.</p>
<p><strong>Limitations</strong>: The method is less accurate for systems with strong directional bonding (covalent materials) or significant Fermi-surface effects, as it assumes spherically averaged electron densities.</p>
<hr>
<h2 id="reproducibility-details">Reproducibility Details</h2>
<h3 id="data">Data</h3>
<p><strong>Fitting Data</strong>: The semi-empirical functions are fitted to basic bulk properties: lattice constants, cohesive energy, elastic constants ($C_{11}$, $C_{12}$, $C_{44}$), and vacancy formation energy.</p>
<p><strong>Universal Binding Curve</strong>: The cohesive energy as a function of lattice constant is constrained to follow the &ldquo;universal binding curve&rdquo; of Rose et al. to ensure accurate anharmonic behavior.</p>
<p><strong>Alloy Data</strong>: For binary alloys, dilute heats of alloying are used for fitting cross-interactions.</p>
<h3 id="algorithms">Algorithms</h3>
<p><strong>Core Ansatz</strong>: The total energy is defined as:</p>
<p>$$E_{coh} = \sum_{i} G_i\left( \sum_{j \neq i} \rho_j^a(R_{ij}) \right) + \frac{1}{2} \sum_{i, j (j \neq i)} U_{ij}(R_{ij})$$</p>
<p>where $G$ is the embedding energy (function of local electron density $\rho$), and $U$ is a pair interaction.</p>
<p><strong>Simulation Techniques</strong>:</p>
<ul>
<li><strong>Molecular Dynamics (MD)</strong>: Used for liquids, phonons, and fracture simulations.</li>
<li><strong>Monte Carlo (MC)</strong>: Used for phase diagrams and segregation profiles (e.g., approximately $10^5$ iterations per atom).</li>
<li><strong>Phonons</strong>: Calculated via the dynamical matrix derived from the force-constant tensor $K_{ij}$.</li>
<li><strong>Normal-Mode Analysis</strong>: Vibrational normal modes obtained by diagonalizing the dynamical matrix, feasible for unit cells of up to about 260 atoms.</li>
</ul>
<h3 id="models">Models</h3>
<p><strong>Parameterizations</strong>: The review lists several specific function sets developed by the authors (Table 2), including:</p>
<ul>
<li><strong>Daw and Baskes</strong>: For Ni, Pd, H (elemental metals and H in solution/on surfaces)</li>
<li><strong>Foiles</strong>: For Cu, Ag, Au, Ni, Pd, Pt (elemental metals)</li>
<li><strong>Foiles</strong>: For Cu, Ni (tailored for the Ni-Cu alloy system)</li>
<li><strong>Foiles, Baskes and Daw</strong>: For Cu, Ag, Au, Ni, Pd, Pt (dilute alloys)</li>
<li><strong>Daw, Baskes, Bisson and Wolfer</strong>: For Ni, H (fracture, dislocations, H embrittlement)</li>
<li><strong>Foiles and Daw</strong>: For Ni, Al (Ni-rich end of the Ni-Al alloy system)</li>
<li><strong>Daw</strong>: For Ni (calculated from first principles, not semi-empirical)</li>
<li><strong>Hoagland, Daw, Foiles and Baskes</strong>: For Al (elemental Al)</li>
</ul>
<p>Many of these historical parameterizations are directly downloadable in machine-readable formats from the NIST Interatomic Potentials Repository (linked in the resources below).</p>
<p><strong>Transferability</strong>: EAM functions are generally <em>not</em> transferable between different parameterization sets; mixing functions from different sets (e.g., Daw-Baskes Ni with Foiles Pd) is invalid.</p>
<h3 id="evaluation">Evaluation</h3>
<p><strong>Bulk Validation</strong>: Phonon dispersion curves for Cu show excellent agreement with experiment across the full Brillouin zone.</p>
<p><strong>Thermal Properties</strong>: Linear thermal expansion coefficients match experiment well (e.g., Cu calculated: $16.4 \times 10^{-6}/K$ vs experimental: $16.7 \times 10^{-6}/K$).</p>
<p><strong>Defect Energetics</strong>: Vacancy migration energies and divacancy binding energies (~0.1-0.2 eV) align with experimental data.</p>
<p><strong>Surface Segregation</strong>: Correctly predicts segregation species for 18 distinct dilute alloy cases (e.g., Cu segregating in Ni).</p>
<h3 id="hardware">Hardware</h3>
<p><strong>Compute Scale</strong>: At the time of publication (1993), Molecular Dynamics simulations of up to 35,000 atoms were possible.</p>
<p><strong>Platforms</strong>: Calculations were performed on supercomputers like the <strong>CRAY-XMP</strong>, though smaller calculations were noted as feasible on high-performance workstations.</p>
<hr>
<h2 id="paper-information">Paper Information</h2>
<p><strong>Citation</strong>: Daw, M. S., Foiles, S. M., &amp; Baskes, M. I. (1993). The embedded-atom method: a review of theory and applications. <em>Materials Science Reports</em>, 9(7-8), 251-310. <a href="https://doi.org/10.1016/0920-2307(93)90001-U">https://doi.org/10.1016/0920-2307(93)90001-U</a></p>
<p><strong>Publication</strong>: Materials Science Reports 1993</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-bibtex" data-lang="bibtex"><span style="display:flex;"><span><span style="color:#a6e22e">@article</span>{dawEmbeddedatomMethodReview1993,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">title</span> = <span style="color:#e6db74">{The embedded-atom method: a review of theory and applications}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">shorttitle</span> = <span style="color:#e6db74">{The Embedded-Atom Method}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">author</span> = <span style="color:#e6db74">{Daw, Murray S. and Foiles, Stephen M. and Baskes, Michael I.}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">year</span> = <span style="color:#ae81ff">1993</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">month</span> = mar,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">journal</span> = <span style="color:#e6db74">{Materials Science Reports}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">volume</span> = <span style="color:#e6db74">{9}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">number</span> = <span style="color:#e6db74">{7-8}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">pages</span> = <span style="color:#e6db74">{251--310}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">issn</span> = <span style="color:#e6db74">{0920-2307}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">doi</span> = <span style="color:#e6db74">{10.1016/0920-2307(93)90001-U}</span>
</span></span><span style="display:flex;"><span>}
</span></span></code></pre></div><p><strong>Additional Resources</strong>:</p>
<ul>
<li><a href="/notes/chemistry/molecular-simulation/classical-methods/embedded-atom-method/">Original EAM Paper (1984)</a></li>
<li><a href="/notes/chemistry/molecular-simulation/classical-methods/embedded-atom-method-voter-1994/">EAM User Guide (1994)</a></li>
<li><a href="https://www.ctcms.nist.gov/potentials/">NIST Interatomic Potentials Repository</a></li>
</ul>
]]></content:encoded></item><item><title>Embedded-Atom Method User Guide: Voter's 1994 Chapter</title><link>https://hunterheidenreich.com/notes/chemistry/molecular-simulation/classical-methods/embedded-atom-method-voter-1994/</link><pubDate>Sun, 14 Dec 2025 00:00:00 +0000</pubDate><guid>https://hunterheidenreich.com/notes/chemistry/molecular-simulation/classical-methods/embedded-atom-method-voter-1994/</guid><description>Comprehensive user guide for the Embedded-Atom Method (EAM), covering theory, potential fitting, and applications to intermetallics.</description><content:encoded><![CDATA[<h2 id="contribution-systematizing-the-embedded-atom-method">Contribution: Systematizing the Embedded-Atom Method</h2>
<p>This is a <strong>Systematization</strong> paper (specifically a handbook chapter) with a strong secondary <strong>Method</strong> projection.</p>
<p>Its primary goal is to serve as a &ldquo;users&rsquo; guide&rdquo; to the Embedded-Atom Method (EAM). The text organizes existing knowledge:</p>
<ul>
<li>It traces the physical origins of EAM from Density Functional Theory (DFT) and Effective Medium Theory.</li>
<li>It synthesizes &ldquo;closely related methods&rdquo; (Second Moment Approximation, Glue Model), showing they are mathematically equivalent or very similar to EAM.</li>
<li>It provides a pedagogical, step-by-step methodology for fitting potentials to experimental data.</li>
</ul>
<h2 id="motivation-bridging-the-gap-between-dft-and-pair-potentials">Motivation: Bridging the Gap Between DFT and Pair Potentials</h2>
<p>The primary motivation is to bridge the gap between accurate, expensive electronic structure calculations and fast, inaccurate pair potentials.</p>
<ul>
<li><strong>Computational Efficiency</strong>: First-principles methods scale as $O(N^3)$ or worse, limiting simulations to $&lt;100$ atoms (in 1994). Pair potentials scale as $O(N)$ and fail to capture essential many-body physics of metals.</li>
<li><strong>Physical Accuracy</strong>: Simple pair potentials cannot accurately model metallic defects; they predict zero Cauchy pressure ($C_{12} - C_{44} = 0$) and equate vacancy formation energy to cohesive energy, both of which are incorrect for transition metals.</li>
<li><strong>Practical Utility</strong>: There was a need for a clear guide on how to construct and apply these potentials for large-scale simulations ($10^6+$ atoms) of fracture and defects.</li>
</ul>
<h2 id="novelty-a-unified-framework-and-robust-fitting-recipe">Novelty: A Unified Framework and Robust Fitting Recipe</h2>
<p>As a review chapter, the novelty lies in the synthesis and the specific, reproducible recipe for potential construction. Central to this synthesis is the core EAM energy functional:</p>
<p>$$E_{\text{tot}} = \sum_i \left( F(\bar{\rho}_i) + \frac{1}{2} \sum_{j \neq i} \phi(r_{ij}) \right)$$</p>
<p>where the total energy $E_{\text{tot}}$ depends on embedding an atom $i$ into a local background electron density $\bar{\rho}_i = \sum_{j \neq i} \rho(r_{ij})$, plus a repulsive pair interaction $\phi(r_{ij})$.</p>
<ul>
<li><strong>Unified Framework</strong>: It explicitly maps the &ldquo;Second Moment Approximation&rdquo; (Tight Binding) and the &ldquo;Glue Model&rdquo; onto the fundamental EAM framework above, clarifying that they differ primarily in terminology or specific functional choices (e.g., square root embedding functions).</li>
<li><strong>Cross-Potential Fitting Recipe</strong>: It details a robust method for fitting alloy potentials (specifically Ni-Al-B) by using &ldquo;transformation invariance&rdquo;, scaling the density and shifting the embedding function to fit alloy properties without disturbing pure element fits.</li>
<li><strong>Specific Parameters</strong>: It publishes optimized potential parameters for Ni, Al, and B that accurately reproduce properties like the Boron interstitial preference in $\text{Ni}_3\text{Al}$.</li>
</ul>
<h2 id="validation-computational-benchmarks-and-simulations">Validation: Computational Benchmarks and Simulations</h2>
<p>The &ldquo;experiments&rdquo; described are computational validations and simulations using the fitted Ni-Al-B potential:</p>
<ol>
<li>
<p><strong>Potential Fitting</strong>:</p>
<ul>
<li>Pure elements (Ni, Al) were fitted to elastic constants, vacancy formation energies, and diatomic data. The Ni fit achieved $\chi_{\text{rms}} = 0.75%$ and Al achieved $\chi_{\text{rms}} = 3.85%$.</li>
<li>Boron was fitted using hypothetical crystal structures (fcc, bcc) calculated via LMTO (Linear Muffin-Tin Orbital) since experimental data for fcc B does not exist.</li>
</ul>
</li>
<li>
<p><strong>Molecular Statics (Validation)</strong>:</p>
<ul>
<li><strong>Surface Relaxation</strong>: Demonstrated that EAM captures the oscillatory relaxation of atomic layers near a free surface, a many-body effect that pair potentials fail to capture.</li>
<li><strong>Defect Energetics</strong>: Calculated formation energies for Boron interstitials in $\text{Ni}_3\text{Al}$. Found the 6Ni-octahedral site is most stable ($-4.59$ eV relative to an isolated B atom and unperturbed crystal), followed by the 4Ni-2Al octahedral site ($-3.65$ eV) and the 3Ni-1Al tetrahedral site ($-2.99$ eV), consistent with channeling experiments.</li>
</ul>
</li>
<li>
<p><strong>Molecular Dynamics (Application)</strong>:</p>
<ul>
<li><strong>Grain Boundary (GB) Cleavage</strong>: Simulated the fracture of a (210) tilt grain boundary in $\text{Ni}_3\text{Al}$ at a strain rate of $5 \times 10^{10}$ s$^{-1}$.</li>
<li><strong>Comparison</strong>: Compared pure $\text{Ni}_3\text{Al}$ boundaries vs. those doped with Boron and substitutional Nickel.</li>
</ul>
</li>
</ol>
<h2 id="key-outcomes-eam-efficiency-and-boron-strengthening">Key Outcomes: EAM Efficiency and Boron Strengthening</h2>
<ul>
<li><strong>EAM Efficiency</strong>: Confirmed that EAM scales linearly with atom count ($N$), requiring only 2-5 times the computational work of pair potentials.</li>
<li><strong>Boron Strengthening Mechanism</strong>: The simulations suggested that Boron segregates to grain boundaries and, specifically when co-segregated with Ni, significantly increases cohesion.
<ul>
<li>The maximum stress for the enriched boundary was approximately 22 GPa, compared to approximately 19 GPa for the clean boundary.</li>
<li>The B-doped boundary required approximately 44% more work to cleave than the undoped boundary.</li>
<li>The fracture mode shifted from cleaving along the GB to failure in the bulk.</li>
</ul>
</li>
<li><strong>Grain Boundary Segregation</strong>: Molecular statics calculations found B interstitial energies at the GB as low as $-6.9$ eV, compared to $-4.59$ eV in the bulk, consistent with experimental observations of boron segregation to grain boundaries.</li>
<li><strong>Limitations</strong>: The author concludes that while EAM is excellent for metals, it lacks the angular dependence required for strongly covalent materials (like $\text{MoSi}_2$) or directional bonding.</li>
</ul>
<hr>
<h2 id="reproducibility-details">Reproducibility Details</h2>
<p>The chapter provides nearly all details required to implement the described potential from scratch.</p>
<h3 id="data">Data</h3>
<ul>
<li><strong>Experimental/Reference Data</strong>: Used for fitting the cost function $\chi_{\text{rms}}$.
<ul>
<li><strong>Pure Elements</strong>: Lattice constants ($a_0$), cohesive energy ($E_{\text{coh}}$), bulk modulus ($B$), elastic constants ($C_{11}, C_{12}, C_{44}$), vacancy formation energy ($E_{\text{vac}}^f$), and diatomic bond length/strength ($R_e, D_e$).</li>
<li><strong>Alloys</strong>: Heat of solution and defect energies (APB, SISF) for $\text{Ni}_3\text{Al}$.</li>
<li><strong>Hypothetical Data</strong>: LMTO first-principles data used for unobserved phases (e.g., fcc Boron, B2 NiB) to constrain the fit.</li>
</ul>
</li>
</ul>
<h3 id="algorithms">Algorithms</h3>
<ul>
<li><strong>Component Functions</strong>:
<ul>
<li><strong>Pair Potential $\phi(r)$</strong>: Morse potential form:
$$\phi(r) = D_M {1 - \exp[-\alpha_M(r - R_M)]}^2 - D_M$$</li>
<li><strong>Density Function $\rho(r)$</strong>: Modified hydrogenic 4s orbital:
$$\rho(r) = r^6(e^{-\beta r} + 2^9 e^{-2\beta r})$$</li>
<li><strong>Embedding Function $F(\bar{\rho})$</strong>: Derived numerically to force the crystal energy to match the &ldquo;Universal Energy Relation&rdquo; (Rose et al.) as a function of lattice constant.</li>
</ul>
</li>
<li><strong>Fitting Strategy</strong>:
<ul>
<li><strong>Smooth Cutoff</strong>: A polynomial smoothing function ($h_{\text{smooth}}$) applied at $r_{\text{cut}}$ to ensure continuous derivatives.</li>
<li><strong>Simplex Algorithm</strong>: Used to optimize parameters ($D_M, R_M, \alpha_M, \beta, r_{\text{cut}}$).</li>
<li><strong>Alloy Invariance</strong>: Used transformations $F&rsquo;(\rho) = F(\rho) + g\rho$ and $\rho&rsquo;(r) = s\rho(r)$ to fit cross-potentials without altering pure-element properties.</li>
</ul>
</li>
</ul>
<h3 id="models">Models</h3>
<ul>
<li><strong>Parameters</strong>: The text provides the exact optimized parameters for the Ni-Al-B potential in <strong>Table 2</strong> (Pure elements) and <strong>Table 5</strong> (Cross-potentials).
<ul>
<li>Example Ni parameters: $D_M=1.5335$ eV, $\alpha_M=1.7728$ Å$^{-1}$, $r_{\text{cut}}=4.7895$ Å.</li>
</ul>
</li>
</ul>
<h3 id="hardware">Hardware</h3>
<ul>
<li><strong>1994 Context</strong>: Mentions that simulations of $10^6$ atoms were possible on the &ldquo;fastest computers available&rdquo;.</li>
<li><strong>Scaling</strong>: Explicitly notes computational work scales as $O(N)$, roughly 2-5x slower than pair potentials.</li>
</ul>
<hr>
<h2 id="paper-information">Paper Information</h2>
<p><strong>Citation</strong>: Voter, A. F. (1994). Chapter 4: The Embedded-Atom Method. In <em>Intermetallic Compounds: Vol. 1, Principles</em>, edited by J. H. Westbrook and R. L. Fleischer. John Wiley &amp; Sons Ltd.</p>
<p><strong>Publication</strong>: Intermetallic Compounds: Vol. 1, Principles (1994)</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-bibtex" data-lang="bibtex"><span style="display:flex;"><span><span style="color:#a6e22e">@incollection</span>{voterEmbeddedAtomMethod1994,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">title</span> = <span style="color:#e6db74">{The Embedded-Atom Method}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">author</span> = <span style="color:#e6db74">{Voter, Arthur F.}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">booktitle</span> = <span style="color:#e6db74">{Intermetallic Compounds: Vol. 1, Principles}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">editor</span> = <span style="color:#e6db74">{Westbrook, J. H. and Fleischer, R. L.}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">year</span> = <span style="color:#e6db74">{1994}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">publisher</span> = <span style="color:#e6db74">{John Wiley &amp; Sons Ltd}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">pages</span> = <span style="color:#e6db74">{77--90}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">chapter</span> = <span style="color:#e6db74">{4}</span>
</span></span><span style="display:flex;"><span>}
</span></span></code></pre></div><p><strong>Additional Resources</strong>:</p>
<ul>
<li><a href="https://www.ctcms.nist.gov/potentials/">NIST Interatomic Potentials Repository</a> (Modern repository often hosting EAM files)</li>
<li><a href="/notes/chemistry/molecular-simulation/classical-methods/embedded-atom-method/">Original EAM Paper (1984)</a></li>
<li><a href="/notes/chemistry/molecular-simulation/classical-methods/embedded-atom-method-review-1993/">EAM Review (1993)</a></li>
</ul>
]]></content:encoded></item><item><title>Dynamical Corrections to TST for Surface Diffusion</title><link>https://hunterheidenreich.com/notes/chemistry/molecular-simulation/surface-science/self-diffusion-lj-fcc111-1989/</link><pubDate>Sun, 14 Dec 2025 00:00:00 +0000</pubDate><guid>https://hunterheidenreich.com/notes/chemistry/molecular-simulation/surface-science/self-diffusion-lj-fcc111-1989/</guid><description>Application of dynamical corrections formalism to TST for LJ surface diffusion, revealing bounce-back recrossings at low T.</description><content:encoded><![CDATA[<h2 id="bridging-md-and-tst-for-surface-diffusion">Bridging MD and TST for Surface Diffusion</h2>
<p>This is primarily a <strong>Methodological Paper</strong> with a secondary contribution in <strong>Discovery</strong>.</p>
<p>The authors&rsquo; primary goal is to demonstrate the validity of the &ldquo;dynamical corrections formalism&rdquo; for calculating diffusion constants. They validate this by reproducing Molecular Dynamics (MD) results at high temperatures and then extending the method into low-temperature regimes where MD is infeasible.</p>
<p>By applying this method, they uncover a specific physical phenomenon, &ldquo;bounce-back recrossings&rdquo;, that causes a dip in the diffusion coefficient at low temperatures, a detail previously unobserved.</p>
<h2 id="timescale-limits-in-molecular-dynamics">Timescale Limits in Molecular Dynamics</h2>
<p>The authors aim to solve the timescale problem in simulating surface diffusion.</p>
<p><strong>Limit of MD</strong>: Molecular Dynamics (MD) is effective at high temperatures but becomes computationally infeasible at low temperatures because the time between diffusive hops increases drastically.</p>
<p><strong>Limit of TST</strong>: Standard Transition State Theory (TST) can handle long timescales but assumes all barrier crossings are successful, ignoring correlated dynamical events like immediate recrossings or multiple jumps.</p>
<p><strong>Goal</strong>: They seek to apply a formalism that corrects TST using short-time trajectory data, allowing for accurate calculation of diffusion constants across the entire temperature range.</p>
<h2 id="the-bounce-back-mechanism">The Bounce-Back Mechanism</h2>
<p>The core novelty is the rigorous application of the dynamical corrections formalism to a multi-site system (fcc/hcp sites) to characterize non-Arrhenius behavior at low temperatures.</p>
<p><strong>Unified Approach</strong>: They demonstrate that this method works for all temperatures, bridging the gap between the &ldquo;rare-event regime&rdquo; and the high-temperature regime dominated by fluid-like motion.</p>
<p><strong>Bounce-back Mechanism</strong>: They identify a specific &ldquo;dip&rdquo; in the dynamical correction factor ($f_d &lt; 1$) at low temperatures ($T \approx 0.038$), attributed to trajectories where the adatom collides with a substrate atom on the far side of the binding site and immediately recrosses the dividing surface.</p>
<h2 id="simulating-the-lennard-jones-fcc111-surface">Simulating the Lennard-Jones fcc(111) Surface</h2>
<p>The authors performed computational experiments on a Lennard-Jones fcc(111) surface cluster.</p>
<p><strong>System Setup</strong>: A single adatom on a 3-layer substrate (30 atoms/layer) with periodic boundary conditions.</p>
<p><strong>Baselines</strong>: They compared their high-temperature results against standard Molecular Dynamics simulations to validate the method.</p>
<p><strong>Ablation of Substrate Freedom</strong>: They ran a control experiment with a 6-layer substrate (top 3 free, 800 trajectories) to confirm the bounce-back effect persisted independently of the fixed deep layers, obtaining $D/D^{TST} = 0.75 \pm 0.06$, consistent with the original result.</p>
<p><strong>Trajectory Analysis</strong>: They analyzed the angular distribution of initial momenta to characterize the specific geometry of the bounce-back trajectories. Bounce-back trajectories were more strongly peaked at $\phi = 90°$ (perpendicular to the TST gate), confirming the effect arises from interaction with the substrate atom directly across the binding site.</p>
<p><strong>Temperature Range</strong>: The full calculation spanned $0.013 \leq T \leq 0.383$ in reduced units, bridging the rare-event regime and the high-temperature fluid-like regime.</p>
<h2 id="resolving-non-arrhenius-behavior">Resolving Non-Arrhenius Behavior</h2>
<p><strong>Arrhenius Behavior of TST</strong>: The uncorrected TST diffusion constant ($D^{TST}$) followed a near-perfect Arrhenius law, with a linear least-squares fit of $\ln(D^{TST}) = -1.8 - 0.30/T$.</p>
<p><strong>High-Temperature Correction</strong>: At high T, the dynamical correction factor $D/D^{TST} &gt; 1$, indicating correlated multiple forward jumps (long flights).</p>
<p><strong>Low-Temperature Dip</strong>: At low T, $D/D^{TST} &lt; 1$ for $T = 0.013, 0.026, 0.038, 0.051$ (minimum at $T = 0.038$), caused by the bounce-back mechanism.</p>
<p><strong>Validation</strong>: The method successfully reproduced high-T literature values while providing access to low-T dynamics inaccessible to direct MD.</p>
<hr>
<h2 id="reproducibility-details">Reproducibility Details</h2>
<h3 id="data">Data</h3>
<p>The paper does not use external datasets but generates simulation data based on the Lennard-Jones potential.</p>
<table>
	<thead>
			<tr>
					<th>Type</th>
					<th>Parameter</th>
					<th>Value</th>
					<th>Notes</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td><strong>Potential</strong></td>
					<td>$\epsilon, \sigma$</td>
					<td>1.0 (Reduced units)</td>
					<td>Standard Lennard-Jones 6-12</td>
			</tr>
			<tr>
					<td><strong>Cutoff</strong></td>
					<td>Spline</td>
					<td>$r_1=1.5\sigma, r_2=2.5\sigma$</td>
					<td>5th-order spline smooths potential to 0 at $r_2$</td>
			</tr>
			<tr>
					<td><strong>Geometry</strong></td>
					<td>Lattice Constant</td>
					<td>$a_0 = 1.549$</td>
					<td>Minimum energy for this potential</td>
			</tr>
			<tr>
					<td><strong>Cluster</strong></td>
					<td>Size</td>
					<td>3 layers, 30 atoms/layer</td>
					<td>Periodic boundary conditions parallel to surface</td>
			</tr>
	</tbody>
</table>
<h3 id="algorithms">Algorithms</h3>
<p>The diffusion constant $D$ is calculated as $D = D^{TST} \times (D/D^{TST})$.</p>
<p><strong>1. TST Rate Calculation ($D^{TST}$)</strong></p>
<ul>
<li><strong>Method</strong>: Monte Carlo integration of the flux through the dividing surface.</li>
<li><strong>Technique</strong>: Calculate free energy difference between the entire binding site and the TST dividing region.</li>
<li><strong>Dividing Surface</strong>: Defined geometrically with respect to equilibrium substrate positions (honeycomb boundaries around fcc/hcp sites).</li>
</ul>
<p><strong>2. Dynamical Correction Factor ($D/D^{TST}$)</strong></p>
<p>The method relies on evaluating the dynamical correction factor $f_d$, initialized via a Metropolis walk restricted to the TST boundary region, computed as:</p>
<p>$$
\begin{aligned}
f_d(i\rightarrow j) = \frac{2}{N}\sum_{I=1}^{N}\eta_{ij}(I)
\end{aligned}
$$</p>
<ul>
<li><strong>Initialization</strong>:
<ul>
<li><strong>Position</strong>: Sampled via Metropolis walk restricted to the TST boundary region.</li>
<li><strong>Momentum</strong>: Maxwellian distribution for parallel components; Maxwellian-flux distribution for normal component.</li>
<li><strong>Symmetry</strong>: Trajectories entering hcp sites are generated by reversing momenta of those entering fcc sites.</li>
</ul>
</li>
<li><strong>Integration</strong>:
<ul>
<li><strong>Integrator</strong>: Adams-Bashforth-Moulton predictor-corrector formulas of orders 1 through 12.</li>
<li><strong>Duration</strong>: Integrated until time $t &gt; \tau_{corr}$ (approximately $\tau_{corr} \approx 13$ reduced time units).</li>
<li><strong>Sample Size</strong>: 1400 trajectories per temperature point (700 initially entering each type of site).</li>
</ul>
</li>
</ul>
<h3 id="models">Models</h3>
<ul>
<li><strong>System</strong>: Single component Lennard-Jones solid (Argon-like).</li>
<li><strong>Adsorbate</strong>: Single adatom on fcc(111) surface.</li>
<li><strong>Substrate Flexibility</strong>: Adatom plus top layer atoms are free to move. Layers 2 and 3 are fixed. (Validation run used 6 layers with top 3 free).</li>
</ul>
<h3 id="evaluation">Evaluation</h3>
<p>The primary metric is the Diffusion Constant $D$, analyzed via the Dynamical Correction Factor.</p>
<table>
	<thead>
			<tr>
					<th>Metric</th>
					<th>Value</th>
					<th>Baseline</th>
					<th>Notes</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td><strong>Slope ($E_a$)</strong></td>
					<td>0.30</td>
					<td>0.303 fcc / 0.316 hcp (Newton-Raphson)</td>
					<td>TST slope in good agreement with static barrier height.</td>
			</tr>
			<tr>
					<td><strong>$D/D^{TST}$ (Low T)</strong></td>
					<td>$0.82 \pm 0.04$</td>
					<td>1.0 (TST)</td>
					<td>At $T=0.038$. Indicates 18% reduction due to recrossing.</td>
			</tr>
			<tr>
					<td><strong>$D/D^{TST}$ (High T)</strong></td>
					<td>$&gt; 1.0$</td>
					<td>MD Literature</td>
					<td>Increases with T due to multiple jumps.</td>
			</tr>
	</tbody>
</table>
<h3 id="hardware">Hardware</h3>
<p>Specific hardware configurations (e.g., node architectures, supercomputers) or training times were not specified in the original publication, which is typical for 1989 literature. Modern open-source MD engines (e.g., LAMMPS, ASE) could perform identical Lennard-Jones molecular dynamics integrations in negligible time on any consumer workstation.</p>
<hr>
<h2 id="paper-information">Paper Information</h2>
<p><strong>Citation</strong>: Cohen, J. M., &amp; Voter, A. F. (1989). Self-diffusion on the Lennard-Jones fcc(111) surface: Effects of temperature on dynamical corrections. <em>The Journal of Chemical Physics</em>, 91(8), 5082-5086. <a href="https://doi.org/10.1063/1.457599">https://doi.org/10.1063/1.457599</a></p>
<p><strong>Publication</strong>: The Journal of Chemical Physics 1989</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-bibtex" data-lang="bibtex"><span style="display:flex;"><span><span style="color:#a6e22e">@article</span>{cohenSelfDiffusionLennard1989,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">title</span> = <span style="color:#e6db74">{Self-diffusion on the {{Lennard}}-{{Jones}} Fcc(111) Surface: {{Effects}} of Temperature on Dynamical Corrections}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">shorttitle</span> = <span style="color:#e6db74">{Self-diffusion on the {{Lennard}}-{{Jones}} Fcc(111) Surface}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">author</span> = <span style="color:#e6db74">{Cohen, J. M. and Voter, A. F.}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">year</span> = <span style="color:#e6db74">{1989}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">month</span> = oct,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">journal</span> = <span style="color:#e6db74">{The Journal of Chemical Physics}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">volume</span> = <span style="color:#e6db74">{91}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">number</span> = <span style="color:#e6db74">{8}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">pages</span> = <span style="color:#e6db74">{5082--5086}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">issn</span> = <span style="color:#e6db74">{0021-9606, 1089-7690}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">doi</span> = <span style="color:#e6db74">{10.1063/1.457599}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">langid</span> = <span style="color:#e6db74">{english}</span>
</span></span><span style="display:flex;"><span>}
</span></span></code></pre></div>]]></content:encoded></item><item><title>Correlations in the Motion of Atoms in Liquid Argon</title><link>https://hunterheidenreich.com/notes/chemistry/molecular-simulation/classical-methods/correlations-motion-atoms-liquid-argon/</link><pubDate>Sat, 13 Dec 2025 00:00:00 +0000</pubDate><guid>https://hunterheidenreich.com/notes/chemistry/molecular-simulation/classical-methods/correlations-motion-atoms-liquid-argon/</guid><description>Rahman's 1964 MD simulation of 864 argon atoms with Lennard-Jones potential revealed the cage effect and validated classical molecular dynamics for liquids.</description><content:encoded><![CDATA[<h2 id="contribution-methodological-validation-of-md">Contribution: Methodological Validation of MD</h2>
<p>This is the archetypal <strong>Method</strong> paper (dominant classification with secondary <strong>Theory</strong> contribution). It establishes the architectural validity of Molecular Dynamics (MD) as a scientific tool. Rahman answers the question: &ldquo;Can a digital computer solving classical difference equations faithfully represent a physical liquid?&rdquo;</p>
<p>The paper utilizes specific rhetorical indicators of a methodological contribution:</p>
<ul>
<li><strong>Algorithmic Explication</strong>: A dedicated Appendix details the predictor-corrector difference equations.</li>
<li><strong>Validation against Ground Truth</strong>: Extensive comparison of calculated diffusion constants and pair-correlation functions against experimental neutron and X-ray scattering data.</li>
<li><strong>Robustness Checks</strong>: Ablation studies on the numerical integration stability (one vs. two corrector cycles).</li>
</ul>
<h2 id="motivation-bridging-neutron-scattering-and-many-body-theory">Motivation: Bridging Neutron Scattering and Many-Body Theory</h2>
<p>In the early 1960s, neutron scattering data provided insights into the dynamic structure of liquids, but theorists lacked concrete models to explain the observed two-body dynamical correlations. Analytic theories were limited by the difficulty of the many-body problem.</p>
<p>Rahman sought to bypass these analytical bottlenecks by assuming that <strong>classical dynamics</strong> with a simple 2-body potential (Lennard-Jones) could sufficiently describe the motion of atoms in liquid argon. The goal was to generate &ldquo;experimental&rdquo; data via simulation to test theoretical models (like the Vineyard convolution approximation) and provide a microscopic understanding of diffusion.</p>
<h2 id="core-innovation-system-stability-and-the-cage-effect">Core Innovation: System Stability and the Cage Effect</h2>
<p>This paper is widely considered the birth of modern molecular dynamics for continuous potentials. Its key novelties include:</p>
<ol>
<li><strong>System Size &amp; Stability</strong>: Successfully simulating 864 particles interacting via a continuous Lennard-Jones potential with stable temperature over the full simulation duration (approximately $10^{-11}$ sec, as confirmed by Table I in the paper).</li>
<li><strong>The &ldquo;Cage Effect&rdquo;</strong>: The discovery that the velocity autocorrelation function becomes negative after a short time:
$$ \langle \textbf{v}(0) \cdot \textbf{v}(t) \rangle &lt; 0 \quad \text{for } t &gt; 0.33 \times 10^{-12} \text{ s} $$
This proved that atoms in a liquid &ldquo;rattle&rdquo; against the cage of their nearest neighbors.</li>
<li><strong>Delayed Convolution</strong>: Proposing an improvement to the Vineyard approximation for the distinct Van Hove function $G_d(r,t)$ by introducing a time-delayed convolution to account for the persistence of local structure. Instead of convolving $g(r)$ with $G_s(r,t)$ at the same time $t$, Rahman convolves at a delayed time $t&rsquo; &lt; t$, using a one-parameter function with $\tau = 1.0 \times 10^{-12}$ sec. This makes $G_d(r,t)$ decay as $t^4$ at short times (instead of $t^2$ in the Vineyard approximation) and as $t$ at long times.</li>
</ol>
<h2 id="methodology-simulating-864-argon-atoms">Methodology: Simulating 864 Argon Atoms</h2>
<p>Rahman performed a &ldquo;computer experiment&rdquo; (simulation) of <strong>Liquid Argon</strong>:</p>
<ul>
<li><strong>System</strong>: 864 particles in a cubic box of side $L=10.229\sigma$.</li>
<li><strong>Conditions</strong>: Temperature $94.4^\circ$K, Density $1.374 \text{ g cm}^{-3}$.</li>
<li><strong>Interaction</strong>: Lennard-Jones potential, truncated at $R=2.25\sigma$.</li>
<li><strong>Time Step</strong>: $\Delta t = 10^{-14}$ s (780 steps total, covering approximately $7.8 \times 10^{-12}$ s).</li>
<li><strong>Output Analysis</strong>:
<ul>
<li>Radial distribution function $g(r)$.</li>
<li>Mean square displacement $\langle r^2 \rangle$.</li>
<li>Velocity autocorrelation function $\langle v(0)\cdot v(t) \rangle$.</li>
<li>Van Hove space-time correlation functions $G_s(r,t)$ and $G_d(r,t)$.</li>
</ul>
</li>
</ul>
<h2 id="results-validation-and-non-gaussian-diffusion-analysis">Results: Validation and Non-Gaussian Diffusion Analysis</h2>
<ul>
<li><strong>Validation</strong>: The calculated pair-distribution function $g(r)$ agreed well with X-ray scattering data from Eisenstein and Gingrich (at $91.8^\circ$K). The self-diffusion constant $D = 2.43 \times 10^{-5} \text{ cm}^2 \text{ sec}^{-1}$ at $94.4^\circ$K matched the experimental value from Naghizadeh and Rice at $90^\circ$K and the same density ($1.374 \text{ g cm}^{-3}$).</li>
<li><strong>Dynamics</strong>: The velocity autocorrelation has a negative region, contradicting simple exponential decay models (Langevin). Its frequency spectrum $f(\omega)$ shows a broad maximum at $\omega \approx 0.25 (k_BT/\hbar)$, reminiscent of solid-like behavior.</li>
<li><strong>Non-Gaussian Behavior</strong>: The self-diffusion function $G_s(r,t)$ attains its maximum departure from a Gaussian shape at about $t \approx 3.0 \times 10^{-12}$ s (with $\langle r^4 \rangle$ departing from its Gaussian value by about 13%), returning to Gaussian form by $\sim 10^{-11}$ s. At that time, the rms displacement ($3.8$ Angstrom) is close to the first-neighbor distance ($3.7$ Angstrom). This indicates that Fickian diffusion is an asymptotic limit and does not apply at short times.</li>
<li><strong>Fourier Transform Validation</strong>: The Fourier transform of $g(r)$ has peaks at $\kappa\sigma = 6.8$, 12.5, 18.5, 24.8, closely matching the X-ray scattering peaks at $\kappa\sigma = 6.8$, 12.3, 18.4, 24.4.</li>
<li><strong>Temperature Dependence</strong>: A second simulation at $130^\circ$K and $1.16 \text{ g cm}^{-3}$ yielded $D = 5.67 \times 10^{-5} \text{ cm}^2 \text{ sec}^{-1}$, compared to the experimental value of $6.06 \times 10^{-5} \text{ cm}^2 \text{ sec}^{-1}$ from Naghizadeh and Rice at $120^\circ$K and $1.16 \text{ g cm}^{-3}$. The paper notes that both calculated values are lower than experiment by about 20%, and suggests that allowing for a softer repulsive part in the interaction potential might reduce this discrepancy.</li>
<li><strong>Vineyard Approximation</strong>: The standard Vineyard convolution approximation ($G_d \approx g * G_s$) produces a too-rapid decay of $G_d(r,t)$ with time. The delayed convolution, matching pairs of $(t&rsquo;, t)$ in units of $10^{-12}$ sec as (0.2, 0.4), (0.5, 0.8), (1.0, 1.6), (1.5, 2.3), (2.0, 2.9), (2.5, 3.5), provides a substantially better fit.</li>
<li><strong>Conclusion</strong>: Classical N-body dynamics with a truncated pair potential is a sufficient model to reproduce both the structural and dynamical properties of simple liquids.</li>
</ul>
<hr>
<h2 id="reproducibility-details">Reproducibility Details</h2>
<h3 id="data">Data</h3>
<p>The simulation uses physical constants for Argon:</p>
<table>
	<thead>
			<tr>
					<th>Parameter</th>
					<th>Value</th>
					<th>Notes</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td>Particle Mass ($M$)</td>
					<td>$39.95 \times 1.6747 \times 10^{-24}$ g</td>
					<td>Mass of Argon atom</td>
			</tr>
			<tr>
					<td>Potential Depth ($\epsilon/k_B$)</td>
					<td>$120^\circ$K</td>
					<td>Lennard-Jones parameter</td>
			</tr>
			<tr>
					<td>Potential Size ($\sigma$)</td>
					<td>$3.4$ Å</td>
					<td>Lennard-Jones parameter</td>
			</tr>
			<tr>
					<td>Cutoff Radius ($R$)</td>
					<td>$2.25\sigma$</td>
					<td>Potential truncated beyond this</td>
			</tr>
			<tr>
					<td>Density ($\rho$)</td>
					<td>$1.374$ g cm$^{-3}$</td>
					<td></td>
			</tr>
			<tr>
					<td>Particle Count ($N$)</td>
					<td>864</td>
					<td></td>
			</tr>
	</tbody>
</table>
<h3 id="algorithms">Algorithms</h3>
<p>Rahman utilized a <strong>Predictor-Corrector</strong> scheme for solving the second-order differential equations of motion.</p>
<p><strong>Step Size</strong>: $\Delta t = 10^{-14}$ sec.</p>
<p><strong>The Algorithm:</strong></p>
<ol>
<li><strong>Predict</strong> positions $\bar{\xi}$ at $t + \Delta t$ based on previous steps:
$$\bar{\xi}_i^{(n+1)} = \xi_i^{(n-1)} + 2\Delta u \eta_i^{(n)}$$</li>
<li><strong>Calculate Forces</strong> (Accelerations $\alpha$) using predicted positions.</li>
<li><strong>Correct</strong> positions and velocities using the trapezoidal rule:
$$
\begin{aligned}
\eta_i^{(n+1)} &amp;= \eta_i^{(n)} + \frac{1}{2}\Delta u (\alpha_i^{(n+1)} + \alpha_i^{(n)}) \\
\xi_i^{(n+1)} &amp;= \xi_i^{(n)} + \frac{1}{2}\Delta u (\eta_i^{(n+1)} + \eta_i^{(n)})
\end{aligned}
$$</li>
</ol>
<p><em>Note: The paper compared one vs. two repetitions of the corrector step, finding that two passes improved precision slightly. The results presented in the paper were obtained using two passes.</em></p>
<h3 id="models">Models</h3>
<p><strong>Interaction Potential</strong>: Lennard-Jones 12-6
$$V(r_{ij}) = 4\epsilon \left[ \left(\frac{\sigma}{r_{ij}}\right)^{12} - \left(\frac{\sigma}{r_{ij}}\right)^6 \right]$$</p>
<p><strong>Boundary Conditions</strong>: Periodic Boundary Conditions (PBC) in 3 dimensions. When a particle moves out of the box ($x &gt; L$), it re-enters at $x - L$.</p>
<h3 id="hardware">Hardware</h3>
<p>This is a historical benchmark for computational capability in 1964:</p>
<table>
	<thead>
			<tr>
					<th>Resource</th>
					<th>Specification</th>
					<th>Notes</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td><strong>Computer</strong></td>
					<td>CDC 3600</td>
					<td>Control Data Corporation mainframe</td>
			</tr>
			<tr>
					<td><strong>Compute Time</strong></td>
					<td>45 seconds / cycle</td>
					<td>Per predictor-corrector cycle for 864 particles (floating point)</td>
			</tr>
			<tr>
					<td><strong>Language</strong></td>
					<td>FORTRAN + Machine Language</td>
					<td>Machine language used for the most time-consuming parts</td>
			</tr>
	</tbody>
</table>
<p><em>Modern Context: Rahman&rsquo;s system (864 Argon atoms, LJ-potential) is highly reproducible today and serves as a classic pedagogical exercise. It can be simulated in standard MD frameworks (LAMMPS, OpenMM) in fractions of a second on consumer hardware.</em></p>
<hr>
<h2 id="paper-information">Paper Information</h2>
<p><strong>Citation</strong>: Rahman, A. (1964). Correlations in the Motion of Atoms in Liquid Argon. <em>Physical Review</em>, 136(2A), A405-A411. <a href="https://doi.org/10.1103/PhysRev.136.A405">https://doi.org/10.1103/PhysRev.136.A405</a></p>
<p><strong>Publication</strong>: Physical Review 1964</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-bibtex" data-lang="bibtex"><span style="display:flex;"><span><span style="color:#a6e22e">@article</span>{rahman1964correlations,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">title</span>=<span style="color:#e6db74">{Correlations in the motion of atoms in liquid argon}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">author</span>=<span style="color:#e6db74">{Rahman, A.}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">journal</span>=<span style="color:#e6db74">{Physical Review}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">volume</span>=<span style="color:#e6db74">{136}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">number</span>=<span style="color:#e6db74">{2A}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">pages</span>=<span style="color:#e6db74">{A405--A411}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">year</span>=<span style="color:#e6db74">{1964}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">publisher</span>=<span style="color:#e6db74">{APS}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">doi</span>=<span style="color:#e6db74">{10.1103/PhysRev.136.A405}</span>
</span></span><span style="display:flex;"><span>}
</span></span></code></pre></div><p><strong>Additional Resources</strong>:</p>
<ul>
<li><a href="https://en.wikipedia.org/wiki/Aneesur_Rahman">Aneesur Rahman - Wikipedia</a></li>
</ul>
]]></content:encoded></item><item><title>Adatom Dimer Diffusion on fcc(111) Crystal Surfaces</title><link>https://hunterheidenreich.com/notes/chemistry/molecular-simulation/surface-science/diffusion-adatom-dimers-1984/</link><pubDate>Sat, 13 Dec 2025 00:00:00 +0000</pubDate><guid>https://hunterheidenreich.com/notes/chemistry/molecular-simulation/surface-science/diffusion-adatom-dimers-1984/</guid><description>A 1984 molecular dynamics study identifying simultaneous multiple jumps in adatom dimer diffusion on fcc(111) surfaces.</description><content:encoded><![CDATA[<h2 id="classification-discovery-of-diffusion-mechanisms">Classification: Discovery of Diffusion Mechanisms</h2>
<p><strong>Discovery (Translational Basis)</strong></p>
<p>This paper applies a computational method (Molecular Dynamics) to observe and characterize a physical phenomenon: the specific diffusion mechanisms of adatom dimers on a crystal surface. It focuses on the &ldquo;what was found&rdquo; (simultaneous multiple jumps).</p>
<p>Based on the <a href="/notes/research-methods/ai-physical-sciences-paper-taxonomy/">AI for Physical Sciences Paper Taxonomy</a>, this is best classified as $\Psi_{\text{Discovery}}$ with a minor superposition of $\Psi_{\text{Method}}$ (approximately 80% Discovery, 20% Method). The dominant contribution is the application of computational tools to observe physical phenomena, while secondarily demonstrating MD&rsquo;s capability for surface diffusion problems in an era when the technique was still developing.</p>
<h2 id="bridging-the-intermediate-temperature-data-gap">Bridging the Intermediate Temperature Data Gap</h2>
<p>The study aims to investigate the behavior of adatom dimers in an <strong>intermediate temperature range</strong> ($0.3T_m$ to $0.6T_m$). At the time, Field Ion Microscopy (FIM) provided data at low temperatures ($T \le 0.2T_m$), and previous simulations had studied single adatoms on various surfaces including (111), (110), and (100), but not dimers on (111). The authors sought to compare dimer mobility with single adatom mobility on the (111) surface, where single adatoms move almost like free particles.</p>
<h2 id="observation-of-simultaneous-multiple-jumps">Observation of Simultaneous Multiple Jumps</h2>
<p>The core contribution is the observation of <strong>simultaneous multiple jumps</strong> for dimers on the (111) surface at intermediate temperatures. The study reveals that:</p>
<ol>
<li>Dimers migrate as a whole entity, with both atoms jumping simultaneously</li>
<li>The mobility of dimers (center of mass) is very close to that of single adatoms in this regime.</li>
</ol>
<h2 id="molecular-dynamics-simulation-design">Molecular Dynamics Simulation Design</h2>
<p>The authors performed <strong>Molecular Dynamics (MD) simulations</strong> of a face-centred cubic (fcc) crystallite:</p>
<ul>
<li><strong>System</strong>: A single crystallite of 192 atoms bounded by two free (111) surfaces</li>
<li><strong>Temperature Range</strong>: $0.22 \epsilon/k$ to $0.40 \epsilon/k$ (approximately $0.3T_m$ to $0.6T_m$)</li>
<li><strong>Duration</strong>: Integration over 50,000 time steps</li>
<li><strong>Comparison</strong>: Results were compared against single adatom diffusion data and Einstein&rsquo;s diffusion relation</li>
</ul>
<h2 id="outcomes-on-mobility-and-migration-dynamics">Outcomes on Mobility and Migration Dynamics</h2>
<ul>
<li><strong>Mechanism Transition</strong>: At low temperatures ($T^\ast=0.22$), diffusion occurs via discrete single jumps where adatoms rotate or extend bonds. At higher temperatures, the &ldquo;multiple jump&rdquo; mechanism becomes preponderant.</li>
<li><strong>Migration Style</strong>: The dimer migrates essentially by extending its bond along the $\langle 110 \rangle$ direction.</li>
<li><strong>Mobility</strong>: The diffusion coefficient of dimers is quantitatively similar to single adatoms.</li>
<li><strong>Qualitative Support</strong>: The results support Bonzel&rsquo;s hypothesis of delocalized diffusion involving energy transfer between translation and rotation. The authors attempted to quantify the coupling using the cross-correlation function:</li>
</ul>
<p>$$g(t) = C \langle E_T(t) , E_R(t + t&rsquo;) \rangle$$</p>
<p>where $C$ is a normalization constant, $E_T$ is the translational energy of the center of mass, and $E_R$ is the rotational energy of the dimer. However, the average lifetime of a dimer (2% to 15% of the total calculation time in the studied temperature range) was too short to allow a statistically significant study of this coupling.</p>
<ul>
<li><strong>Dimer Concentration</strong>: The contribution of dimers to mass transport depends on their concentration. As a first approximation, the dimer concentration is expressed as:</li>
</ul>
<p>$$C = C_0 \exp\left[\frac{-2E_f - E_d}{k_B T}\right]$$</p>
<p>where $E_f$ is the formation energy of adatoms and $E_d$ is the binding energy of a dimer. If the binding energy is sufficiently strong, dimer contributions should be accounted for even in the intermediate temperature range ($0.3T_m$ to $0.6T_m$).</p>
<hr>
<h2 id="reproducibility-details">Reproducibility Details</h2>
<h3 id="data-simulation-setup">Data (Simulation Setup)</h3>
<p>Because this is an early computational study, &ldquo;data&rdquo; refers to the initial structural configuration. The simulation begins with an algorithmically generated generic fcc(111) lattice containing two adatoms as the initial state.</p>















<figure class="post-figure center ">
    <img src="/img/notes/chemistry/argon-dimer-diffusion.webp"
         alt="Visualization of argon dimer on fcc(111) surface"
         title="Visualization of argon dimer on fcc(111) surface"
         
         
         loading="lazy"
         class="post-image">
    
    <figcaption class="post-caption">Initial configuration showing an adatom dimer (two adatoms on neighboring sites) on an fcc(111) surface. The crystallite consists of 192 atoms with periodic boundary conditions in the x and y directions.</figcaption>
    
</figure>

<table>
	<thead>
			<tr>
					<th>Parameter</th>
					<th>Value</th>
					<th>Notes</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td><strong>Particles</strong></td>
					<td>192 atoms</td>
					<td>Single fcc crystallite</td>
			</tr>
			<tr>
					<td><strong>Dimensions</strong></td>
					<td>$4[110] \times 4[112]$</td>
					<td>Thickness of 6 planes</td>
			</tr>
			<tr>
					<td><strong>Boundary</strong></td>
					<td>Periodic (x, y)</td>
					<td>Free surface in z-direction</td>
			</tr>
			<tr>
					<td><strong>Initial State</strong></td>
					<td>Dimer on neighbor sites</td>
					<td>Starts with 2 adatoms</td>
			</tr>
	</tbody>
</table>
<h3 id="algorithms">Algorithms</h3>
<p>The simulation relies on standard Molecular Dynamics integration techniques. Historical source code is absent. Complete reproducibility is achievable today utilizing modern open-source tools like LAMMPS with standard <code>lj/cut</code> pair styles and NVE/NVT ensembles.</p>
<ul>
<li><strong>Integration Scheme</strong>: Central difference algorithm (Verlet algorithm)</li>
<li><strong>Time Step</strong>: $\Delta t^\ast = 0.01$ (reduced units)</li>
<li><strong>Total Steps</strong>: 50,000 integration steps</li>
<li><strong>Dimer Definition</strong>: Two adatoms are considered a dimer if their distance $r \le r_c = 2\sigma$</li>
</ul>
<h3 id="models-analytic-potential">Models (Analytic Potential)</h3>
<p>The physics are modeled using a classic Lennard-Jones potential.</p>
<p><strong>Potential Form</strong>: (12, 6) Lennard-Jones
$$ V(r) = 4\epsilon \left[ \left(\frac{\sigma}{r}\right)^{12} - \left(\frac{\sigma}{r}\right)^6 \right] $$</p>
<p><strong>Parameters (Argon-like)</strong>:</p>
<ul>
<li>$\epsilon/k = 119.5$ K</li>
<li>$\sigma = 3.4478$ Å</li>
<li>$m = 39.948$ a.u.</li>
<li>Cut-off radius: $2\sigma$</li>
</ul>
<h3 id="evaluation">Evaluation</h3>
<p>Metrics used to quantify the diffusion behavior:</p>
<table>
	<thead>
			<tr>
					<th>Metric</th>
					<th>Formula</th>
					<th>Notes</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td><strong>Diffusion Coefficient</strong></td>
					<td>$D = \frac{\langle R^2 \rangle}{4t}$</td>
					<td>Calculated from Mean Square Displacement of center of mass</td>
			</tr>
			<tr>
					<td><strong>Trajectory Analysis</strong></td>
					<td>Visual inspection</td>
					<td>Categorized into &ldquo;fast migration&rdquo; (multiple jumps) or &ldquo;discrete jumps&rdquo;</td>
			</tr>
	</tbody>
</table>
<h3 id="hardware">Hardware</h3>
<ul>
<li><strong>Specifics</strong>: Unspecified in the original text.</li>
<li><strong>Scale</strong>: 192 particles simulated for 50,000 steps is extremely lightweight by modern standards. A standard laptop CPU executes this workload in under a second, providing a strong contrast to the mainframe computing resources required in 1984.</li>
</ul>
<hr>
<h2 id="paper-information">Paper Information</h2>
<p><strong>Citation</strong>: Ghaleb, D. (1984). Diffusion of adatom dimers on (111) surface of face centred crystals: A molecular dynamics study. <em>Surface Science</em>, 137(2-3), L103-L108. <a href="https://doi.org/10.1016/0039-6028(84)90515-6">https://doi.org/10.1016/0039-6028(84)90515-6</a></p>
<p><strong>Publication</strong>: Surface Science 1984</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-bibtex" data-lang="bibtex"><span style="display:flex;"><span><span style="color:#a6e22e">@article</span>{ghalebDiffusionAdatomDimers1984,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">title</span> = <span style="color:#e6db74">{Diffusion of Adatom Dimers on (111) Surface of Face Centred Crystals: A Molecular Dynamics Study}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">author</span> = <span style="color:#e6db74">{Ghaleb, Dominique}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">year</span> = <span style="color:#e6db74">{1984}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">journal</span> = <span style="color:#e6db74">{Surface Science}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">volume</span> = <span style="color:#e6db74">{137}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">number</span> = <span style="color:#e6db74">{2-3}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">pages</span> = <span style="color:#e6db74">{L103-L108}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">doi</span> = <span style="color:#e6db74">{10.1016/0039-6028(84)90515-6}</span>
</span></span><span style="display:flex;"><span>}
</span></span></code></pre></div>]]></content:encoded></item><item><title>The Müller-Brown Potential: A 2D Benchmark Surface</title><link>https://hunterheidenreich.com/notes/chemistry/molecular-simulation/classical-methods/muller-brown-1979/</link><pubDate>Mon, 08 Sep 2025 00:00:00 +0000</pubDate><guid>https://hunterheidenreich.com/notes/chemistry/molecular-simulation/classical-methods/muller-brown-1979/</guid><description>The Müller-Brown potential is a classic 2D benchmark for testing optimization algorithms and molecular dynamics methods.</description><content:encoded><![CDATA[<h2 id="overview">Overview</h2>
<p>The Müller-Brown potential is a primary benchmark system in computational chemistry: a two-dimensional analytical surface used to evaluate optimization algorithms. Introduced by Klaus Müller and Leo D. Brown in 1979 as a test system for their constrained simplex optimization algorithm, this potential energy function captures the essential topology of chemical reaction landscapes while preserving computational efficiency.</p>
<p><strong>Origin</strong>: Müller, K., &amp; Brown, L. D. (1979). Location of saddle points and minimum energy paths by a constrained simplex optimization procedure. <em>Theoretica Chimica Acta</em>, 53, 75-93. The potential is introduced in footnote 7 (p. 79) as a two-parametric model surface for testing the constrained simplex procedures.</p>
<h2 id="mathematical-definition">Mathematical Definition</h2>
<p>The Müller-Brown potential combines four two-dimensional Gaussian functions:</p>
<p>$$V(x,y) = \sum_{k=1}^{4} A_k \exp\left[a_k(x-x_k^0)^2 + b_k(x-x_k^0)(y-y_k^0) + c_k(y-y_k^0)^2\right]$$</p>
<p>Each Gaussian contributes a different &ldquo;bump&rdquo; or &ldquo;well&rdquo; to the landscape. The parameters control amplitude ($A_k$), width, orientation, and center position.</p>
<h3 id="standard-parameters">Standard Parameters</h3>
<p>The canonical parameter values that define the Müller-Brown surface are:</p>
<table>
	<thead>
			<tr>
					<th>k</th>
					<th>$A_k$</th>
					<th>$a_k$</th>
					<th>$b_k$</th>
					<th>$c_k$</th>
					<th>$x_k^0$</th>
					<th>$y_k^0$</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td>1</td>
					<td>-200</td>
					<td>-1</td>
					<td>0</td>
					<td>-10</td>
					<td>1</td>
					<td>0</td>
			</tr>
			<tr>
					<td>2</td>
					<td>-100</td>
					<td>-1</td>
					<td>0</td>
					<td>-10</td>
					<td>0</td>
					<td>0.5</td>
			</tr>
			<tr>
					<td>3</td>
					<td>-170</td>
					<td>-6.5</td>
					<td>11</td>
					<td>-6.5</td>
					<td>-0.5</td>
					<td>1.5</td>
			</tr>
			<tr>
					<td>4</td>
					<td>15</td>
					<td>0.7</td>
					<td>0.6</td>
					<td>0.7</td>
					<td>-1</td>
					<td>1</td>
			</tr>
	</tbody>
</table>
<p>The first three terms have negative amplitudes (creating energy wells), while the fourth has a positive amplitude (creating a barrier). The cross-term $b_k$ in the third Gaussian creates the tilted orientation that gives the surface its characteristic curved pathways.</p>
<h3 id="analytical-gradients-forces">Analytical Gradients (Forces)</h3>
<p>To optimize paths or simulate molecular dynamics across this surface, calculating the spatial derivatives (negative forces) is structurally simple. Defining $G_k(x,y)$ as the inner argument of the exponent, the partial derivatives with respect to $x$ and $y$ are:</p>
<p>$$ \frac{\partial V}{\partial x} = \sum_{k=1}^4 A_k \exp[G_k(x,y)] \cdot \left[ 2a_k(x-x_k^0) + b_k(y-y_k^0) \right] $$</p>
<p>$$ \frac{\partial V}{\partial y} = \sum_{k=1}^4 A_k \exp[G_k(x,y)] \cdot \left[ b_k(x-x_k^0) + 2c_k(y-y_k^0) \right] $$</p>
<h2 id="energy-landscape">Energy Landscape</h2>
<p>This simple formula creates a surprisingly rich topography with exactly the features needed to challenge optimization algorithms:</p>
<table>
	<thead>
			<tr>
					<th><strong>Stationary Point</strong></th>
					<th><strong>Coordinates</strong></th>
					<th><strong>Energy</strong></th>
					<th><strong>Type</strong></th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td>MA (Reactant)</td>
					<td>(-0.558, 1.442)</td>
					<td>-146.70</td>
					<td>Deep minimum</td>
			</tr>
			<tr>
					<td>MC (Intermediate)</td>
					<td>(-0.050, 0.467)</td>
					<td>-80.77</td>
					<td>Shallow minimum</td>
			</tr>
			<tr>
					<td>MB (Product)</td>
					<td>(0.623, 0.028)</td>
					<td>-108.17</td>
					<td>Medium minimum</td>
			</tr>
			<tr>
					<td>S1</td>
					<td>(-0.822, 0.624)</td>
					<td>-40.67</td>
					<td>First saddle point</td>
			</tr>
			<tr>
					<td>S2</td>
					<td>(0.212, 0.293)</td>
					<td>-72.25</td>
					<td>Second saddle point</td>
			</tr>
	</tbody>
</table>
<p>All values from Table 1 of Müller &amp; Brown (1979).</p>















<figure class="post-figure center ">
    <img src="/img/muller-brown/muller-brown-potential-surface.webp"
         alt="Müller-Brown Potential Energy Surface showing the three minima (dark blue regions) and two saddle points"
         title="Müller-Brown Potential Energy Surface showing the three minima (dark blue regions) and two saddle points"
         
         
         loading="lazy"
         class="post-image">
    
    <figcaption class="post-caption">The Müller-Brown potential energy surface showing the three minima (dark blue regions) and two saddle points.</figcaption>
    
</figure>

<h3 id="key-challenge-curved-reaction-pathways">Key Challenge: Curved Reaction Pathways</h3>
<p>The path from the deep reactant minimum (MA) to the product minimum (MB) follows a curved two-step pathway:</p>
<ol>
<li><strong>MA → S1 → MC</strong>: First transition over the higher, rate-limiting barrier (S1) into an intermediate basin</li>
<li><strong>MC → S2 → MB</strong>: Second transition over a much lower barrier (S2) to the product</li>
</ol>
<p>This curved pathway breaks linear interpolation methods. Algorithms that draw a straight line from reactant to product miss both the intermediate minimum and the correct transition states, climbing over much higher energy regions instead.</p>
<h2 id="why-it-works-as-a-benchmark">Why It Works as a Benchmark</h2>
<p>The Müller-Brown potential has served as a computational chemistry benchmark for over four decades because of four key characteristics:</p>
<p><strong>Low dimensionality</strong>: As a 2D surface, it permits complete visualization of the landscape, clearly revealing why specific algorithms succeed or fail.</p>
<p><strong>Analytical form</strong>: Energy and gradient calculations cost virtually nothing, enabling exhaustive testing impossible with quantum mechanical surfaces.</p>
<p><strong>Non-trivial topology</strong>: The curved minimum energy path and shallow intermediate minimum challenge sophisticated methods while remaining manageable.</p>
<p><strong>Known ground truth</strong>: All minima and saddle points are precisely known, providing unambiguous success metrics.</p>
<h3 id="contrast-with-other-benchmarks">Contrast with Other Benchmarks</h3>
<p>The Müller-Brown potential provides distinct evaluation metrics compared to other classic potentials. The Lennard-Jones potential serves as the standard benchmark for equilibrium properties due to its single energy minimum. In parallel, Müller-Brown explicitly models reactive landscapes. Its multiple minima and connecting barriers create an evaluation environment for algorithms designed to discover transition states and reaction paths.</p>
<h2 id="historical-applications">Historical Applications</h2>
<p>The potential has evolved with the field&rsquo;s changing focus:</p>
<p><strong>1980s-1990s</strong>: Testing path-finding methods like Nudged Elastic Band (NEB), which creates discrete representations of reaction pathways and optimizes them to find minimum energy paths.</p>
<p><strong>2000s-2010s</strong>: Validating Transition Path Sampling (TPS) methods that harvest statistical ensembles of reactive trajectories.</p>
<p><strong>2020s</strong>: Benchmarking machine learning models and generative approaches that learn to sample transition paths or approximate potential energy surfaces.</p>
<h2 id="modern-applications-in-machine-learning">Modern Applications in Machine Learning</h2>
<p>The rise of machine learning has given the Müller-Brown potential renewed purpose. Modern <strong>Machine Learning Interatomic Potentials (MLIPs)</strong> aim to bridge the gap between quantum mechanical accuracy and classical force field efficiency by training flexible models on expensive quantum chemistry data.</p>
<p>The Müller-Brown potential provides an ideal benchmarking solution: an exactly known potential energy surface that can generate unlimited, noise-free training data. This enables researchers to ask fundamental questions:</p>
<ul>
<li>How well does a given architecture learn complex, curved surfaces?</li>
<li>How many training points are needed for acceptable accuracy?</li>
<li>How does the model behave when extrapolating beyond training data?</li>
<li>Can it correctly identify minima and saddle points?</li>
</ul>
<p>The potential serves as a consistent benchmark for measuring the learning capacity of AI models.</p>
<h2 id="extensions-and-variants">Extensions and Variants</h2>
<h3 id="higher-dimensional-extensions">Higher-Dimensional Extensions</h3>
<p>The canonical Müller-Brown potential can be extended beyond two dimensions to create more challenging test cases:</p>
<p><strong>Harmonic constraints</strong>: Add quadratic wells in orthogonal dimensions while preserving the complex 2D landscape:</p>
<p>$$V_{5D}(x_1, x_2, x_3, x_4, x_5) = V(x_1, x_3) + \kappa(x_2^2 + x_4^2 + x_5^2)$$</p>
<p><strong>Collective variables (CVs)</strong>: Collective variables are low-dimensional coordinates that capture the most important degrees of freedom in a high-dimensional system. By defining CVs that mix multiple dimensions, the original surface can be embedded in higher-dimensional spaces. For instance, the active 2D coordinates $x$ and $y$ can be projected as linear combinations of $N$ arbitrary degrees of freedom ($q_i$):</p>
<p>$$ x = \sum_{i=1}^N w_{x,i} q_i \quad \text{and} \quad y = \sum_{i=1}^N w_{y,i} q_i $$</p>
<p>This constructs a complex, high-dimensional problem where an algorithm must learn to isolate the relevant active subspace (the CVs) before it can effectively optimize the topology.</p>
<p>These extensions enable systematic testing of algorithm scaling with dimensionality while maintaining known ground truth in the active subspace.</p>
<h2 id="limitations">Limitations</h2>
<p>Despite its utility, the Müller-Brown potential has fundamental limitations as a proxy for physical systems:</p>
<ul>
<li><strong>Lack of Realistic Scaling</strong>: As a purely mathematical 2D/analytical model, it cannot directly simulate the complexities of high-dimensional scaling found in many-body atomic systems.</li>
<li><strong>No Entropic Effects</strong>: In real chemical systems, entropic contributions heavily influence the free-energy landscape. The Müller-Brown potential maps energy precisely but lacks the thermal/entropic complexity of solvent or macromolecular environments.</li>
<li><strong>Trivial Topology Contrasts</strong>: While non-trivial compared to single wells, its global topology remains simpler than proper ab initio potential energy surfaces, missing features like complex bifurcations, multi-state crossings, or non-adiabatic couplings.</li>
</ul>
<h2 id="implementation-considerations">Implementation Considerations</h2>
<p>Modern implementations typically focus on:</p>
<ul>
<li><strong>Vectorized calculations</strong> for batch processing</li>
<li><strong>Analytical derivatives</strong> for gradient-based methods</li>
<li><strong>JIT compilation</strong> for performance optimization</li>
<li><strong>Automatic differentiation</strong> compatibility for machine learning frameworks</li>
</ul>
<p>The analytical nature of the potential makes it ideal for testing both classical optimization methods and modern machine learning approaches.</p>
<h2 id="resources-and-visualizations">Resources and Visualizations</h2>
<ul>
<li><a href="/muller-brown-optimized/">Interactive Müller-Brown Potential Energy Surface</a> - Local visualization tool</li>
<li><a href="https://www.wolframcloud.com/objects/demonstrations/TrajectoriesOnTheMullerBrownPotentialEnergySurface-source.nb">Müller-Brown Potential Visualization (Wolfram)</a> - External Wolfram demonstration</li>
<li><a href="/posts/muller-brown-in-pytorch/">Implementing the Müller-Brown Potential in PyTorch</a> - Detailed implementation guide with performance analysis</li>
</ul>
<h2 id="related-systems">Related Systems</h2>
<p>The Müller-Brown potential belongs to a family of analytical benchmark systems used in computational chemistry. Other notable examples include:</p>
<ul>
<li><strong>Lennard-Jones potential</strong>: Single-minimum benchmark for equilibrium properties</li>
<li><strong>Double-well potentials</strong>: Simple models for bistable systems</li>
<li><strong>Eckart barrier</strong>: One-dimensional tunneling benchmark</li>
<li><strong>Wolfe-Quapp potential</strong>: Higher-dimensional extension with valley-ridge inflection points</li>
</ul>
<h2 id="conclusion">Conclusion</h2>
<p>The Müller-Brown potential demonstrates how a well-designed benchmark can evolve with a field. Originating from 1970s computational constraints to test algorithms when quantum chemistry calculations were expensive, its topology causes naive linear-interpolation approaches to fail while maintaining instantaneous computational execution. Because of this, it remains a heavily analyzed benchmark system today.</p>
<p>It serves specific purposes in the machine learning era by providing a controlled environment for developing methods targeted at complex realistic molecular systems. Its evolution from a practical surrogate model to a machine learning benchmark demonstrates the continued relevance of foundational analytical test cases in computational science.</p>
]]></content:encoded></item><item><title>Müller-Brown Transition: Langevin Dynamics Simulation</title><link>https://hunterheidenreich.com/videos/muller-brown-transition-simulation/</link><pubDate>Wed, 27 Aug 2025 00:00:00 +0000</pubDate><guid>https://hunterheidenreich.com/videos/muller-brown-transition-simulation/</guid><description>Extended Langevin dynamics simulation showing particle transitions between different basins of the Müller-Brown potential energy surface.</description><content:encoded><![CDATA[<div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;">
			<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube-nocookie.com/embed/dVFe_4KZbps?autoplay=0&amp;controls=1&amp;end=0&amp;loop=0&amp;mute=0&amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"></iframe>
		</div>

<p>This video shows an extended Langevin dynamics simulation demonstrating transitions between different basins of the Müller-Brown potential. The trajectory illustrates the particle&rsquo;s movement between energy minima, highlighting the energy barriers and pathways involved in reactive processes.</p>
<p>Details on the simulation and implementation can be found in the <a href="/posts/muller-brown-in-pytorch/">Implementing the Müller-Brown Potential in PyTorch</a> post.</p>
]]></content:encoded></item><item><title>Müller-Brown Potential: A PyTorch ML Testbed</title><link>https://hunterheidenreich.com/projects/muller-brown-pytorch/</link><pubDate>Wed, 27 Aug 2025 00:00:00 +0000</pubDate><guid>https://hunterheidenreich.com/projects/muller-brown-pytorch/</guid><description>A PyTorch testbed for the Müller-Brown potential: BAOAB Langevin dynamics, torch.compile analytical forces, and a statistical-mechanics validation suite.</description><content:encoded><![CDATA[<h2 id="overview">Overview</h2>
<p>This project implements the classic 2D Müller-Brown potential in PyTorch as a ground-truth testbed for machine-learning-in-molecular-dynamics (ML-MD) work. The potential is a <code>torch.nn.Module</code> that computes forces two ways: a hand-derived analytical gradient (the default, compiled with <code>torch.compile</code>) and <code>torch.autograd.grad</code> (a reference the analytical path is checked against). On an Apple M1 Max, the analytical kernel runs about 4x faster than autograd (3-7x depending on batch size; 100 warm-up iterations, then the median of 5 runs of 1000), because it skips autograd&rsquo;s graph construction inside the force loop.</p>
<p>The energy is deliberately left uncompiled so that second derivatives (the Hessian via autograd) keep working, since <code>torch.compile</code> does not support double-backward; the force, the hot path, is the compiled function.</p>
<h2 id="features">Features</h2>
<ul>
<li><strong>Dual force kernels</strong>: a hand-derived analytical gradient (compiled) for fast simulation, and an autograd mode for differentiation and as the correctness reference the analytical path is tested against.</li>
<li><strong>BAOAB Langevin integrator</strong>: the BAOAB splitting scheme (Leimkuhler &amp; Matthews, 2013), which solves the friction-plus-noise step exactly and samples the canonical distribution accurately (exactly so for a harmonic oscillator).</li>
<li><strong>Device-agnostic</strong>: potential, forces, and simulation are plain PyTorch tensor operations that run on CPU or CUDA; the included benchmark measures CPU.</li>
<li><strong>Modular architecture</strong>: physics (<code>MuellerBrownPotential</code>), numerics (<code>LangevinSimulator</code>), visualization, and HDF5 I/O are separated, with a CLI orchestrating demo, single-run, batch, and plot-regeneration modes.</li>
</ul>
<h2 id="usage">Usage</h2>
<p>The package installs editable with <code>uv sync</code> and imports as a normal package:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-python" data-lang="python"><span style="display:flex;"><span><span style="color:#f92672">from</span> muller_brown <span style="color:#f92672">import</span> MuellerBrownPotential, LangevinSimulator
</span></span></code></pre></div><p>It provides a fast, differentiable Müller-Brown potential and a Langevin sampler for testing ML-MD algorithms against a known-exact surface.</p>
<h2 id="results">Results</h2>
<h3 id="architecture">Architecture</h3>
<ul>
<li><strong>Physics module</strong>: the energy surface is a <code>torch.nn.Module</code> with the potential parameters held as registered buffers, so device and dtype move with the module.</li>
<li><strong>Analytical force kernel</strong>: the analytical Jacobian is implemented directly and compiled with <code>torch.compile(dynamic=True)</code>, bypassing autograd-graph construction during long simulations.</li>
<li><strong>Vectorized execution</strong>: kernel operations are vectorized over particles, so an ensemble runs in roughly the same wall time as a single particle (the per-step cost is dominated by the fixed force call and noise draw).</li>
<li><strong>Device-agnostic</strong>: all operations move to CUDA via native tensor handling; the benchmark and tests run on CPU.</li>
</ul>
<h3 id="performance">Performance</h3>
<p>A force-throughput benchmark (analytical vs autograd) across batch sizes from 2 to roughly 50,000 particles, on an Apple M1 Max:</p>
<ul>
<li>The analytical kernel is about 4x faster than autograd (3-7x across batch sizes).</li>
<li>Per-particle force time drops below 1 microsecond at large batch sizes.</li>
<li>Throughput rises with batch size and saturates for large ensembles.</li>
</ul>
<h3 id="validation">Validation</h3>
<p>The sampler is checked against statistical mechanics, not just run:</p>
<ul>
<li><strong>Deterministic tests</strong>: the documented minima and saddles have the correct Hessian signatures; the analytical force matches <code>torch.autograd.grad</code>; energy is conserved in the frictionless (NVE) limit; <code>float32</code> matches <code>float64</code>; and HDF5 round-trips preserve the data.</li>
<li><strong>Statistical tests</strong>: the sampler reproduces equipartition, the harmonic-oscillator distributions, and the Müller-Brown Boltzmann mean energy against a grid-integrated reference; a separate convergence study confirms the integrator&rsquo;s kinetic-temperature bias vanishes as the timestep squared.</li>
</ul>
<h3 id="molecular-dynamics">Molecular Dynamics</h3>
<p>Langevin simulations on the surface show particle motion within energy basins, thermal fluctuations around the minima, and barrier-crossing transitions between wells, visualized as trajectories on the potential surface.</p>
<h2 id="simulation-videos">Simulation Videos</h2>
<p>These videos demonstrate Langevin dynamics simulations on the Müller-Brown potential surface:</p>
<p><div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;">
			<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube-nocookie.com/embed/woVM90qXUQs?autoplay=0&amp;controls=1&amp;end=0&amp;loop=0&amp;mute=0&amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"></iframe>
		</div>

<strong>A Basin Dynamics</strong>: Particle motion and thermal fluctuations around the A minimum.</p>
<p><div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;">
			<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube-nocookie.com/embed/gdAHme07bGs?autoplay=0&amp;controls=1&amp;end=0&amp;loop=0&amp;mute=0&amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"></iframe>
		</div>

<strong>B Basin Dynamics</strong>: Exploration of the deeper B minimum energy well.</p>
<p><div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;">
			<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube-nocookie.com/embed/dVFe_4KZbps?autoplay=0&amp;controls=1&amp;end=0&amp;loop=0&amp;mute=0&amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"></iframe>
		</div>

<strong>Transition Path</strong>: Particle transitioning between energy basins, demonstrating barrier crossing.</p>
<h2 id="related-work">Related Work</h2>
<p>This implementation is documented in detail in:</p>
<ul>
<li><a href="/posts/muller-brown-in-pytorch/">Implementing the Müller-Brown Potential in PyTorch</a></li>
<li><a href="/videos/muller-brown-basin-ma-simulation/">Basin A Simulation</a></li>
<li><a href="/videos/muller-brown-basin-mb-simulation/">Basin B Simulation</a></li>
<li><a href="/videos/muller-brown-transition-simulation/">Transition Path Simulation</a></li>
</ul>
]]></content:encoded></item><item><title>Müller-Brown Basin MB: Langevin Dynamics Simulation</title><link>https://hunterheidenreich.com/videos/muller-brown-basin-mb-simulation/</link><pubDate>Wed, 27 Aug 2025 00:00:00 +0000</pubDate><guid>https://hunterheidenreich.com/videos/muller-brown-basin-mb-simulation/</guid><description>Langevin dynamics simulation showing particle motion in the product minimum (Basin MB) of the Müller-Brown potential energy surface.</description><content:encoded><![CDATA[<div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;">
			<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube-nocookie.com/embed/gdAHme07bGs?autoplay=0&amp;controls=1&amp;end=0&amp;loop=0&amp;mute=0&amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"></iframe>
		</div>

<p>This video shows Langevin dynamics simulation in Basin MB, the product minimum of the Müller-Brown potential. The particle shows moderate thermal motion around (0.623, 0.028) with intermediate behavior between the deep reactant well and shallow intermediate basin (-108.17 in reduced units).</p>
<p>Details on the simulation and implementation can be found in the <a href="/posts/muller-brown-in-pytorch/">Implementing the Müller-Brown Potential in PyTorch</a> post.</p>
]]></content:encoded></item><item><title>Müller-Brown Basin MA: Langevin Dynamics Simulation</title><link>https://hunterheidenreich.com/videos/muller-brown-basin-ma-simulation/</link><pubDate>Wed, 27 Aug 2025 00:00:00 +0000</pubDate><guid>https://hunterheidenreich.com/videos/muller-brown-basin-ma-simulation/</guid><description>Langevin dynamics simulation showing particle motion in the deep reactant minimum (Basin MA) of the Müller-Brown potential energy surface.</description><content:encoded><![CDATA[<div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;">
			<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube-nocookie.com/embed/woVM90qXUQs?autoplay=0&amp;controls=1&amp;end=0&amp;loop=0&amp;mute=0&amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"></iframe>
		</div>

<p>This video shows Langevin dynamics simulation in Basin MA, the deep reactant minimum of the Müller-Brown potential. The particle remains tightly confined around (-0.558, 1.442) due to the deep potential well (-146.70 in reduced units) and steep energy barriers.</p>
<p>Details on the simulation and implementation can be found in the <a href="/posts/muller-brown-in-pytorch/">Implementing the Müller-Brown Potential in PyTorch</a> post.</p>
]]></content:encoded></item><item><title>Implementing the Müller-Brown Potential in PyTorch</title><link>https://hunterheidenreich.com/posts/muller-brown-in-pytorch/</link><pubDate>Wed, 27 Aug 2025 00:00:00 +0000</pubDate><guid>https://hunterheidenreich.com/posts/muller-brown-in-pytorch/</guid><description>Guide to implementing the Müller-Brown potential in PyTorch, comparing analytical vs automatic differentiation with performance analysis.</description><content:encoded><![CDATA[<h2 id="introduction">Introduction</h2>
<p>The Müller-Brown potential reads, in hindsight, like an adversarial example for optimization algorithms.</p>
<p>Designed in 1979 to break naive path-finding methods, this deceptively simple 2D surface features deep minima, high barriers, and tricky saddle points. For nearly five decades, it has served as a ground-truth benchmark for computational chemistry.</p>
<p>Today, it finds new life as a testbed for machine learning. In the 1970s, chemists struggled to find transition states, saddle points where standard gradient descent fails catastrophically. Modern machine learning engineers face a strikingly similar challenge: escaping saddle points in high-dimensional loss landscapes. The Müller-Brown potential was the original stress test for these algorithms, and it remains a perfect, low-cost sandbox for benchmarking modern optimizers.</p>
<p>Whether you&rsquo;re training neural network potentials or benchmarking reinforcement learning agents for exploration, the Müller-Brown potential offers a fast, noise-free, and mathematically exact environment.</p>
<p>In this guide, we&rsquo;ll implement it in PyTorch, work through the engineering trade-off between <strong>analytical derivatives</strong> and <strong>Autograd</strong>, and measure the roughly <strong>4x</strong> force-evaluation speedup of the compiled analytical kernel over the Autograd reference.</p>
<h2 id="the-problem-finding-saddle-points-in-the-1970s">The Problem: Finding Saddle Points in the 1970s</h2>
<p>In the 1970s, finding energy minima was straightforward: follow the gradient downhill. But finding transition states proved much more challenging. These saddle points are maxima along the reaction coordinate but minima in all other directions, like standing at the top of a mountain pass.</p>















<figure class="post-figure center ">
    <img src="/img/muller-brown/muller-brown-saddle.webp"
         alt="Diagram showing gradient descent getting stuck at a saddle point, where the surface curves up in one direction and down in another"
         title="Diagram showing gradient descent getting stuck at a saddle point, where the surface curves up in one direction and down in another"
         
         
         loading="lazy"
         class="post-image">
    
    <figcaption class="post-caption">The saddle point problem: standard gradient descent sees a minimum in one direction but a maximum in another. Modern optimizers like SGD and Adam face this same challenge in high-dimensional loss landscapes.</figcaption>
    
</figure>

<p>Standard first-order optimizers, whether 1970s simplex methods or modern SGD and Adam, are designed to minimize loss functions blindly. Point them at a saddle point, and they slide into the nearest valley. The gradients vanish or point in misleading directions. Specialized algorithms were needed to navigate this mixed landscape of ups and downs.</p>
<p>The computational reality made this worse. Early quantum chemistry programs like ATMOL and Gaussian made energy calculations possible, but each computation was expensive. Gradients required even more resources, and second derivatives were rarely computed.</p>
<p>This created a catch-22: sophisticated algorithms were needed to find saddle points, but researchers couldn&rsquo;t afford to test them on real molecular systems. Every calculation represented a major investment of time and computational resources.</p>
<h2 id="müller-and-browns-solution">Müller and Brown&rsquo;s Solution</h2>
<p>Müller and Brown&rsquo;s insight<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup> was to create a simple analytical test function that captured the essential difficulties of real chemical systems without the computational cost. Their potential offered three key advantages:</p>
<ul>
<li><strong>Negligible computational cost</strong> - Evaluate millions of points instantly</li>
<li><strong>Analytical derivatives</strong> - Exact gradients and Hessians available immediately</li>
<li><strong>Realistic challenges</strong> - Multiple minima, saddle points, and curved pathways</li>
</ul>
<p>The clever part was the deliberate design to break naive approaches. Early methods often assumed linear paths between reactants and products. The Müller-Brown potential has a curved minimum energy path that punishes this assumption. Try to take shortcuts, and algorithms climb over high-energy barriers.</p>
<h2 id="the-mathematical-foundation">The Mathematical Foundation</h2>
<p>The Müller-Brown potential combines four two-dimensional Gaussian functions:</p>
<p>$$V(x,y) = \sum_{k=1}^{4} A_k \exp\left[a_k(x-x_k^0)^2 + b_k(x-x_k^0)(y-y_k^0) + c_k(y-y_k^0)^2\right]$$</p>
<p>Each Gaussian contributes a different &ldquo;bump&rdquo; or &ldquo;well&rdquo; to the landscape. The parameters control amplitude ($A_k$), width, orientation, and center position.</p>
<h3 id="the-standard-parameters">The Standard Parameters</h3>
<p>The specific parameter values that define the canonical Müller-Brown surface are:</p>
<table>
	<thead>
			<tr>
					<th>k</th>
					<th>$A_k$</th>
					<th>$a_k$</th>
					<th>$b_k$</th>
					<th>$c_k$</th>
					<th>$x_k^0$</th>
					<th>$y_k^0$</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td>1</td>
					<td>-200</td>
					<td>-1</td>
					<td>0</td>
					<td>-10</td>
					<td>1</td>
					<td>0</td>
			</tr>
			<tr>
					<td>2</td>
					<td>-100</td>
					<td>-1</td>
					<td>0</td>
					<td>-10</td>
					<td>0</td>
					<td>0.5</td>
			</tr>
			<tr>
					<td>3</td>
					<td>-170</td>
					<td>-6.5</td>
					<td>11</td>
					<td>-6.5</td>
					<td>-0.5</td>
					<td>1.5</td>
			</tr>
			<tr>
					<td>4</td>
					<td>15</td>
					<td>0.7</td>
					<td>0.6</td>
					<td>0.7</td>
					<td>-1</td>
					<td>1</td>
			</tr>
	</tbody>
</table>
<p>Notice that the first three terms have negative amplitudes (creating energy wells), while the fourth has a positive amplitude (creating a barrier). The cross-term $b_k$ in the third Gaussian creates the tilted orientation that gives the surface its characteristic curved pathways.</p>
<p><a href="/muller-brown-optimized/"><strong>View Interactive Müller-Brown Potential Energy Surface →</strong></a></p>
<h3 id="the-resulting-landscape">The Resulting Landscape</h3>















<figure class="post-figure center ">
    <img src="/img/muller-brown/muller-brown-potential-surface.webp"
         alt="Müller-Brown Potential Energy Surface showing the three minima (dark blue regions) and two saddle points"
         title="Müller-Brown Potential Energy Surface showing the three minima (dark blue regions) and two saddle points"
         
         
         loading="lazy"
         class="post-image">
    
    <figcaption class="post-caption">The Müller-Brown potential energy surface showing the three minima (dark blue regions) and two saddle points.</figcaption>
    
</figure>

<p>This simple formula creates a surprisingly rich topography with exactly the features needed to challenge optimization algorithms:</p>
<table>
	<thead>
			<tr>
					<th><strong>Stationary Point</strong></th>
					<th><strong>Coordinates</strong></th>
					<th><strong>Energy</strong></th>
					<th><strong>Type</strong></th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td>MA (Reactant)</td>
					<td>(-0.558, 1.442)</td>
					<td>-146.70</td>
					<td>Deep minimum</td>
			</tr>
			<tr>
					<td>MC (Intermediate)</td>
					<td>(-0.050, 0.467)</td>
					<td>-80.77</td>
					<td>Shallow minimum</td>
			</tr>
			<tr>
					<td>MB (Product)</td>
					<td>(0.623, 0.028)</td>
					<td>-108.17</td>
					<td>Medium minimum</td>
			</tr>
			<tr>
					<td>S1</td>
					<td>(-0.822, 0.624)</td>
					<td>-40.66</td>
					<td>First saddle point</td>
			</tr>
			<tr>
					<td>S2</td>
					<td>(0.212, 0.293)</td>
					<td>-72.25</td>
					<td>Second saddle point</td>
			</tr>
	</tbody>
</table>
<h3 id="the-key-challenge-curved-pathways">The Key Challenge: Curved Pathways</h3>
<p>The path from the deep reactant minimum (MA) to the product minimum (MB) doesn&rsquo;t go directly over a single barrier. Instead, it follows a curved route:</p>
<ol>
<li><strong>MA → S1 → MC</strong>: First transition over the higher, rate-limiting barrier (S1) into an intermediate basin</li>
<li><strong>MC → S2 → MB</strong>: Second transition over a much lower barrier (S2) to the product</li>
</ol>
<p>This two-step pathway breaks linear interpolation methods. Algorithms that draw a straight line from reactant to product miss both the intermediate minimum and the correct transition states, climbing over much higher energy regions instead.</p>















<figure class="post-figure center ">
    <img src="/img/muller-brown/naive-versus-minimum-path.webp"
         alt="Two-panel comparison showing naive linear interpolation versus minimum energy path. Left panel shows the contour map with both paths overlaid. Right panel shows the energy profile along each path, revealing the naive path hits a far higher barrier."
         title="Two-panel comparison showing naive linear interpolation versus minimum energy path. Left panel shows the contour map with both paths overlaid. Right panel shows the energy profile along each path, revealing the naive path hits a far higher barrier."
         
         
         loading="lazy"
         class="post-image">
    
    <figcaption class="post-caption">Why naive optimization fails: The left panel shows a straight-line path (red dashed) versus the true minimum energy path (green solid) on the potential surface. The right panel reveals the energetic cost. The naive path climbs a barrier roughly 53 reduced units higher that the curved path avoids entirely. This is the &lsquo;adversarial&rsquo; nature of the Müller-Brown surface.</figcaption>
    
</figure>

<p>The energy profile comparison makes the failure mode concrete. A naive optimizer following the red dashed path would encounter a barrier roughly <strong>53 reduced units higher</strong> than necessary (the naive summit sits at about +13 while the true path tops out near -41, the S1 saddle). The green minimum energy path navigates through the valleys, passing through the intermediate basin MC and crossing only the low-lying saddle points S1 and S2.</p>
<h2 id="why-it-works-as-a-benchmark">Why It Works as a Benchmark</h2>
<p>The Müller-Brown potential has served as a computational chemistry benchmark for over four decades because of four key characteristics:</p>
<p><strong>Low dimensionality</strong>: As a 2D surface, you can visualize the entire landscape and see exactly why algorithms succeed or fail.</p>
<p><strong>Analytical form</strong>: Energy and gradient calculations cost virtually nothing, enabling exhaustive testing impossible with quantum mechanical surfaces.</p>
<p><strong>Non-trivial topology</strong>: The curved minimum energy path and shallow intermediate minimum challenge sophisticated methods while remaining manageable.</p>
<p><strong>Known ground truth</strong>: All minima and saddle points are precisely known, providing unambiguous success metrics.</p>















<figure class="post-figure center ">
    <img src="/img/muller-brown/muller-brown-basins-of-attraction.webp"
         alt="Basins of attraction map showing which regions of the Müller-Brown surface lead to each minimum under gradient descent. Blue region flows to MA, green to MC, and yellow to MB."
         title="Basins of attraction map showing which regions of the Müller-Brown surface lead to each minimum under gradient descent. Blue region flows to MA, green to MC, and yellow to MB."
         
         
         loading="lazy"
         class="post-image">
    
    <figcaption class="post-caption">Basins of attraction: the &lsquo;optimization map&rsquo; of the Müller-Brown surface. Each color indicates which minimum a gradient descent optimizer will reach from that starting point. Saddle points (red x) sit precisely at the basin boundaries, the unstable equilibria that algorithms must navigate to find reaction paths.</figcaption>
    
</figure>

<p>This basin map reveals why the Müller-Brown potential is such an effective benchmark. Standard gradient descent from any point in the blue region inevitably falls into the deep MA minimum; from yellow, into MB. The saddle points S1 and S2 lie exactly on the boundaries between basins, infinitesimally perturbing an optimizer at these points sends it tumbling into different valleys. Finding these saddle points requires algorithms that identify and stabilize at these boundary regions.</p>
<p>What makes this particularly valuable is the contrast with other classic potentials. While the Lennard-Jones potential<sup id="fnref:2"><a href="#fn:2" class="footnote-ref" role="doc-noteref">2</a></sup> serves as the benchmark for equilibrium properties with its single energy minimum, Müller-Brown explicitly models reactive landscapes. Its multiple minima and connecting barriers make it the testing ground for algorithms that find reaction paths, the methods that reveal how chemistry actually happens.</p>
<h3 id="applications-across-decades">Applications Across Decades</h3>
<p>The potential has evolved with the field&rsquo;s changing focus:</p>
<p><strong>1980s-1990s</strong>: Testing path-finding methods like Nudged Elastic Band (NEB)<sup id="fnref:3"><a href="#fn:3" class="footnote-ref" role="doc-noteref">3</a></sup>, which creates discrete representations of reaction pathways and optimizes them to find minimum energy paths.</p>
<p><strong>2000s-2010s</strong>: Validating Transition Path Sampling (TPS) methods<sup id="fnref:4"><a href="#fn:4" class="footnote-ref" role="doc-noteref">4</a></sup> that harvest statistical ensembles of reactive trajectories.</p>
<p><strong>2020s</strong>: Benchmarking machine learning models and generative approaches that learn to sample transition paths or approximate potential energy surfaces.</p>
<h2 id="modern-applications-in-machine-learning">Modern Applications in Machine Learning</h2>
<p>The rise of machine learning has given the Müller-Brown potential renewed purpose. Modern <strong>Machine Learning Interatomic Potentials (MLIPs)</strong><sup id="fnref:5"><a href="#fn:5" class="footnote-ref" role="doc-noteref">5</a></sup><sup id="fnref:6"><a href="#fn:6" class="footnote-ref" role="doc-noteref">6</a></sup> aim to bridge the gap between quantum mechanical accuracy and classical force field efficiency by training flexible models on expensive quantum chemistry data.</p>
<p>This creates a benchmarking challenge: with countless ML architectures available, how do you objectively compare them? The Müller-Brown potential provides an ideal solution, an exactly known potential energy surface that can generate unlimited, noise-free training data.</p>
<p>This enables researchers to ask fundamental questions:</p>
<ul>
<li>How well does a given architecture learn complex, curved surfaces?</li>
<li>How many training points are needed for acceptable accuracy?</li>
<li>How does the model behave when extrapolating beyond training data?</li>
<li>Can it correctly identify minima and saddle points?</li>
</ul>















<figure class="post-figure center ">
    <img src="/img/muller-brown/muller-brown-ml-benchmark.webp"
         alt="Three-panel comparison showing the analytical Müller-Brown surface (left), a neural network at epoch 50 with high error (middle), and a converged neural network at epoch 1000 (right)"
         title="Three-panel comparison showing the analytical Müller-Brown surface (left), a neural network at epoch 50 with high error (middle), and a converged neural network at epoch 1000 (right)"
         
         
         loading="lazy"
         class="post-image">
    
    <figcaption class="post-caption">Visualizing the ML benchmark: A comparison of the analytical ground truth (left) versus a neural network potential at early (middle) and late (right) stages of training. Notice how the model in early training quickly grasps the deep minima regions but struggles significantly with the complex topography of the saddle points and energy barriers: the curved pathways are smoothed into simpler shapes. This illustrates why the Müller-Brown surface remains a challenging test case for modern architectures.</figcaption>
    
</figure>

<p>The potential has evolved from a simple model system into a <strong>reference benchmark</strong>: a fixed, exactly-known surface against which AI learning capacity is measured. Any prediction error is due to model limitations, not data quality.</p>
<p>Beyond static benchmarking, a PyTorch implementation enables <strong>differentiable simulation</strong>. Because the potential, forces, and integrator are all differentiable tensor operations, gradients can be backpropagated <em>through time</em> (via the trajectory) to optimize force field parameters or control policies directly. This capability connects classical molecular simulation to modern gradient-based machine learning in a single computational graph.</p>
<p>These benchmarking principles extend beyond abstract test cases. Real molecular dynamics simulations, such as those studying <a href="/posts/adatom-cu-diffusion/">adatom diffusion on metal surfaces</a>, face similar challenges in understanding energy landscapes and transition pathways. The Müller-Brown potential provides a controlled environment for developing methods that eventually tackle these complex realistic systems.</p>
<h2 id="extension-to-higher-dimensions">Extension to Higher Dimensions</h2>
<p>The canonical Müller-Brown potential can be extended beyond two dimensions to create more challenging test cases that better reflect real molecular systems. This extensibility demonstrates why it remains such an effective template for computational method development.</p>
<h3 id="why-higher-dimensions-matter">Why Higher Dimensions Matter</h3>
<p>Real molecules have dozens or hundreds of degrees of freedom. Understanding how algorithms scale with dimensionality is crucial for practical applications. Higher-dimensional extensions allow researchers to systematically test:</p>
<ul>
<li><strong>Algorithm scaling</strong> - Does performance degrade gracefully as dimensions increase?</li>
<li><strong>Model robustness</strong> - Do machine learning approaches maintain accuracy in high-dimensional spaces?</li>
<li><strong>Parallel efficiency</strong> - Can massively parallel methods exploit additional dimensions effectively?</li>
</ul>
<h3 id="extension-approaches">Extension Approaches</h3>
<p><strong>Harmonic constraints</strong>: Add quadratic wells in orthogonal dimensions while preserving the complex 2D landscape<sup id="fnref:7"><a href="#fn:7" class="footnote-ref" role="doc-noteref">7</a></sup>:</p>
<p>$$V_{5D}(x_1, x_2, x_3, x_4, x_5) = V(x_1, x_3) + \kappa(x_2^2 + x_4^2 + x_5^2)$$</p>
<p>The parameter $\kappa$ controls constraint strength: small values create nearly flat directions that test algorithmic efficiency.</p>
<p><strong>Collective variables</strong>: Define new coordinates that mix multiple dimensions<sup id="fnref:8"><a href="#fn:8" class="footnote-ref" role="doc-noteref">8</a></sup>:</p>
<p>$$\tilde{x} = \sqrt{x_1^2 + x_2^2 + \epsilon x_5^2},\quad \tilde{y} = \sqrt{x_3^2 + x_4^2}$$</p>
<p>where $\epsilon \ll 1$. The 5D potential becomes $V_{5D}(\tilde{x}, \tilde{y}) = V(\tilde{x}, \tilde{y})$, embedding the original surface in a higher-dimensional space.</p>
<h3 id="value-for-algorithm-development">Value for Algorithm Development</h3>
<p>This extensibility makes the Müller-Brown potential ideal for systematic testing:</p>
<ul>
<li><strong>Progressive complexity</strong>: Debug on 2D, then scale to higher dimensions</li>
<li><strong>Ground truth preservation</strong>: Known minima and saddle points remain in the active subspace</li>
<li><strong>Realistic challenges</strong>: Captures the &ldquo;needle in a haystack&rdquo; problem of transition state finding while maintaining analytical tractability</li>
</ul>
<p>These extensions transform a simple 2D benchmark into a scalable testbed for modern computational methods, probing specific challenges in high-dimensional optimization.</p>
<h2 id="implementation-in-pytorch">Implementation in PyTorch</h2>
<p>Now let&rsquo;s implement the Müller-Brown potential in PyTorch. A practical implementation needs to handle batch processing, support both analytical and automatic differentiation, and be optimized for performance.</p>
<h3 id="core-implementation">Core Implementation</h3>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-python" data-lang="python"><span style="display:flex;"><span><span style="color:#f92672">import</span> torch
</span></span><span style="display:flex;"><span><span style="color:#f92672">import</span> torch.nn <span style="color:#66d9ef">as</span> nn
</span></span><span style="display:flex;"><span><span style="color:#f92672">from</span> torch <span style="color:#f92672">import</span> Tensor
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">class</span> <span style="color:#a6e22e">MuellerBrownPotential</span>(nn<span style="color:#f92672">.</span>Module):
</span></span><span style="display:flex;"><span>    <span style="color:#e6db74">&#34;&#34;&#34;Müller-Brown potential with a torch.compile-accelerated force kernel.&#34;&#34;&#34;</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">def</span> <span style="color:#a6e22e">__init__</span>(
</span></span><span style="display:flex;"><span>        self,
</span></span><span style="display:flex;"><span>        device: str <span style="color:#f92672">|</span> torch<span style="color:#f92672">.</span>device <span style="color:#f92672">=</span> <span style="color:#e6db74">&#34;cpu&#34;</span>,
</span></span><span style="display:flex;"><span>        dtype: torch<span style="color:#f92672">.</span>dtype <span style="color:#f92672">=</span> torch<span style="color:#f92672">.</span>float64,
</span></span><span style="display:flex;"><span>        use_autograd: bool <span style="color:#f92672">=</span> <span style="color:#66d9ef">False</span>
</span></span><span style="display:flex;"><span>    ):
</span></span><span style="display:flex;"><span>        super()<span style="color:#f92672">.</span><span style="color:#a6e22e">__init__</span>()
</span></span><span style="display:flex;"><span>        self<span style="color:#f92672">.</span>use_autograd <span style="color:#f92672">=</span> use_autograd
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>        <span style="color:#75715e"># Standard Müller-Brown parameters</span>
</span></span><span style="display:flex;"><span>        self<span style="color:#f92672">.</span>register_buffer(
</span></span><span style="display:flex;"><span>            <span style="color:#e6db74">&#34;A&#34;</span>, torch<span style="color:#f92672">.</span>tensor([<span style="color:#f92672">-</span><span style="color:#ae81ff">200.0</span>, <span style="color:#f92672">-</span><span style="color:#ae81ff">100.0</span>, <span style="color:#f92672">-</span><span style="color:#ae81ff">170.0</span>, <span style="color:#ae81ff">15.0</span>],
</span></span><span style="display:flex;"><span>                             device<span style="color:#f92672">=</span>device, dtype<span style="color:#f92672">=</span>dtype)
</span></span><span style="display:flex;"><span>        )
</span></span><span style="display:flex;"><span>        self<span style="color:#f92672">.</span>register_buffer(
</span></span><span style="display:flex;"><span>            <span style="color:#e6db74">&#34;a&#34;</span>, torch<span style="color:#f92672">.</span>tensor([<span style="color:#f92672">-</span><span style="color:#ae81ff">1.0</span>, <span style="color:#f92672">-</span><span style="color:#ae81ff">1.0</span>, <span style="color:#f92672">-</span><span style="color:#ae81ff">6.5</span>, <span style="color:#ae81ff">0.7</span>],
</span></span><span style="display:flex;"><span>                             device<span style="color:#f92672">=</span>device, dtype<span style="color:#f92672">=</span>dtype)
</span></span><span style="display:flex;"><span>        )
</span></span><span style="display:flex;"><span>        self<span style="color:#f92672">.</span>register_buffer(
</span></span><span style="display:flex;"><span>            <span style="color:#e6db74">&#34;b&#34;</span>, torch<span style="color:#f92672">.</span>tensor([<span style="color:#ae81ff">0.0</span>, <span style="color:#ae81ff">0.0</span>, <span style="color:#ae81ff">11.0</span>, <span style="color:#ae81ff">0.6</span>],
</span></span><span style="display:flex;"><span>                             device<span style="color:#f92672">=</span>device, dtype<span style="color:#f92672">=</span>dtype)
</span></span><span style="display:flex;"><span>        )
</span></span><span style="display:flex;"><span>        self<span style="color:#f92672">.</span>register_buffer(
</span></span><span style="display:flex;"><span>            <span style="color:#e6db74">&#34;c&#34;</span>, torch<span style="color:#f92672">.</span>tensor([<span style="color:#f92672">-</span><span style="color:#ae81ff">10.0</span>, <span style="color:#f92672">-</span><span style="color:#ae81ff">10.0</span>, <span style="color:#f92672">-</span><span style="color:#ae81ff">6.5</span>, <span style="color:#ae81ff">0.7</span>],
</span></span><span style="display:flex;"><span>                             device<span style="color:#f92672">=</span>device, dtype<span style="color:#f92672">=</span>dtype)
</span></span><span style="display:flex;"><span>        )
</span></span><span style="display:flex;"><span>        self<span style="color:#f92672">.</span>register_buffer(
</span></span><span style="display:flex;"><span>            <span style="color:#e6db74">&#34;x_centers&#34;</span>, torch<span style="color:#f92672">.</span>tensor([<span style="color:#ae81ff">1.0</span>, <span style="color:#ae81ff">0.0</span>, <span style="color:#f92672">-</span><span style="color:#ae81ff">0.5</span>, <span style="color:#f92672">-</span><span style="color:#ae81ff">1.0</span>],
</span></span><span style="display:flex;"><span>                                    device<span style="color:#f92672">=</span>device, dtype<span style="color:#f92672">=</span>dtype)
</span></span><span style="display:flex;"><span>        )
</span></span><span style="display:flex;"><span>        self<span style="color:#f92672">.</span>register_buffer(
</span></span><span style="display:flex;"><span>            <span style="color:#e6db74">&#34;y_centers&#34;</span>, torch<span style="color:#f92672">.</span>tensor([<span style="color:#ae81ff">0.0</span>, <span style="color:#ae81ff">0.5</span>, <span style="color:#ae81ff">1.5</span>, <span style="color:#ae81ff">1.0</span>],
</span></span><span style="display:flex;"><span>                                    device<span style="color:#f92672">=</span>device, dtype<span style="color:#f92672">=</span>dtype)
</span></span><span style="display:flex;"><span>        )
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">def</span> <span style="color:#a6e22e">forward</span>(self, coordinates: Tensor) <span style="color:#f92672">-&gt;</span> Tensor:
</span></span><span style="display:flex;"><span>        <span style="color:#e6db74">&#34;&#34;&#34;Compute potential energy.&#34;&#34;&#34;</span>
</span></span><span style="display:flex;"><span>        <span style="color:#66d9ef">return</span> _calculate_potential(
</span></span><span style="display:flex;"><span>            coordinates, self<span style="color:#f92672">.</span>A, self<span style="color:#f92672">.</span>a, self<span style="color:#f92672">.</span>b, self<span style="color:#f92672">.</span>c,
</span></span><span style="display:flex;"><span>            self<span style="color:#f92672">.</span>x_centers, self<span style="color:#f92672">.</span>y_centers
</span></span><span style="display:flex;"><span>        )
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">def</span> <span style="color:#a6e22e">force</span>(self, coordinates: Tensor) <span style="color:#f92672">-&gt;</span> Tensor:
</span></span><span style="display:flex;"><span>        <span style="color:#e6db74">&#34;&#34;&#34;Compute forces (negative gradient).&#34;&#34;&#34;</span>
</span></span><span style="display:flex;"><span>        <span style="color:#66d9ef">if</span> self<span style="color:#f92672">.</span>use_autograd:
</span></span><span style="display:flex;"><span>            coordinates <span style="color:#f92672">=</span> coordinates<span style="color:#f92672">.</span>requires_grad_(<span style="color:#66d9ef">True</span>)
</span></span><span style="display:flex;"><span>            potential <span style="color:#f92672">=</span> self<span style="color:#f92672">.</span>forward(coordinates)
</span></span><span style="display:flex;"><span>            grad <span style="color:#f92672">=</span> torch<span style="color:#f92672">.</span>autograd<span style="color:#f92672">.</span>grad(potential<span style="color:#f92672">.</span>sum(), coordinates)[<span style="color:#ae81ff">0</span>]
</span></span><span style="display:flex;"><span>            <span style="color:#66d9ef">return</span> <span style="color:#f92672">-</span>grad
</span></span><span style="display:flex;"><span>        <span style="color:#66d9ef">else</span>:
</span></span><span style="display:flex;"><span>            <span style="color:#66d9ef">return</span> _calculate_force(
</span></span><span style="display:flex;"><span>                coordinates, self<span style="color:#f92672">.</span>A, self<span style="color:#f92672">.</span>a, self<span style="color:#f92672">.</span>b, self<span style="color:#f92672">.</span>c,
</span></span><span style="display:flex;"><span>                self<span style="color:#f92672">.</span>x_centers, self<span style="color:#f92672">.</span>y_centers
</span></span><span style="display:flex;"><span>            )
</span></span></code></pre></div><p>The implementation uses <code>register_buffer</code> to store parameters, a subtle but important PyTorch best practice. This ensures that the potential parameters are automatically moved to the GPU along with the model when calling <code>.to(device)</code>, a common pitfall that leads to frustrating device mismatch errors. Beyond device placement, <code>register_buffer</code> also ensures these parameters are correctly handled during <strong>DistributedDataParallel (DDP)</strong> broadcasting, preventing silent failures when scaling training to multi-GPU clusters. The <code>use_autograd</code> flag switches between analytical and automatic differentiation.</p>
<h3 id="compiling-the-force-kernel">Compiling the Force Kernel</h3>
<p>Two decisions make the force path fast while keeping the rest flexible:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-python" data-lang="python"><span style="display:flex;"><span><span style="color:#66d9ef">def</span> <span style="color:#a6e22e">_calculate_potential</span>(coordinates: Tensor, A: Tensor, a: Tensor,
</span></span><span style="display:flex;"><span>                        b: Tensor, c: Tensor, x_centers: Tensor,
</span></span><span style="display:flex;"><span>                        y_centers: Tensor) <span style="color:#f92672">-&gt;</span> Tensor:
</span></span><span style="display:flex;"><span>    <span style="color:#e6db74">&#34;&#34;&#34;Energy. Left eager (uncompiled) so autograd second derivatives,
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">    e.g. the Hessian, keep working: torch.compile does not support
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">    double-backward, and energy is computed per save, not per step.&#34;&#34;&#34;</span>
</span></span><span style="display:flex;"><span>    coords <span style="color:#f92672">=</span> coordinates<span style="color:#f92672">.</span>view(<span style="color:#f92672">-</span><span style="color:#ae81ff">1</span>, <span style="color:#ae81ff">2</span>)
</span></span><span style="display:flex;"><span>    x, y <span style="color:#f92672">=</span> coords[:, <span style="color:#ae81ff">0</span>], coords[:, <span style="color:#ae81ff">1</span>]
</span></span><span style="display:flex;"><span>    dx <span style="color:#f92672">=</span> x<span style="color:#f92672">.</span>unsqueeze(<span style="color:#f92672">-</span><span style="color:#ae81ff">1</span>) <span style="color:#f92672">-</span> x_centers
</span></span><span style="display:flex;"><span>    dy <span style="color:#f92672">=</span> y<span style="color:#f92672">.</span>unsqueeze(<span style="color:#f92672">-</span><span style="color:#ae81ff">1</span>) <span style="color:#f92672">-</span> y_centers
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>    potential <span style="color:#f92672">=</span> torch<span style="color:#f92672">.</span>sum(
</span></span><span style="display:flex;"><span>        A <span style="color:#f92672">*</span> torch<span style="color:#f92672">.</span>exp(a <span style="color:#f92672">*</span> dx<span style="color:#f92672">**</span><span style="color:#ae81ff">2</span> <span style="color:#f92672">+</span> b <span style="color:#f92672">*</span> dx <span style="color:#f92672">*</span> dy <span style="color:#f92672">+</span> c <span style="color:#f92672">*</span> dy<span style="color:#f92672">**</span><span style="color:#ae81ff">2</span>),
</span></span><span style="display:flex;"><span>        dim<span style="color:#f92672">=-</span><span style="color:#ae81ff">1</span>
</span></span><span style="display:flex;"><span>    )
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">return</span> potential<span style="color:#f92672">.</span>view(coordinates<span style="color:#f92672">.</span>shape[:<span style="color:#f92672">-</span><span style="color:#ae81ff">1</span>])
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">@torch.compile</span>(dynamic<span style="color:#f92672">=</span><span style="color:#66d9ef">True</span>)
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">def</span> <span style="color:#a6e22e">_calculate_force</span>(coordinates: Tensor, A: Tensor, a: Tensor,
</span></span><span style="display:flex;"><span>                    b: Tensor, c: Tensor, x_centers: Tensor,
</span></span><span style="display:flex;"><span>                    y_centers: Tensor) <span style="color:#f92672">-&gt;</span> Tensor:
</span></span><span style="display:flex;"><span>    <span style="color:#e6db74">&#34;&#34;&#34;Forces (negative gradient). Compiled: this is the hot path,
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">    called once per simulation step.&#34;&#34;&#34;</span>
</span></span><span style="display:flex;"><span>    coords <span style="color:#f92672">=</span> coordinates<span style="color:#f92672">.</span>view(<span style="color:#f92672">-</span><span style="color:#ae81ff">1</span>, <span style="color:#ae81ff">2</span>)
</span></span><span style="display:flex;"><span>    x, y <span style="color:#f92672">=</span> coords[:, <span style="color:#ae81ff">0</span>], coords[:, <span style="color:#ae81ff">1</span>]
</span></span><span style="display:flex;"><span>    dx <span style="color:#f92672">=</span> x<span style="color:#f92672">.</span>unsqueeze(<span style="color:#f92672">-</span><span style="color:#ae81ff">1</span>) <span style="color:#f92672">-</span> x_centers
</span></span><span style="display:flex;"><span>    dy <span style="color:#f92672">=</span> y<span style="color:#f92672">.</span>unsqueeze(<span style="color:#f92672">-</span><span style="color:#ae81ff">1</span>) <span style="color:#f92672">-</span> y_centers
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>    exp_terms <span style="color:#f92672">=</span> torch<span style="color:#f92672">.</span>exp(a <span style="color:#f92672">*</span> dx<span style="color:#f92672">**</span><span style="color:#ae81ff">2</span> <span style="color:#f92672">+</span> b <span style="color:#f92672">*</span> dx <span style="color:#f92672">*</span> dy <span style="color:#f92672">+</span> c <span style="color:#f92672">*</span> dy<span style="color:#f92672">**</span><span style="color:#ae81ff">2</span>)
</span></span><span style="display:flex;"><span>    A_exp <span style="color:#f92672">=</span> A <span style="color:#f92672">*</span> exp_terms
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>    grad_x <span style="color:#f92672">=</span> torch<span style="color:#f92672">.</span>sum(A_exp <span style="color:#f92672">*</span> (<span style="color:#ae81ff">2</span> <span style="color:#f92672">*</span> a <span style="color:#f92672">*</span> dx <span style="color:#f92672">+</span> b <span style="color:#f92672">*</span> dy), dim<span style="color:#f92672">=-</span><span style="color:#ae81ff">1</span>)
</span></span><span style="display:flex;"><span>    grad_y <span style="color:#f92672">=</span> torch<span style="color:#f92672">.</span>sum(A_exp <span style="color:#f92672">*</span> (b <span style="color:#f92672">*</span> dx <span style="color:#f92672">+</span> <span style="color:#ae81ff">2</span> <span style="color:#f92672">*</span> c <span style="color:#f92672">*</span> dy), dim<span style="color:#f92672">=-</span><span style="color:#ae81ff">1</span>)
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span>    forces <span style="color:#f92672">=</span> torch<span style="color:#f92672">.</span>stack([<span style="color:#f92672">-</span>grad_x, <span style="color:#f92672">-</span>grad_y], dim<span style="color:#f92672">=-</span><span style="color:#ae81ff">1</span>)
</span></span><span style="display:flex;"><span>    new_shape <span style="color:#f92672">=</span> list(coordinates<span style="color:#f92672">.</span>shape[:<span style="color:#f92672">-</span><span style="color:#ae81ff">1</span>]) <span style="color:#f92672">+</span> [<span style="color:#ae81ff">2</span>]
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">return</span> forces<span style="color:#f92672">.</span>view(new_shape)
</span></span></code></pre></div><p>The force kernel is decorated with <code>@torch.compile(dynamic=True)</code>, which traces it once and hands it to TorchInductor to fuse the pointwise operations (the exponentials and polynomial terms) and cut Python&rsquo;s dispatch overhead in the inner loop that runs millions of times per simulation. The <code>dynamic=True</code> flag keeps a single compiled trace valid across particle counts, so changing the batch size does not trigger a recompile. The energy is left eager on purpose: <code>torch.compile</code> does not support double-backward, so leaving <code>forward</code> uncompiled keeps autograd second derivatives (the Hessian) available, and since the energy is only evaluated when an observable is saved, it is not on the hot path anyway.</p>
<h3 id="performance-analytical-vs-automatic-differentiation">Performance: Analytical vs. Automatic Differentiation</h3>
<p>A key design decision is whether to use analytical derivatives or automatic differentiation. I benchmarked both on an Apple M1 Max (CPU, PyTorch 2.x). To get a stable measurement, each configuration runs 100 warm-up iterations, then the median wall-clock time over 5 runs of 1000 iterations, which filters out operating-system jitter.</p>















<figure class="post-figure center ">
    <img src="/img/muller-brown/muller-brown-throughput-analysis.webp"
         alt="Throughput comparison showing the analytical force kernel outperforming autograd across batch sizes"
         title="Throughput comparison showing the analytical force kernel outperforming autograd across batch sizes"
         
         
         loading="lazy"
         class="post-image">
    
    <figcaption class="post-caption">Force-evaluation throughput, analytical vs autograd, across batch sizes. The analytical kernel is about 4x faster (3-7x depending on batch size).</figcaption>
    
</figure>
















<figure class="post-figure center ">
    <img src="/img/muller-brown/muller-brown-time-per-particle.webp"
         alt="Per-particle computation time showing analytical derivatives maintain sub-microsecond performance for large systems"
         title="Per-particle computation time showing analytical derivatives maintain sub-microsecond performance for large systems"
         
         
         loading="lazy"
         class="post-image">
    
    <figcaption class="post-caption">Per-particle computation time. Analytical derivatives maintain sub-microsecond performance for large systems.</figcaption>
    
</figure>

<p>The speedup comes from bypassing the computational graph that PyTorch&rsquo;s Autograd engine builds. By deriving the analytical Jacobian, we skip that machinery entirely. Every <code>autograd.grad()</code> call must:</p>
<ol>
<li><strong>Build a tape</strong> of operations during the forward pass</li>
<li><strong>Traverse the graph</strong> backward to compute gradients</li>
<li><strong>Allocate intermediate tensors</strong> for each node</li>
</ol>
<p>For iterative workloads like molecular dynamics (millions of force evaluations per trajectory), this overhead elimination is critical. The analytical kernel computes forces directly in a single fused operation, no graph, no tape, no intermediate allocations.</p>
<p><strong>When to use each approach:</strong></p>
<ul>
<li><strong>Analytical</strong>: Best for production molecular dynamics where forces are computed millions of times. The speedup directly reduces wall-clock simulation time.</li>
<li><strong>Autograd</strong>: Better for prototyping, machine learning training loops, or when implementing new potentials where correctness verification is paramount. The convenience and guaranteed accuracy often outweigh performance costs during development.</li>
</ul>
<h3 id="molecular-dynamics-simulations">Molecular Dynamics Simulations</h3>
<p>To demonstrate the PyTorch implementation in action, I performed Langevin dynamics simulations in different energy basins. These simulations reveal how particles behave when confined to different regions of the potential energy surface.</p>
<h4 id="simulation-parameters">Simulation Parameters</h4>
<p>I ran 3600 time steps with a 0.01 time unit step size, using a friction coefficient of 1.0 and temperature of 25.0 in reduced units. The simulations started from equilibrium positions within each basin and show the characteristic thermal fluctuations around local minima.</p>
<h4 id="basin-ma-deep-reactant-minimum">Basin MA: Deep Reactant Minimum</h4>
<p>The deepest energy well (-146.70 in reduced units) shows highly constrained motion due to the steep energy barriers surrounding it.</p>















<figure class="post-figure center ">
    <img src="/img/muller-brown/muller-brown-basin-ma-position-distributions.webp"
         alt="Position distributions in Basin MA showing tight confinement"
         title="Position distributions in Basin MA showing tight confinement"
         
         
         loading="lazy"
         class="post-image">
    
    <figcaption class="post-caption">Position distributions in Basin MA. The particle remains tightly confined around (-0.558, 1.442) due to the deep potential well.</figcaption>
    
</figure>
















<figure class="post-figure center ">
    <img src="/img/muller-brown/muller-brown-basin-ma-time-series.webp"
         alt="Time evolution of coordinates in Basin MA"
         title="Time evolution of coordinates in Basin MA"
         
         
         loading="lazy"
         class="post-image">
    
    <figcaption class="post-caption">Time series showing small-amplitude oscillations around the equilibrium position. The deep well severely restricts thermal motion.</figcaption>
    
</figure>
















<figure class="post-figure center ">
    <img src="/img/muller-brown/muller-brown-basin-ma-trajectory.webp"
         alt="Trajectory overlaid on potential surface for Basin MA"
         title="Trajectory overlaid on potential surface for Basin MA"
         
         
         loading="lazy"
         class="post-image">
    
    <figcaption class="post-caption">Trajectory visualization showing the particle&rsquo;s motion confined to a small region around the minimum. High energy barriers prevent escape on this time scale.</figcaption>
    
</figure>

<div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;">
			<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube-nocookie.com/embed/woVM90qXUQs?autoplay=0&amp;controls=1&amp;end=0&amp;loop=0&amp;mute=0&amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"></iframe>
		</div>

<h4 id="basin-mb-product-minimum">Basin MB: Product Minimum</h4>
<p>The product minimum (-108.17 in reduced units) shows intermediate behavior between the deep reactant well and shallow intermediate basin.</p>















<figure class="post-figure center ">
    <img src="/img/muller-brown/muller-brown-basin-mb-position-distributions.webp"
         alt="Position distributions in Basin MB showing moderate confinement"
         title="Position distributions in Basin MB showing moderate confinement"
         
         
         loading="lazy"
         class="post-image">
    
    <figcaption class="post-caption">Position distributions in Basin MB. The particle shows moderate thermal motion around (0.623, 0.028), with confinement between the deep MA basin and shallow MC basin.</figcaption>
    
</figure>
















<figure class="post-figure center ">
    <img src="/img/muller-brown/muller-brown-basin-mb-time-series.webp"
         alt="Time evolution showing moderate amplitude fluctuations in Basin MB"
         title="Time evolution showing moderate amplitude fluctuations in Basin MB"
         
         
         loading="lazy"
         class="post-image">
    
    <figcaption class="post-caption">Time series demonstrating moderate amplitude fluctuations. The particle explores a region larger than MA but more constrained than the shallow MC basin.</figcaption>
    
</figure>
















<figure class="post-figure center ">
    <img src="/img/muller-brown/muller-brown-basin-mb-trajectory.webp"
         alt="Basin MB trajectory showing balanced exploration"
         title="Basin MB trajectory showing balanced exploration"
         
         
         loading="lazy"
         class="post-image">
    
    <figcaption class="post-caption">The trajectory shows balanced thermal exploration within the product basin. The moderate well depth allows reasonable sampling while maintaining basin confinement.</figcaption>
    
</figure>

<div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;">
			<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube-nocookie.com/embed/gdAHme07bGs?autoplay=0&amp;controls=1&amp;end=0&amp;loop=0&amp;mute=0&amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"></iframe>
		</div>

<h4 id="transition-example">Transition Example</h4>
<p>Running a longer simulation demonstrates transitions between basins:</p>















<figure class="post-figure center ">
    <img src="/img/muller-brown/muller-brown-transition-trajectory.webp"
         alt="Transition trajectory between basins"
         title="Transition trajectory between basins"
         
         
         loading="lazy"
         class="post-image">
    
    <figcaption class="post-caption">The trajectory illustrates the particle&rsquo;s movement between the different basins, highlighting the energy barriers and pathways involved.</figcaption>
    
</figure>
















<figure class="post-figure center ">
    <img src="/img/muller-brown/muller-brown-transition-time-series.webp"
         alt="Time evolution of positions during transition"
         title="Time evolution of positions during transition"
         
         
         loading="lazy"
         class="post-image">
    
    <figcaption class="post-caption">Time series showing the evolution of the particle&rsquo;s position during the transition between basins.</figcaption>
    
</figure>
















<figure class="post-figure center ">
    <img src="/img/muller-brown/muller-brown-transition-position-distributions.webp"
         alt="Transition trajectory on potential surface"
         title="Transition trajectory on potential surface"
         
         
         loading="lazy"
         class="post-image">
    
    <figcaption class="post-caption">The trajectory on the potential surface highlights the energy landscape the particle navigates during the transition.</figcaption>
    
</figure>

<div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;">
			<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube-nocookie.com/embed/dVFe_4KZbps?autoplay=0&amp;controls=1&amp;end=0&amp;loop=0&amp;mute=0&amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"></iframe>
		</div>

<h3 id="integration-with-modern-workflows">Integration with Modern Workflows</h3>
<p>The PyTorch implementation integrates naturally with machine learning workflows. It can serve as a component in larger computational graphs, enable gradient-based optimization, and bridge classical molecular simulation with deep learning approaches.</p>
<p>For readers interested in broader molecular ML applications, this implementation pairs well with other molecular representation methods. The <a href="/posts/molecular-descriptor-coulomb-matrix/">Coulomb matrix approach</a> offers complementary perspectives on encoding molecular structure, while the <a href="/posts/kabsch-algorithm/#the-math">Kabsch algorithm</a> provides essential tools for structural alignment.</p>
<p>The complete implementation is available on <a href="https://github.com/hunter-heidenreich/Muller-Brown-Potential">GitHub</a><sup id="fnref:9"><a href="#fn:9" class="footnote-ref" role="doc-noteref">9</a></sup><sup id="fnref:10"><a href="#fn:10" class="footnote-ref" role="doc-noteref">10</a></sup><sup id="fnref:11"><a href="#fn:11" class="footnote-ref" role="doc-noteref">11</a></sup>, including benchmarking scripts, visualization tools, the test suite, and examples for optimization and molecular dynamics.</p>
<h2 id="conclusion">Conclusion</h2>
<p>The Müller-Brown potential exemplifies how a well-designed benchmark can evolve with a field. Born from 1970s computational constraints, it provided a simple way to test algorithms when quantum chemistry calculations were expensive. Its clever design, simple enough to compute instantly, complex enough to break naive approaches, made it invaluable for algorithm development.</p>
<p>Today, it serves new purposes in the machine learning era. This PyTorch implementation pairs a hand-derived analytical force kernel (compiled with <code>torch.compile</code>) with an autograd reference, a BAOAB Langevin sampler, and a test suite that checks the sampler against the canonical distribution. The analytical kernel&rsquo;s roughly 4x advantage matters for intensive simulations, while PyTorch&rsquo;s flexibility enables integration with neural network potentials and enhanced sampling methods.</p>
<p>The potential&rsquo;s evolution from practical necessity to pedagogical tool to machine learning benchmark demonstrates the value of foundational test cases. As computational chemistry continues evolving, reliable standards like the Müller-Brown potential become even more important for rigorous method development and comparison.</p>
<p>For the complete implementation with benchmarking scripts, the BAOAB Langevin simulator, and visualization tools, see the <a href="https://github.com/hunter-heidenreich/Muller-Brown-Potential">GitHub repository</a>. The full project with architecture details and performance results is at the <a href="/projects/muller-brown-pytorch/">Müller-Brown Potential: A PyTorch ML Testbed project page</a>.</p>
<div class="footnotes" role="doc-endnotes">
<hr>
<ol>
<li id="fn:1">
<p>Müller, K., &amp; Brown, L. D. (1979). Location of saddle points and minimum energy paths by a constrained simplex optimization procedure. <em>Theoretica Chimica Acta</em>, 53, 75-93. <a href="https://link.springer.com/article/10.1007/BF00547608">https://link.springer.com/article/10.1007/BF00547608</a>&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
<li id="fn:2">
<p>Lennard-Jones, J. E. (1931). Cohesion. <em>Proceedings of the Physical Society</em>, 43(5), 461-482. <a href="https://doi.org/10.1088/0959-5309/43/5/301">https://doi.org/10.1088/0959-5309/43/5/301</a>&#160;<a href="#fnref:2" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
<li id="fn:3">
<p>Henkelman, G., &amp; Jónsson, H. (2000). Improved tangent estimate in the nudged elastic band method for finding minimum energy paths and saddle points. <em>Journal of Chemical Physics</em>, 113(22), 9901-9904. <a href="https://doi.org/10.1063/1.1329672">https://doi.org/10.1063/1.1329672</a>&#160;<a href="#fnref:3" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
<li id="fn:4">
<p>Dellago, C., Bolhuis, P. G., Csajka, F. S., &amp; Chandler, D. (1998). Transition path sampling and the calculation of rate constants. <em>Journal of Chemical Physics</em>, 108(5), 1964-1977. <a href="https://doi.org/10.1063/1.475562">https://doi.org/10.1063/1.475562</a>&#160;<a href="#fnref:4" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
<li id="fn:5">
<p>Behler, J., &amp; Parrinello, M. (2007). Generalized neural-network representation of high-dimensional potential-energy surfaces. <em>Physical Review Letters</em>, 98(14), 146401. <a href="https://doi.org/10.1103/PhysRevLett.98.146401">https://doi.org/10.1103/PhysRevLett.98.146401</a>&#160;<a href="#fnref:5" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
<li id="fn:6">
<p>Smith, J. S., Isayev, O., &amp; Roitberg, A. E. (2017). ANI-1: an extensible neural network potential with DFT accuracy at force field computational cost. <em>Chemical Science</em>, 8(4), 3192-3203. <a href="https://doi.org/10.1039/C6SC05720A">https://doi.org/10.1039/C6SC05720A</a>&#160;<a href="#fnref:6" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
<li id="fn:7">
<p>Sipka, M., Dietschreit, J. C. B., Grajciar, L., &amp; Gómez-Bombarelli, R. (2023). Differentiable simulations for enhanced sampling of rare events. In <em>International Conference on Machine Learning</em> (pp. 31990-32007). PMLR.&#160;<a href="#fnref:7" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
<li id="fn:8">
<p>Sun, L., Vandermause, J., Batzner, S., Xie, Y., Clark, D., Chen, W., &amp; Kozinsky, B. (2022). Multitask machine learning of collective variables for enhanced sampling of rare events. <em>Journal of Chemical Theory and Computation</em>, 18(4), 2341-2353.&#160;<a href="#fnref:8" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
<li id="fn:9">
<p>LED-Molecular Repository - Original implementation of the Müller-Brown potential. <a href="https://github.com/cselab/LED-Molecular">https://github.com/cselab/LED-Molecular</a>&#160;<a href="#fnref:9" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
<li id="fn:10">
<p>Vlachas, P. R., Zavadlav, J., Praprotnik, M., &amp; Koumoutsakos, P. (2022). Accelerated simulations of molecular systems through learning of effective dynamics. <em>Journal of Chemical Theory and Computation</em>, 18(1), 538-549. <a href="https://pubs.acs.org/doi/10.1021/acs.jctc.1c00809">https://pubs.acs.org/doi/10.1021/acs.jctc.1c00809</a>&#160;<a href="#fnref:10" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
<li id="fn:11">
<p>Vlachas, P. R., Arampatzis, G., Uhler, C., &amp; Koumoutsakos, P. (2022). Multiscale simulations of complex systems by learning their effective dynamics. <em>Nature Machine Intelligence</em>. <a href="https://www.nature.com/articles/s42256-022-00464-w">https://www.nature.com/articles/s42256-022-00464-w</a>&#160;<a href="#fnref:11" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
</ol>
</div>
]]></content:encoded></item><item><title>Modernizing Rahman's 1964 Argon Simulation</title><link>https://hunterheidenreich.com/projects/rahman-1964-replication/</link><pubDate>Sat, 23 Aug 2025 00:00:00 +0000</pubDate><guid>https://hunterheidenreich.com/projects/rahman-1964-replication/</guid><description>A high-fidelity replication of foundational molecular dynamics using modern software engineering practices: caching, vectorization, and strict reproducibility.</description><content:encoded><![CDATA[<h2 id="overview">Overview</h2>
<p>This project is a &ldquo;digital restoration&rdquo; of Aneesur Rahman&rsquo;s seminal 1964 paper, <em>Correlations in the Motion of Atoms in Liquid Argon</em>. While the physics of liquid argon is a solved problem, the challenge lies in bridging the gap between 1960s mainframe constraints and 2025 software architecture.</p>
<p>I replicated the simulation using <strong>LAMMPS</strong> and built a <strong>Python analysis pipeline</strong> to process the trajectory data. The project demonstrates how modern tooling (<code>uv</code>, type hinting, vectorized NumPy) can transform academic &ldquo;write-once&rdquo; scripts into a reproducible research toolkit.</p>
<h2 id="features">Features</h2>
<h3 id="the-analysis-pipeline">The Analysis Pipeline</h3>
<p>I architected a modular Python package (<code>argon_sim</code>) designed for performance and maintainability.</p>
<ul>
<li><strong>Intelligent Caching System</strong>: MD analysis is compute-intensive ($O(N^2)$). I implemented a decorator-based caching layer (<code>@cached_computation</code>) that hashes source file modification times and function arguments. This ensures expensive calculations (like RDF or Van Hove correlations) are only re-run when the underlying trajectory or parameters actually change.</li>
<li><strong>Vectorization &amp; Optimization</strong>: To handle the $N^2$ complexity of pair-wise interactions without C++ extensions, I utilized NumPy broadcasting. For example, the Mean Square Displacement (MSD) calculation is fully vectorized, with a fallback &ldquo;chunked&rdquo; implementation to handle memory overflows on smaller machines.</li>
<li><strong>Modern Python Tooling</strong>:
<ul>
<li><strong>Dependency Management</strong>: Used <code>uv</code> for deterministic environment locking (sub-second resolution).</li>
<li><strong>Type Safety</strong>: Fully type-hinted codebase for static analysis compliance.</li>
<li><strong>Automation</strong>: A <code>Makefile</code> abstracts the workflow (simulation → analysis → figure generation) into single commands (e.g., <code>make figure-5</code>).</li>
</ul>
</li>
</ul>
<h3 id="the-simulation-strategy">The Simulation Strategy</h3>
<p>I used LAMMPS for the MD engine but strictly adhered to Rahman&rsquo;s physical parameters while modernizing the stability mechanisms.</p>
<ul>
<li><strong>Integration</strong>: Replaced Rahman&rsquo;s predictor-corrector method with the modern standard <strong>Velocity Verlet</strong> algorithm (2 fs timestep).</li>
<li><strong>Equilibration</strong>: I implemented a 1 ns <strong>NVT equilibration</strong> phase (500,000 steps at the 2 fs timestep) to properly melt the FCC crystal structure before the NVE production run.</li>
<li><strong>Intellectual Honesty</strong>: The <code>in.argon</code> script explicitly documents every deviation from the original methodology (e.g., energy minimization) and the justification for ensuring numerical stability.</li>
</ul>
<h2 id="usage">Usage</h2>
<p>The project uses a <code>Makefile</code> to automate the workflow. Run <code>make all</code> to execute the LAMMPS simulation and generate all analysis figures.</p>
<h2 id="results">Results</h2>
<p>The replication achieved high quantitative agreement with the historical data, validating both the simulation parameters and the custom analysis code.</p>
<table>
	<thead>
			<tr>
					<th style="text-align: left">Property</th>
					<th style="text-align: left">Rahman (1964)</th>
					<th style="text-align: left">This Work</th>
					<th style="text-align: left">Notes</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td style="text-align: left">Diffusion Coefficient ($D$)</td>
					<td style="text-align: left">$2.43 \times 10^{-5}$ cm²/s</td>
					<td style="text-align: left">$2.47 \times 10^{-5}$ cm²/s</td>
					<td style="text-align: left">Agreement within 2%</td>
			</tr>
			<tr>
					<td style="text-align: left">RDF First Peak</td>
					<td style="text-align: left">$3.7$ Å</td>
					<td style="text-align: left">$3.82$ Å</td>
					<td style="text-align: left">Slight shift</td>
			</tr>
			<tr>
					<td style="text-align: left">Velocity Dist. Width ($e^{-1/2}$)</td>
					<td style="text-align: left">$1.77$</td>
					<td style="text-align: left">$1.77$</td>
					<td style="text-align: left">Exact match to theoretical Maxwell-Boltzmann</td>
			</tr>
	</tbody>
</table>
<h3 id="visual-replication">Visual Replication</h3>
<p>I used Matplotlib to digitally recreate Rahman&rsquo;s hand-drawn plots, confirming signatures like the <strong>negative region in the Velocity Autocorrelation Function (VACF)</strong>, which provided the first evidence of the &ldquo;cage effect&rdquo; in simple liquids.</p>















<figure class="post-figure center ">
    <img src="/img/rahman-1964-argon-molecular-dynamics/rahman-argon-velocity-autocorrelation.webp"
         alt="Velocity Autocorrelation Function comparison showing the characteristic negative region"
         title="Velocity Autocorrelation Function comparison showing the characteristic negative region"
         
         
         loading="lazy"
         class="post-image">
    
    <figcaption class="post-caption">The VACF&rsquo;s negative region (first evidence of the &lsquo;cage effect&rsquo; in liquids) reproduced 60 years later.</figcaption>
    
</figure>

<h2 id="challenges--learnings">Challenges &amp; Learnings</h2>
<ul>
<li><strong>Unit Hell</strong>: Rahman&rsquo;s paper uses a mix of reduced units and CGS. Mapping these to LAMMPS&rsquo;s <code>real</code> units required a dedicated <code>constants.py</code> module and rigorous unit testing to prevent dimensional errors.</li>
<li><strong>Fourier Transforms</strong>: Calculating the Structure Factor $S(k)$ from $g(r)$ required implementing a manual 3D Fourier transform for spherical symmetry, as standard FFT packages do not account for the radial shell integration implicit in liquid structure analysis.</li>
<li><strong>Code as a Liability</strong>: Early in the project, I realized that re-running analysis scripts was becoming a bottleneck. This drove the decision to build the caching infrastructure, reinforcing the lesson that investing in developer tooling pays off even in small-scale scientific projects.</li>
</ul>
<h2 id="related-work">Related Work</h2>
<p>The full methodology and physics are documented in the companion blog post:</p>
<ul>
<li><a href="/posts/rahman-1964-lammps-liquid-argon/">Replicating Rahman&rsquo;s 1964 Liquid Argon Simulation</a></li>
</ul>
]]></content:encoded></item><item><title>Modernizing Rahman's 1964 Argon Simulation</title><link>https://hunterheidenreich.com/posts/rahman-1964-lammps-liquid-argon/</link><pubDate>Sat, 23 Aug 2025 00:00:00 +0000</pubDate><guid>https://hunterheidenreich.com/posts/rahman-1964-lammps-liquid-argon/</guid><description>How I used modern software engineering (caching, vectorization, and dependency locking) to reproduce a 60-year-old physics milestone.</description><content:encoded><![CDATA[<p>Some papers invent entire fields. Aneesur Rahman&rsquo;s 1964 paper, <strong>&ldquo;Correlations in the Motion of Atoms in Liquid Argon&rdquo;</strong>, is the &ldquo;Hello World&rdquo; of molecular dynamics (MD). Using a computer with less memory than a modern microwave, Rahman solved Newton&rsquo;s equations for 864 atoms and proved that liquids have distinct, quantifiable structure.</p>
<p>The physics of liquid argon is a solved problem. We know the answer.</p>
<p>So, why replicate it in 2025? <strong>To apply modern engineering standards to legacy science.</strong></p>
<p>This project served as an exercise in <strong>software archaeology</strong>: taking a vintage scientific workflow and rebuilding it with a modular Python analysis pipeline. I wanted to see if I could replace Rahman&rsquo;s &ldquo;write-once&rdquo; Fortran mentality with modern reproducibility, type safety, and intelligent caching.</p>
<p>The full source code is available on <a href="https://github.com/hunter-heidenreich/argon-simulation">GitHub</a>. The complete project overview, including analysis results and pipeline architecture, is on the <a href="/projects/rahman-1964-replication/">Rahman 1964 Replication project page</a>.</p>
<div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;">
			<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube-nocookie.com/embed/KjFixUt6bnQ?autoplay=0&amp;controls=1&amp;end=0&amp;loop=0&amp;mute=0&amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"></iframe>
		</div>

<hr>
<h2 id="engineering-the-pipeline">Engineering the Pipeline</h2>
<p>The most interesting part of this project isn&rsquo;t the simulation engine (LAMMPS handles that); it&rsquo;s the architecture of the analysis suite. MD analysis is computationally expensive ($O(N^2)$), and iterating on plots can be painfully slow if you re-compute trajectory data every time.</p>
<p>Why bother? Don&rsquo;t modern MD packages come with analysis tools?
Well, some say that writing is thinking.
Sometimes getting into the weeds of how an algorithm works or an analysis is performed, you gain insights and a deeper understanding that might be obscured by a plug-and-play tool.</p>
<h3 id="intelligent-caching">Intelligent Caching</h3>
<p>I built the <code>argon_sim</code> package with a decorator-based caching layer. The system hashes the source file&rsquo;s modification time and the function&rsquo;s arguments to avoid re-calculating the Radial Distribution Function (RDF) or Van Hove correlations on every script run.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-python" data-lang="python"><span style="display:flex;"><span><span style="color:#a6e22e">@cached_computation</span>(<span style="color:#e6db74">&#34;gr&#34;</span>)
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">def</span> <span style="color:#a6e22e">compute_radial_distribution</span>(filename: str, dr: float <span style="color:#f92672">=</span> <span style="color:#ae81ff">0.05</span>):
</span></span><span style="display:flex;"><span>    <span style="color:#75715e"># ... expensive O(N^2) distance calculations ...</span>
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">return</span> r_values, g_r, density
</span></span></code></pre></div><p>If I tweak a plot axis, the script runs instantly, loading pre-computed arrays from disk instead of re-running the $O(N^2)$ computation. If I change the simulation trajectory, the cache invalidates automatically.</p>
<h3 id="vectorization--memory-management">Vectorization &amp; Memory Management</h3>
<p>Rahman likely relied on nested loops. Python is too slow for that. I utilized <strong>NumPy broadcasting</strong> to vectorize the calculation of atomic displacements.</p>
<p>However, calculating an $864 \times 864$ distance matrix for 5,000 frames consumes significant RAM. I implemented a <strong>chunked MSD (Mean Square Displacement) algorithm</strong> that processes the trajectory in blocks, balancing vectorization speed with memory constraints. The chunking trades some vectorization speed for a bounded memory footprint, so the analysis is not capped by holding the full distance matrix in RAM.</p>
<h3 id="reproducibility-as-a-feature">Reproducibility as a Feature</h3>
<p>Academic code is notorious for &ldquo;it works on my machine.&rdquo; To combat this, I used <strong><code>uv</code></strong> for dependency management, locking the exact environment state. The entire workflow (from simulation to final figure generation) is abstracted into a <code>Makefile</code>.</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span><span style="color:#75715e"># One command to run the physics, analyze data, and generate plots</span>
</span></span><span style="display:flex;"><span>make workflow
</span></span></code></pre></div><hr>
<h2 id="the-simulation-1964-vs-2025">The Simulation: 1964 vs. 2025</h2>
<p>I preserved Rahman&rsquo;s physical parameters exactly to ensure a fair comparison:</p>
<ul>
<li><strong>System</strong>: 864 Argon atoms</li>
<li><strong>Potential</strong>: Lennard-Jones ($\sigma = 3.4$ Å, $\epsilon/k_B = 120$ K)</li>
<li><strong>Target</strong>: 94.4 K, 1.374 g/cm³</li>
</ul>
<p>However, I modernized the <em>numerical</em> methods to ensure stability:</p>
<table>
	<thead>
			<tr>
					<th style="text-align: left">Feature</th>
					<th style="text-align: left">Rahman (1964)</th>
					<th style="text-align: left">This Work (2025)</th>
					<th style="text-align: left">Why it Matters</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td style="text-align: left"><strong>Integration</strong></td>
					<td style="text-align: left">Predictor-Corrector</td>
					<td style="text-align: left">Velocity Verlet</td>
					<td style="text-align: left">Better energy conservation over long runs</td>
			</tr>
			<tr>
					<td style="text-align: left"><strong>Timestep</strong></td>
					<td style="text-align: left">10 fs</td>
					<td style="text-align: left">2 fs</td>
					<td style="text-align: left">Rahman&rsquo;s step was aggressive; 2 fs ensures numerical stability</td>
			</tr>
			<tr>
					<td style="text-align: left"><strong>Equilibration</strong></td>
					<td style="text-align: left">Velocity Scaling</td>
					<td style="text-align: left">1 ns NVT</td>
					<td style="text-align: left">Rahman couldn&rsquo;t afford long equilibrations; I melted the crystal properly to remove bias</td>
			</tr>
	</tbody>
</table>
<p>The production run lasted 10 ps in the NVE ensemble, generating 5,001 frames. Temperature remained within 1% of target with an RMS fluctuation of 0.0165.</p>
<hr>
<h2 id="validation-results">Validation Results</h2>
<p>The replication was quantitatively successful. The analysis pipeline faithfully reproduced every key signature of liquid argon.</p>
<h3 id="the-cage-effect">The Cage Effect</h3>
<p>This is the paper&rsquo;s crown jewel. In a gas, velocity correlations decay exponentially. In a liquid, Rahman discovered that atoms get trapped by their neighbors and bounce back, causing the correlation to go <em>negative</em>.</p>















<figure class="post-figure center ">
    <img src="/img/rahman-1964-argon-molecular-dynamics/rahman-argon-velocity-autocorrelation.webp"
         alt="Velocity Autocorrelation Function"
         title="Velocity Autocorrelation Function"
         
         
         loading="lazy"
         class="post-image">
    
    <figcaption class="post-caption">The VACF dips below zero at 0.3 ps. This &rsquo;negative correlation&rsquo; is the signature of the cage effect: atoms rattling against their neighbors.</figcaption>
    
</figure>

<p>My simulation captures this minimum at -0.083, matching Rahman&rsquo;s observation. The Fourier transform of this data (the frequency spectrum) reveals a peak at $\beta \approx 0.25$, physically representing the frequency of atomic collisions within the cage.</p>















<figure class="post-figure center ">
    <img src="/img/rahman-1964-argon-molecular-dynamics/rahman-argon-vacf-frequency-spectrum.webp"
         alt="Frequency spectrum of the VACF showing characteristic peak from atomic caging effects"
         title="Frequency spectrum of the VACF showing characteristic peak from atomic caging effects"
         
         
         loading="lazy"
         class="post-image">
    
    <figcaption class="post-caption">Frequency spectrum of the VACF showing characteristic peak from atomic caging effects</figcaption>
    
</figure>

<h3 id="structural-fingerprints">Structural Fingerprints</h3>
<p>The Radial Distribution Function $g(r)$ and its Fourier transform, the Structure Factor $S(k)$, are the &ldquo;fingerprints&rdquo; of a liquid&rsquo;s structure.</p>















<figure class="post-figure center ">
    <img src="/img/rahman-1964-argon-molecular-dynamics/rahman-argon-radial-distribution-function.webp"
         alt="Radial Distribution Function and Structure Factor"
         title="Radial Distribution Function and Structure Factor"
         
         
         loading="lazy"
         class="post-image">
    
    <figcaption class="post-caption">The sharp first peak (3.82 Å) shows defined nearest neighbors, while the decay shows the lack of long-range order. My calculated peaks match Rahman&rsquo;s within 3%.</figcaption>
    
</figure>

<p>The agreement here is striking. My first peak appeared at <strong>3.82 Å</strong> (Rahman: 3.7 Å). The slight discrepancy is likely due to my improved equilibration method, which allowed the system to relax into a more natural liquid state than Rahman&rsquo;s 1960s hardware allowed.</p>
<h3 id="diffusion-and-non-gaussian-behavior">Diffusion and Non-Gaussian Behavior</h3>
<p>By calculating the Mean Square Displacement (MSD), I derived a diffusion coefficient of <strong>$D = 2.47 \times 10^{-5}$ cm²/s</strong>, which deviates only <strong>2%</strong> from Rahman&rsquo;s reported $2.43 \times 10^{-5}$.</p>















<figure class="post-figure center ">
    <img src="/img/rahman-1964-argon-molecular-dynamics/rahman-argon-mean-square-displacement.webp"
         alt="Mean Square Displacement vs time showing ballistic to diffusive transition"
         title="Mean Square Displacement vs time showing ballistic to diffusive transition"
         
         
         loading="lazy"
         class="post-image">
    
    <figcaption class="post-caption">Mean Square Displacement vs. time showing ballistic to diffusive transition</figcaption>
    
</figure>

<p>More interestingly, I reproduced the &ldquo;Non-Gaussian&rdquo; parameters. Standard diffusion assumes a Gaussian distribution of displacements. Rahman found (and I confirmed) that liquid atoms deviate from this. They exhibit &ldquo;jump&rdquo; and &ldquo;wait&rdquo; dynamics, a behavior that standard Brownian motion models fail to capture.</p>















<figure class="post-figure center ">
    <img src="/img/rahman-1964-argon-molecular-dynamics/rahman-argon-non-gaussian-parameters.webp"
         alt="Non-Gaussian parameters showing deviation from simple diffusive behavior"
         title="Non-Gaussian parameters showing deviation from simple diffusive behavior"
         
         
         loading="lazy"
         class="post-image">
    
    <figcaption class="post-caption">Evidence that atoms do not follow a simple random walk. The non-zero alpha parameters indicate heterogeneous dynamics.</figcaption>
    
</figure>

<h3 id="advanced-analysis-van-hove-functions">Advanced Analysis: Van Hove Functions</h3>
<p>Rahman also explored advanced properties like the Van Hove correlation function $G(r,t)$, which describes how liquid structure evolves over time.</p>















<figure class="post-figure center ">
    <img src="/img/rahman-1964-argon-molecular-dynamics/rahman-argon-van-hove-correlation.webp"
         alt="Van Hove distinct correlation function G_d(r,t) at two time points"
         title="Van Hove distinct correlation function G_d(r,t) at two time points"
         
         
         loading="lazy"
         class="post-image">
    
    <figcaption class="post-caption">Van Hove distinct correlation function showing how neighbor coordination shells &lsquo;melt&rsquo; as time progresses</figcaption>
    
</figure>

<p>At 1.0 ps, the structure remains well-defined with clear shells. By 2.5 ps, it becomes increasingly diffuse. Rahman compared this evolution to theoretical predictions (the Vineyard approximation) and found that theory predicted overly rapid structural decay. My results confirm this finding.</p>















<figure class="post-figure center ">
    <img src="/img/rahman-1964-argon-molecular-dynamics/rahman-argon-delayed-convolution.webp"
         alt="Delayed convolution approximation testing Rahman&#39;s theoretical improvement"
         title="Delayed convolution approximation testing Rahman&#39;s theoretical improvement"
         
         
         loading="lazy"
         class="post-image">
    
    <figcaption class="post-caption">Testing Rahman&rsquo;s &lsquo;delayed convolution approximation&rsquo; (his proposed improvement over existing theory)</figcaption>
    
</figure>

<hr>
<h2 id="system-validation">System Validation</h2>
<p>Before analyzing physics, basic sanity checks confirmed proper thermal equilibrium.</p>















<figure class="post-figure center ">
    <img src="/img/rahman-1964-argon-molecular-dynamics/rahman-argon-temperature-stability.webp"
         alt="Temperature vs time plot showing excellent temperature control around 94.4 K target"
         title="Temperature vs time plot showing excellent temperature control around 94.4 K target"
         
         
         loading="lazy"
         class="post-image">
    
    <figcaption class="post-caption">Temperature vs. Time - 5001 frames showing excellent temperature control with mean 94.73 K</figcaption>
    
</figure>

<p>Mean temperature was 94.73 K (0.33 K off target) with a standard deviation of 1.56 K.</p>















<figure class="post-figure center ">
    <img src="/img/rahman-1964-argon-molecular-dynamics/rahman-argon-maxwell-boltzmann-velocity.webp"
         alt="Maxwell-Boltzmann velocity distribution"
         title="Maxwell-Boltzmann velocity distribution"
         
         
         loading="lazy"
         class="post-image">
    
    <figcaption class="post-caption">Maxwell-Boltzmann velocity distribution from 12.9 million velocity components</figcaption>
    
</figure>

<p>The velocity distribution from 12.9 million velocity components produces a clean Maxwell-Boltzmann distribution, as expected for thermal equilibrium. The distribution widths at various heights closely match Rahman&rsquo;s results: 1.77, 2.48, and 3.56 compared to his 1.77, 2.52, and 3.52.</p>
<hr>
<h2 id="conclusion">Conclusion</h2>
<p>Replicating a 60-year-old paper might seem like a solved puzzle, but it teaches a valuable lesson in computational science. Rahman relied on brilliance and raw mathematical intuition because he lacked compute power. Today, pairing modern compute with disciplined software practices makes the same result reproducible and auditable.</p>
<p>Applying modern software engineering (<strong>modular architecture, caching, and automated workflows</strong>) to classical physics reproduces the past and builds a foundation that makes the <em>next</em> discovery easier, faster, and more reliable.</p>
<p>The quantitative agreement is striking: diffusion coefficients within 2%, structural peaks within 0.1 Å, velocity distributions matching to three significant figures. This level of reproducibility, achieved with completely different hardware and software, validates something fundamental: Rahman&rsquo;s physical model was remarkably sound, and his computational methodology was scientifically rigorous despite 1960s constraints.</p>
<p>The cage effect, velocity correlations, and structural evolution are fundamental characteristics of how matter behaves at the atomic scale, as relevant today as they were six decades ago.</p>
]]></content:encoded></item><item><title>Liquid Argon: LAMMPS Simulation</title><link>https://hunterheidenreich.com/videos/liquid-argon-lammps-simulation/</link><pubDate>Sat, 23 Aug 2025 00:00:00 +0000</pubDate><guid>https://hunterheidenreich.com/videos/liquid-argon-lammps-simulation/</guid><description>LAMMPS molecular dynamics simulation of liquid argon demonstrating fundamental liquid-state behavior and molecular motion.</description><content:encoded><![CDATA[<div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;">
			<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube-nocookie.com/embed/KjFixUt6bnQ?autoplay=0&amp;controls=1&amp;end=0&amp;loop=0&amp;mute=0&amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"></iframe>
		</div>

<p>Details on the simulation can be found in the <a href="/posts/rahman-1964-lammps-liquid-argon/">Liquid Argon: LAMMPS Simulation</a> post.</p>
]]></content:encoded></item><item><title>Embedded-Atom Method: Impurities and Defects in Metals</title><link>https://hunterheidenreich.com/notes/chemistry/molecular-simulation/classical-methods/embedded-atom-method/</link><pubDate>Fri, 22 Aug 2025 00:00:00 +0000</pubDate><guid>https://hunterheidenreich.com/notes/chemistry/molecular-simulation/classical-methods/embedded-atom-method/</guid><description>Daw and Baskes's foundational 1984 paper introducing the Embedded-Atom Method (EAM), a many-body potential for metal simulations.</description><content:encoded><![CDATA[<h2 id="contribution-adaptive-many-body-potentials">Contribution: Adaptive Many-Body Potentials</h2>
<p>This is a foundational <strong>method paper</strong> that introduces a new class of semi-empirical, many-body interatomic potential: the <strong>Embedded-Atom Method (EAM)</strong>. It is designed for large-scale atomistic simulations of metallic systems, bridging the gap between computationally cheap (but physically limited) pair potentials and accurate (but expensive) quantum mechanical methods. The EAM achieves pair-potential speed while incorporating many-body physics inspired by density functional theory.</p>
<h2 id="motivation-the-geometric-limits-of-pair-potentials">Motivation: The Geometric Limits of Pair Potentials</h2>
<p>The authors sought to overcome the limitations of <strong>pair potentials</strong> (the dominant method of the time), which failed in three key areas:</p>
<ul>
<li><strong>Elastic Anisotropy:</strong> Pair potentials enforce the Cauchy relation ($C_{12} = C_{44}$), which is violated by most transition metals.</li>
<li><strong>Volume Ambiguity:</strong> Pair potentials require a volume-dependent energy term, making them impossible to use accurately on surfaces or cracks where local volume is undefined.</li>
<li><strong>Chemical Incompatibility:</strong> Pair potentials cannot model chemically active impurities like Hydrogen.</li>
</ul>
<p>First-principles quantum mechanical methods (e.g., band theory) are limited by basis-set size and periodicity requirements, making them impractical for the large systems (thousands of atoms) needed to study defects, surfaces, and mechanical properties.</p>
<p>The goal was to create a new model that bridges this gap in accuracy and computational cost.</p>
<h2 id="core-innovation-the-embedding-energy-function">Core Innovation: The Embedding Energy Function</h2>
<p>The EAM postulates that the energy of an atom is determined by the local electron density of its neighbors. The total energy is:</p>
<p>$$E_{tot} = \sum_{i} F_i(\rho_{h,i}) + \frac{1}{2}\sum_{i \neq j} \phi_{ij}(R_{ij})$$</p>
<ul>
<li><strong>$F_i(\rho_{h,i})$ (Embedding Energy):</strong> The energy required to embed atom $i$ into the background electron density $\rho$ provided by its neighbors. This term is non-linear and captures many-body effects.</li>
<li><strong>$\phi_{ij}$ (Pair Potential):</strong> A short-range electrostatic repulsion between cores.</li>
<li><strong>$\rho_{h,i}$ (Host Density):</strong> Approximated as a linear superposition of atomic densities: $\rho_{h,i} = \sum_{j \neq i} \rho^a_j(R_{ij})$.</li>
</ul>
<p>The key innovations are:</p>
<ol>
<li><strong>The Embedding Energy</strong>: Each atom $i$ contributes an energy $F_i$ which is a non-linear function of the local electron density $\rho_{h,i}$ it is embedded in. This density is approximated as a simple linear superposition of the atomic electron densities of all its neighbors. This term captures the crucial many-body effects of metallic bonding.</li>
<li><strong>A Redefined Pair Potential</strong>: A short-range, two-body potential $\phi_{ij}$ is retained, but it primarily models the electrostatic core-core repulsion.</li>
<li><strong>Elimination of the &ldquo;Volume&rdquo; Problem</strong>: Because the embedding energy depends on the local electron density (a quantity that is always well-defined, even at a surface or a crack tip), the method circumvents the ambiguities of volume-dependent pair potentials.</li>
<li><strong>Intrinsic Many-Body Nature</strong>: The non-linearity of the embedding function $F(\rho)$ naturally accounts for why chemically active impurities (like hydrogen) cannot be described by pair potentials and correctly breaks the Cauchy relation for elastic constants.</li>
</ol>
<h2 id="experimental-design-robust-parameter-validation">Experimental Design: Robust Parameter Validation</h2>
<p>The authors validated EAM through a rigorous split between parameterization data and prediction tasks:</p>
<p><strong>Fitting Data (Bulk Properties Only):</strong></p>
<p>The model parameters were fitted exclusively to these experimental values for Ni and Pd:</p>
<ul>
<li>Lattice constant ($a_0$)</li>
<li>Elastic constants ($C_{11}, C_{12}, C_{44}$)</li>
<li>Sublimation energy ($E_s$)</li>
<li>Vacancy-formation energy ($E^F_{1V}$)</li>
<li>Hydrogen heat of solution (for fitting H parameters)</li>
</ul>
<p><strong>Validation Tests (No Further Fitting):</strong></p>
<p>The model was then evaluated on its ability to predict these properties without any additional parameter adjustments:</p>
<ul>
<li><strong>Surface Relaxations:</strong> Ni(110) surface contraction</li>
<li><strong>Surface Energy:</strong> Ni(100) surface energy</li>
<li><strong>Hydrogen Migration:</strong> H migration energy in Pd</li>
<li><strong>Fracture Mechanics:</strong> Hydrogen embrittlement in Ni slabs</li>
</ul>
<h2 id="results-extending-predictive-power-to-surfaces-and-defects">Results: Extending Predictive Power to Surfaces and Defects</h2>
<ol>
<li><strong>Many-Body Physics:</strong> The embedding function $F(\rho)$ successfully captures the volume-dependence of metallic cohesion, fixing the &ldquo;Cauchy discrepancy&rdquo; inherent in pair potentials.</li>
<li><strong>Surface Properties:</strong> A single set of functions, fitted only to bulk data, correctly reproduces surface relaxations within 0.1 Å of experiment across three faces (100), (110), and (111) for Ni. The Ni(100) surface energy (1550 erg/cm²) compares well with the measured crystal-vapor average (1725 erg/cm²).</li>
<li><strong>Hydrogen in Bulk:</strong> The method predicts H migration energy in Pd as 0.26 eV, matching experiment exactly. Hydride lattice expansions are also well reproduced: 4.5% for NiH (experiment: 5%) and 4% for PdH (experiment: 3.5% for PdH$_{0.6}$).</li>
<li><strong>Hydrogen on Surfaces:</strong> Calculated adsorption sites on all three Ni and Pd faces agree with experimentally determined sites. Adsorption energies on Ni surfaces are systematically about 0.25 eV too low, while on Pd surfaces the error is much smaller (about 0.05 eV too high on average).</li>
<li><strong>Fracture Mechanics:</strong> Static fracture calculations on Ni slabs demonstrate brittle fracture behavior and show that hydrogen lowers the fracture stress, providing a qualitative model of hydrogen embrittlement.</li>
</ol>
<h2 id="limitations">Limitations</h2>
<p>The authors acknowledge several limitations:</p>
<ul>
<li>The functions $F$ and $\phi$ are not uniquely determined by the empirical fitting procedure. The short-range pair potential (restricted to first neighbors in fcc metals) may not be the best choice for all crystal structures.</li>
<li>The choice of hydrogen embedding function (Puska et al. vs. Norskov&rsquo;s corrected function) remains undecided and may affect hydrogen binding energies.</li>
<li>The fracture calculations are static, and dynamical effects and plasticity play important roles in real fracture that are not captured.</li>
<li>The method has only been demonstrated for fcc metals (Ni and Pd). Extension to bcc metals and other crystal structures requires further investigation.</li>
</ul>
<h2 id="reproducibility-details">Reproducibility Details</h2>
<h3 id="algorithms">Algorithms</h3>
<p>To replicate the method, three specific algorithmic definitions are needed:</p>
<ol>
<li>
<p><strong>Atomic Density Construction</strong>: The electron density $\rho^a(r)$ is a weighted sum of Hartree-Fock $s$ and $d$ orbital densities (from Clementi &amp; Roetti tables), controlled by a parameter $N_s$ (the number of s-like electrons):
$$\rho^a(r) = N_s\rho_s^a(r) + (N-N_s)\rho_d^a(r)$$
For Ni, $N_s = 0.85$; for Pd, $N_s = 0.65$ (fitted to H solution heat).</p>
</li>
<li>
<p><strong>Pair Potential Form</strong>: The short-range pair interaction derives from an effective charge function $Z(r)$ to handle core repulsion:
$$\phi_{ij}(r) = \frac{Z_i(r)Z_j(r)}{r}$$
Splines for $Z(r)$ are provided in Table II.</p>
</li>
<li>
<p><strong>Analytic Forces</strong>: Because embedding energy depends on neighbor density, the force calculation is many-body:
$$\vec{f}_{k} = -\sum_{j(\neq k)} (F&rsquo;_{k} \rho&rsquo;_{j} + F&rsquo;_{j} \rho&rsquo;_{k} + \phi&rsquo;_{jk}) \vec{r}_{jk}$$</p>
</li>
</ol>
<h3 id="models">Models</h3>
<p>The functions $F(\rho)$ and $\phi(r)$ are modeled using <strong>cubic splines</strong>, with parameters fitted to reproduce bulk experimental constants. The embedding function $F(\rho)$ is constrained to have a single minimum and to be linear at high densities, matching the qualitative form of the first-principles calculations by Puska et al. Energy minimization uses the <strong>conjugate gradients</strong> technique. The paper explicitly lists spline knots, coefficients, and cutoffs in Tables II and IV, making the method fully reproducible.</p>















<figure class="post-figure center ">
    <img src="/img/notes/chemistry/eam-embedding-effective-charge.webp"
         alt="Reproduction of Figures 1 and 2 from Daw &amp; Baskes (1984) showing the embedding energy and effective charge functions for Ni and Pd"
         title="Reproduction of Figures 1 and 2 from Daw &amp; Baskes (1984) showing the embedding energy and effective charge functions for Ni and Pd"
         
         
         loading="lazy"
         class="post-image">
    
    <figcaption class="post-caption"><strong>Left:</strong> Dimensionless embedding energy ($E/E_s$) vs. normalized electron density ($\rho/\bar{\rho}$). The minimum near $\rho/\bar{\rho} \approx 1.0$ drives metallic cohesion. <strong>Right:</strong> Normalized effective charge ($Z/Z_0$) vs. normalized distance ($R/a_0$). The charge drops to zero near $R/a_0 = 0.85$, ensuring short-range interactions. Reproduced from Table II spline knots.</figcaption>
    
</figure>

<h3 id="evaluation">Evaluation</h3>
<p><strong>Fitting Data (Used for Parameterization):</strong></p>
<p>Bulk experimental properties for Ni and Pd only:</p>
<ul>
<li>Lattice constant ($a_0$)</li>
<li>Elastic constants ($C_{11}, C_{12}, C_{44}$)</li>
<li>Sublimation energy ($E_s$)</li>
<li>Vacancy-formation energy ($E^F_{1V}$)</li>
<li>Hydrogen heat of solution (for fitting H parameters)</li>
</ul>
<p><strong>Validation Results (Predictions Without Further Fitting):</strong></p>
<table>
	<thead>
			<tr>
					<th>Property</th>
					<th>Predicted</th>
					<th>Experimental</th>
					<th>Agreement</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td>Ni(110) surface contraction</td>
					<td>-0.11 Å</td>
					<td>-0.06 to -0.10 Å</td>
					<td>Within 0.1 Å</td>
			</tr>
			<tr>
					<td>Ni(100) surface energy</td>
					<td>1550 erg/cm²</td>
					<td>1725 erg/cm² (avg.)</td>
					<td>Close</td>
			</tr>
			<tr>
					<td>H migration in Pd</td>
					<td>0.26 eV</td>
					<td>0.26 eV</td>
					<td>Exact</td>
			</tr>
			<tr>
					<td>NiH lattice expansion</td>
					<td>4.5%</td>
					<td>5%</td>
					<td>Close</td>
			</tr>
			<tr>
					<td>PdH lattice expansion</td>
					<td>4%</td>
					<td>3.5% (PdH$_{0.6}$)</td>
					<td>Close</td>
			</tr>
			<tr>
					<td>H adsorption sites (Ni, Pd)</td>
					<td>Correct on all faces</td>
					<td>Matches experiment</td>
					<td>Exact</td>
			</tr>
			<tr>
					<td>H embrittlement in Ni</td>
					<td>Qualitative model</td>
					<td>-</td>
					<td>Qualitative</td>
			</tr>
	</tbody>
</table>
<h2 id="paper-information">Paper Information</h2>
<p><strong>Citation</strong>: Daw, M. S., &amp; Baskes, M. I. (1984). Embedded-atom method: Derivation and application to impurities, surfaces, and other defects in metals. <em>Physical Review B</em>, 29(12), 6443-6453. <a href="https://doi.org/10.1103/PhysRevB.29.6443">https://doi.org/10.1103/PhysRevB.29.6443</a></p>
<p><strong>Publication</strong>: Physical Review B, 1984</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-bibtex" data-lang="bibtex"><span style="display:flex;"><span><span style="color:#a6e22e">@article</span>{daw1984embedded,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">title</span>=<span style="color:#e6db74">{Embedded-atom method: Derivation and application to impurities, surfaces, and other defects in metals}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">author</span>=<span style="color:#e6db74">{Daw, Murray S and Baskes, Mike I}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">journal</span>=<span style="color:#e6db74">{Physical Review B}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">volume</span>=<span style="color:#e6db74">{29}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">number</span>=<span style="color:#e6db74">{12}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">pages</span>=<span style="color:#e6db74">{6443--6453}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">year</span>=<span style="color:#e6db74">{1984}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">publisher</span>=<span style="color:#e6db74">{APS}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">doi</span>=<span style="color:#e6db74">{10.1103/PhysRevB.29.6443}</span>
</span></span><span style="display:flex;"><span>}
</span></span></code></pre></div><p><strong>Additional Resources</strong>:</p>
<ul>
<li><a href="/notes/chemistry/molecular-simulation/classical-methods/embedded-atom-method-review-1993/">EAM Review (1993)</a></li>
<li><a href="/notes/chemistry/molecular-simulation/classical-methods/embedded-atom-method-voter-1994/">EAM User Guide (1994)</a></li>
<li><a href="https://www.ctcms.nist.gov/potentials/">NIST Interatomic Potentials Repository</a></li>
</ul>
]]></content:encoded></item><item><title>Umbrella Sampling: Monte Carlo Free-Energy Estimation</title><link>https://hunterheidenreich.com/notes/chemistry/molecular-simulation/classical-methods/umbrella-sampling/</link><pubDate>Thu, 21 Aug 2025 00:00:00 +0000</pubDate><guid>https://hunterheidenreich.com/notes/chemistry/molecular-simulation/classical-methods/umbrella-sampling/</guid><description>Torrie and Valleau's 1977 paper introducing Umbrella Sampling, an importance sampling technique for Monte Carlo free-energy calculations.</description><content:encoded><![CDATA[<h2 id="a-methodological-shift-in-monte-carlo-simulations">A Methodological Shift in Monte Carlo Simulations</h2>
<p>This is a <strong>Method</strong> paper that introduces a novel computational technique for Monte Carlo simulations. It presents Umbrella Sampling, an importance sampling approach that uses non-physical distributions to calculate free energy differences in molecular systems.</p>
<h2 id="the-sampling-gap-in-phase-transitions">The Sampling Gap in Phase Transitions</h2>
<p>The paper addresses the failure of conventional Boltzmann-weighted Monte Carlo to estimate free energy differences.</p>
<ul>
<li><strong>The Problem</strong>: Free energy depends on the integral of configurations that are rare in the reference system. In a standard simulation, the relevant probability density $f_0(\Delta U^*)$ is too small to be sampled accurately by conventional Boltzmann-weighted Monte Carlo.</li>
<li><strong>Phase Transitions</strong>: Conventional &ldquo;thermodynamic integration&rdquo; fails near phase transitions because it requires a path of integration where ensemble averages can be reliably measured, which is difficult in unstable regions.</li>
</ul>
<h2 id="bridging-states-with-non-physical-distributions">Bridging States with Non-Physical Distributions</h2>
<p>The authors introduce a non-physical distribution $\pi(q^N)$ to bridge the gap between a reference system (0) and a system of interest (1).</p>
<ul>
<li><strong>Arbitrary Weights</strong>: They generate a Markov chain with a limiting distribution $\pi(q^N)$ that differs from the Boltzmann distribution of either system. This distribution is written as $\pi(q&rsquo;^N) = w(q&rsquo;^N) \exp(-U_0(q&rsquo;^N)/kT_0) / Z$, where $w(q^N) = W(\Delta U^*)$ is a weighting function chosen to favor configurations with values of $\Delta U^*$ important to the free-energy integral.</li>
<li><strong>Reweighting Formula</strong>: The unbiased average of any property $\theta$ is recovered via the ratio of biased averages:</li>
</ul>
<p>$$\langle\theta\rangle_{0}=\frac{\langle\theta/w\rangle_{w}}{\langle1/w\rangle_{w}}$$</p>
<ul>
<li><strong>Overlap</strong>: The method allows sampling a range of $\Delta U^*$ up to <strong>three times</strong> that of a conventional Monte Carlo experiment, enabling accurate determination of values of $f_0(\Delta U^*)$ as small as $10^{-8}$. If a single weight function cannot span the entire gap, additional overlapping umbrella-sampling experiments are carried out with different weighting functions exploring successively overlapping ranges of $\Delta U^*$.</li>
</ul>
<h2 id="validation-on-lennard-jones-fluids">Validation on Lennard-Jones Fluids</h2>
<p>The authors validated Umbrella Sampling using Monte Carlo simulations of model fluids.</p>
<h3 id="experimental-setup">Experimental Setup</h3>
<ul>
<li><strong>System Specifications</strong>: The study used a <strong>Lennard-Jones (LJ)</strong> fluid and an <strong>inverse-12 &ldquo;soft-sphere&rdquo;</strong> fluid.</li>
<li><strong>System Size</strong>: Simulations were primarily performed with <strong>$N=32$ particles</strong>, with some validation runs at <strong>$N=108$ particles</strong> to check for size dependence.</li>
<li><strong>State Points</strong>: Calculations covered a wide range of densities ($N\sigma^3/V = 0.50$ to $0.85$) and temperatures ($kT/\epsilon = 0.7$ to $2.8$), including the gas-liquid coexistence region.</li>
</ul>
<h3 id="baselines">Baselines</h3>
<ul>
<li><strong>Baselines</strong>: Results were compared to thermodynamic integration data from <strong>Hansen</strong>, <strong>Levesque</strong>, and <strong>Verlet</strong>.</li>
<li><strong>Quantitative Success</strong>:
<ul>
<li><strong>Agreement</strong>: The free energy estimates agreed with pressure integration results to within statistical uncertainties (e.g., at $kT/\epsilon=1.35$, Umbrella Sampling gave -3.236 vs. Conventional -3.25).</li>
<li><strong>Precision</strong>: Free energy differences were obtained with high precision ($\pm 0.005 NkT$ for $N=108$).</li>
<li><strong>Efficiency</strong>: A single umbrella run could replace the &ldquo;numerous runs&rdquo; required for conventional $1/T$ integrations.</li>
</ul>
</li>
</ul>
<h2 id="temperature-scaling-via-reweighting">Temperature Scaling via Reweighting</h2>
<p>When the reference system has the same internal energy function as the system of interest (i.e., the same fluid at a different temperature), the free-energy expression simplifies to:</p>
<p>$$\frac{A(T)}{kT} = \frac{A(T_0)}{kT_0} - \ln \int f_0(U) \exp\left[-U\left(\frac{1}{kT} - \frac{1}{kT_0}\right)\right] dU$$</p>
<p>This is especially useful because a single determination of $f_0(U)$ over a wide energy range gives the free energy over a whole range of temperatures simultaneously. For 32 Lennard-Jones particles, only two umbrella-sampling experiments are needed to span the temperature range from the triple point ($kT/\epsilon = 0.7$) to twice the critical temperature ($kT/\epsilon = 2.8$). For 108 particles, four experiments suffice.</p>
<h2 id="mapping-the-liquid-gas-free-energy-surface">Mapping the Liquid-Gas Free Energy Surface</h2>
<ul>
<li><strong>Methodological Utility</strong>: The method successfully mapped the free energy of the LJ fluid across the liquid-gas transition, a region where conventional methods face convergence problems.</li>
<li><strong>N-Dependence</strong>: Comparison between $N=32$ and $N=108$ showed no statistically significant size dependence for free energy differences, suggesting small systems are sufficient for these estimates.</li>
<li><strong>Comparison with Gosling-Singer Method</strong>: The paper contrasts its results with free energies derived from Gosling and Singer&rsquo;s entropy estimation technique, finding discrepancies as large as $0.4N\epsilon$ (a 20% error in the nonideal entropy), equivalent to overestimating the configurational integral of a 108-particle system by a factor of $10^{16}$.</li>
<li><strong>Generality</strong>: While demonstrated on energy ($U$), the authors note the weighting function $w$ can be any function of the coordinates, generalizing the technique beyond simple free energy differences.</li>
</ul>
<h2 id="reproducibility">Reproducibility</h2>
<p>This 1977 paper predates modern code-sharing practices, and no source code or data files are publicly available. However, the paper provides sufficient algorithmic detail for reimplementation:</p>
<ul>
<li><strong>Constructing $W$</strong>: The paper does not derive $W$ analytically. It uses a <strong>trial-and-error procedure</strong>: start with a short Boltzmann-weighted experiment, then broaden the distribution in stages through short test runs, adjusting weights to flatten the probability density $f_w(\Delta U^*)$. The paper acknowledges this requires &ldquo;interaction between the trial computer results and human judgment.&rdquo;</li>
<li><strong>Specific Weights</strong>: Table I provides the exact numerical weights used for the 32-particle soft-sphere experiment at $N\sigma^3/V = 0.85$, $kT/\epsilon = 2.74$, with values spanning from $W=1{,}500{,}000$ at the lowest energies down to $W=1.0$ at the center and back up to $W=16.0$ at the highest energies.</li>
<li><strong>Potentials</strong>: The Lennard-Jones and inverse-twelve potentials are fully specified (Eqs. 8 and 9).</li>
<li><strong>State Points</strong>: Densities and temperatures are enumerated in Tables II and III.</li>
<li><strong>Block Averaging</strong>: Errors were estimated by treating sequences of $m$ steps as independent samples, where $m$ is determined by increasing block size until no systematic trends can be detected in either the average or the standard deviation of the mean.</li>
</ul>
<h2 id="paper-information">Paper Information</h2>
<p><strong>Citation</strong>: Torrie, G. M., &amp; Valleau, J. P. (1977). Nonphysical sampling distributions in Monte Carlo free-energy estimation: Umbrella sampling. <em>Journal of Computational Physics</em>, 23(2), 187-199. <a href="https://doi.org/10.1016/0021-9991(77)90121-8">https://doi.org/10.1016/0021-9991(77)90121-8</a></p>
<p><strong>Publication</strong>: Journal of Computational Physics, 1977</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-bibtex" data-lang="bibtex"><span style="display:flex;"><span><span style="color:#a6e22e">@article</span>{torrie1977nonphysical,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">title</span>=<span style="color:#e6db74">{Nonphysical sampling distributions in Monte Carlo free-energy estimation: Umbrella sampling}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">author</span>=<span style="color:#e6db74">{Torrie, Glenn M and Valleau, John P}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">journal</span>=<span style="color:#e6db74">{Journal of Computational Physics}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">volume</span>=<span style="color:#e6db74">{23}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">number</span>=<span style="color:#e6db74">{2}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">pages</span>=<span style="color:#e6db74">{187--199}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">year</span>=<span style="color:#e6db74">{1977}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">publisher</span>=<span style="color:#e6db74">{Elsevier}</span>,
</span></span><span style="display:flex;"><span>  <span style="color:#a6e22e">doi</span>=<span style="color:#e6db74">{10.1016/0021-9991(77)90121-8}</span>
</span></span><span style="display:flex;"><span>}
</span></span></code></pre></div>]]></content:encoded></item><item><title>Platinum Adatom Diffusion on Pt(100): LAMMPS Simulation</title><link>https://hunterheidenreich.com/videos/pt-adatom-diffusion/</link><pubDate>Wed, 27 Sep 2023 00:00:00 +0000</pubDate><guid>https://hunterheidenreich.com/videos/pt-adatom-diffusion/</guid><description>LAMMPS molecular dynamics simulation of platinum adatom diffusion on a Pt(100) surface, showing atomic mobility mechanisms.</description><content:encoded><![CDATA[<div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;">
			<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube-nocookie.com/embed/1hhf5cQh56w?autoplay=0&amp;controls=1&amp;end=0&amp;loop=0&amp;mute=0&amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"></iframe>
		</div>

<p>Details on the simulation can be found in the <a href="/posts/adatom-cu-diffusion/">LAMMPS Tutorial: Copper and Platinum Adatom Diffusion</a> post and the <a href="/projects/lammps-adatom-diffusion/">Automated Adatom Diffusion Workflow</a> project page.</p>
]]></content:encoded></item><item><title>Copper Adatom Diffusion on Cu(100): LAMMPS Simulation</title><link>https://hunterheidenreich.com/videos/cu-adatom-diffusion/</link><pubDate>Wed, 27 Sep 2023 00:00:00 +0000</pubDate><guid>https://hunterheidenreich.com/videos/cu-adatom-diffusion/</guid><description>LAMMPS molecular dynamics simulation of copper adatom diffusion on a Cu(100) surface, showing atomic mobility mechanisms.</description><content:encoded><![CDATA[<div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;">
			<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube-nocookie.com/embed/nIdbNqEEPys?autoplay=0&amp;controls=1&amp;end=0&amp;loop=0&amp;mute=0&amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"></iframe>
		</div>

<p>Details on the simulation can be found in the <a href="/posts/adatom-cu-diffusion/">Cu Adatom Diffusion on Cu(100)</a> post and the <a href="/projects/lammps-adatom-diffusion/">Automated Adatom Diffusion Workflow</a> project page.</p>
]]></content:encoded></item><item><title>Generating Mini-Protein Trajectories with GROMACS</title><link>https://hunterheidenreich.com/posts/mini-proteins/</link><pubDate>Thu, 21 Sep 2023 00:00:00 +0000</pubDate><guid>https://hunterheidenreich.com/posts/mini-proteins/</guid><description>Systematic GROMACS workflows for simulating mini-proteins across multiple amino acids to generate diverse MD trajectories for ML applications.</description><content:encoded><![CDATA[<h2 id="introduction">Introduction</h2>
<p>When developing machine learning models for protein dynamics, I needed training data, lots of it. Most researchers start with alanine dipeptide, a tiny two-amino-acid system that&rsquo;s become the &ldquo;hello world&rdquo; of protein simulation. It&rsquo;s small enough to simulate quickly but complex enough to show interesting folding behavior.</p>
<p>I wanted more diversity in my training data. Different amino acid side chains behave differently, and I was curious how this would affect model performance. So I extended the typical alanine dipeptide approach to include eight other amino acids, creating a small collection of &ldquo;mini-proteins&rdquo; for ML studies.</p>
<p>These dipeptides give a controlled testbed for studying how different chemical properties (aromatic rings, flexibility, branching) affect molecular dynamics, and for generating training data that varies those properties systematically.</p>
<h2 id="what-are-mini-proteins">What Are Mini-Proteins?</h2>
<p>In this context, &ldquo;mini-proteins&rdquo; are single amino acid residues capped with acetyl and N-methyl groups (Ace-X-Nme, where X is the amino acid). These systems act as the simplest possible models that still capture essential protein-like behavior.</p>
<p>These systems are popular in computational studies because they:</p>
<ul>
<li>Simulate quickly (seconds to minutes instead of hours)</li>
<li>Have well-characterized behavior for validation</li>
<li>Show enough complexity to be interesting</li>
<li>Can be systematically varied to study different chemical effects</li>
</ul>
<h2 id="getting-started">Getting Started</h2>
<p>The complete workflow and scripts are available on GitHub: <a href="https://github.com/hunter-heidenreich/mini-proteins/">mini-proteins</a>. The full project overview is on the <a href="/projects/mini-protein-trajectories/">Mini-Protein Trajectory Generation project page</a>.</p>
<h3 id="requirements">Requirements</h3>
<ul>
<li>Linux system with GROMACS installed</li>
<li>Python 3 with numpy and matplotlib</li>
<li>Basic familiarity with molecular dynamics concepts</li>
</ul>
<h3 id="quick-start">Quick Start</h3>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>git clone https://github.com/hunter-heidenreich/mini-proteins
</span></span><span style="display:flex;"><span>cd mini-proteins
</span></span><span style="display:flex;"><span>ID<span style="color:#f92672">=</span>ala sh scripts/run.sh
</span></span></code></pre></div><p>This runs the complete pipeline: energy minimization, solvation, equilibration, and production simulation. The default settings generate 1 ns of trajectory data saved every 100 fs. I chose high temporal resolution for my ML models, but you can adjust this in <code>config/md_langevin.mdp</code>.</p>
<p>For longer production runs (recommended for most applications), increase the simulation time to ~100 ns and reduce the save frequency to manage file sizes.</p>
<h2 id="the-collection">The Collection</h2>
<p>I&rsquo;ve included nine different amino acid dipeptides, each with distinct chemical properties:</p>
<p><strong>Flexible systems</strong>: Glycine (smallest side chain), Alanine (methyl group)</p>
<p><strong>Branched systems</strong>: Valine, Isoleucine, Leucine (different branching patterns)</p>
<p><strong>Aromatic systems</strong>: Phenylalanine, Tryptophan (different ring structures)</p>
<p><strong>Special cases</strong>: Proline (ring constraint), Methionine (sulfur chemistry)</p>
<p>This systematic set allows studying how different chemical features affect dynamics:</p>
<ul>
<li>Does the flexibility of glycine lead to more diverse conformational sampling?</li>
<li>How do aromatic rings in tryptophan affect folding pathways?</li>
<li>Does the ring constraint in proline create different energy landscapes?</li>
</ul>
<p>These fundamental questions provide systematic data to test ML models against known chemical intuition, building confidence in the approach.</p>
<p>Ideally, a neural network trained on this dataset should learn physical <em>invariances</em>. By training on both aliphatic (Val, Leu, Ile) and aromatic (Phe, Trp) systems, the model learns to focus entirely on how electron density (π-systems vs. σ-bonds) influences local potential energy surfaces.</p>
<h3 id="generating-ml-ready-trajectory-data">Generating ML-Ready Trajectory Data</h3>
<p>Generating raw coordinates is easy; generating <strong>ML-ready data</strong> requires specific configurations. Standard MD simulations compress trajectory files to save space, discarding high-frequency velocity and force data. To train Neural Network Potentials (NNPs), I configured the GROMACS pipeline differently.</p>
<p>The fastest way to generate trajectory data is using the <code>run.sh</code> script:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>ID<span style="color:#f92672">=</span>ala sh scripts/run.sh
</span></span></code></pre></div><p>where <code>ID</code> is the three-letter amino acid code (here, <code>ala</code> for alanine).</p>
<p>This script performs energy minimization, solvation, neutralization, NVT equilibration, NPT equilibration, and production simulation. The resulting trajectory saves to the <code>out/ID/data</code> directory.</p>
<h4 id="why-this-pipeline-differs-from-standard-tutorials">Why This Pipeline Differs from Standard Tutorials</h4>
<p>A key deviation from standard tutorials is the use of <strong>Stochastic Dynamics (Langevin)</strong> as the integrator. This adds friction and noise terms to the equations of motion, ensuring correct thermodynamic sampling:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-ini" data-lang="ini"><span style="display:flex;"><span><span style="color:#75715e">; config/md_langevin.mdp</span>
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">integrator</span>  <span style="color:#f92672">=</span> <span style="color:#e6db74">sd        ; Stochastic dynamics (Langevin)</span>
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">dt</span>          <span style="color:#f92672">=</span> <span style="color:#e6db74">0.001     ; 1 fs timestep</span>
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">nstxout</span>     <span style="color:#f92672">=</span> <span style="color:#e6db74">100       ; Save coordinates every 100 steps</span>
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">nstvout</span>     <span style="color:#f92672">=</span> <span style="color:#e6db74">100       ; Save velocities every 100 steps</span>
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">nstfout</span>     <span style="color:#f92672">=</span> <span style="color:#e6db74">100       ; Save forces every 100 steps</span>
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">tc-grps</span>     <span style="color:#f92672">=</span> <span style="color:#e6db74">Protein Non-Protein</span>
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">tau_t</span>       <span style="color:#f92672">=</span> <span style="color:#e6db74">0.1  0.1  ; Friction constant (ps)</span>
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">ref_t</span>       <span style="color:#f92672">=</span> <span style="color:#e6db74">298  298  ; Reference temperature (K)</span>
</span></span></code></pre></div><p>The critical settings for ML applications:</p>
<ol>
<li><strong>Langevin Dynamics (<code>sd</code>)</strong>: Ensures proper canonical (NVT) sampling, providing a robust alternative to the velocity-rescaling thermostat often used in tutorials</li>
<li><strong>Uncompressed Force Output (<code>nstfout = 100</code>)</strong>: Writing to <code>.trr</code> format captures the precise atomic forces acting on every atom, essential for force-matching in NNP training</li>
<li><strong>High-Frequency Sampling (0.1 ps)</strong>: Saving frames every 100 fs captures fast bond vibrations often missed in standard 10 ps snapshots</li>
</ol>
<p><strong>Note</strong>: A production simulation currently runs for 1 nanosecond, saved every 0.1 picoseconds (100 fs). For most applications, increase this to 100 nanoseconds and adjust the save frequency to avoid large data files. I targeted 100 fs because I needed correlated time data for ML models; other applications may require a lower frequency.</p>
<p>You can also run each step individually (see <code>scripts/run.sh</code> for examples).</p>
<h2 id="the-systems">The Systems</h2>
<p>Here are the nine amino acid dipeptides I&rsquo;ve included, each chosen for different chemical properties:</p>
<h3 id="alanine-dipeptide-the-standard">Alanine Dipeptide: The Standard</h3>















<figure class="post-figure center ">
    <img src="/img/alanine-dipeptide-molecular-dynamics.webp"
         alt="Alanine dipeptide molecular dynamics simulation animation"
         title="Alanine dipeptide molecular dynamics simulation animation"
         
         
         loading="lazy"
         class="post-image">
    
    <figcaption class="post-caption">Alanine Dipeptide</figcaption>
    
</figure>

<p>The classic starting point for protein folding studies. The small methyl side chain provides a simple yet challenging system.</p>
<h3 id="glycine-dipeptide-maximum-flexibility">Glycine Dipeptide: Maximum Flexibility</h3>















<figure class="post-figure center ">
    <img src="/img/glycine-dipeptide-molecular-dynamics.webp"
         alt="Glycine dipeptide molecular dynamics simulation animation"
         title="Glycine dipeptide molecular dynamics simulation animation"
         
         
         loading="lazy"
         class="post-image">
    
    <figcaption class="post-caption">Glycine Dipeptide</figcaption>
    
</figure>

<p>No side chain means maximum backbone flexibility. Great for studying how constraints affect conformational sampling.</p>
<h3 id="proline-dipeptide-built-in-rigidity">Proline Dipeptide: Built-in Rigidity</h3>















<figure class="post-figure center ">
    <img src="/img/proline-dipeptide-molecular-dynamics.webp"
         alt="Proline dipeptide molecular dynamics simulation animation"
         title="Proline dipeptide molecular dynamics simulation animation"
         
         
         loading="lazy"
         class="post-image">
    
    <figcaption class="post-caption">Proline Dipeptide</figcaption>
    
</figure>

<p>The ring structure creates backbone constraints. Interesting comparison to glycine&rsquo;s flexibility.</p>
<h3 id="aromatic-systems">Aromatic Systems</h3>















<figure class="post-figure center ">
    <img src="/img/phenylalanine-dipeptide-molecular-dynamics.webp"
         alt="Phenylalanine dipeptide molecular dynamics simulation animation"
         title="Phenylalanine dipeptide molecular dynamics simulation animation"
         
         
         loading="lazy"
         class="post-image">
    
    <figcaption class="post-caption">Phenylalanine Dipeptide</figcaption>
    
</figure>

<p><strong>Phenylalanine</strong>: Simple benzene ring for studying aromatic interactions.</p>















<figure class="post-figure center ">
    <img src="/img/tryptophan-dipeptide-molecular-dynamics.webp"
         alt="Tryptophan dipeptide molecular dynamics simulation animation"
         title="Tryptophan dipeptide molecular dynamics simulation animation"
         
         
         loading="lazy"
         class="post-image">
    
    <figcaption class="post-caption">Tryptophan Dipeptide</figcaption>
    
</figure>

<p><strong>Tryptophan</strong>: Larger indole ring system with more complex aromatic chemistry.</p>
<h3 id="branched-aliphatic-systems">Branched Aliphatic Systems</h3>















<figure class="post-figure center ">
    <img src="/img/valine-dipeptide-molecular-dynamics.webp"
         alt="Valine dipeptide molecular dynamics simulation animation"
         title="Valine dipeptide molecular dynamics simulation animation"
         
         
         loading="lazy"
         class="post-image">
    
    <figcaption class="post-caption">Valine Dipeptide</figcaption>
    
</figure>

<p><strong>Valine</strong>: β-branched, creates steric constraints near the backbone.</p>















<figure class="post-figure center ">
    <img src="/img/isoleucine-dipeptide-molecular-dynamics.webp"
         alt="Isoleucine dipeptide molecular dynamics simulation animation"
         title="Isoleucine dipeptide molecular dynamics simulation animation"
         
         
         loading="lazy"
         class="post-image">
    
    <figcaption class="post-caption">Isoleucine Dipeptide</figcaption>
    
</figure>

<p><strong>Isoleucine</strong>: γ-branched, different steric profile than valine.</p>















<figure class="post-figure center ">
    <img src="/img/leucine-dipeptide-molecular-dynamics.webp"
         alt="Leucine dipeptide molecular dynamics simulation animation"
         title="Leucine dipeptide molecular dynamics simulation animation"
         
         
         loading="lazy"
         class="post-image">
    
    <figcaption class="post-caption">Leucine Dipeptide</figcaption>
    
</figure>

<p><strong>Leucine</strong>: Longer branched chain with more conformational freedom.</p>
<h3 id="special-chemistry">Special Chemistry</h3>















<figure class="post-figure center ">
    <img src="/img/methionine-dipeptide-molecular-dynamics.webp"
         alt="Methionine dipeptide molecular dynamics simulation animation"
         title="Methionine dipeptide molecular dynamics simulation animation"
         
         
         loading="lazy"
         class="post-image">
    
    <figcaption class="post-caption">Methionine Dipeptide</figcaption>
    
</figure>

<p><strong>Methionine</strong>: Sulfur chemistry, different from the others and interesting for studying heteroatom effects.</p>
<h2 id="whats-next">What&rsquo;s Next?</h2>
<p>These mini-protein simulations have been useful for my ML work, providing systematic training data with controlled chemical variation. These simple systems have helped me understand how different amino acid properties affect molecular behavior, knowledge that&rsquo;s valuable when working with larger, more complex proteins.</p>
<p>The primary value of this pipeline lies in the <strong>force extraction</strong> workflow. Having atomic forces alongside coordinates enables training NNPs via force matching; force information is a richer training signal than energies alone. Tools like <a href="https://github.com/torchmd/torchmd-net">TorchMD-Net</a>, <a href="https://github.com/mir-group/nequip">NequIP</a>, and <a href="https://github.com/ACEsuit/mace">MACE</a> can directly consume this data format.</p>
<p>The scripts are designed to be easily modified for different amino acids or simulation conditions. I&rsquo;ve tried to make the workflow straightforward while keeping it flexible.</p>
<p>This work complements my other molecular dynamics projects:</p>
<ul>
<li><a href="/posts/adatom-cu-diffusion/">LAMMPS Tutorial: Copper and Platinum Adatom Diffusion</a>: Learning LAMMPS for surface simulations and extending to different elements</li>
</ul>
<p>Together, these projects have given me a solid foundation in MD simulations for generating ML training data across different molecular systems.</p>
<hr>
<p><em>Find the complete code and documentation on <a href="https://github.com/hunter-heidenreich/mini-proteins">GitHub</a>. Questions or suggestions? I&rsquo;d love to hear from you, especially if you&rsquo;ve found interesting ways to extend or improve the approach.</em></p>
<h2 id="acknowledgements">Acknowledgements</h2>
<p>The scripts build on the <a href="https://cbp-unitn.gitlab.io/qcb22-23/QCB/tutorial2_gromacs">GROMACS tutorial</a> by Luca Tubiana at the University of Trento.</p>
]]></content:encoded></item><item><title>Automated Adatom Diffusion Workflow</title><link>https://hunterheidenreich.com/projects/lammps-adatom-diffusion/</link><pubDate>Thu, 21 Sep 2023 00:00:00 +0000</pubDate><guid>https://hunterheidenreich.com/projects/lammps-adatom-diffusion/</guid><description>Python-wrapped reference implementation for surface diffusion simulations using LAMMPS and EAM potentials, with automated analysis pipelines.</description><content:encoded><![CDATA[<h2 id="overview">Overview</h2>
<p>This project provides an &ldquo;input-to-analysis&rdquo; workflow for simulating adatom diffusion on FCC metal surfaces. It demonstrates how to set up surface diffusion simulations in LAMMPS, manage EAM potentials, and parse trajectory data into energy and trajectory plots using Python. The LAMMPS input scripts are adapted from Eric N. Hahn&rsquo;s adatom tutorial; the Python analysis layer (<code>plot_energy.py</code>, <code>plot_xy.py</code>) is my own, written while in CSElab (Harvard, 2023).</p>
<p>The workflow covers two material systems (Copper (Cu) and Platinum (Pt)) providing comparative datasets that highlight how atomic mass and bonding strength affect surface dynamics.</p>
<h2 id="features">Features</h2>
<h3 id="simulation-architecture">Simulation Architecture</h3>
<p>The project separates simulation logic from analysis code:</p>
<table>
	<thead>
			<tr>
					<th style="text-align: left">Directory</th>
					<th style="text-align: left">Description</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td style="text-align: left"><strong><code>/adatom_cu</code></strong></td>
					<td style="text-align: left">Copper adatom diffusion on Cu(100)</td>
			</tr>
			<tr>
					<td style="text-align: left"><strong><code>/adatom_pt</code></strong></td>
					<td style="text-align: left">Platinum adatom diffusion on Pt(100)</td>
			</tr>
	</tbody>
</table>
<p>Each directory contains:</p>
<ul>
<li><strong>LAMMPS input scripts</strong> (<code>.in</code> files) defining the physics</li>
<li><strong>EAM potential files</strong> for metallic bonding (the Cu potential is committed; the Pt potential must be downloaded separately from the NIST Interatomic Potentials Repository, so the Pt system does not run as-checked-out)</li>
<li><strong>Python analysis scripts</strong> for trajectory and energy parsing</li>
</ul>
<h3 id="key-features">Key Features</h3>
<ul>
<li><strong>EAM Potentials</strong>: Uses Embedded Atom Method alloy potentials to accurately model metallic bonding and surface energies, providing accuracy beyond simple Lennard-Jones potentials</li>
<li><strong>Automated Analysis</strong>: Python pipeline (<code>plot_energy.py</code>, <code>plot_xy.py</code>) that parses raw thermodynamic logs and trajectory dumps to generate &ldquo;health check&rdquo; dashboards</li>
<li><strong>Workflow Orchestration</strong>: Demonstrates the &ldquo;Input → Simulation → Analysis&rdquo; loop, automating the transition from raw <code>.lammpstrj</code> files to publication-ready plots</li>
<li><strong>Kokkos Support</strong>: Includes Kokkos execution commands for GPU/multi-threaded runs</li>
</ul>
<h3 id="simulation-parameters">Simulation Parameters</h3>
<table>
	<thead>
			<tr>
					<th style="text-align: left">Parameter</th>
					<th style="text-align: left">Value</th>
					<th style="text-align: left">Purpose</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td style="text-align: left"><strong>Ensemble</strong></td>
					<td style="text-align: left">NVT → NVE</td>
					<td style="text-align: left">Equilibration followed by energy conservation checks</td>
			</tr>
			<tr>
					<td style="text-align: left"><strong>Potential</strong></td>
					<td style="text-align: left">EAM/alloy</td>
					<td style="text-align: left">Accurate metallic bonding for surface dynamics</td>
			</tr>
			<tr>
					<td style="text-align: left"><strong>Minimization</strong></td>
					<td style="text-align: left">CG (1.0e-4)</td>
					<td style="text-align: left">Remove steric overlaps before dynamics</td>
			</tr>
			<tr>
					<td style="text-align: left"><strong>Timestep</strong></td>
					<td style="text-align: left">5 fs (metal units)</td>
					<td style="text-align: left">EAM-appropriate integration step</td>
			</tr>
			<tr>
					<td style="text-align: left"><strong>Trajectory dump</strong></td>
					<td style="text-align: left">every 5 steps (25 fs)</td>
					<td style="text-align: left">Tracks adatom site-to-site hops</td>
			</tr>
	</tbody>
</table>
<h2 id="usage">Usage</h2>
<p>The repository includes LAMMPS input scripts and Python analysis scripts. Run the LAMMPS scripts to generate trajectory data, then use the Python scripts to visualize the results.</p>
<h2 id="results">Results</h2>
<p>This workflow is documented in detail in companion blog posts:</p>
<ul>
<li><a href="/posts/adatom-cu-diffusion/">LAMMPS Tutorial: Copper and Platinum Adatom Diffusion</a> - Complete setup walkthrough with line-by-line script explanation and comparison of how heavier atoms behave differently on surfaces</li>
</ul>
]]></content:encoded></item><item><title>Mini-Protein Trajectory Generation</title><link>https://hunterheidenreich.com/projects/mini-protein-trajectories/</link><pubDate>Tue, 01 Aug 2023 00:00:00 +0000</pubDate><guid>https://hunterheidenreich.com/projects/mini-protein-trajectories/</guid><description>Automated GROMACS pipeline generating MD trajectories with atomic force extraction for Neural Network Potential training.</description><content:encoded><![CDATA[<h2 id="overview">Overview</h2>
<p>I developed an automated GROMACS pipeline to generate molecular dynamics (MD) datasets for machine learning applications. The workflow automates the simulation of capped dipeptides across nine distinct residue types, creating a diverse training set suitable for Neural Network Potentials (NNPs). The pipeline is built off Luca Tubiana&rsquo;s GROMACS tutorial (University of Trento); the Python analysis layer and the curated dipeptide dataset are my own.</p>
<h2 id="features">Features</h2>
<h3 id="automated-simulation-pipeline">Automated Simulation Pipeline</h3>
<ul>
<li><strong>End-to-End Scripting</strong>: Bash-automated workflow handling topology generation (<code>pdb2gmx</code>), solvation, ionization, and equilibration</li>
<li><strong>Langevin Dynamics</strong>: Implemented Stochastic Dynamics (SD) integration to ensure proper canonical (NVT) ensemble sampling</li>
<li><strong>High-Resolution Output</strong>: Configured to capture <strong>0.1 ps (100 fs) resolution</strong> trajectories, critical for capturing fast bond vibrations</li>
<li><strong>Force Extraction</strong>: Optimized output to <code>.trr</code> format preserving uncompressed atomic forces, a key requirement for force-matching in ML potentials</li>
</ul>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-ini" data-lang="ini"><span style="display:flex;"><span><span style="color:#75715e">; md_langevin.mdp</span>
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">integrator</span>  <span style="color:#f92672">=</span> <span style="color:#e6db74">sd        ; Stochastic dynamics for proper sampling</span>
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">dt</span>          <span style="color:#f92672">=</span> <span style="color:#e6db74">0.001     ; 1 fs timestep</span>
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">nstxout</span>     <span style="color:#f92672">=</span> <span style="color:#e6db74">100       ; Output every 100 steps = 0.1 ps resolution</span>
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">tc-grps</span>     <span style="color:#f92672">=</span> <span style="color:#e6db74">Protein Non-Protein</span>
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">tau_t</span>       <span style="color:#f92672">=</span> <span style="color:#e6db74">0.1  0.1  ; Friction constant (ps)</span>
</span></span></code></pre></div><h3 id="chemical-diversity-suite">Chemical Diversity Suite</h3>
<p>Designed to stress-test ML models against varied kinematic constraints:</p>
<table>
	<thead>
			<tr>
					<th>Category</th>
					<th>Residues</th>
					<th>Dynamics Challenge</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td><strong>Aromatic</strong></td>
					<td>Phe, Trp</td>
					<td>π-stacking, bulky side chains</td>
			</tr>
			<tr>
					<td><strong>Constrained</strong></td>
					<td>Pro</td>
					<td>Cyclic backbone restrictions</td>
			</tr>
			<tr>
					<td><strong>Flexible</strong></td>
					<td>Gly, Ala</td>
					<td>High conformational entropy</td>
			</tr>
			<tr>
					<td><strong>Branched</strong></td>
					<td>Val, Ile, Leu</td>
					<td>Steric clashes, rotamer preferences</td>
			</tr>
			<tr>
					<td><strong>Sulfur-Containing</strong></td>
					<td>Met</td>
					<td>Flexible thioether linkage</td>
			</tr>
	</tbody>
</table>
<h2 id="usage">Usage</h2>
<p>The pipeline is executed via bash scripts and needs a working GROMACS (<code>gmx</code>) install:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>uv sync                 <span style="color:#75715e"># core: numpy + matplotlib</span>
</span></span><span style="display:flex;"><span>uv sync --extra ml      <span style="color:#75715e"># adds the OpenMM benchmark track</span>
</span></span></code></pre></div><h2 id="design-decisions">Design Decisions</h2>
<ul>
<li><strong>Data Volume vs. Fidelity</strong>: Balanced high-frequency force outputs (every 100 steps) against storage constraints by automating post-processing extraction of forces into lightweight <code>.xvg</code> formats</li>
<li><strong>Force Field Consistency</strong>: Standardized the Amber03 force field and TIP3P water model across all residues to ensure consistent potential energy surfaces for downstream model training</li>
</ul>
<h2 id="retrospective">Retrospective</h2>
<ul>
<li><strong>Demonstrative, not production-scale</strong>: the 1 ns trajectories exercise the pipeline and capture fast bond vibrations, but proper conformational sampling needs 100 ns to 1 µs runs. This is a working reference, not a finished dataset.</li>
<li><strong>Dated force field</strong>: Amber03 / TIP3P keeps the potential energy surface consistent across residues, but it is not state-of-the-art for ML-potential training; CHARMM36m or Amber ff19SB would be the upgrade path.</li>
<li><strong>Paused, not abandoned</strong>: a candidate to revive and extend (more residues, longer trajectories, Ramachandran analysis) for future force-matching work.</li>
</ul>
<h2 id="related-work">Related Work</h2>
<ul>
<li><a href="/posts/mini-proteins/">Mini-Protein Dynamics</a> - Detailed blog post on the simulation methodology</li>
</ul>
]]></content:encoded></item><item><title>Rubik's Cube Player - Drexel Music Hackathon 2017</title><link>https://hunterheidenreich.com/videos/rubiks-cube-player-hackathon/</link><pubDate>Sun, 29 Jan 2017 00:00:00 +0000</pubDate><guid>https://hunterheidenreich.com/videos/rubiks-cube-player-hackathon/</guid><description>A hackathon project that converts Rubik's cube faces into music, creating more harmonious sounds as the cube becomes more solved.</description><content:encoded><![CDATA[<div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;">
			<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube-nocookie.com/embed/s0xpRTJYw4I?autoplay=0&amp;controls=1&amp;end=0&amp;loop=0&amp;mute=0&amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"></iframe>
		</div>

<p>This is a project I worked on with Emmanuel Espino and Jason Zogheb for the Drexel 2017 Music Hackathon at the ExCITe Center. The Rubik&rsquo;s Cube Player uses a webcam to capture images of a Rubik&rsquo;s cube face and converts the color patterns into musical pitches.</p>
<p>The interesting part is that the more solved a cube face is, the more harmonious the generated melody sounds. We built this in less than 24 hours using Python, computer vision libraries, and audio synthesis techniques.</p>
<h2 id="technical-details">Technical Details</h2>
<ul>
<li><strong>Computer Vision</strong>: Uses webcam capture and image processing to identify cube colors</li>
<li><strong>Audio Generation</strong>: Converts color patterns to musical pitches and waveforms</li>
<li><strong>Real-time Processing</strong>: Live analysis and audio playback</li>
<li><strong>Harmony Algorithm</strong>: More solved faces produce more consonant musical intervals</li>
</ul>
<h2 id="links">Links</h2>
<ul>
<li><strong>GitHub Repository</strong>: <a href="https://github.com/hunter-heidenreich/Rubik-s-Player">Rubik&rsquo;s Player</a></li>
<li><strong>Project Page</strong>: <a href="/projects/rubiks-cube-player/">Rubik&rsquo;s Cube Player</a></li>
<li><strong>Contributors</strong>: Emmanuel Espino, Jason Zogheb, and myself</li>
</ul>
]]></content:encoded></item><item><title>Internal Reflection - Audio Reactive Music Video</title><link>https://hunterheidenreich.com/videos/internal-reflection-music-video/</link><pubDate>Tue, 30 Aug 2016 00:00:00 +0000</pubDate><guid>https://hunterheidenreich.com/videos/internal-reflection-music-video/</guid><description>Audio reactive music video for 'Internal Reflection' by Section 31 - Tech, created using Processing for real-time audio visualization.</description><content:encoded><![CDATA[<div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;">
			<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube-nocookie.com/embed/C7xNV_5WXBo?autoplay=0&amp;controls=1&amp;end=0&amp;loop=0&amp;mute=0&amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"></iframe>
		</div>

<p>This is an audio reactive music video for &ldquo;Internal Reflection&rdquo; by <strong>Section 31 - Tech</strong>. The visuals were generated using code that responds to audio information in real-time, making it an audio visualization video.</p>
<p>This video was created using <strong>Processing</strong>, a flexible software sketchbook and language for learning how to code within the context of the visual arts.</p>
<h2 id="song-credit">Song Credit</h2>
<ul>
<li><strong>Artist</strong>: Section 31 - Tech</li>
<li><strong>Track</strong>: Internal Reflection</li>
<li><strong>Source</strong>: <a href="https://opengameart.org/content/internal-reflection">OpenGameArt</a></li>
</ul>
]]></content:encoded></item><item><title>The Secrecy in Dreaming - Music Video</title><link>https://hunterheidenreich.com/videos/the-secrecy-in-dreaming-music-video/</link><pubDate>Sat, 25 Jul 2015 00:00:00 +0000</pubDate><guid>https://hunterheidenreich.com/videos/the-secrecy-in-dreaming-music-video/</guid><description>Music video for 'The Secrecy in Dreaming' by Youthful Notion, an experimental electronic track with visuals created in Unity3D.</description><content:encoded><![CDATA[<div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;">
			<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube-nocookie.com/embed/H7NArm5oVWM?autoplay=0&amp;controls=1&amp;end=0&amp;loop=0&amp;mute=0&amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"></iframe>
		</div>

<p>This is a music video for &ldquo;The Secrecy in Dreaming,&rdquo; another experimental electronic track I made under the name <strong>Youthful Notion</strong>. Like the other videos from this project, it uses basic audio visualization in Unity3D.</p>
<p>This was also part of <em>The Edge of Waking</em> EP from 2015.</p>
<h2 id="stream--purchase">Stream &amp; Purchase</h2>
<ul>
<li><strong>Apple Music</strong>: <a href="https://music.apple.com/us/album/the-edge-of-waking-ep/1000608446">The Edge of Waking EP</a></li>
<li><strong>Spotify</strong>: <a href="https://open.spotify.com/album/2B43KWlpv38vB4r8POnC9Y">The Edge of Waking EP</a></li>
</ul>
]]></content:encoded></item><item><title>In the Grass By a Lake - Music Video</title><link>https://hunterheidenreich.com/videos/in-the-grass-by-a-lake-music-video/</link><pubDate>Sat, 25 Jul 2015 00:00:00 +0000</pubDate><guid>https://hunterheidenreich.com/videos/in-the-grass-by-a-lake-music-video/</guid><description>Music video for 'In the Grass By a Lake' by Youthful Notion, an experimental electronic track with visuals created in Unity3D.</description><content:encoded><![CDATA[<div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;">
			<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube-nocookie.com/embed/prW9gteIVME?autoplay=0&amp;controls=1&amp;end=0&amp;loop=0&amp;mute=0&amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"></iframe>
		</div>

<p>This is a music video for &ldquo;In the Grass By a Lake,&rdquo; another experimental electronic track I made under the name <strong>Youthful Notion</strong>. Like the other videos from this project, it uses basic audio visualization in Unity3D.</p>
<p>This was also part of <em>The Edge of Waking</em> EP from 2015.</p>
<h2 id="stream--purchase">Stream &amp; Purchase</h2>
<ul>
<li><strong>Apple Music</strong>: <a href="https://music.apple.com/us/album/the-edge-of-waking-ep/1000608446">The Edge of Waking EP</a></li>
<li><strong>Spotify</strong>: <a href="https://open.spotify.com/album/2B43KWlpv38vB4r8POnC9Y">The Edge of Waking EP</a></li>
</ul>
]]></content:encoded></item><item><title>False Idols - Music Video</title><link>https://hunterheidenreich.com/videos/false-idols-music-video/</link><pubDate>Sat, 25 Jul 2015 00:00:00 +0000</pubDate><guid>https://hunterheidenreich.com/videos/false-idols-music-video/</guid><description>Music video for 'False Idols' by Youthful Notion, an experimental electronic track with visuals created in Unity3D.</description><content:encoded><![CDATA[<div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;">
			<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube-nocookie.com/embed/E2aG8g0o09M?autoplay=0&amp;controls=1&amp;end=0&amp;loop=0&amp;mute=0&amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"></iframe>
		</div>

<p>This is a music video for &ldquo;False Idols,&rdquo; another experimental electronic track I made under the name <strong>Youthful Notion</strong>. Like the other videos from this project, it uses basic audio visualization in Unity3D.</p>
<p>This was also part of <em>The Edge of Waking</em> EP from 2015.</p>
<h2 id="stream--purchase">Stream &amp; Purchase</h2>
<ul>
<li><strong>Apple Music</strong>: <a href="https://music.apple.com/us/album/the-edge-of-waking-ep/1000608446">The Edge of Waking EP</a></li>
<li><strong>Spotify</strong>: <a href="https://open.spotify.com/album/2B43KWlpv38vB4r8POnC9Y">The Edge of Waking EP</a></li>
</ul>
]]></content:encoded></item><item><title>False Gods - Official Music Video</title><link>https://hunterheidenreich.com/videos/false-gods-official-video/</link><pubDate>Sat, 25 Jul 2015 00:00:00 +0000</pubDate><guid>https://hunterheidenreich.com/videos/false-gods-official-video/</guid><description>Music video for 'False Gods' by Youthful Notion, an experimental electronic track with visuals created in Unity3D.</description><content:encoded><![CDATA[<div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;">
			<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube-nocookie.com/embed/Cw2Hz2rAZxo?autoplay=0&amp;controls=1&amp;end=0&amp;loop=0&amp;mute=0&amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"></iframe>
		</div>

<p>This is a music video for &ldquo;False Gods,&rdquo; an experimental electronic track I made under the name <strong>Youthful Notion</strong>. The video uses some basic audio visualization in Unity3D that responds to the music.</p>
<p>This was part of an EP called <em>The Edge of Waking</em> that I released back in 2015.</p>
<h2 id="stream--purchase">Stream &amp; Purchase</h2>
<ul>
<li><strong>Apple Music</strong>: <a href="https://music.apple.com/us/album/the-edge-of-waking-ep/1000608446">The Edge of Waking EP</a></li>
<li><strong>Spotify</strong>: <a href="https://open.spotify.com/album/2B43KWlpv38vB4r8POnC9Y">The Edge of Waking EP</a></li>
</ul>
]]></content:encoded></item><item><title>Concavity - Music Video</title><link>https://hunterheidenreich.com/videos/concavity-music-video/</link><pubDate>Sat, 25 Jul 2015 00:00:00 +0000</pubDate><guid>https://hunterheidenreich.com/videos/concavity-music-video/</guid><description>Music video for 'Concavity' by Youthful Notion, an experimental electronic track with visuals created in Unity3D.</description><content:encoded><![CDATA[<div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;">
			<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube-nocookie.com/embed/vpUl3UJtHRg?autoplay=0&amp;controls=1&amp;end=0&amp;loop=0&amp;mute=0&amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"></iframe>
		</div>

<p>This is a music video for &ldquo;Concavity,&rdquo; another experimental electronic track I made under the name <strong>Youthful Notion</strong>. Like the other videos from this project, it uses basic audio visualization in Unity3D.</p>
<p>This was also part of <em>The Edge of Waking</em> EP from 2015.</p>
<h2 id="stream--purchase">Stream &amp; Purchase</h2>
<ul>
<li><strong>Apple Music</strong>: <a href="https://music.apple.com/us/album/the-edge-of-waking-ep/1000608446">The Edge of Waking EP</a></li>
<li><strong>Spotify</strong>: <a href="https://open.spotify.com/album/2B43KWlpv38vB4r8POnC9Y">The Edge of Waking EP</a></li>
</ul>
]]></content:encoded></item><item><title>Carnal Desires (My Soul) - Music Video</title><link>https://hunterheidenreich.com/videos/carnal-desires-music-video/</link><pubDate>Sat, 25 Jul 2015 00:00:00 +0000</pubDate><guid>https://hunterheidenreich.com/videos/carnal-desires-music-video/</guid><description>Music video for 'Carnal Desires (My Soul)' by Youthful Notion, an experimental electronic track with visuals created in Unity3D.</description><content:encoded><![CDATA[<div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;">
			<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube-nocookie.com/embed/vCu9I4mTMkA?autoplay=0&amp;controls=1&amp;end=0&amp;loop=0&amp;mute=0&amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"></iframe>
		</div>

<p>This is a music video for &ldquo;Carnal Desires (My Soul),&rdquo; another experimental electronic track I made under the name <strong>Youthful Notion</strong>. Like the other videos from this project, it uses basic audio visualization in Unity3D.</p>
<p>This was also part of <em>The Edge of Waking</em> EP from 2015.</p>
<h2 id="stream--purchase">Stream &amp; Purchase</h2>
<ul>
<li><strong>Apple Music</strong>: <a href="https://music.apple.com/us/album/the-edge-of-waking-ep/1000608446">The Edge of Waking EP</a></li>
<li><strong>Spotify</strong>: <a href="https://open.spotify.com/album/2B43KWlpv38vB4r8POnC9Y">The Edge of Waking EP</a></li>
</ul>
]]></content:encoded></item></channel></rss>