From Hard Spheres and Cubes to Nonequilibrium Maps with Thirty-Some Years of Thermostatted Molecular Dynamics

This is our current research perspective on models providing insight into statistical mechanics. It is necessarily personal, emphasizing our own interest in simulation as it developed from the National Laboratories' work to the worldwide explosion of computation of today. We contrast the past and present in atomistic simulations, emphasizing those simple models which best achieve reproducibility and promote understanding. Few-body models with pair forces have led to today's"realistic"simulations with billions of atoms and molecules. Rapid advances in computer technology have led to change. Theoretical formalisms have largely been replaced by simulations incorporating ingenious algorithm development. We choose to study particularly simple, yet relevant, models directed toward understanding general principles. Simplicity remains a worthy goal, as does relevance. We discuss hard-particle virial series, melting, thermostatted oscillators with and without heat conduction, chaotic dynamics, fractals, the connection of Lyapunov spectra to thermodynamics, and finally simple linear maps. Along the way we mention directions in which additional modelling could provide more clarity and yet more interesting developments in the future.


I. HOW THIS PROJECT BEGAN
This project began with the loss of a long-time colleague and good friend, Francis Hayin Ree, a generous and productive gentleman-scholar. As Bill's nine joint publications with Francis had appeared in the Journal of Chemical Physics from 1963 to 1968, Bill thought JCP well-suited to a short publication honoring Francis' memory and work. He wrote and submitted a memorial piece and soon received two pieces of news from JCP: The bad news: Memorial Articles were not allowed; The good news: a "Perspective" article touching on A certain amount of "Perspective" is a natural side effect of being part of the research scene for 60 years. There is plenty of opportunity to distinguish useful from useless work and to reflect upon the difference. Two things stand out, with a third lurking in the background.
First of all useful work is reproducible. In fact the reproduction of science is in itself extremely satisfying. Being able to follow a trail gives one confidence in blazing his own, leaving sufficient clues so that his fellows can follow suit. A second characteristic of useful work is simplicity as recommended by Occam and Thoreau. Simplicity saves time in the assessment and reproduction and generalization and also indicates a kind regard for one's fellows. When Bill read Zwanzig's claim that cubes could bound results for spheres 76 it was relatively easy to see that the "bound" was mistaken, as Zwanzig's ideas were expressed clearly. When Bill read Nosé's discussion of canonical dynamics 50,51 he entered into a struggle to understand ideas which were more formal than useful and though stimulating, were in the end too complex in their presentation. Simplicity through the exploration of simple models is the key to understanding and utility.
By studying the simple harmonic oscillator 24 Bill began to see not only the limited usefulness of Nosé's original work but also the compelling vision which had motivated him.
Simplicity can steer us toward a third research benefit, modular thinking and working, making the repeated use of integrators, graphics, text software, and the underlying ideas that motivated their development. It is a cliché that simplicity can be carried too far.
Keeping up with the literature is certainly useful, and nearly essential. At the frontier this involves realtime communication with those who are generating the work. It would be very useful if those journals which are not free to read would sunset their prohibitions after a reasonable time (a year or two ?) so that those without access to institutional accounts or libraries could more easily contribute to the research effort. The bottom row indicates that the ten summed-up integrals can be reexpressed in terms of the "complete star" integral, with six f -function links together with a "Ree-Hoover" integral with four f functions and two Boltzmann-factor links (shown in red). For drawings of the star graphs with up to seven points see reference 18.

C. The Mayers' Star Graphs
The Mayers showed that the nth virial coefficient can be written as a sum of integrals represented by n-particle "star graphs". The ten four-point star graphs contributing to B 4 are shown in figure 1. At Bill's Alma Mater of 1958-1961, the University of Michigan, George Ford and George Uhlenbeck had recently generated a list of all the topologically distinct types of star graphs up to, and including, the 468 7-point star graphs contributing to B 7 , the seventh term in the virial series 18 . For n > 2 any n-point star graph has at least two independent paths linking any pair of points in the graph. The simplest star, the "ring" star graph has n links while the "complete star" graph has the maximum number of links, n(n − 1)/2. Each link, or bond, or edge represents a corresponding Mayer "f-bond"in an n-body integral. The Mayer f represents e −φ/kT − 1, where φ is the pair potential, and so is equal to either zero or minus one for "hard particles". Finally each virial coefficient is proportional to the summed-up configurational integrals of all these star graphs. E. Virial Coefficients Using Ree-Hoover Graphs 59 figure 1 showed the Mayers' ten four-point star graphs in the top two rows. Combining those with identical integrals, identified by using the same color for the links, gives the first three entries in the bottom row. Those three types of four-particle integrals are reduced to just two Ree-Hoover graphs by introducing the identity 1 ≡ e −φ/kT − f . The Mayers' f functions, { e −φ/kT −1 } correspond to all of the black, blue, and green lines in the figure. The Boltzmann factors used in the Ree-Hoover graph representation of the integrals (at bottom right) are the two links shown in red. Of all the Ree-Hoover graphs only the complete-star integral, with its n(n − 1)/2 f -links, is nonzero when applied to Tonks' hard-rod problem.
The integrals corresponding to the graphs can be evaluated numerically, but there are so many of them that the enumeration is instead the most time-consuming aspect of the computations. For hard cubes or spheres or parallel squares and disks the integrands are all ±1 whenever linked particles overlap, and zero otherwise. Bill was able to program the evaluation of all the integral types for squares and cubes, including up to seven points.
Summing the star integrals he soon found that both B 6 and B 7 were negative for hard cubes 18 . This was quite a surprise, as hard-particle collisions necessarily make only positive contributions to the pressure. Because both B 6 and B 7 were thought to be positive for hard spheres (as Francis Ree and Bill confirmed precisely in 1966), these discrepancies implied that Zwanzig was wrong. A quick phonecall from Andy De Rocco in Ann Arbor to Bob Zwanzig in College Park confirmed this conclusion, certainly a "rare event", exciting for a youngish graduate student to discover. It was time for Bill to write his thesis, completed in August 1961. Both Berni and Edward Teller provided support for this work. Francis and Bill introduced "Ree-Hoover" graphs in a reformulation of the Mayers' work 59 . By introducing e −φ/kT links as well as f = e −φ/kT −1 links into the star graphs, they reformulated the Mayers' expressions, reducing the 468 seven-point star integrals to 171 simpler ones, each with 21 links of the two different types, f and e −φ/kT . As shown in detail in figure 1 the fourth virial coefficient requires only two integral types rather than three, one with 6 f s, the other with four f s and two e −φ/kT links. Francis and Bill were able to evaluate the integrals giving B 6 and B 7 for disks and spheres in 1968 20 . They were able to estimate the densities and pressure of the hard-disk and hard-sphere melting and freezing transitions by Padé-approximant extrapolation.

