Three atoms of a Lennard-Jones cluster lie on a line at positions , ,

PHYSICS · Multi-part · Fermi University Physics · Mathematical Methods for Physics · Computational Physics · Scientific programming for physicists

Scientific Computing for Physicists, Ch Letting the computer do advanced algebra: operators, series and differentiated programs

Problem

Three atoms of a Lennard-Jones cluster lie on a line at positions x1=0x_1=0, x2=1.2σx_2=1.2\sigma, x3=2.4σx_3=2.4\sigma, with V(r)=4ϵ[(σ/r)12−(σ/r)6]V(r)=4\epsilon[(\sigma/r)^{12}-(\sigma/r)^6]. Building the full pairwise-distance array rij=∣xi−xj∣r_{ij}=|x_i-x_j| by broadcasting the position array against itself (as in Chapter 1), the total energy is the index contraction E=12∑i≠jV(rij).E=\tfrac12\sum_{i\ne j}V(r_{ij}). ((a)) Evaluate EE, in units of ϵ\epsilon, from the three pair distances. ((b)) Rather than differentiating by hand, generate dV/dr\mathrm{d}V/\mathrm{d}r symbolically and use the chain rule r1j=∣xj−x1∣⇒dr1j/dx1=−1r_{1j}=|x_j-x_1|\Rightarrow \mathrm{d}r_{1j}/\mathrm{d}x_1=-1 to obtain ∂E/∂x1\partial E/\partial x_1 (in units of ϵ/σ\epsilon/\sigma), summing the contributions from r12r_{12} and r13r_{13} only (the pair r23r_{23} does not involve x1x_1). ((c)) The generic estimate says a central difference at h⋆=(3ϵmach)1/3σ≈8.7×10−6σh^\star=(3\epsilon_{\rm mach})^{1/3}\sigma\approx8.7\times10^{-6}\sigma is good to about ϵmach2/3≈4×10−11\epsilon_{\rm mach}^{2/3}\approx4\times10^{-11} relative, for a third derivative of ordinary size. Generate ∂3E/∂x13\partial^3E/\partial x_1^3 at this configuration, estimate the leading truncation error h⋆2∣∂3E/∂x13∣/6h^{\star2}|\partial^3E/\partial x_1^3|/6 relative to ∣∂E/∂x1∣|\partial E/\partial x_1|, and say what relative tolerance a check of the generated ∂E/∂x1\partial E/\partial x_1 against a central difference at h⋆h^\star should use.

Browse the problem library