Type system#
eOn was written to use Eigen as the matrix multiplication library.
All matrices are row-major (eOnStorageOrder = Eigen::RowMajor), so that
.data() yields [x0, y0, z0, x1, y1, z1, ...] as the Fortran potentials
and VectorXd::Map round-trips expect.
Instead of the EIGEN_DEFAULT_TO_ROW_MAJOR preprocessor macro (which would
make eOn’s Eigen types binary-incompatible with other libraries), client/Eigen.h
provides explicit row-major type aliases (MatrixXd, Matrix3d, Matrix4d,
AtomMatrix, RotationMatrix) alongside selective using declarations for
vector types (VectorXd, VectorXi, Vector3d) that are unaffected by
storage order.
Warning
New multi-dimensional Eigen matrix types in the codebase must use
eOnStorageOrder or one of the existing row-major aliases. Adding a bare
Eigen::MatrixXd (column-major) will silently corrupt force projections and
data mapping.
Changed in version 2.11: Removed the EIGEN_DEFAULT_TO_ROW_MAJOR preprocessor macro. All matrix types
are now explicitly row-major via aliases in client/Eigen.h, ensuring binary
compatibility with other Eigen-based libraries.
Header conventions#
Changed in version 2.x.
include-what-you-usepragma onceis preferred over settingifdefs