G. Modern Calculations of Virial Coefficients
Some 40 years later Nathan Clisby and Barry McCoy used the Ree-Hoover idea to pursue the eighth, ninth, and tenth coefficients for multi-dimensional hard spheres 9 , and found that the 9,743,542 ten-point Mayer f graphs could be expressed in terms of just 4,980,756 "Ree-Hoover" graphs with two kinds of links, f and e −φ/kT . Clisby and McCoy discovered that all the virial coefficients through the tenth are positive for one, two, three, and four-dimensional hard spheres but that the fourth coefficient becomes negative for the first time for eightdimensional spheres, hard particles whose cartesian description requires eight orthogonal directions in eight-dimensional space rather than the simpler two dimensions of disks and three of cubes. The sign change is easily understood, in retrospect. As dimensionality increases the n-link ring integral comes to dominate each exponent. For hard particles, with all the ring-integral f links negative, (−1), this causes the virial coefficients after B 2 to alternate in sign, with B 4 , B 6 , B 8 , . . . necessarily negative and B 3 , B 5 , . . . positive, as indicated in Clisby and McCoy's work.
In seven more years Richard Wheatley evaluated the eleventh and twelfth coefficients for three-dimensional hard spheres 70 . At the freezing density, about two-thirds of close packing, the hard-sphere compressibility factor is about 12.5. The 12-term virial series sum at that density is 12.39. Of all the statistical-mechanical topics which we have studied over the past sixty years the virial series, for both hard-particle and "realistic" models, has progressed the most 71 . In 2014, Zhang and Pettitt 75 published the first 64 coefficients in the series for multidimensional hyperspheres of as many as 100 dimensions! We worked on two-dimensional squares and three-dimensional cubes with Marcus Bannerman in 2009. The three of us found that parallel squares likely have a second-order (discontinuity in slope) phase transition at a density near 0.793 and that cubes behave even more smoothly. So far these results have no theoretical explanation, though they are well established from the numerical standpoint. Wheatley's valuable contributions suggest that for hard squares and cubes the truncated virial series is as reasonable a choice as the approximants. For both squares and cubes the discrepancies between the truncated and Padé equations of state increased with the additional knowledge of B 8 and B 9 .
The number and complexity of the star graphs limited the number of computationally feasible terms to seven in 1961. By 2013 that number had increased, from seven to twelve, through the efforts of Nathan Clisby, Barry McCoy, and Richard Wheatley 9,70 .
Disks and spheres have already been thoroughly investigated. Now, in 2020, it is high time that the hard-cubes model be reinvestigated, taking advantage of the tremendous computational progress in both hardware and algorithms made since 1961. The mechanism for the hard-disk melting transition was identified in 1962. That and the melting and freezing transitions' locations are the subjects of the following subsection. The four filled circles are from 1600-square simulations using 1000 collisions per particle. The two Padé approximants (right to left and shown in red) indicate the change from using seven virial coefficients to using nine. These two approximants are ratios of cubics and quartics in the density, respectively. The inset shows a typical configuration of 400 squares at ρ = 2/3 where the dotted particles originally occupied the even-numbered rows. Marcus Bannerman's minute-long YouTube presentation of "Parallel Hard Cubes" is worth well more than a thousand words.

H. Padé Approximants, A Useful Extrapolation Tool?
The steady progress in finding virial coefficients suggests a program of extrapolation and checking, much like the economists' and climate scientists' efforts to understand a country's financial and environmental futures. For virial coefficients a systematic nineteenth-century extrapolation procedure, used by Henri Padé and Georg Frobenius, can be used to generate predicted sums of the entire virial series. Here is an example Padé approximation, extending the truncated five-term virial series for hard parallel squares to a closed form, a ratio of quadratics in the density.
the unknowns in the numerator { N i } and denominator { D i } can be evaluated by equating coefficients of like powers of the density. The resulting system of linear equations is then solved by matrix inversion. The four coefficients B 2 through B 5 are enough information to identify two unknowns each in the numerator and denominator: The solution of this example problem is : For hard parallel squares Hoover and DeRocco found the following results (rounded to six figures after the decimal point): For cubes they found: In 2020 Wheatley reconsidered the parallel square and cube systems, finding that both B 8 and B 9 are negative for squares, the first negative exponents found for that system. The exponents for cubes continue to be much larger, indicating a much less useful series in three dimensions than in two : Cell models describing the motion of a single particle in the fixed field of its neighbors are not just crude approximations of reality. For hard particles one can imagine a very light specimen in a system sampling its cell while its fellows scarcely move. It is evident that this picture can be made exact and it would be an excellent thesis project to make this concept rigorous. For more details see the discussion of hard-disk free volumes in subsection II.k. The situation was then a bit less clear for disks than for spheres. Disks are well understood today 11 . Disks exhibit a "hexatic" phase prior to melting, a modification of the usual solid with cooperative motion parallel to the three sets of close-packed rows of particles. Wood remarked on a circular "ring-around-the-rosey" cooperative motion of disks in his voluminous 1963 Los Alamos report 73 . By then Alder and Wainwright's movies had shown row-wise infinitely-long parallel rows of disks. With one of the two particle rows fixed the free area integral, a f = [ e −φ/kT dxdy ] cell , available to the other one is: Here D > 1 is the center-to-center separation of the unit-diameter disks in the perfect lattice.
The disk number density, relative to close-packing is D −2 . At densities greater than threefourths of the closest-packed the sliding motion is prevented and there are two additional terms: The equation of state for this "correlated cell model" follows easily from a numerical differentiation of the free area a f , P V N kT = 1 + [ d ln(a f )/d ln(D 2 ) ] . See figure 4. That the sliding mechanism of the correlated-cell model is reflected in the equation of state can be seen in the good agreement of the transition pressure with that measured by a variety of numerical methods. Now, more than half a century after Alder, Jacobson, Wainwright, and Wood's work, with from 12 to 870 particles, the hard-disk and hard-sphere transitions have been thoroughly investigated 11,40 . Many algorithms were implemented and compared for system sizes up to 2 20 particles, corresponding to system widths of about 1000 disks and 100 spheres.

