Hamiltonian Computational Chemistry: Geometrical Structures in Chemical Dynamics and Kinetics

The common geometrical (symplectic) structures of classical mechanics, quantum mechanics, and classical thermodynamics are unveiled with three pictures. These cardinal theories, mainly at the non-relativistic approximation, are the cornerstones for studying chemical dynamics and chemical kinetics. Working in extended phase spaces, we show that the physical states of integrable dynamical systems are depicted by Lagrangian submanifolds embedded in phase space. Observable quantities are calculated by properly transforming the extended phase space onto a reduced space, and trajectories are integrated by solving Hamilton’s equations of motion. After defining a Riemannian metric, we can also estimate the length between two states. Local constants of motion are investigated by integrating Jacobi fields and solving the variational linear equations. Diagonalizing the symplectic fundamental matrix, eigenvalues equal to one reveal the number of constants of motion. For conservative systems, geometrical quantum mechanics has proved that solving the Schrödinger equation in extended Hilbert space, which incorporates the quantum phase, is equivalent to solving Hamilton’s equations in the projective Hilbert space. In classical thermodynamics, we take entropy and energy as canonical variables to construct the extended phase space and to represent the Lagrangian submanifold. Hamilton’s and variational equations are written and solved in the same fashion as in classical mechanics. Solvers based on high-order finite differences for numerically solving Hamilton’s, variational, and Schrödinger equations are described. Employing the Hénon–Heiles two-dimensional nonlinear model, representative results for time-dependent, quantum, and dissipative macroscopic systems are shown to illustrate concepts and methods. High-order finite-difference algorithms, despite their accuracy in low-dimensional systems, require substantial computer resources when they are applied to systems with many degrees of freedom, such as polyatomic molecules. We discuss recent research progress in employing Hamiltonian neural networks for solving Hamilton’s equations. It turns out that Hamiltonian geometry, shared with all physical theories, yields the necessary and sufficient conditions for the mutual assistance of humans and machines in deep-learning processes.


Introduction
Chemistry is now deeply rooted in the two fundamental physical theories, quantum and classical mechanics.Quantum chemistry and molecular dynamics computer programs are indispensable devices in almost all kinds of chemical research.Thermodynamics, also a vital theory for chemistry that lacked a genuine mathematical foundation for years, has acquired the necessary mathematical framework in the last two decades, which brings it to the same level as classical and quantum mechanics.On the other hand, the advancements in mathematics that occurred in the 20th century in the fields of differential geometry and topology have revealed common geometrical structures in all physical theories.These discoveries provide a deeper understanding of the physical theories per se and pave the way for their application in other scientific fields, such as chemistry.
The purpose of this article is to render an introductory and graphical presentation of common geometrical structures of the principal physical theories and the consequences they may have in chemistry, especially via their numerical applications.Specifically, after almost two centuries of evolution of Hamiltonian theory, a modern geometrical description emerged, and significant theorems and techniques for locating invariant structures in phase space, and thus constants of motion, have been found [1][2][3].Chemical dynamics and spectroscopy have tremendously benefited from applying these methods to comprehend the behaviors of highly excited molecules [4,5].
It is essential to underline that the stage of action for molecular dynamics, within a classical mechanical approach, is the phase space and its tangent bundle, which means that both generalized coordinates and conjugate momenta should be taken into account.We also emphasize that in the 1980s, it was found that quantum and classical mechanics share some common geometrical properties, which explain similarities as well as differences.It was shown that instead of the usual algebraic linear quantum theory formulated either in the Schrödinger or Heisenberg picture, we can take the quantum analog of phase space to be the projective Hilbert space of the extended Hilbert space [6][7][8].
Earlier, in the 1970s, it was recognized that the mathematical framework for thermodynamics is the contact geometry [9,10] of the physical states embedded in an odddimensional state space [11][12][13][14][15][16][17].However, at the beginning of the twenty-first century, Balian and Valentin [18] made a significant contribution by publishing a Hamiltonian theory of thermodynamics in an extended phase space.Based on Callen's [19] formulation of thermodynamics, they produced a Hamiltonian theory for reversible and irreversible processes equivalent to classical mechanics.They studied homogeneous Hamiltonians with generalized coordinates, the complete set of extensive properties (i.e., entropy, internal energy, volume, particle numbers, etc.) and conjugate momenta proportional to intensive properties (i.e., temperature, pressure, chemical potential, etc.), either in the entropy or energy representation.Gibbs's fundamental equation was employed to describe the physical state manifold.This work triggered numerous studies, the results of which have revealed several geometrical properties common to classical and quantum mechanics [20][21][22][23][24].
It turns out that the mathematical abstraction and generalization of geometrical Hamiltonian theory in extended phase space lead to a common computational platform for working in both microscopic and macroscopic worlds.The aim of the present article is to highlight that Hamiltonian theories share some common geometrical properties in extended phase space with classical mechanics, quantum mechanics, and thermodynamics, which manifest the foundations for formulating and comprehending chemical dynamics and chemical kinetics.
In Section 2, we present, with the help of two pictures, the Hamiltonian theories of classical and quantum mechanics.Similarly, in Section 3, we discuss Hamiltonian thermodynamics in contemporary mathematical language that unveils the geometrical properties of this theory.In Section 4, we describe numerical algorithms for solving Hamilton's equations of motion and variational equations, common to the three principal theories.We mainly focus on high-order finite-difference (FD) methods and their relation to pseudospectral methods (PS) [25].Furthermore, to illustrate the mathematical concepts introduced in the previous sections, we have performed numerical calculations with a rather simple two-dimensional nonlinear model, that of Hénon-Heiles [26].We deduce that high-order finite-difference methods based on the Lagrangian interpolation polynomials are appropriate for solving initial value problems, as well as partial differential equations, such as the Schrödinger equation, necessary in chemical theories.Finally, the conclusions are summarized in Section 5, where recent research on Hamiltonian neural networks (HNN) is discussed.Proofs for some equations, tables that summarize results in Hamiltonian thermodynamics, and an example of formulating a chemical kinetic model with thermodynamic Hamiltonian theory are presented in Appendix A.

Geometrical Structures in Chemical Dynamics
Molecules are sets of N n nuclei and N e electrons interacting with Coulomb forces.Usually, their quantum mechanical treatment is obtained by solving the Schrödinger equation in the Born-Oppenheimer approximation [27] that separates the electronic from the nuclear motion.The electronic energies are calculated by freezing the nuclei at specific configurations, which produces the adiabatic potential energy surface for each electronic state.
These molecular potentials, named also Potential Energy Surfaces, are employed to solve the nuclear equations of motion either in quantum mechanics or in classical mechanics.It is, thus, important to investigate common geometrical structures in the foundations of the two basic theories of physics, which in turn may assist in the numerical solutions of the corresponding equations of motion.In the following two subsections, we examine the topological and geometrical properties of classical and quantum mechanics, whereas in Section 3, the relatively new Hamiltonian formulation of thermodynamics is reviewed, all of them in extended phase spaces and at the non-relativistic approximation.