K. Single-Speed Molecular Dynamics for Squares and Cubes
Although Zwanzig's hard parallel square and cube models were slower to be understood, the simplicity of their Cartesian collisions suggested useful algorithms for disks and spheres.
In 2009 Marcus Bannerman invented and implemented a special square and cube dynamics in which every particle's Cartesian velocity components were ±1. Collisions left the overall velocity distribution unchanged 32 . This same idea, reminiscent of the Ehrenfests' "Wind-Tree" model, can be, and has been, applied to disks and spheres. By 2015 Krauth and his several coworkers had applied a similar mock dynamics to their Monte Carlo simulations 11 . Displacement moves of single disks and spheres were made in the two or three Cartesian directions, with each move terminating in a mock Cartesian collision. Just as in the hard parallel simulations these successive displacements could be continued in Cartesian fashion without altering the longtime-averaged configurational distribution needed to determine the pressure. This mock collision method has the advantage of determining a collision rate directly without the need for extrapolating binning data to find the probability density of colliding particles.
In addition to the mechanical pressure-volume diagnosis of melting it is feasible, and cer- This approach was also applied to parallel square and cubes by Bannerman in 2009, but the relative weakness of the transitions in those two cases precluded definite results.

L. Communal Entropy, Hard-Particle Free Volumes
Prior to the computer simulations of the middle 1950s theoretical understanding of manybody systems was restricted to the Mayers' virial series and a variety of approximate models, of which the "cell model" was particularly physical. The configurational states available to fluid or solid particles were estimated by models of a typical particle's surroundings. See To the right a Monte Carlo configuration at the same overall density, 0.64 relative to the close-packed density, provides a distribution of free volumes, each of them corresponding to the instantaneous states accessible to a light particle confined by its heavier neighbors.
The cell picture has a defect at low density, predicting a configurational phase volume smaller than Gibbs' by a factor e N . In 1950, Kirkwood formalized the idea of a "communal" entropy as an explanation of the extra factor of e = 2.71828 in the ideal-gas configurational  ( The division of the N-particle integral V N by N! accounts for the indistinguishability of the N identical particles. We see in figure 6 that Kirkwood's communal entropy dies away slowly, nearly linearly in density, for hard squares, disks, cubes, and spheres.

M. Single-Occupancy Solid Entropy Calculation
Francis Ree and Bill adopted Kirkwood's particle-in-cell notion to carry out a precise numerical evaluation of the solid-phase entropy 4,20 . Because the velocity distributions of the solid and fluid are identical only the configurational entropy determines phase stability.
Kirkwood's idea of confining particles in cells provides a way to extend a "single-occupancy" cell model of the solid all the way from close-packing to zero density. For simplicity we consider two two-dimensional hard-particle models, hard disks and hard parallel squares.
By confining (the center of) every particle in a manybody system of hard disks or squares to its own hexagonal or square cell of area (V /N), and integrating the resulting pressure from low density into the solid phase, the vacancy-free solid's entropy, relative to that of an ideal gas at the same density and temperature, can be determined with an uncertainty of order 0.01Nk, where k is Boltzmann's constant: We used this approach to determine the coexisting densities for disks (0.761 and 0.798) and spheres (0.667 and 0.736) relative to close-packing. For squares the transition density we determined with Marcus Bannerman in 2009 is 0.793, nearly the same as the melting density for hard disks. For cubes the number dependence is so large, including many apparent changes in the sign of the P (ρ) curvature, that no definite phase-transition density was apparent! Certainly this is a problem that will eventually be solved through the inexorable exponential advances in computational capabilities summarized by Moore's Law. With new algorithms additional virial coefficients and compressibility data for squares and cubes would be a good investment of computer time. The entropies of simple cubic and brick-wallstructured three-dimensional crystals are also reasonable and readily accessible research goals. The entropy associated with solid-phase vacancies is also readily accessible 64 .
Bob Zwanzig pointed out that, apart from sign, the Mayers' star integrals in two or three dimensions are just the squares and cubes of the corresponding one-dimensional hardrod integrals 76 . Additionally, the independence of the spatial distribution to the velocity distribution means that the molecular dynamics of squares and cubes can be replaced by the simpler one with the speeds of all particles made identical by choosing each of the Cartesian velocity components equal to ±1.
Although treating squares and cubes is relatively simple from the conceptual and computational standpoints, numerical work reveals considerable complexity. For example, squares have a smooth equation of state without any apparent jumps in density as a function of pressure. There does appear to be a transition between two distinct phases (fluid and solid), a weak "second-order" one, corresponding to a discontinuity in slope rather than magnitude.
The situation with respect to cubes is worse. For "reasonable" system sizes such as 10 5 par- show clear van der Waals' loops for disks and spheres 11,40 . It would be a worthwhile project to follow the number-dependence of the pressure-volume loops and the entropy, along with additional virial coefficients, as guides to understanding the square and cube phase diagrams. A rigorous argument for the weighting of free volumes so as to calculate an average pressure could be a useful part of an interesting thesis.
With a firm grasp on the properties of hard-particle equilibrium systems let us turn next to methods appropriate to smooth continuous interparticle interactions, the solution of ordinary differential motion equations, both at and away from equilibrium.

III. HARMONIC-OSCILLATOR BASED MODELS
Molecular dynamics is the numerical solution of the particle equations of motion, often Assume a periodic solution q(t) ∝ e iωt and then divide by 2q(t). The result is : For the extreme example dt = 1, shown in figure 7, the approximate oscillator frequency is (1/6) revolution per unit of time. This exceeds the exact frequency (1/2π) by a factor of π/3 = 1.0472 ≃ 1 + 1 24 = 1.0416. Typical molecular dynamics timesteps are ten to one hundred times smaller than atomistic vibrational periods.
Yoshida showed that the finite-difference solution differs from the exact dt → 0 limit by a term of order dt. In the harmonic oscillator example there are no higher-order terms so that the agreement is exact.
The centered-second-difference Størmer-Verlet algorithm is perfectly satisfactory for systems obeying Newtonian or Hamiltonian mechanics, small or large so long as the boundaries and the energy are fixed. Simulations at specified values of temperature and pressure required new ideas. Shuichi Nosé furnished them in 1984.

A. Nosé's Route to Isothermal Nosé-Hoover Dynamics
In 1984 Shuichi Nosé took a giant step toward an ambitious goal, finding isothermal and isobaric modifications of Hamiltonian mechanics 50,51 . We discuss the isothermal case here. Nosé wanted to reproduce Gibbs' canonical distribution with molecular dynamics.
He discovered a Hamiltonian, containing what he called a "time-scaling" variable s and its conjugate momentum p s . For simplicity, which is highly desirable in view of the complexity of Nosé's work, we confine our discussion here to the dynamics of a one-dimensional harmonic oscillator with mass, force constant, and relaxation time all equal to unity. In this case Nosé's novel Hamiltonian and the motion equations following from it, are Nosé observed that a logarithmic potential is uniquely capable of providing motion equations consistent with the canonical distribution. A constant Hamiltonian with the logarithmic potential implies s ∝ e −H/kT , where Nosé termed his s the "time-scaling variable".
Unfortunately his time-scaling approach encounters both verbal and computational complexities, with two sets of variables, "real" and "virtual", exceptionally "stiff" motion equations (as s is often small), and two sets of timesteps. In Nosé's words, Choosing H D = 0 for the Hamiltonian's value simplifies the time derivative of p s as follows: Then we can either replace the combination (p/s) by p or equivalentlyq. With the latter choice the equation of motion is just the usual Newtonian one with the addition of a timereversible friction. Changing the signs of the velocityq and friction coefficient ζ leaves the equations of motion unchanged, confirming reversibility. Any Nosé trajectory q(t) can be followed equally well forward or backward without change despite the "frictional" control forces.
Notice that the "momentum" p s becomes the time-reversible friction coefficient ζ here.
Finally it can be confirmed that the three-dimensional Gaussian distribution function, in either (q, p, ζ) or (q,q, ζ) space, is stationary so that the equations of motion are consistent with, and preserve, Gibbs' canonical distribution: It is noteworthy that the three-dimensional motion, unlike that in the four-dimensional With Dettmann's discovery these complexities of Nosé's ideas are seen to be entirely unnecessary. In fact it is even simpler, and doesn't require Hamiltonian mechanics at all, to use the phase-space continuity equation to derive a compressible version of Liouville's Theorem, from which the Nosé-Hoover algorithm emerges in a natural way. This is next.

C. Hoover's Route to Nosé-Hoover Dynamics in 1984
After lengthy stimulating conversations with Nosé in Paris, a few days prior to a meeting in Orsay, Bill sought to add a friction coefficient ζ to the Newtonian equations of motion while constraining the stationary probability density to Gibbs' canonical-ensemble form: The continuity equation came in handy here. For a stationary probability density in the three-dimensional (q, p, ζ) space the sum of all six contributions to (∂f /∂t) must vanish: The product form of the distribution function, with g depending only on ζ, turns out to satisfy the continuity equation in (q, p, ζ) space, with the control variable ζ regulating the kinetic temperature by integral feedback, This Nosé-Hoover approach is not at all unique. Bauer, Bulgac, and Kusnezov discuss the generality of such thermostatting approaches and note particularly the usefulness of cubic forces in promoting "ergodicity", the desirable property of accessing the entire distribution from any initial condition 8,46 . In the case of the oscillator Nosé-Hoover dynamics is not at all ergodic. figure 8 shows an improved approach toward ergodicity when cubic terms are included.
This prototypical harmonic oscillator example 55 only hints at the many applications of Nosé-Hoover dynamics. Though Nosé's goal was the dynamical simulation of thermal equilibrium it is evident that such thermal boundary conditions can also be used to drive and analyze nonequilibrium steady states, the longstanding and elusive goals of researchers in statistical mechanics 6,12-14,23 . Nosé's incorporation of macroscopic temperature into the microscopic motion equations can be generalized to other types of applications in several ways: [1] to manybody systems at or away from equilibrium; [2] to ergodic distributions, by using more elaborate thermostats 8,46 ; and [3] to situations far from equilibrium 57 .
In the manybody case it is feasible to apply different thermostat variables { ζ } to different degrees of freedom and to control the local velocities as well as the kinetic temperature.
A straightforward route to ergodicity is to use two control variables rather than one 28,48 , constraining both the second and the fourth moments of the velocity distribution: In subsection III.h we will see detailed numerical evidence that these motion equations are indeed ergodic 35 , filling out a four-dimensional Gaussian probability density, Although these thermostatted algorithms have "frictional" control forces in additional to the usual forces derived from a potential function it is relatively easy to formulate timereversible centered-difference algorithms to generate accurate trajectories. We explored this extension with Brad Holian and Tony De Groot and describe such an algorithm next for the Nosé-Hoover oscillator.

D. Centered Time-Reversible Algorithm for the Nosé-Hoover Oscillator
"Thermostatted" molecular dynamics such as the Nosé-Hoover or Hoover-Holian approach provides simulations at constant temperature. Let us demonstrate the feasibility of extending an algorithm of the Størmer-Verlet type to solve the Nosé-Hoover oscillator problem 17 . The harmonic oscillator, with the initial conditions (q, p, ζ) = (2.21, 0, 0) is an excellent example. The underlying differential equations can then be written in either one of two ways : The second-derivative form suggests a centered-difference analog: A convenient initial condition chooses the coordinate q at a turning point and the friction coefficient zero so that q +dt = q −dt = q 0 + a 0 dt 2 /2. The centered-difference algorithm has a trio of advantages: stability, simplicity, and reversibility. The Runge-Kutta algorithm, detailed in the next subsection, is likewise straightforward and simple, though it lacks longtime stability and time-reversibility. Beyond these two useful approaches dozens of higher-order algorithms have been derived and implemented 34,37 . All of them require more storage and more effort to reproduce. We illustrate the most useful of them here by applying it to a stiff, and therefore challenging example, the Nosé oscillator 37 , illustrated in figure 10. The corresponding nonstiff Nosé-Hoover oscillator problem is shown there as well. A periodic Nosé-Hoover orbit appears in