Canonical Classical Mechanics 2.1.1. Manifolds and Maps
We introduce the basic geometrical concepts of classical mechanics for time-dependent systems by elucidating the graphics of Figure 1.Starting from the bottom and moving upwards, we denote the set of configurations of the system with n-degrees of freedom (DOF) with the column vector (The symbol ( T ) denotes the transpose of a matrix.Thus, a row vector becomes a column vector, and vice versa, a column vector is converted into a row vector.),q = (q 1 , . . ., q n ) T , and the parameter (time) with q 0 .Capital letters designate the set of n + 1 coordinates as a column vector, Q = (q 0 , q) T .These coordinates parametrize the Extended Configuration Manifold, Q n+1 .Generally, this is a smooth (differentiable) nonlinear manifold.
Manifolds generalize the geometrical objects of curves and surfaces in three-dimensional Euclidean space into N-dimensional (N > 3) spaces.It took more than two centuries to develop the current mathematical definition of a manifold since it required the parallel development of various other branches of Mathematics, such as topology, geometry, and algebra [28].
The extended configuration space Q n+1 can be described locally by a coordinate system (chart) Q, i.e., a homeomorphism of an open set U of Q n+1 onto an open set ϕ(U) of a Euclidean space R n+1 of dimension n + 1.
In Euclidean space, we understand the definition of a coordinate system in R n+1 as for every point s ∈ U, and π i are the canonical projections taken to be differentiable functions.Transition maps provide the transformation from one coordinate system to another for points that belong to the intersection of two different open subsets.
The tangent space of Q n+1 at a point s ∈ Q n+1 (T s Q n+1 ) is a vector space, and the union of all tangent spaces for all points s of Q n+1 form the tangent bundle (TQ n+1 ) with the extended configuration space Q n+1 to be the base space The tangent bundle contains both the configuration manifold Q n+1 and its tangent spaces T s Q n+1 called the fibers, and it is a smooth manifold of dimension 2(n + 1).Since TQ n+1 is also a smooth manifold, a chart is defined by the diffeomorphism Legendre Transform(FLe) (q 0 ,q,q 0 ,q) (q 0 ,q,p0,p) Inter.Pr. <Q|Q>=P Q R n+1 x R n+1 (q 0 ,q,p0,p) R n+1 x R n+1 (q 0 ,q,q 0 ,q) He=H(q 0 ,q,p)+p 0 q 0 =0 Tangent Bundle (TQ n+1 ) R 2n+2 x R 2n+2 (q 0 ,q,p0,p,q 0 ,q,p0,p) R . . .
Interior Product iXHe = ( Manifolds and functions which determine the geometrical structures of a classical system with n + 1 coordinates.q 0 denotes a parameter and, specifically, the time for time-dependent systems.q = (q 1 , . . ., q n ) are the n coordinates that define the configurations of the system and p = (p 1 , . . ., p n ) their canonical conjugate momenta.Details are given in the text.
Each coordinate system (ϕ, U) from the atlas of Q n+1 induces a coordinate system (ϕ, TU) for TQ n+1 .This chart is said to be the bundle chart associated with (ϕ, U).The velocities ( qi = dq i /dt) live in this space.
The potential function, V (Q), is a function on the configuration manifold to real numbers.The Lagrangian, L e (Q, Q), is a function on the tangent bundle to real numbers.
The dual space of TQ n+1 (the set of all linear maps on tangent bundle to real numbers) is the cotangent bundle (M = T * Q n+1 ), also named phase space.The phase space is a differentiable manifold of 2(n + 1)−dimension for which the tangent bundle can also be defined with charts described by the generalized coordinates (q i ), the conjugate momenta (Notice that we use superscripts for coordinates and subscripts for momenta.)(p j ), and their velocities, where p j = ∂L e /∂ qj , j = 0, . . ., n.
The Extended Hamiltonian, H e (Q, P), is a function on the phase space to real numbers, H e : T * Q n+1 → R, obtained by a Legendre transformation (F L e ) of the Lagrangian.We may consider that the Legendre transformation generates a differentiable map between the tangent and cotangent bundles of are canonical projections to extended configuration manifold of tangent and cotangent bundles, respectively.The tangent bundle of phase space is denoted by TT * Q n+1 and π T * Q n+1 is the canonical projection to phase space.
For a system of particles with n-DOF, we define the Lagrangian as the difference between kinetic energy K and potential energy with g ij (q, m) to be the kinetic metric tensor, written as a function of coordinates q and the particle masses m.The metric is the non-degenerate, symmetric, covariant tensor rank-2 that defines the kinetic energy.The momentum p i is the covector of the velocity qi , which is a map from the tangent bundle (TQ n ) to the cotangent bundle (T * Q n ).Obviously, for a diagonal unit metric, g ij = δ ij , momenta are equal to velocities.
The velocities qi can also be extracted from the momenta by the inverse tensor where ∑ l g il g lj = δ j i (The components of Kronecker delta tensor, δ j i , are equal to 1 for i = j and 0 for i ̸ = j.).
Momenta may also be considered to be 1−forms which act on the tangent bundle to real numbers, p : TQ n → R, by taking the interior product (contraction) of 1−forms with vector fields.Employing Dirac's notation, we write If H(q 0 , q, p) = K(p) + V (Q) is the Hamiltonian of a system of particles with n-DOF, then the extended Hamiltonian, (H e ), is defined with the Legendre transformation (Notice that in chemical thermodynamics the Legendre transformation is defined as the difference between the function and the sum of products of conjugate variables. ) The physical states are obtained by imposing the two constraints which result in p 0 = −H(q 0 , q, p).
Hence, the time-extended system is a conservative system with Hamiltonian H e .

Equations of Motion
We collect the generalized coordinates Q = (q 0 , q 1 , . . ., q n ) T and their conjugate momenta P = (p 0 , p 1 , . . ., p n ) to a single column vector x = (Q, P T ) T of 2k−dimension, where we use k = n + 1. Hamilton's principle of stationary action leads to Hamilton's equations of motion.Then, Hamilton's equations with a Hamiltonian H e (x) are written in the form or ẋ(t) = J∂H e (x(t)), (14) where ∂H e (x) is the gradient of Hamiltonian function, and J the symplectic matrix.J is the map on the tangent bundle of phase space M J : TM → TM, J = 0 k and I k are the zero and unit k × k matrices, respectively.It is proved that J satisfies the relations, Thus, the Hamiltonian vector field is or using the coordinate base in the tangent bundle of phase space (Q, P, ∂ ∂Q , ∂ ∂P ), we write that lives in the tangent space of phase space.
In a more general approach, we can extract the Hamiltonian vector field as follows.In the cotangent space of extended coordinate manifold, let us denote with θ e the 1−form acting on the phase space manifold and with α the 1−forms on the configuration manifold Since α is a linear map from Q k to M and θ e an 1−form on M we can pull-back θ e to Q k to produce the 1−form α * θ e , which lives on the base manifold Q k .Then, the canonical Poincaré 1−form satisfies the relation (tautological 1−form) Hence, we can expand θ e as θ e is invariant under coordinate transformations which we assume to be invertible This is proved by arguing as follows.The velocities are given by The new momenta are Hence, The canonical Symplectic 2−form is extracted by taking the exterior derivative (Notice the negative sign in our formulation.) of θ e ω e = −dθ e . ( This is a non-degenerate, skew-symmetric, closed 2−form (dω e = −d • dθ e = 0).In local coordinates (q, p), ω e is expressed by the wedge products If we introduce dx = (dx 1 , . . ., dx 2k ) = (dq 0 , . . ., dq n , dp 0 , . . ., dp n ), the symplectic 2−form (Equation ( 29)) is written A pair (M, ω e ), i.e., the phase space with the symplectic 2−form, is said to be a symplectic manifold.Those local coordinates which satisfy, ω e = ∑ k i=1 dx i ∧ dx k+i , are said to be canonical and symplectic.In the following, we shall see that Hamiltonian mechanics and its geometrical properties can be formulated by ω e .
Let (M, ω e ) be a symplectic manifold of dimension 2k with ω e a canonical symplectic 2−form.The Hamiltonian function H e is a smooth function on the phase space.The Hamiltonian vector field, X H e , (Equations ( 17) and ( 18)) is then defined via the relationship i X He ω e symbolizes interior product (contraction) and the triple (M, ω e , X H e ) is a Hamiltonian system.In particular, for the variable q 0 we extract the equation ṗ0 = − ∂H(q 0 , q, p) We can see that with this formulation of time-dependent systems and taking into account the constraints Equations ( 11) and ( 12), the trajectories are described at each time t in the physical phase space of the system of 2n−dimension.With x q = (q 1 , . . ., q n , p 1 , . . ., p n ) T Hamilton's equations of motion with the time-dependent Hamiltonian are written For a smooth function O(x) on phase space, the Poisson bracket is defined as Since or employing the coordinate base in the tangent space of phase space X We have used where δ is the Kronecker's delta tensor.
The Lie derivative of a dynamical quantity O(x(t)) with respect to the Hamiltonian vector field X H e is defined as the directional derivative of O along the vector So, From the above equation, we infer that for conserved quantities, Ȯ = 0, the Poisson's bracket commutes, i.e., {O, H e } = 0. Applying the above equation to coordinates and conjugate momenta, (Q, P), we extract Hamilton's equations Poisson brackets defined on a set of smooth functions F (M) on M satisfy the properties; For ( f , g, h) ∈ F (M), then

Integrable Hamiltonian Systems
In classical mechanics, a finite 2n−dimensional Hamiltonian system, (M 2n , ω, X H ) is completely integrable if it admits n independent constants of motion whose Poisson brackets are in involution, i.e., pairwise commute.
Let the integrals of motion are F 1 = H, . . ., F n and are assigned to values c = (c 1 , . . ., c n ).Then, the corresponding level set, F −1 (c) is a Lagrangian submanifold.
In a more formal wording, for an even-dimensional phase space, M, the symplectic 2−form ω, which satisfies the condition (volume form) (dθ) n ̸ = 0, the condition ω = 0 determines the nD−Lagrangian submanifold L n p ∈ M. For compact phase spaces, the Lagrangian submanifolds have the structure of a n-torus, T n .Moreover, in a neighborhood of every such invariant torus, one can find angle-action coordinates (ϕ, I), In such a coordinate system, the Hamiltonian function depends only on I j , i.e., H(I), and Hamilton's equations give w i are the normal frequencies, and the action variables are constants.The Poisson brackets of the action coordinates, I, pairwise commute, {I i , I j } = 0, and also satisfy {ϕ i , I j } = δ i j .

Complexification of Classical Hamilton's Equations
Hamilton's equations in classical mechanics can also be cast in a complex manifold by complexification of phase space, i.e., by introducing the complex transformation Similarly, in Section 2.2.3 by realification of the quantum Hilbert space, we bring the Schrödinger equation into the form of Hamilton's equations.
To make the complex transformation canonical, we define the complex variables The inverse transformation gives the real functions Because of the symmetry of Hamiltonians under the unitary group U(1) ∼ = C, i.e., the Hamiltonian H should be invariant with a unitary transformation.We write the canonical Poincaré 1−form as and thus, the canonical symplectic 2−form becomes For example, a harmonic oscillator in scaled normal coordinates and introducing these canonical complex coordinates results in Since the transformation to complex coordinates and conjugate momenta is symplectic, Hamilton's equations are also written as where H ′ (Q, P) = H[q(Q, P), p(Q, P)] is the Hamiltonian in complex coordinates.

Jacobi Fields and Variational Equations
Geodesic curves are obtained by searching for the critical points of the length functional, i.e., by requiring ds is the infinitesimal length of the curve given by the norm of the velocity vector.
The same critical points are obtained by varying the integrand |dq/dt| 2 instead It is worth noting that the above integral depends on the parameter t.This integral is related to the action or the energy of a physical system.Indeed, Hamilton's principle of stationary action results in Hamilton's equations, the solutions of which are geodesics on the phase space manifold.
Let C be a trajectory in phase space with kinetic metric g From the above equations, we deduce that the coefficients g ij result from the action of the metric on the base coordinates of the tangent space The length of a trajectory starting from the point t = 0 and finishing at the point t = t max is calculated as the line integral In case we want to investigate the behavior of neighboring trajectories C x+δx to a reference one C x in phase space, we examine the time evolution of the variation vector Y x (t) = δx(t), (Figure 2).The time derivative of the vector field Y x (t) with respect to the vector field X x (Lie derivative) is equal to J is the symplectic matrix (Equation ( 15)).The higher order term (h.o.t.) is a function of the displacement δx at time t, which contains all the terms in the Taylor expansion larger than the first order.The derivatives are computed at the reference trajectory with initial conditions x 0 .Y x = δx is a Jacobi field and the equations the variational equations.
The fundamental matrix Z(t, t 0 ) satisfies the variational equations with initial condition Z(t 0 , t 0 ) = I.It is a symplectic matrix, and therefore, the following equations are valid [3] det It is proved that if σ is an eigenvalue of a real symplectic matrix, so are σ −1 , σ * and (σ * ) −1 .σ * are complex conjugate numbers.Also, for every constant of motion, two eigenvalues of the fundamental matrix are equal to one.For proofs and applications see references [4,5] and [29,30].

Geometrical Quantum Mechanics 2.2.1. Manifolds and Maps
Moving to the quantum world, the states of a system are described by complex vectors, |ψ(s, t) >, with s to be the configuration coordinates and t the time instead of the real coordinates and momenta (or velocities) in classical mechanics.The square of the norm of state vectors is interpreted as a probability density, with ||ψ(s, t) > | 2 ds to be the probability of finding the system in the coordinate intervals [s, s + ds] at time t.The observable quantities, which are real-valued functions on phase space in classical mechanics, are replaced by operators that designate linear transformations on the complex state vector space, named Hilbert space of dimension n (H n ∼ = C n ) (Figure 3).Infinite-dimensional Hilbert spaces for quantum systems also exist.
The time evolution of the quantum states is given by Schrödinger's equation where ı = √ −1, ℏ the reduced Heisenberg constant, Ĥ is the Hamiltonian operator of the system that corresponds to its energy, and X Ĥ = − ı ℏ Ĥ is the Hamiltonian-Schrödinger vector field.To any observable O, we assign the operator Ô and the Schrödinger vector field X Ô = − ı ℏ Ô.Hence, we may consider the vectors |ψ > as vector fields, and thus, the Hilbert space H n to be also the tangent space T |ψ> H n at the state |ψ >∈ H n .
Separating the real and imaginary parts of the Hermitian inner product, we write (ϕ k r , ψ k r ) are the real and (ϕ k i , ψ k i ) the imaginary components, respectively, of the kth component of the complex vectors.G is a Riemannian metric, i.e., it is real, positive definite, and strongly non-degenerate Ω is a symplectic (antisymmetric) closed 2−form, and strongly non-degenerate Both G, Ω act on the tangent bundle TH n .
. The states of the quantum system are the elements of a n-dimensional complex vector space (Hilbert space H n ∼ = C n ) that includes the vectors |ψ >, their complex conjugate < ψ|, and linear transformations | ψ >.Hermitian inner products, < ϕ|ψ >, are employed for Hilbert spaces.The tangent bundle (H n × H n ) is mapped to the Extended Hilbert Space (H n+1 × H n+1 ) by the inclusion of a complex phase λ, the elements of the unitary group U(1), that produces the rays {|ψ >} := {λ|ψ >}.The canonical projection, π |ψ P > , projects the rays in H n+1 onto the Projective Hilbert Space P n (H n+1 ), the space where the physical states of the system live.Details are given in the text.
Since the physical interpretation of a quantum state is probabilistic, i.e., for a pure state |ψ > (the states of an isolated system), the following normalization condition should be satisfied The observables, or measurable quantities of the system, O, are represented by selfadjoint linear operators, Ô = Ô † , on H n , and are thus vector fields.The expectation value of an observable with operator Ô at the state |ψ > is the real-valued function In particular, for the Hamiltonian operator of the system, we write

Projective Hilbert Space
For any nonzero factor λ ∈ U(1) ∼ = C, such as λ = exp (ıϕ 0 ), λ|ψ > yields the same expectation value for the observable O as does |ψ >. λ are the elements of the unitary Lie group, U(1).Thus, the inclusion of these phases to the initial Hilbert space results in the extended Hilbert space of (n + 1)−dimension, H n+1 , which is isomorphic to C n+1 with a Hermitian inner product.
The set of vectors obtained by multiplying the state |ψ > with λ consists of a 1−dimensional subspace of H n+1 , called ray, which we symbolize as {|ψ >} ≡ {λ|ψ >}.A ray is an equivalence class of vectors in H n+1 : two vectors are equivalent if and only if one is a nonzero complex scalar multiple of the other.Also, adopting normalized vectors (Equation ( 70)), the physical quantum states are elements of the complex Projective Hilbert space, P n (H n+1 ) of n-dimension obtained by the canonical projection map π |ψ P > of the extended Hilbert space H n+1 .
Hence, a quantum system may be described with what mathematicians call principal bundle with state vectors the rays {|ψ >} in H n+1 , and physical states |ψ P > in P n (H n+1 ) obtained by the projection map π |ψ P > .The inverse projection is To recapitulate, the inclusion of the unitary group U(1) extends the n-dimensional Hilbert space H n to the H n+1 extended Hilbert space.For normalized state vectors, the extended Hilbert space is mapped to the unit sphere S 2n+1 of dimension (2n + 1) embedded in the real Euclidean R 2n+2 space.Finally, by the projection π |ψ P > we produce the Projective Hilbert space isomorphic to the complex space C n or to real of 2n−dimensional space, R 2n , The tangent space of the projective space at point |ψ P >, T |ψ P > (P n (H n+1 )), is isomorphic to the kernel of the ray, {|ψ >} ⊥ , i.e., and the push-forward of the projection map, π ⊥ * ({|ψ >}), is a complex conjugate linear isomorphism onto T |ψ P > (P n (H n+1 )) An illustrative figure is shown in the article of Dorje C. Brody and Lane P. Hughston [7].
For a normalized ray and its kernel, one can argue that [6-8] which gives a well-defined Hermitian inner product on T |ψ P > (P n (H n+1 )).Moreover, we deduce that the equation provides a strong symplectic form on P n (H n+1 ), and the equation defines a strong Riemannian metric on P n (H n+1 ) called the Fubini-Study metric.ℜ and ℑ are the real and imaginary parts of the Hermitian inner product, respectively, in the extended complex Hilbert space H n+1 .Both ω |ψ P > and g |ψ P > are invariant under all transformations U(1), for all unitary operators Û on H n+1 .

Realification of Hilbert Space and Kähler Manifolds
Expanding the vectors of Hilbert space in a n-dimensional basis, as well as its dual basis, we write the n-coefficients ψ k with the real (ψ k r ) and imaginary (ψ k i ) components.Similarly, the covectors are written as (ψ kr ) for the real and (ψ ki ) for the imaginary components.Thus, working with the real vectors (ψ r , ψ i ) T we can describe quantum states in a real vector space An almost complex structure is introduced in H 2n r by replacing the imaginary number ı = √ −1 with the symplectic matrix −J, Equation (15).We also derive The triple (J, G, Ω) attributes a Kähler structure, and thus, H 2n r is a Kähler manifold [2].By realification of the Hilbert space, we may express the Hamiltonian-Schrödinger vector field as Also, for an observable, O, the corresponding Schrödinger vector field is For a time-independent Hamiltonian, Ĥ, we solve the Schrödinger equation by employing the unitary propagator Û (t) = exp(−ı Ĥt/ℏ), and write the Hamiltonian flow as Û generates a one-parameter group of transformations on H 2n r , which preserve the metric G and the symplectic 2−form Ω.
The triple (H 2n r , Ω, X Ĥ ) is a Hamiltonian system with Hamiltonian function the Expectation value of Ĥ at the state |ψ > We can prove (see Appendix A.1) that for an observable Ô and normalized states < ψ|ψ >= 1, the differential 1−form of the expectation value of Ô is the interior product of the symplectic 2−form Ω(X Ô , |ϕ >) with the Schrödinger vector field X Ô (Equation (86)) Ô1 , Ô2 is the commutator of the two operators ( Ô1 , Ô2 ).
The uncertainty (dispersion) of a quantum observable Ô in a normalized state |ψ >∈ H n is defined as [8,31] (∆O) If |ψ > is an eigenvalue of the observable Ô, then, (∆ Ô)(|ψ >) = 0.For two quantum observables ( Ô1 , Ô2 ) on H n the product of the uncertainties of the expectation value functions and the covariance or correlation function is expressed as where the anticommutator is denoted by The Schrödinger vector fields are expressed as usually If we use Equation (90), then we can express the commutator Schwartz inequality implies and the Robertson-Schrödinger uncertainty relation is written as (Notice that to be consistent with the literature in discussing the covariance of two observables, we introduce the factor 1/2 in the commutator and anticommutator.) (100)

Equations of Motion
We have seen that in the Extended Hilbert space, the vector states are the rays {|ψ >}, which for simplicity we symbolize as |ψ >.The projection of the Extended Hilbert space on the n-dimensional tangent Projective Hilbert phase makes the solutions of the timedependent Schrödinger equation to be equivalent to the solutions of Hamilton's equations in the Projective Hilbert space, with the expectation value of the Hamiltonian operator playing the role of Hamiltonian function.Furthermore, the phase space is a Kähler manifold, both in the extended Hilbert space as well as in the Projective Hilbert space.
If we use as basis set the coordinate basis |s The coefficient ψ(s) is called wavefunction and it is a complex function, ψ(s) ∈ C n , which we assume normalized to one With an orthonormal coordinate basis, the completeness relation is written as In the following, we adopt the coordinate representation of the state vectors using wavefunctions in the Schrödinger picture, ψ(s, t).We expand |ψ(s, t) > of a dynamical system in an arbitrary orthonormal basis set, |χ k (s) In this expansion, the basis functions |χ k > are time-independent, whereas the coefficients c k depend on time.|ψ > are solutions of the Schrödinger equation evolving in the extended Hilbert space and their complex conjugate solutions of the equation We assume |ψ > to be normalized, < ψ(s, t)|ψ(s, t) >= 1, at any time.Then, by substituting Equation (104) in the expectation value of the Hamiltonian, H, we obtain The Schrödinger equation in the extended Hilbert space is mapped into Hamilton's equations in the Projective Hilbert space P n (H n+1 ) with Hamiltonian function the expectation value of the Hamiltonian operator Ĥ.For simplicity, we again denote the quantum states |ψ P > in the Projective Hilbert space with |ψ >.Then, we differentiate Equation (107) with respect to c Similarly, we take We define the complex variables (Q k , P k ) by introducing the real functions q k (t) and p k (t) to correspond to real and imaginary parts of the complex variables, respectively, Equations ( 108) and (109) are the quantum equivalent of Hamilton's equations of motion Hence, w kl = h kl /ℏ are the transition frequencies.It is also worth noting that the quantum Hamiltonian is similar to that of a harmonic oscillator after complexification (Equation ( 56)).
We can take the inverse of Equations ( 110) and write the real functions q(t) and p(t) as Adopting the realification of the complex Projective Hilbert space, we may transform Hamilton's equations to or h kl is the representation of Hamiltonian operator in the basis set |χ(s) >, and thus, a Hermitian matrix (The Hamiltonian operator is Hermitian, and its representation in a basis results in a Hermitian matrix, h kl = h * lk ).The Hamiltonian vector field is extracted from an equation similar to that of classical mechanics (Equation ( 31)).Hence, in the realified phase space with coordinates (q, p) the canonical Poincaré 1−form provides the symplectic 2−form Then, the interior product (contraction) of ω h gives and the Hamiltonian vector field is extracted as We define the length of a curve C in the Projective Hilbert space by introducing the Riemannian metric g(| ψ >, | ψ >) as For real wavefunction, the length is the Euclidean distance

Quantum Systems as Totally Integrable Hamiltonian Systems
It has been shown that geometrical quantum mechanics naturally describes a completely integrable system, as follows.Let H n+1 be a complex separable Hilbert space of dimension n + 1, and view the triple (P n (H n+1 ), ω h , X h ) as a Hamiltonian dynamical system on the phase space P n (H n+1 ), equipped with the symplectic 2−form ω h .Let Ĥ be the self-adjoint Hamiltonian operator for the system, and assume that each eigenspace of Ĥ is one-dimensional (non-degenerate).Choose an orthonormal basis |χ 0 >, where we have used Equation (104).Without loss of generality, we set the lowest eigenvalue (w 0 ) to be 0 so that we can expand the Hamiltonian operator as Observe that the projectors { Pk } form a mutually commuting set of n operators on H n+1 , and we can define the corresponding expectation value functions {P k } in the Projective Hilbert space P n (H n+1 ) as Hence, (q k , p k ) are the real and imaginary parts of the wavefunction.Thus, the Hamiltonian in the projective Hilbert space resembles that of a sum of n harmonic oscillators in scaled canonical coordinates (Equation ( 55)).Therefore, we may conclude that there are n constants of motion, P k , and the trajectories lie on n-dimensional tori (Lagrangian tori).

Manifolds and Maps
To establish an analogous theoretical framework for classical thermodynamics to that of Hamiltonian classical mechanics, we consider the macroscopic properties of the system to consist of the configuration manifold (Figure 4).For a typical chemical system we usually take the extensive physical properties of entropy (S), internal energy (U), volume (V), and the number of molecules (or moles) (N 1 , . . ., N M ) of M chemical species to consist of the coordinates of the extended configuration manifold Q n+1 , where n = 2 + M. If we attribute entropy to be a homogeneous first-degree function of q = (q 1 , q 2 , . . ., q n ) T ≡ (U, V, N 1 , . . ., N M ) T ∈ Q n+1 , then according to Euler's theorem for homogeneous functions we can write where we have introduced the conjugate intensive variables {γ i } as the partial derivatives of entropy T is the absolute temperature, P the pressure, and µ 1 , . . ., µ M the chemical potentials of M compounds.
(q, γ) and entropy comprise of a (2n + 1)D−coordinate system for the contact manifold (C 2n+1 ), where the physical states of the system live.The extended configuration manifold and the contact manifold are generally nonlinear, and the maps (ϕ Q , U Q ) and (ϕ C , U C ) determine local coordinate systems in Euclidean space.
The total differential of S is Gibbs's fundamental equation that describes the physical thermodynamic submanifold (PTS) of a thermodynamic system If we assign the entropy S to coordinate q 0 , we can also write From Equations ( 129) and ( 130) we deduce that the 1−form θ c satisfies This equation expresses the physical state submanifold of a thermodynamic system, named Legendrian submanifold, and it is what we represent with the equation of states [32].
Inclusion gauge: PS π -1 :(S,q, ) (S,q, γ PS, p) : H e = p q + P S S = 0 R 2n+2 x R 2n+2 (S,q,PS,p,S,q,PS,p)  Manifolds and functions which determine the geometrical structures of a thermodynamical system with n + 1 coordinates.S denotes the entropy and q = (q 1 , . . ., q n ) T are the coordinates of n-extensive properties.γ are the partial derivatives of entropy that correspond to the intensive properties of the system.With the inclusion of gauge P S , the conjugate momenta p are defined with respect to which homogeneous Hamiltonians, H e , of first-degree are determined.Details are given in the text.
In a more formal wording, in the contact space C 2n+1 the locally defined 1−form θ c that satisfies the condition, i.e., there is the volume form θ c ∧ (dθ c ) n ̸ = 0, ascertains the nD−Legendrian submanifold L n c of C 2n+1 by requiring θ c = 0.In other words, the kernel of θ c provides the maximal dimension hyperplanes tangent to L n c .To construct a Hamiltonian system, we need to define the canonical conjugate momenta.Following Balian and Valentine [18], we denote the conjugate momentum of entropy with P S , and we take it as a non-vanishing free parameter or a gauge variable.Then, the canonical conjugate momenta to the other coordinates of Q n+1 are defined as Hence, {p i } act as new variables, which replace the physical intensive variables {γ i }.We write P S = p 0 and Equation (131) determines the Poincaré 1−form which produces the symplectic 2−form This equation sets the Thermodynamic Extended Physical State Submanifold (TEPSS) in the extended phase space, T * Q n+1 ≡ P 2n+2 , named Lagrangian submanifold.
In a more formal wording, for an even-dimensional phase space, P 2n+2 , the symplectic 2−form ω e (see also Equation ( 29)), which satisfies the condition (volume form) (dθ e ) n+1 ̸ = 0, determines the (n + 1)D−Lagrangian submanifold L n+1 p in P 2n+2 by requiring ω e = 0.The thermodynamic contact space C 2n+1 is the projective space of thermodynamic extended phase space P (see Appendix A.4.1) where π is the projection map.
It is proved that the submanifold L n c ⊂ P 2n+1 (T * Q n+1 ) is a Legendrian submanifold, if and only if L n+1 p := π −1 (L n c ) ⊂ T * Q n+1 is a homogeneous in momenta Lagrangian submanifold (see Table A1).This means that (dθ e = 0) as well as We say that all Q = (q 0 , q), P = (p 0 , p), which satisfy Equation (136), belong to the ray {Q, P}.Then, it is valid θ e = 0 for every vector field tangent to L n+1 p .Also, every homogeneous Lagrangian submanifold originates from a Legendrian submanifold of the form π −1 (L n c ).We can also state that a submanifold is homogeneous if its generating function is homogeneous.
In the entropy representation, the n extensive independent variables (q 1 , . . ., q n ) together with the p 0 parameterize the Lagrangian submanifold.If the entropy S(q 1 , . . ., q n ) is the generating function of the Legendrian submanifold, then for the Lagrangian submanifold the generating function is −p 0 S(q 1 , . . ., q n ).This is a property of homogeneous functions of first-degree.Similarly, in energy representation we take −p 1 U(q 0 , q 2 , . . ., q n ) as generating function for the Lagrangian submanifold [29].With the generating function in the entropy representation, we extract the remaining n + 1 variables as q 0 = S(q 1 , . . ., q n ), The extended Hamiltonian H e is a function on phase space to real numbers, whereas the tangent bundle of phase space, TT * Q n+1 , is described by coordinates and momenta, x = (Q, P T ) T , as well as their time derivatives.The extended Hamiltonian is a homogeneous function of first-degree in momenta, i.e., λH e = H e (Q, λP).
(138) π T * Q n+1 is the projection map of the tangent bundle of phase space to phase space.In Appendix A.4, we summarize in Tables A2 and A3 several formulae of Hamiltonian thermodynamics in entropy-and energy-representations, respectively.

Equations of Motion
The Hamiltonian function H e (Q, P) acting in the extended phase space is a homogeneous function of first-degree in momenta [18] and according to Euler's theorem for homogeneous functions of first-degree, we can write For a simple thermodynamic system, the extended Hamiltonian is H e = p q + P S Ṡ.To extract the physical states, we impose the constrain P S = −1, which implies H e = 0 on thermodynamic extended physical state submanifold, also written as [29] H We point out that a Hamiltonian system is the triple (P 2n+2 , ω e , X H e ), where X H e is the Hamiltonian vector field defined on the tangent bundle of phase space, and ω e a skewsymmetric, non-degenerate, closed differential 2−form.Then, we can use the machinery of geometrical classical mechanics as was developed in Section 2.1 to write down equations for equilibrium and non-equilibrium processes.Thus, the Hamiltonian vector field can be extracted from the equation given the Hamiltonian function H e on the phase space P 2n+2 .This equation provides the Hamiltonian vector field From the definition of the extended Poincaré 1−form (Equation ( 133)) we prove that for homogeneous in momenta of first-degree Hamiltonian functions.Hence, Hamilton's equations take their usual form (Equation ( 33) Moreover, (Q, P) is a canonical coordinate system in the corresponding phase space, and thus, satisfy the Poisson brackets Equation (34) qi = {q i , H e }, ṗj = {p j , H e }. (147)

Contact Equations of Motion
Since the Poisson bracket (Equation ( 34)) is invariant under gauge (canonical) transformations, we obtain H e (q 0 , q 1 , . . ., q n , p 0 , p 1 , . . ., p n ) = −p 0 F(q 0 , q 1 , . . ., q n , γ 1 , . . ., where F is a generating function and we extract the contact vector field (see Appendix A.3) For a generating function F, which is independent of q 0 variable, as well as a homogeneous function of first-degree in momenta, the contact equations of motion are reduced to those of Hamilton's equations in P 2n phase space, i.e.,

Embedding Systems in Homogeneous Media
We examine the case of a simple system with internal energy U and constant volume and number of particles.The embedded mechanical system is described by the Hamiltonian H d (σ, π).Here, we consider the augmented system, system plus environment, isolated with total energy E constant, Ė = 0 The entropy of the thermodynamic system is given by the equation i.e., a function of n = 2w + 1 independent variables.In the extended thermodynamic phase space, we include entropy as an independent variable as well q 0 = S, q 1 = E, q 2 = σ 1 , . . ., q w+1 = σ w , q w+2 = π 1 , . . ., q 2w+1 = π w .
In the entropy representation, we take as the generating function of the Legendrian submanifold in the thermodynamic contact space the entropy S(q 1 , . . ., q n ).Hence, the generating function of the corresponding Lagrangian submanifold in the extended phase space is −p 0 S(q 1 , . . ., q n ).For p 0 = −1 the canonical momenta become Therefore, we have attained the important conclusion that the thermodynamic extended state manifold in thermodynamic extended phase space is the Lagrangian submanifold, L n+1 p , q 0 = S(q 1 , q 2 , . . ., q n ) = S(E, σ 1 , . . ., σ w , π 1 , . . ., π w ) (158) From Equation (140) the Hamiltonian function in the extended phase space is written as Hamilton's equations are then determined where the velocities ẋj−1 d are determined from the definition of the embedded system.

Chemical Kinetics
The kinetics of chemical reaction networks can also be formulated using a geometric Hamiltonian theory as an embedded system.However, classical chemical kinetics is better studied by introducing temperature, pressure, and the elementary chemical reaction coordinates (ξ) as the independent variables.

Thermodynamics of Chemical Reactions
A general chemical reaction with r−reactant compounds and p−product compounds can be expressed by the formula where M = r + p.The stoichiometric integers ν j , j = 1, . . ., r are negative for the reactant molecules J j = (A 1 , . . ., A r ) and positive ν j , j = r + 1, . . ., M, for the product molecules, J j = (B 1 , . . ., B p ).
For K elementary chemical reactions, we must employ K independent reaction coordinates ξ 1 , . . ., ξ K .Then, the time variation of the number of molecules is related to the velocities of reactions by the equation where . ., K, being the stoichiometric matrix for the K elementary reactions.The reaction Gibbs free energy ∆ r G is defined by introducing the chemical potentials of the J j compounds where G(T, P, N 1 , . . ., N M ) is Gibbs free energy, T the temperature and P the pressure.From Gibbs's fundamental equation and for a general chemical reaction at constant temperature and pressure, Equation (169), we have Therefore, the above equation becomes Usually, the derivative of Gibbs free energy with the reaction coordinate is denoted as ∆ r G m = ∑ M j=1 ν j µ j (T, P) and is called molar reaction Gibbs free energy.
For K elementary reactions, we write employing the rates of forward (R f k ) and backward (R bk ) reactions, as expressed by the law of Mass Action [37][38][39][40].Also, for an elementary chemical reaction De Donder [41,42] introduced the quantity of Affinity which can be written as [30]

.2. Thermodynamic Hamiltonian in Massieu-Gibbs Representation
Chemical reactions are better studied at constant temperature and pressure.Hence, we first transform the entropy from a function of the internal energy and volume to a function in temperature and pressure by a Legendre transformation S is Massieu function related to Gibbs free energy G(T, P, N) = U − TS + PV [19].
The above Legendre transformation is a diffeomorphism on the Legendrian and Lagrangian submanifolds.This means that we can define Affinity with the chemical potentials µ j of M chemical compounds (reactants and products) given by Gibbs free energy The rate of entropy production for the kth-irreversible reaction is written with the molar reaction Gibbs free energy (∆ r G m,k ) where A ξ k is the Affinity of kth-reaction and ξ k is the reaction coordinate that describes the progress (extent) of the reaction.The total entropy rate for K reactions becomes or employing Equations ( 176) and (178), as where R is the ideal gas constant.Obviously, for reactions at equilibrium in a closed thermodynamic system, we have R f k = R bk , which means that dS dt = 0, and thus, the total entropy is conserved.The inequality in Equation (183), which is consistent with the second thermodynamic law, holds because ln is a monotonous function in the domain of its definition.
The thermodynamic extended state manifold in thermodynamic extended phase space is a Lagrangian submanifold, L n+1 p embedding in P 2n+2 phase space with n = 2 + M. The generating function is −p 0 S = p 0 G(T, P, N)/T L n+1 p = (q, p) T ∈ P 2n+2 (185) p 0 is the conjugate momentum of S.
The Hamiltonian function in the extended cotangent bundle (phase space) is written as At constant temperature and pressure and using concentrations instead of the number of molecules for reactants and products, (x 1 , . . ., x M ) T with conjugate momenta also denoted by (p 1 , . . ., p M ), we take For K elementary reactions in the reaction coordinate space, ξ = (ξ 1 , . . ., ξ K ) T , and under the transformation of stoichiometric matrix C : ξ → x we have and the Hamiltonian (Equation ( 189)) becomes Then, Hamilton's equations are written We can also define a metric on the Lagrangian submanifold in Massieu-Gibbs representation, and this is given as Therefore, to measure the distance between initial and equilibrium states, we compute the length of a path on the thermodynamic extended state manifold with t max to be the maximum integration time and substituting p 0 = −1.The distance of two states has been utilized to define a better low bound of the entropy production or dissipated work (availability) than zero for finite time irreversible processes [43,44].In Appendix A.5, an example of two elementary consecutive chemical reactions is presented and described in detail.

High-Order Finite-Difference and Pseudospectral Methods
High-order finite-difference methods are widespread for solving the differential equations encountered in classical and quantum mechanics.They are based on polynomial approximations to the solution functions, and thus, finite-difference methods (FD) are suited for problems that can be solved by expanding the unknown functions to Taylor series [25,45].In the past, we developed and tested high-order multivariable finite-difference methods in configuration space and time (herein they are denoted with x), formulated by Lagrange interpolating polynomials [46,47].Given that variable order finite-difference algorithms are among the most suitable for modern high-performance computing, the computer technology to which computational chemistry is mainly addressed, as well as their programming simplicity, finite-difference methods emerge as one of the best choices for studying chemical dynamics.
There is a huge literature concerning finite-difference approximations to initial value problems (Notice that Hamilton's equations, Jacobi fields, and Poisson brackets can be written as initial value problems, and thus, ordinary differential equations can simultaneously be integrated.),such as Hamilton's and variational equations [45], as well as calculating the action of Hamiltonian operator on wavefunctions in quantum mechanics [25].
For ordinary differential equations (ODEs) and partial differential equations, we approximate the solution functions by expanding them in an appropriate basis set {χ j (x)} Different global basis functions produce different pseudospectral methods.From such so-called finite basis representation, we can transform to a cardinal set of basis functions, {u j (x)}, also called discrete variable representation, by choosing N grid points, {x i }, at which the function is calculated.The cardinal functions obey the δ−Kronecker property so that the wavefunction is expressed by the set of grid points The transformation from χ j (x) to the cardinal basis set is unitary, and the new basis is given in terms of the old one by the equation where the grid points x k and the corresponding weights w k depend on the chosen quadrature rule.
The mth-derivative of the approximate solution is written as The differentiation matrix D m contains the coefficients necessary for calculating the mthderivative at the collocation points, and T is the column vector of dimension N containing the basis functions.
Usually, the functions are interpolated by Lagrange cardinal basis set of order k − 1 where It is proved that by increasing the order of Lagrange polynomials, the series converges to the corresponding pseudospectral limits.For uniform equidistant grids, x j = j∆x, and N = 2M + 1, it is shown that the pseudospectral limit is a sinc−function Also, for periodic functions, Fourier series are associated with the cardinal functions A relation of Fourier cardinal functions and sinc functions can be seen by the formula sin Since sinc functions are the infinite order limit of an equispaced FD (Equation ( 203)), the correspondence now is that periodically repeated FD stencils will tend to the PS limit of Fourier functions as the number of grid points in the stencil approaches the total number of grid points in one period.Also, because equispaced FD can be considered to be a robust sum acceleration scheme of a sinc function series, we expect the same convergence properties of the FD approximation to the Fourier series as the one we find for radial variables [46].
To solve Hamilton's and variational differential equations [5], we use methods for solving ordinary differential equations, such as those described in the book of Shampine and Gordon [45].The algorithms are based on predictor-corrector methods with variable order finite-difference approximations, as well as variable time step and backward difference formulae.The accuracy of solutions is controlled by prespecified values.
The action of the Hamiltonian operator on a wavefunction can also be approximated by high-order finite-difference schemes or pseudospectral methods.We have demonstrated that the algorithm developed by Fornberg [25] to construct Lagrange interpolating polynomials for solving the Schrödinger equation is robust and fast.Applications can be found in references [46,47].

The Hénon-Heiles Model
In this section, we show results that demonstrate the effectiveness of solving the Hamiltonian ODEs encountered in the three principal theories: classical, quantum, and thermodynamic.We use a test model that of Hénon-Heiles [26] and mainly the software POMULT [48].The Hénon-Heiles potential was initially proposed as a model for studying the dynamics of a galaxy.The potential function introduces cubic nonlinearities, and soon, it became the model of choice for numerically investigating the nonlinear behavior of two degrees of freedom systems.
Numerous articles have been published that explore the phase space structures of this nonlinear dynamical system in detail [49].The Hamiltonian function for a Hénon-Heiles system is written as (σ 1 , σ 2 ) denote the coordinates and (π 1 , π 2 ) the canonical conjugate momenta.In Figure 5, we present 3D graphs and isocontours from the projections of the potential in the coordinate plane.The potential has one minimum at (σ 1 , σ 2 ) = (0, 0) and three saddles at the energy of D = 1/6.Trajectories with energy above D may escape to infinity from the three exit channels.The harmonic normal mode frequencies are w 1 = w 2 = 1, and thus, the system shows a 1:1 resonance.Notice that the spatial symmetry of the Hénon-Heiles potential is D 3 , the same symmetry as triatomic molecules with the same atom.

A Classical Time-Dependent Hénon-Heiles System
A time-dependent Hénon-Heiles system is produced by adding the q 0 −term coupled to σ 1 −coordinate (see Figure 1) with q 0 = t, and canonical conjugate momentum, p 0 = −H.We solve Hamilton's equations as given by Equations ( 14), and with the extended Hamiltonian, H e = p 0 q0 + H = 0.
In Figure 6, we depict a dissociating trajectory with parameters of the time-dependent term, A f = −0.01 and w f = 1.The initial conditions are selected from the stable periodic orbit of the principal family along the σ 2 coordinate and at energy 0.1575.The red thick line in Figure 6b is the projection of this periodic orbit on the coordinate plane.The 3D plot in Figure 6a shows the evolution of the system with the absorbed energy that leads to dissociation.The Fourier transformation of the autocorrelation function depicts the power spectrum from which one can extract eigenenergies and eigenfunctions.Numerical technologies of accurately calculating the energy levels, as well as the corresponding eigenfunctions, have extensively been investigated [50].The outputs of a typical run are depicted in Figures 7 and 8.

Energy Dissipation of Hénon-Heiles System in Homogeneous Media
For a simple thermodynamic system, such as that of an inert atomic gas with constant volume and particle number (1 mole), the entropy function is given by the equation with reference the energy U 0 at T = 300K and c V = 3 2 N A k B to be the specific heat.k B denotes the Boltzmann constant and N A the Avogadro constant.
We assume a diagonal friction parameter matrix [b kl ] that couples the Hénon-Heiles nonlinear oscillator with the homogeneous environment.We assign the nonzero elements (b 11 , b 22 ) to the values, (b 11 , b 22 ) = (0.3, 0.001).This is an example of loosely coupling one DOF of the dynamical system to the environment, and we investigate the effect it may have on the entropy production and length of the path [29].
For zero frictions, the dynamical system remains uncoupled to the environment and thus, is a conserved Hamiltonian system.When the friction parameters are turned on, energy dissipates from the dynamical system to the environment.In the extended thermodynamic space, the number of DOF is 6 with coordinates the entropy, S, the total energy, E, and the four variables of the dynamical system, (σ 1 , σ 2 , π 1 , π 2 ).Hence, the dimension of the extended phase space is 12.
The extended Hamiltonian H e (Equation ( 162)) is equal to zero on the Lagrangian thermodynamic extended state manifold.We integrate trajectories up to 50 time units with a precision in the value of extended Hamiltonian to about 10 −15 .
In Figures 9 and 10, the results for two trajectories are depicted by treating the Hénon-Heiles as a dissipating system.We plot the produced entropy (Equation (163)) and the lengths of trajectories, computed via the Ruppeiner metric (Rlength), Equation (154), and with initial energy of the dynamical system H d = 0.125.
Since one DOF of the dynamical system is weakly coupled to the environment, we find that for the integration times, trajectories are trapped around reduced tori related to the approximately decoupled mode.The thermodynamic length provides an estimate of how close the initial state is to the physical equilibrium state.Hence, we expect trapped trajectories in the approximately decoupled modes to have large lengths and to produce low entropies [29].

Conclusions
All cardinal physical theories have acquired a Lagrangian or Hamiltonian formalism.The advantages of employing a Hamiltonian framework stem from the fact that global and local constants of motion that dictate the dynamics of the system are respected by solving Hamilton's equations.In particular, the geometrical structures of Hamiltonian theory were mainly investigated in the second half of the twentieth century with the development of contemporary differential geometry.The purpose of this article is to introduce and unveil common geometrical structures of the three most frequently applied theories in computational chemistry, those of classical mechanics, quantum mechanics, and classical thermodynamics, all of them at the non-relativistic approximation.We have shown that working in extended phase space, the physical states of the system in the three theories are described by Lagrangian submanifolds.Observables are calculated by canonically projecting the extended phase space in a reduced dimensional space.In classical mechanics, integrable systems guarantee the existence of n + 1 constants of motion, and thus (n + 1)−dimensional Lagrangian submanifolds embedded into 2(n + 1)−dimensional phase space.Quantum systems can also be considered to be integrable systems in the projective Hilbert space.Finally, classical thermodynamics have also been given a Hamiltonian formalism in an extended phase space, similar to classical mechanics, and capable of formulating irreversible processes.We can obtain representations of Lagrangian manifolds when we use Hamiltonians in action-angle variables in classical mechanics and Gibbs's fundamental equation in classical thermodynamics.
Noether's theorem [51] proves that constants of motion are associated with symmetries of the system, which leave the Hamiltonian function invariant.Global continuous symmetries, such as time-reversal, translational, and rotational transformations, are theorized by Lie groups and their associated Lie algebras.Advanced methods to extract the constants of motion related to symmetries and to reduce the dimensionality of the problem have been developed in recent decades [2].
Here, we have not explored the important role of symmetry in dynamical systems.However, we have emphasized the importance of approximating local constants of motion by solving the variational equations of a Hamiltonian system, such as around equilibria and stable periodic orbits.This requires the diagonalization of the fundamental matrix (see Section 2.1.5).It is proved that each constant of motion corresponds to a pair of eigenvalues equal to one.
Numerically solving the equations of motion (classical, quantum, thermodynamic) is the main task of computational chemistry.Finite-difference methods have been broadly adopted for finding solutions of ordinary differential equations, as well as partial differential equations, such as the Schrödinger equation.Nevertheless, in spite of their many successes, they are restricted to low-dimensional systems since they require substantial computational resources for many degrees of freedom systems.Furthermore, non-symplectic integrators for Hamiltonian ODEs inevitably introduce numerical instability in long time integrations.
Molecules are generally complex systems with many degrees of freedom.Their phase space is entangled with regular and chaotic regions.Therefore, it is not a surprise that computational chemistry has always tried to exploit new computer advances, such as parallel computing (including grid and cloud), as well as GPU technology.As far as the integration of the trajectories of large molecules for a long time is concerned, the good performance of several symplectic integrators has been recognized.Among the most popular ones are the simple low-order symplectic algorithms, such as the leapfrog or velocity Verlet algorithms [52].
Presently, AI (artificial intelligence) methods, particularly machine-learning techniques, are under exploration.In the last few years, an intense interest has been directed at finding algorithms that incorporate physics knowledge into neural networks.Hamiltonian neural networks label techniques that try to solve Hamilton's equations with deep neural networks [53][54][55].Solving the Schrödinger equation has also attracted the interest of researchers in this field [56].However, we must note that at present, physics neural networks (PNN) algorithms are tested with low-dimensional systems, and their extension to systems with many degrees of freedom remains to be proved.
Irrespective of the final result of this endeavor, what is worth pursuing is developing computational methods that take into account multiscale physical theories that cover extended temporal/spatial scales.What we have shown in this review is that Hamiltonian (symplectic) geometry is the foundation of principal physical theories.This should be taken into account in building PNN algorithms [57], and it signals the need for new projects.Hamiltonian geometry yields the necessary and sufficient conditions for the mutual assistance of humans and machines in deep-learning processes.Ô1 , Ô2 is the commutator of the two operators ( Ô1 , Ô2 ).Indeed, the Poisson bracket of the expectation functions (O 1 , O 2 ) at state |ψ > is developed as follows Appendix A.3.Proof of Equation ( 152) For a thermodynamic system the Hamiltonian in the extended phase space is written as, H e (q 0 , q 1 , . . ., q n , p 0 , p 1 , . . ., p n ) = −p 0 F(q 0 , q 1 , . . ., q n , γ 1 , . . ., γ n ), whereγ i = − p i p 0 .Then, the time derivative of an observable function O(q, p) is given by the The reaction coordinates (extension or progress of the reactions) are denoted by ξ = (ξ 1 , ξ 2 ) T .Then, the time variation of concentrations is written as C is the stoichiometric matrix.We consider the reactive system as a closed thermodynamic system, i.e., it exchanges energy with the environment, but not mass.If the initial concentrations of the three substances Q 1 , Q 2 and P are x 1 (0) = x 10 , x 2 (0) = x 20 and x 3 (0) = x 30 , respectively, and assuming ξ = 0 at t = 0, then the solution of Equations (A10) is x 3 (t) = x 30 + ξ 2 (t). (A11) According to the law of mass action [37][38][39][40] the reaction rates are written as where (R f 1 , R f 2 ) are the rates of the forward reactions and (R b1 , R b2 ) the rates of the backward reactions, respectively.Then, the rates of reaction coordinates are The analytical solutions of the above differential equations for the case k b1 = k b2 = 0, as well as x 20 = x 30 = 0 are with limits at equilibrium (t → ∞) x eq 1 = x eq 2 = 0 x eq 3 = x 10 .
As discussed in Section 3, the extended phase space is obtained by adding the entropy to the set of generalized coordinates and p 0 as a conjugate momentum.Then, the momenta of thermodynamic coordinates are defined as p = p 0 µ.
We study chemical reactions under isothermal and isobaric conditions.In this case, we take p 0 to denote the conjugate momentum of the entropy expressed by the Massieu-Gibbs and calculate the distance between the initial and equilibrium states with t max to be the maximum integration time and substituting p 0 = −1.The distance of two states has been utilized to define a better low bound of the entropy production or dissipated work (availability) than zero for finite time irreversible processes [43,44].
For the chosen example, we have numerically solved Hamilton's equations for several combinations of rate constants and initial concentrations [30].A representative trajectory is shown in Figure A1 with parameter values given in the caption of the figure.For all trajectories run with double precision arithmetic, the extended Hamiltonian H S ξ is conserved approximately to zero with an accuracy ≈ 10 −15 .The symplectic fundamental matrix is obtained by solving the variational equations [29,48] for a time interval of 5 t.u.(time units).Diagonalizing this matrix, we find three pairs of eigenvalues.One pair is always equal to one as a result of the conservation of the Hamiltonian function, whereas the other two come in combinations of two real positive numbers σ i , 1 σ i .For the present trajectory, these are (0.18478 × 10 6 , 0.54117 × 10 −5) and (61.74712, 0.016195).All panels in Figure A1 demonstrate that for this highly unstable trajectory, equilibrium is reached in 4 t.u., with the momenta to approach zero.

Figure 2 .
Figure 2. The description of the variation vector field, Y x , with respect to a reference trajectory with vector field X x and initial condition x 0 .Φ x 0 (t) denotes the Hamiltonian flow.

Figure 3 .
Figure 3. Manifolds and functions which determine the geometrical structures of a quantum system.The states of the quantum system are the elements of a n-dimensional complex vector space (Hilbert space H n ∼ = C n ) that includes the vectors |ψ >, their complex conjugate < ψ|, and linear transformations | ψ >.Hermitian inner products, < ϕ|ψ >, are employed for Hilbert spaces.The tangent bundle (H n × H n ) is mapped to the Extended Hilbert Space (H n+1 × H n+1 ) by the inclusion of a complex phase λ, the elements of the unitary group U(1), that produces the rays {|ψ >} := {λ|ψ >}.The canonical projection, π |ψ P > , projects the rays in H n+1 onto the Projective Hilbert Space P n (H n+1 ), the space where the physical states of the system live.Details are given in the text.

Figure 4 .
Figure 4.Manifolds and functions which determine the geometrical structures of a thermodynamical system with n + 1 coordinates.S denotes the entropy and q = (q 1 , . . ., q n ) T are the coordinates of n-extensive properties.γ are the partial derivatives of entropy that correspond to the intensive properties of the system.With the inclusion of gauge P S , the conjugate momenta p are defined with respect to which homogeneous Hamiltonians, H e , of first-degree are determined.Details are given in the text.

Figure 5 .
Figure 5. Potential energy surface of the Hénon-Heiles model and isocontours in the configuration plane.

Figure 7 .Figure 8 .
Figure 7. (a) The initial wavepacket centered at the minimum of the potential well.(b) The evolved wavepacket after 2000 time units.

Figure 10 .
Figure 10.Panel (a) is the time evolution of the entropy production and (b) the trajectory length calculated with the Ruppeiner metric for the two trajectories shown in Figure 9.