E. Fourth-Order Runge-Kutta Integrators
An advantage of Runge-Kutta integrators is that the timestep dt can be changed automatically in response to stiffness. By comparing the results of a single timestep to those of two half timesteps the rms discrepancy can be restricted to a prescribed interval by halving or doubling dt. A comparison of timestep histories for the stiff Nosé and nonstiff Nosé-Hoover oscillators is shown in figure 10 with the details spelled out in reference 37.
Fourth-order Runge-Kutta integrations begin by selecting three additional points in the vicinity of the initial or current coordinate set of time-dependent variable, coordinates q(t) and momenta p(t) in the case of Hamiltonian mechanics: By expressing the derivatives at each of the four points as Taylor's series it is possible to choose coefficients giving an averaged derivative such that errors of order dt, dt 2 , dt 3 , and dt 4 all vanish, with the summed up coefficients equal to unity. Though this choice is not unique the symmetric average, "classic Runge-Kutta", is nearly always used: giving an error of order dt 5 /5! and completing the algorithm. The algorithm requires a knowledge of the momentum p =q where p is advanced in just the same fashion as q, using the first-order set of motion equations {q = +p ;ṗ = −q } : Here too the Runge-Kutta algorithm has an analytic solution, but the oscillation is slightly damped, proportional to dt 6 . Although the algorithm is neither reversible nor conservative it is particularly simple to implement and is a first choice when thermostatted motion equations are introduced to carry out nonequilibrium simulations. The simplest such system is the Nosé-Hoover Oscillator. In the next subsection we apply the Runge-Kutta technique to a nonequilibrium version of the harmonic oscillator exposed to a specified temperature gradient (dT /dq), developed by Bill and Harald Posch in 1997 and revisited in 2014 57,62 .

F. Nonequilibrium Nosé-Hoover Mechanics with T(q) and Knots
To begin, we generalize the Nosé-Hoover oscillator a bit by introducing the thermostat frequency parameter α and the temperature T (q), which may be a nonconstant function of location for which we will choose T (q) = 1 + ǫ tanh(q). Throughout we maintain the mass and force constant of the oscillator equal to unity.
When the temperature is constant we have seen that the Nosé-Hoover oscillator has a deceptively simple stationary state. The stationary probability density f (q, p, ζ) is a threedimensional space-filling Gaussian : In 1985 Runge-Kutta solutions of the oscillator motion provided a stimulating surprise: at most, the numerical solutions for various thermostat strengths α occupied only small portions of this Gaussian 24 .
For the Nosé-Hoover oscillator with α = 1 the most common numerical solution type is a torus. There are infinitely many of these, with each of them centered on a stable onedimensional periodic orbit in the three-dimensional (q, p, ζ) space. In addition to the tori, a definite fraction of the solutions explores a unique three-dimensional "chaotic sea". Motion in that sea is "Lyapunov unstable", meaning that small perturbations grow exponentially with time, an essential characteristic of chaos.
With α = 1 and initial conditions for numerical solutions randomly drawn from the Gaussian stationary distribution, about six percent of the solutions trace out the threedimensional chaotic sea 53 . The remaining 94 percent give stable tori enclosing stable periodic orbits. The simultaneous existence of one-dimensional stable orbits with two-dimensional tori and unstable three-dimensional orbits, comprising the chaotic sea, all in close proximity to one another, was a surprise and heralded even more discoveries.
Soon after, in 2015, Wang and Yang showed that a stiffer higher-frequency thermostat, withζ = 10(p 2 −1), provides knots, not just simple overhand or trefoil knots, but a wide and complex variety 68,69 . In preparing this review we wondered whether or not such structures could also be found in the prototypical α = 1 case. Investigation revealed a surprising complexity. We soon found the stable periodic orbit of figure 9 with period 45.14 using α = 1 . The initial values (q, p, ζ) were (2.21, 0, 0). In principle, such an orbit, embedded in three-dimensional space, can be analyzed according to a classical field of mathematics, "knot theory".
Three-dimensional knots are now conventionally classified according to the number of crossings found in their two-dimensional projections 41 . Wikipedia states that there are over a million topologically distinct knots with 16 crossings, so that the knot shown in figure   9, with its 36 crossings, is likely well beyond the patience of even the most earnest of investigators. But this knot has a simplifying two-fold symmetry shown at the left. The initial half-period, 0 < t < 22.57, is a mirror image of the second, 22.57 < t < 45.14.
The oscillator friction coefficient ζ can then react to the local temperature T (q) : In the following subsection we will consider a surprise which results from this simple nonequilibrium problem, an astonishing complexity of oscillator orbits in the form of topological knots, an active mathematical field, with 1898 arXiv papers now listed under "knot theory".  These chaotic trajectories invariably converge to stationary nonequilibrium flows of kinetic energy p × (p 2 /2) in the hot-to-cold direction. Though Lyapunov unstable, with chaos, the flows are stable from the thermodynamic viewpoint, satisfying the Second Law.
With Clint Sprott, in 2014, we discovered that a pair of dissimilar two-dimensional conservative tori can coexist, while simultaneously interlocked with a nonequilibrium dissipative limit cycle. On the one hand, like the phase-space fractals, the limit cycle supports dissipation, phase-volume loss, and net hot-to-cold heat flow. On the other hand, the mutually interlocked conservative tori have no net heat flow, p × (p 2 /2) -nor do they show any tendency for phase-volume loss:  Let us illustrate with a moderate temperature gradient, T (q) = 1 + 0.25 tanh(q). We incorporate this feature into the equations of motion as follows: The structure of the resulting fractals can then be explored through double cross sections in which two of the four time-dependent variables take on specified values as is illustrated in figure 12.

H. MKT, HH, 0532, and Sprott Routes to Ergodicity
Because Nosé's goal, a deterministic dynamics reproducing Gibbs' canonical distribution, was eluded by the prototypical oscillator problem it was natural to modify Nosé-Hoover mechanics in an attempt to achieve ergodicity. Two successful approaches 28,48 added a second control variable to ζ: Both approaches trace out exactly the same stationary state, a Gaussian in all four variables.
The Martyna-Klein-Tuckerman approach can be generalized to add "chains" of thermostat variables. The Hoover-Holian approach can also be generalized further, but only a little, and at the expense of excessive stiffness, by adding control of the sixth moment, p 6 .
It is interesting to note that the fluctuations in the rate at which phase space is explored, The next year Sprott, noting that a limiting case of TBS control is "bang-bang" (or "onoff") control, suggested switching the friction coefficient discontinuously, ±α ←→ ∓α, based on the kinetic temperature's history 63 . Sprott termed this singular model a"Signum Thermostat" as it depends only on the sign and not the magnitude of the friction coefficient ζ Sprott found that a sufficiently large value of α > 1.7 provides an ergodic oscillator. This problem is instructive in that programming a precise interpolation to find the times at which ζ vanishes just adds to the difficulty of carrying out an adaptive integration. It is simpler and straightforward to solve the motion equationṗ = −q − α tanh(400ζ)p rather than the singular signum limit. We have adopted this simplification in figure 13.
In none of these cases is ergodicity proven. But several convincing numerical tests can be applied. In 2015 we applied six of them to the MKT oscillator 35 . TBS provided more.
Three of these tests are relatively simple: These (ζ, ξ) equations are isomorphic to those of a falling particle, with speed ζ, controlled by a friction coefficient ξ maintaining a "kinetic temperature" ζ 2 of unity. Let us describe that closely-related problem next. The two problems, a falling particle and an ergodic oscillator's ( 0, 0, ζ, ξ ) plane motion are one and the same! All these equations are time-reversible, in that any solution with positive dt can be used to find a solution with negative dt by changing the signs of p, ζ, and ξ.
The repellor and attractor for the dissipative falling-particle flow are just "fixed points" in this simplest example problem rather than the complex fractal objects familiar from δ p ≡ p + 1 and δ ζ ≡ ζ − 1. From the Falling Particle equations above we then find the equations of motion for δ p and δ ζ : The two linear second-order equations for δ p and δ ζ have solutions proportional to e iωt where substitution of that form of the solution gives the result : given.
The falling-particle flow itself has an interesting and stimulating stationary global solution for the probability density f (p, ζ, t) which can be written in either of two forms. Here are both: We can confirm the two expressions simultaneously by showing that there is a constant of the motion, C for the flow: By introducing more complexity in the falling-particle model, with a more elaborate thermostat (HH or MKT) and with two space dimensions rather than just one, a variety of interesting nonequilibrium states can be constructed and analyzed. This appears to be an excellent problem for elaboration and exploration. We recommend it for further study. "attractor" actually gives way to an irreversible one-dimensional limit cycle 33 . In figure 16 two different coordinate systems describe the same periodic orbit: The relationship between the two coordinate systems illustrated here is the simplest possible: (q, p) → (Q/s, sP ). Here both s = 1 (purple) and s = 2 (green) are illustrated. The two limit cycles, both with period 8.65, were obtained after discarding ten million timesteps with infinitesimal offset vectors taken to be of unit length 58 .
The straightforward "Gram-Schmidt" algorithm maintains the orthogonality and orthonormality of the offset vectors and can be applied at every timestep. The first offset vector, which determines the exponent λ 1 (t), is simply rescaled in length at every timestep so as to determine the local exponent: The second offset vector then undergoes two constraints: [1] orthogonality with δ 1 is first imposed, by subtracting that fraction of δ 2 which parallels δ 1 .
[2] the length of δ 2 is then rescaled, giving the second local Lyapunov exponent λ 2 (t): The alternative Lagrange-multiplier constraints require only occasional applications of the Gram-Schmidt orthonormality algorithm to offset the inevitable effects of roundoff error.
In manybody systems the Lyapunov spectra often exhibit a powerlaw form reminiscent of the Debye Model's vibrational frequencies of a continuum 56 . The time-averaged spectrum of Lyapunov exponents, unlike the local instantaneous spectra, has a very interesting connection to the Second Law of Thermodynamics. We describe it in the next subsection for a family of one-and two-dimensional manybody problems exhibiting heat conductivity and interesting Lyapunov spectra.

A. Fractal Dimensionality Loss for 24 φ 4 Particles 30
The thermostat forces generalizing Nosé's work to nonequilibrium systems make it possible to study "mesoscopic" systems, small enough for an atomistic description but large enough to be described with continuum concepts. The simplest such system is the φ 4 model, a regular lattice, one-, two-, or three-dimensional, of particles tethered to lattice sites with a quartic potential and with additional nearest-neighbor Hooke's-Law harmonic forces. In 2004 two-dimensional φ 4 models provided an excellent testbed for comparing a variety of thermostat forces. We carried out a thorough comparison of seven distinct thermostat types, all of them applied to two-dimensional models with four thermostatted cold particles at a cold-end kinetic temperature of 0.5 and four thermostatted hot particles at a hot-end temperature of 1.5. 16, 32, or 64 Newtonian particles were sandwiched between the two thermostatted columns 31 . Series of simulations for the different system sizes and different thermostats suggested that the various approaches would agree for large systems.
Deviations from this imagined large-system limit could be estimated for each of the thermostats. In the end this work reached a simple conclusion : "The simplicity of thermostats based on the second moment of the velocity distribution and simply connected to irreversible thermodynamics recommends the use of Nosé-Hoover thermostats whenever possible."

B. An Educational One-Dimensional Model of Heat Flow
The encouraging nature of the two-dimensional simulation results led us to subsequent investigations of somewhat longer one-dimensional φ 4 chains 36 . figure 17 describes the Lyapunov instability of a typical 24-atom chain. The figure shows the largest sixteen Lyapunov exponents from the spectrum of 50. The 50-dimensional phase space is composed of 24 coordinates, 24 momenta, and two Nosé-Hoover friction coefficients. The two thermostats maintain time-averaged kinetic temperatures of 0.003 and 0.027 at the two ends of the 24-particle chain. The tethering force constant, the Hooke's-Law force constant, and the particle masses were all taken equal to unity. To illustrate, the motion equations of the first (cold) particle and its neighbor in the chain are as follows: Here the particle coordinates { q } are measured relative to their fixed lattice positions.
The Lyapunov exponents summed-up at the right in figure 17 show that a 15-dimensional hypervolume in the phase space expands exponentially with time while a 16-dimensional hypervolume contracts. Evidently the fractal dimension of the strange attractor (between 15 and 16) lies below that of the phase space by a "dimensionality loss" of at least 34, about 70 percent of the total. This feature of time-reversible dynamical systems is striking in its significance and generality. With this specific microscopic case in mind let us consider a corresponding "thought experiment" close to macroscopic thermodynamics and its Second Law.

C. Macroscopic Heat Flow and the Second Law of Thermodynamics
Imagine a conducting solid with many degrees of freedom connected to two time-reversible heat reservoirs with different temperatures, one "cold" and the other "hot", just as in the 24-particle model example above. Imagine that this macroscopic solid body obeys Fourier's Law, with a heat flux proportional to the local temperature gradient, Q ∝ −∇T . We expect that on a time-averaged basis heat would flow from the hot reservoir through the system to the cold reservoir at a rate proportional to the temperature difference between the reservoirs. The consequent thermodynamic rate of increase in the solid's entropy at the hot reservoir, ≃ Q/T hot , is then more than offset by the larger rate of entropy decrease at the cold reservoir ≃ Q/T cold . The greater loss at T cold leads to the embarrassing conclusion that in a heat-conducting steady state the system entropy inexorably diverges to minus infinity! The conventional cure for this straightforward conclusion is to imagine an "entropy production" inside the system chosen exactly to offset the net entropy loss at the reservoirsystem boundaries. Without this ad hoc assumption the entropy changes at the boundaries would sum to zero rather than to the positive result required by the Second Law: the entropy of the "Universe" (system plus reservoirs here) approaches a maximum.
Evidently the macroscopic analysis of this thought experiment is not particularly informative. If we instead consider the alternative microscopic point of view, imagining that Nosé-Hoover heat reservoirs maintain the hot and cold boundary temperatures, we can develop time-averaged equations relating the energy extracted from the solid to the summed-up hot and cold friction coefficients and to the volume change in phase space: Here the time-averaged equality of ζp 2 and ζmkT follows from the vanishing of the averaged time derivative of a bounded quantity 0 = d dt (ζ 2 /2) = ζζ ∝ ζ(p 2 − mkT ) . The formation of fractal attractors and repellors in the phase space is thoroughly consistent with macroscopic thermodynamics. Nonequilibrium microstates, both the repellor and the attractor, are both so rare as to have zero measure in the equilibrium phase space, due to dimensionality loss. The fractal attractor is stable, with shrinking phase volume, while the repellor is not, making its observation impossible. A simulation beginning with a reversed heat flow and reversed friction coefficients quickly illustrates its numerical instability by returning to its mirror-image attractor. The compatibility of the paired attractors and repellors in nonequilibrium systems became apparent in 1987 16,26,49 and supports the use of reversible thermostats in modelling nonequilibrium systems. Simulations of shear and heat flow have a long history and a record of good agreement with experimental values 6 . Let us turn to systems which are not yet so well understood, systems in which the transport is nonlinear, shockwaves.

D. Macroscopic and Microscopic Shockwave Models
Nonequilibrium systems involve dissipation, irreversibility, and boundary conditions linking the system to the outside world, which drives it away from equilibrium. In modelling nonequilibrium stationary states the heat generated inside the system is extracted by external heat reservoirs. The simplest nonequilibrium steady states, shear flow and heat flow, require transport of momentum and energy through such a system. Such nonequilibrium steady states can be described by a variety of models, of which the macroscopic Navier- Here we focus on phenomena for which the boundary conditions are purely equilibrium, as in the interface between coexisting phases, but with the boundary between different states characterized by different velocities. Let us consider a steady "one-dimensional" (meaning planar) shockwave, with cold low-pressure material transformed to a higher-pressure higher-temperature compressed state by motion of a steady wave. We begin by indicating a predictive path to the steady structure of such a wave.
E. Macroscopic Shockwaves from the Navier-Stokes Equations 15,22 The two simplest transport processes appear together in sound waves, which decay, and in shockwaves, where a steady input of fast-moving cold fluid is converted to a slower hotter output state by a localized nonequilibrium process. The macroscopic Rankine-Hugoniot Equations, dating back to the nineteenth century, are most easily derived by imagining the nonequilibrium conversion of a left-moving fluid to right-moving with equal speeds but opposite velocities before and after. As the kinetic energy is unchanged the internal energy increase is equal to the work done: Though the Rankine-Hugoniot equation expressed in figure 18 correctly describes the give a stationary shockwave profile. We display the coordinate dependence of the mass density ρ and fluid velocity u, the pressure tensor P xx , P yy including the viscous contributions ∓(du/dx), the energy per unit mass e, the temperature T , and the heat flux Q ≡ −(dT /dx). energy changes taking place in a steady shockwave it provides no indication of the equilibration mechanism(s) responsible. Viewing the shockwave compression process in a different coordinate frame, centered on the shockwave, can provide descriptions well suited to comparison with simulations and shown in considerable microscopic detail in figure 19.
In that figure cold fluid enters at the left and passes through the shockwave transition region to become a denser, higher-pressure, higher-temperature "shocked" fluid, which exits at the right. In the frame centered on the shockwave the flow is completely stationary, simplifying its description in terms of simple models such as the microscopic Boltzmann Equation and the macroscopic Navier-Stokes equations. The Navier-Stokes approach is the simpler of the two. A short computer program solving that model can be based on the three macroscopic conservation laws, conservation of mass, momentum, and energy. We illustrate this next.
The mass flux ρu is necessarily constant throughout the steady state. This follows from the continuity equation, (∂ρ/∂t) = −∇ · (ρu). The momentum flux, in addition to the comoving component P xx parallel to the flow, includes the additional contribution ρu 2 due to the net flow velocity u in the coordinate frame of figure 19. A consequence of these two observations is that the longitudinal pressure-tensor component within the wave varies linearly with volume, the "Rayleigh Line": as the mass flux (ρu) is constant in the wave. It is remarkable that the highly nonequilibrium pressure-tensor component P xx can be determined by a relatively simple velocity measurement.
A one-dimensional steady shockwave wave has stationary values of the mass, momentum, and energy fluxes throughout the wave : ρu, P xx + ρu 2 , ρu[ e + (P xx /ρ) + (u 2 /2) ] + Q x . P xx and Q x are the longitudinal pressure and heat flux, e is the internal energy per unit mass, and u is the stream velocity, u s (for "shock") to the left of the stationary wave and u s − u p (for "shock minus particle") to the right. Although the equations appear complicated they are quite easy to solve using the Runge-Kutta integrator. To do so integrate simultaneously the differential equations for (du/dx) and (dT /dx). We illustrate the integration here for a simple example problem.
In this Navier-Stokes model of a shockwave we adopt the following constitutive relations: P = ρe = (ρ 2 /2) + ρT ; e = (ρ/2) + T ; (P xx − P yy )/2 = −du/dx ; (P xx + P yy )/2 = P. A little numerical experimentation shows that the continuum equations for the velocity and temperature : { (du/dx) = P + ρu 2 − 4.5 ; (dT /dx) = 2[ e + (P xx /ρ) + (u 2 /2) ] − 6 } , can be solved by starting at the "hot" side of the shockwave and integrating toward the "cold" side. The logic of the program is as follows. Given u and T compute ρ from the mass flux, after which the equilibrium pressure P is known, which makes it possible to compute (du/dx) from the momentum flux. The internal energy is then known making it possible to compute the temperature gradient (dT /dx) from the energy flux. This process provides the internal structure of the shockwave shown in figure 19. In the case shown in the figure the density doubles and the longitudinal pressure exceeds the transverse by about a factor of three at the center of the wave. Although twofold compression may seem extreme typical shockwave experiments carried out in laboratory settings compress metals as much as fourfold at pressures comparable to that at the center of the earth, a few million times normal atmospheric pressures. The characterization of deviations from the linear-transport Navier-Stokes assumptions is an active and rewarding research area, well suited to microscopic modelling.
By 1973 Ashurst had developed techniques for controlling boundary regions' velocities and kinetic temperatures through time-reversible constraint forces. His viscosity and conductivity results agreed well with the somewhat more cumbersome equilibrium Green-Kubo simulations 6,47 . By 1980 several molecular dynamics simulations of shockwaves, with as many as 4800 particles, had been carried out, making it possible to compare the microscopic and macroscopic shockwave profiles 15,44 . This work was particularly welcomed by those who interpretted laboratory measurements of shockwave and particle velocities to obtain equations of state for real materials. The findings from atomistic computer simulations that strong shockwave thicknesses are only a few particle diameters, and later, that nonplanar sinusoidal-shaped shocks promptly become planar 36 , confirm the accuracy of the assumptions underlying the Rankine-Hugoniot equation and the equations of state obtained from it through laboratory velocity measurements.
G. Three Routes to the Information Dimension for the N2 and N3 Maps Let us complete our view of interesting computational models by turning to deterministic "maps", the simplest models of nonequilibrium systems. In maps discrete jumps in a model phase space, usually two-dimensional, replace the continuous flows generated by ordinary differential equations. Flows require at least three dimensions plus nonlinearity for chaos.  The details of the somewhat more complicated N3 map and its inverse can be found in reference 39.
In 1998 we adopted the conventional wisdom that the information dimension of the fractal generated by N2 was correctly given in terms of the maps' Lyapunov exponents by Kaplan and Yorke interpolated between the growth rate of a one-dimensional length, λ 1 , and the decay rate of a two-dimensional area, λ 1 + λ 2 , to estimate the information dimension D I of a "typical" two-dimensional map. In the N2 case the stretching direction provides Lyapunov exponent λ 1 and the shrinking fractal direction parallel to q = p gives λ 2 :  Mapping a set of one million points arranged originally in a uniform grid is a convenient way to carry out region mapping. figure 25 compares the result of applying the N2 and N3 mapping to an initially uniform grid of points. We choose a mesh δ = (1/3) 5 = 1/243 and observe that five iterations of the maps produce exactly the same information dimensions for both maps, as would be expected because their region mapping probabilities are identical.
However iterations beyond the fifth show that N3's dimensionality is unchanged at 0.7897 while the N2 dimensionality converges to 0.7315, corresponding to the rightmost point in figure 23.
In sum, the N3 map shows good agreement among all four methods of estimating the information dimension, Kaplan-Yorke, region mapping, and point mapping with different values of δ, suggesting that information dimension is well understood for maps. N2 suggests the opposite and demonstrates that the revinvestigation of known problems with the everincreasing computational capabilities described by Moore's Law reveals new problems in old areas as well as access to completely new research areas. Maps, though simple, reveal the need for yet more investigation.

V. 60 YEARS' EXPERIENCE WITH COMPUTER SIMULATIONS
Starting out with Kirkwood's formal 1960 approach to statistical mechanics and ending up with the inexpensive trillion-timestep laptop simulations of 2020 provides a rear-viewmirror look at the effects of the computational revolution on statistical mechanics. Hours of laborious algebra and calculus have been replaced with the need to generate, process, and understand terabytes of data. Simulation has largely replaced theory as a means of "understanding". Simulations differ from ideas. For relevance and acceptance they must be reproducible. The need for reproducibility and cross-checking of conclusions is particularly important today when the public understanding of "science" has been politicized by worldwide crises, both real and imagined.
We have found that simple models capturing and detailing some aspect of reality are reliable means of organizing, understanding, and educating. The Mayers' virial series has led to sophisticated equation-of-state modelling. Molecular Dynamics has led from the three-body problem to simulations with trillions of degrees of freedom. Though the research frontier is constantly on the move it remains as tantalizing as ever despite the changing landscapes and the ever-improving tools that we have for its exploration.
In view of the ongoing explosion of new data, results, and conjectures, fully spanning the range from useful to useless, simple models (but not too simple) continue to provide stimulating clues to progress in understanding, our goal through 60 years of joint explorations.

VI. DATA AVAILABILITY STATEMENT
The data that support the findings of this study are available from the corresponding author upon reasonable request.