NEB path: chain of images between two endpoints. More...
#include <gpr/neb/NEBPath.h>
Public Member Functions | |
| NEBPath (const Eigen::VectorXd &initial, const Eigen::VectorXd &final_state, int n_images, double spring_constant=0.1) | |
| Initialize path with linear interpolation between endpoints. | |
| NEBPath (const EigenMatrix &image_positions, double spring_constant=0.1) | |
| Initialize path from explicit image positions. | |
| void | initializeIDPP (int n_atoms, bool collective=false) |
| Initialize from IDPP (image dependent pair potential) interpolation. | |
| void | initializeIDPP (int n_atoms, const std::vector< char > &moving_atoms, bool collective=false) |
| void | initializeSIDPP (int n_atoms, double alpha=0.33) |
| Initialize via Sequential IDPP (SIDPP). rgsaddle_sidpp_alternating_path. The spring on that call is the unit IDPP spring, not the physical NEB spring. | |
| void | initializeSIDPP (int n_atoms, const std::vector< char > &moving_atoms, double alpha=0.33) |
| void | initializeSIDPPGeodesic (int n_atoms, double alpha=0.33) |
| Initialize via inverse-distance S-IDPP. rgsaddle_sidpp_alternating_inverse_distance_path. This is the –sidpp-geodesic blend (close pairs stay close longer). It is not rgsaddle_geodesic_path, which minimises a redundant-coordinate length and needs a chart. | |
| void | initializeSIDPPGeodesic (int n_atoms, const std::vector< char > &moving_atoms, double alpha=0.33) |
| void | computeNEBForces () |
| Compute NEB forces for all intermediate images. | |
| void | enableClimbingImage () |
| Enable climbing image on the highest-energy intermediate image. | |
| int | highestEnergyImageIndex () const |
| Highest finite interior energy, or -1 when none exists. | |
| int | highestEnergyImageIndexPreferring (int preferred) const |
| int | highestLocalMaximumImageIndex () const |
| Strict interior local maximum, else the highest finite energy. | |
| int | highestLocalMaximumImageIndexPreferring (int preferred) const |
| void | setForceVariance (int i, const Eigen::VectorXd &variance) |
| void | clearForceVariance () |
| bool | hasForceVariance (int i) const |
| void | setPeriodicCell (const std::array< double, 9 > &cell) |
| void | interpolateFromEndpoints () |
| Rebuild interior images on the chord between the current endpoints. | |
| void | setMovingAtoms (std::vector< char > moving_atoms) |
| void | setExternalFixedAtoms (bool present) |
| void | setSpringCoordinates (std::vector< Eigen::Index > coordinates, std::vector< double > weights={}) |
| Band coordinates that carry the springs; empty means all. | |
| const std::vector< Eigen::Index > & | springCoordinates () const |
| const std::vector< double > & | springWeights () const |
| void | setMolecularRigidMotion (bool enabled) |
| bool | molecularRigidMotion () const |
| void | projectPhysicalVector (const Eigen::VectorXd &reference, Eigen::Ref< Eigen::VectorXd > vector) const |
| Eigen::VectorXd | alignMolecularGeometry (const Eigen::VectorXd &reference, const Eigen::VectorXd &geometry) const |
| Proper rigid alignment with fixed atom correspondence; no reassignment. | |
| void | alignMolecularFrames () |
| Normalize seed frames before evaluation, invalidating changed images. | |
| void | pinFixedAtoms (Eigen::Ref< Eigen::VectorXd > positions) const |
| Copy reactant coordinates onto fixed atoms. | |
| void | maskFixedForce (Eigen::Ref< Eigen::VectorXd > force) const |
| Zero a force on fixed atoms. | |
| bool | usesPeriodicCell () const noexcept |
| const Eigen::VectorXd & | nebForce (int i) const |
| Get the NEB force for image i. | |
| double | saddleForce (int i) const |
| void | setConvergenceForceNorm (std::optional< ConvergenceNormType > norm) |
| ConvergenceNormType | convergenceForceNorm (Eigen::Index dof) const |
| double | forceMagnitude (const Eigen::VectorXd &force) const |
| double | nebForceMagnitude (int i) const |
| double | tangentStiffness (int i) const |
| Stiffness the tangent adds to image i across the path. | |
| Eigen::VectorXd | tangentAt (int i) const |
| Improved (energy-weighted) tangent at image i, normalised. Used by the OCINEB controller to seed the dimer's initial mode at the CI image when no cached eigenvector is available. | |
| Image & | image (int i) |
| Access image i. | |
| const Image & | image (int i) const |
| int | numImages () const |
| int | numIntermediate () const |
| EigenMatrix | intermediatePositions () const |
| Get all intermediate image positions as a matrix. | |
| void | setFromObservation (const Observation &obs, int start_image=1) |
| Set energies and gradients for images from an Observation. | |
| void | setSpringBounds (double k_max, double k_min) |
| Set the spring constant bounds for the energy-weighted variable-spring force computation. | |
| void | setGeometricSpring (bool on) |
| Toggle the geometric (cubic-potential) spring on the intermediate-image NEB force. With geometric=true the parallel spring force becomes ~F_par = k * (d_n^2 - d_p^2) * tau~ (derived from U = (k/3) sum ||R_{i+1}-R_i||^3); the perpendicular component cancels exactly under right-triangle perturbations of dense meshes and ~K_eff = 4 k s~ scales linearly in spacing. The energy-weighted ~spring_constant_min_~ tapering is ignored when geometric mode is on – the cubic potential's natural softening replaces it. | |
| bool | geometricSpring () const |
| void | setEnergyWeightedSprings (bool on) |
| Allow the energy-weighted spring taper. | |
| bool | energyWeightedSprings () const |
| void | setSpringRestLengths (std::vector< double > rest_lengths) |
| Per-segment spring rest lengths (numImages()-1 entries). | |
| const std::vector< double > & | springRestLengths () const |
| double | maxSpacingDeviation () const |
| Maximum relative deviation of image spacing from uniform. | |
| double | maxMetricSpacingDeviation (const std::vector< Eigen::MatrixXd > &segment_metric_factors) const |
| Maximum relative spacing deviation measured in a pullback metric. | |
| double | reparametrizeByArcLength () |
| Redistribute interior images uniformly along arc length. | |
| double | reparametrizeByArcLengthKeepingImage (int anchor_index) |
| Redistribute the two subchains while preserving one image. | |
| double | reparametrizeByMetricArcLength (const std::vector< Eigen::MatrixXd > &segment_metric_factors) |
| Redistribute interior images uniformly in a pullback metric. | |
| double | reparametrizeByMetricArcLengthKeepingImage (const std::vector< Eigen::MatrixXd > &segment_metric_factors, int anchor_index) |
| Metric pullback variant of reparametrizeByArcLengthKeepingImage(). | |
| std::vector< Eigen::MatrixXd > | inverseDistanceSegmentMetricFactors (int n_atoms) const |
| Build segment metric factors for inverse-distance coordinates. | |
| std::vector< Eigen::MatrixXd > | inverseDistanceSegmentMetricFactors (int n_atoms, const std::vector< char > &moving_atoms) const |
| Build inverse-distance segment factors over active atom pairs. | |
| double | reparametrizeByInverseDistanceGeodesicArcLength (int n_atoms) |
| Redistribute the band by solving inverse-distance targets. | |
| double | reparametrizeByInverseDistanceGeodesicArcLength (int n_atoms, const std::vector< char > &moving_atoms) |
| double | reparametrizeByInverseDistanceGeodesicArcLengthKeepingImage (int n_atoms, const std::vector< char > &moving_atoms, int anchor_index) |
| Anchor-preserving inverse-distance geodesic reparameterization. | |
| void | setPosteriorVarianceThreshold (double threshold) |
| Set the signal-scaled posterior-variance confidence threshold. | |
| void | setClimbingCurvatureDirection (Eigen::VectorXd direction) |
| void | clearClimbingCurvatureDirection () |
| const Eigen::VectorXd & | climbingCurvatureDirection () const |
| double | posteriorVarianceThreshold () const |
| Current signal-scaled posterior-variance confidence threshold. | |
Static Public Member Functions | |
| static Eigen::VectorXd | inverseDistanceGeodesicStep (int n_atoms, const std::vector< char > &moving_atoms, const Eigen::VectorXd &positions, const Eigen::VectorXd &cartesian_step, const std::array< double, 9 > *cell=nullptr) |
| Apply one inverse-distance internal-coordinate retraction. | |
| static Eigen::VectorXd | inverseDistanceGeodesicInterpolate (int n_atoms, const std::vector< char > &moving_atoms, const Eigen::VectorXd &left, const Eigen::VectorXd &right, double alpha, const std::array< double, 9 > *cell=nullptr) |
| Interpolate between two geometries in inverse-distance space. | |
| gpr::neb::NEBPath::NEBPath | ( | const Eigen::VectorXd & | initial, |
| const Eigen::VectorXd & | final_state, | ||
| int | n_images, | ||
| double | spring_constant = 0.1 ) |
Initialize path with linear interpolation between endpoints.
| initial | Initial state positions (flat) |
| final_state | Final state positions (flat) |
| n_images | Number of intermediate images (excluding endpoints) |
| spring_constant | NEB spring constant k |
Definition at line 359 of file NEBPath.cpp.
| gpr::neb::NEBPath::NEBPath | ( | const EigenMatrix & | image_positions, |
| double | spring_constant = 0.1 ) |
Initialize path from explicit image positions.
| image_positions | Matrix with one image per row, endpoints included. |
| spring_constant | NEB spring constant k |
Definition at line 390 of file NEBPath.cpp.
| void gpr::neb::NEBPath::alignMolecularFrames | ( | ) |
Normalize seed frames before evaluation, invalidating changed images.
Definition at line 538 of file NEBPath.cpp.
|
nodiscard |
Proper rigid alignment with fixed atom correspondence; no reassignment.
Definition at line 517 of file NEBPath.cpp.
|
inline |
| void gpr::neb::NEBPath::clearForceVariance | ( | ) |
Definition at line 866 of file NEBPath.cpp.
|
inlinenodiscard |
| void gpr::neb::NEBPath::computeNEBForces | ( | ) |
Compute NEB forces for all intermediate images.
For each image i (not endpoint): F_NEB = F_perp + F_spring_parallel
Where: F_perp = F - (F . tau) * tau (perpendicular to path) F_spring = k times [length(r_{i+1} - r_i) - length(r_i - r_{i-1})] times tau tau = normalized tangent along path
For climbing image: F_CI = F - 2*(F . tau)*tau (inverted parallel component)
Definition at line 880 of file NEBPath.cpp.
|
inline |
Definition at line 273 of file NEBPath.h.
| void gpr::neb::NEBPath::enableClimbingImage | ( | ) |
Enable climbing image on the highest-energy intermediate image.
Definition at line 1121 of file NEBPath.cpp.
|
inline |
|
inline |
Physical and prediction-error forces use the same stopping norm.
Definition at line 281 of file NEBPath.h.
|
inline |
|
nodiscard |
Definition at line 871 of file NEBPath.cpp.
| int gpr::neb::NEBPath::highestEnergyImageIndex | ( | ) | const |
Highest finite interior energy, or -1 when none exists.
A non-finite energy is not a candidate. A strict interior local maximum wins a tie at that energy over a non-strict shoulder, and loses to any strictly higher interior energy. The lowest index breaks remaining ties.
Definition at line 1132 of file NEBPath.cpp.
| int gpr::neb::NEBPath::highestEnergyImageIndexPreferring | ( | int | preferred | ) | const |
Like highestEnergyImageIndex, but if ~preferred~ is still a strict interior local maximum, keep it (CI continuity on multi-saddle bands).
Definition at line 1165 of file NEBPath.cpp.
| int gpr::neb::NEBPath::highestLocalMaximumImageIndex | ( | ) | const |
Strict interior local maximum, else the highest finite energy.
A higher shoulder that is not itself strict does not replace a lower strict maximum. Non-finite energies are not candidates. The GP-OIE candidate uses this so the seeded reaction coordinate keeps the climb. highestEnergyImageIndex remains the global maximum.
Definition at line 1188 of file NEBPath.cpp.
| int gpr::neb::NEBPath::highestLocalMaximumImageIndexPreferring | ( | int | preferred | ) | const |
Definition at line 1219 of file NEBPath.cpp.
|
inline |
|
inline |
| void gpr::neb::NEBPath::initializeIDPP | ( | int | n_atoms, |
| bool | collective = false ) |
Initialize from IDPP (image dependent pair potential) interpolation.
Better initial path than linear interpolation for molecular systems. The per-image seed is rgsaddle_idpp_fixed_path. collective is the alternating S-IDPP seed with the insertion stage skipped; rgsaddle has no collective entry of its own.
| n_atoms | Number of atoms (positions.size() / 3) |
| collective | If true, relax the whole chain together. |
Definition at line 697 of file NEBPath.cpp.
| void gpr::neb::NEBPath::initializeIDPP | ( | int | n_atoms, |
| const std::vector< char > & | moving_atoms, | ||
| bool | collective = false ) |
Definition at line 702 of file NEBPath.cpp.
| void gpr::neb::NEBPath::initializeSIDPP | ( | int | n_atoms, |
| const std::vector< char > & | moving_atoms, | ||
| double | alpha = 0.33 ) |
Definition at line 717 of file NEBPath.cpp.
| void gpr::neb::NEBPath::initializeSIDPP | ( | int | n_atoms, |
| double | alpha = 0.33 ) |
Initialize via Sequential IDPP (SIDPP). rgsaddle_sidpp_alternating_path. The spring on that call is the unit IDPP spring, not the physical NEB spring.
Definition at line 712 of file NEBPath.cpp.
| void gpr::neb::NEBPath::initializeSIDPPGeodesic | ( | int | n_atoms, |
| const std::vector< char > & | moving_atoms, | ||
| double | alpha = 0.33 ) |
Definition at line 737 of file NEBPath.cpp.
| void gpr::neb::NEBPath::initializeSIDPPGeodesic | ( | int | n_atoms, |
| double | alpha = 0.33 ) |
Initialize via inverse-distance S-IDPP. rgsaddle_sidpp_alternating_inverse_distance_path. This is the –sidpp-geodesic blend (close pairs stay close longer). It is not rgsaddle_geodesic_path, which minimises a redundant-coordinate length and needs a chart.
Definition at line 732 of file NEBPath.cpp.
| EigenMatrix gpr::neb::NEBPath::intermediatePositions | ( | ) | const |
Get all intermediate image positions as a matrix.
Definition at line 1231 of file NEBPath.cpp.
| void gpr::neb::NEBPath::interpolateFromEndpoints | ( | ) |
Rebuild interior images on the chord between the current endpoints.
Definition at line 610 of file NEBPath.cpp.
|
staticnodiscard |
Interpolate between two geometries in inverse-distance space.
Active atom-pair inverse distances follow ~(1 - alpha) q(left) + alpha q(right)~. Inactive Cartesian columns are held at the left geometry, so fixed-atom masks remain fixed during trust bisection and line-search interpolation.
Definition at line 1629 of file NEBPath.cpp.
|
staticnodiscard |
Apply one inverse-distance internal-coordinate retraction.
The Cartesian step defines a linearized internal-coordinate target q(R) + J(R) dR for q_ab = 1 / ||R_a - R_b|| over active atom pairs. The target is mapped back to Cartesian coordinates with the same SVD Gauss-Newton solve used by the band geodesic reparameterizer.
Definition at line 1593 of file NEBPath.cpp.
| std::vector< Eigen::MatrixXd > gpr::neb::NEBPath::inverseDistanceSegmentMetricFactors | ( | int | n_atoms | ) | const |
Build segment metric factors for inverse-distance coordinates.
For each segment, evaluates the Jacobian of q_ab = 1 / r_ab at the segment midpoint for every atom pair a < b. Passing the returned factors into reparametrizeByMetricArcLength() spaces the band uniformly in the local inverse-distance coordinate metric used by geodesic IDPP.
Definition at line 1398 of file NEBPath.cpp.
| std::vector< Eigen::MatrixXd > gpr::neb::NEBPath::inverseDistanceSegmentMetricFactors | ( | int | n_atoms, |
| const std::vector< char > & | moving_atoms ) const |
Build inverse-distance segment factors over active atom pairs.
moving_atoms[a] marks atoms whose coordinates may change along the band. Pairs where both atoms are fixed are removed from the pullback metric, while moving-moving and moving-fixed pairs remain. An empty mask keeps every pair active.
Definition at line 1404 of file NEBPath.cpp.
| void gpr::neb::NEBPath::maskFixedForce | ( | Eigen::Ref< Eigen::VectorXd > | force | ) | const |
Zero a force on fixed atoms.
Definition at line 563 of file NEBPath.cpp.
| double gpr::neb::NEBPath::maxMetricSpacingDeviation | ( | const std::vector< Eigen::MatrixXd > & | segment_metric_factors | ) | const |
Maximum relative spacing deviation measured in a pullback metric.
Uses the same segment metric factors consumed by reparametrizeByMetricArcLength(). The deviation is local and scale-free: max_i abs(ell_i - mean(ell)) / mean(ell), where ell_i is the metric length of segment i.
Definition at line 1277 of file NEBPath.cpp.
| double gpr::neb::NEBPath::maxSpacingDeviation | ( | ) | const |
Maximum relative deviation of image spacing from uniform.
For a chain of total arc length L with N images, the uniform segment length is h = L / (N-1). This returns max_i abs(s_i - h) / h where s_i = ||r_{i+1} - r_i||. Zero means uniformly spaced; a value >1 means at least one segment is more than 2x the mean. Callers gate path reparametrization on this returning above a tolerance.
Definition at line 1255 of file NEBPath.cpp.
|
nodiscard |
Definition at line 496 of file NEBPath.cpp.
|
inline |
|
inline |
|
inline |
|
inline |
| void gpr::neb::NEBPath::pinFixedAtoms | ( | Eigen::Ref< Eigen::VectorXd > | positions | ) | const |
Copy reactant coordinates onto fixed atoms.
Definition at line 552 of file NEBPath.cpp.
|
inlinenodiscard |
| void gpr::neb::NEBPath::projectPhysicalVector | ( | const Eigen::VectorXd & | reference, |
| Eigen::Ref< Eigen::VectorXd > | vector ) const |
Project a force or step onto the molecular internal-motion space. Linear molecules retain both bending directions.
Definition at line 503 of file NEBPath.cpp.
| double gpr::neb::NEBPath::reparametrizeByArcLength | ( | ) |
Redistribute interior images uniformly along arc length.
Computes cumulative arc length along the current chain, then resamples each interior image at uniform arc-length spacing via piecewise-linear interpolation between the original positions. Endpoints are unchanged. A resampled image drops its energy, gradient, evaluated flag, posterior variance (back to +infinity), and force variance, because that state does not describe the new positions. Cached NEB forces on every intermediate image are zeroed. The caller must refresh the surrogate predictions and call computeNEBForces() before the next L-BFGS step.
Returns the maxSpacingDeviation() measured BEFORE reparametrizing.
Quasi-Newton state held by the band L-BFGS optimizer is invalidated by this operation: every curvature pair (s_k, y_k) is indexed against the pre-reparam parameterization, so the caller MUST reset its optimizer's history after this call returns.
Definition at line 1312 of file NEBPath.cpp.
| double gpr::neb::NEBPath::reparametrizeByArcLengthKeepingImage | ( | int | anchor_index | ) |
Redistribute the two subchains while preserving one image.
The preserved image is an exact observation anchor, such as a dimer-refined saddle row. Images on each side are resampled uniformly along their own arc-length interval; endpoints and the anchor retain their coordinates and exact-data state. Non-anchor interiors are invalidated like reparametrizeByArcLength().
Definition at line 1327 of file NEBPath.cpp.
| double gpr::neb::NEBPath::reparametrizeByInverseDistanceGeodesicArcLength | ( | int | n_atoms | ) |
Redistribute the band by solving inverse-distance targets.
Builds q_ab(R) = 1 / ||R_a - R_b|| for every active atom pair and spaces the chain along that q-space arc. Spring rest lengths, when set, fix the cumulative fractions; otherwise the spacing is uniform. Each target q is mapped back to Cartesian coordinates with an SVD Gauss-Newton internal-coordinate step. Moved images are invalidated like reparametrizeByArcLength(). This is the NEB reparameterization analogue of the geodesic internal coordinate update in Hermes et al. (doi:10.1063/5.0060146).
Definition at line 1497 of file NEBPath.cpp.
| double gpr::neb::NEBPath::reparametrizeByInverseDistanceGeodesicArcLength | ( | int | n_atoms, |
| const std::vector< char > & | moving_atoms ) |
Definition at line 1502 of file NEBPath.cpp.
| double gpr::neb::NEBPath::reparametrizeByInverseDistanceGeodesicArcLengthKeepingImage | ( | int | n_atoms, |
| const std::vector< char > & | moving_atoms, | ||
| int | anchor_index ) |
Anchor-preserving inverse-distance geodesic reparameterization.
Definition at line 1509 of file NEBPath.cpp.
| double gpr::neb::NEBPath::reparametrizeByMetricArcLength | ( | const std::vector< Eigen::MatrixXd > & | segment_metric_factors | ) |
Redistribute interior images uniformly in a pullback metric.
segment_metric_factors[i] maps the Cartesian displacement images[i+1].positions - images[i].positions into the coordinate space used to measure that segment. For internal-coordinate spacing this factor is an internal-coordinate Jacobian (or a midpoint/trapezoid representative of neighbouring Jacobians); for IRC mass weighting it is diag(sqrt(m)).
The segment length is ||B_i * (R_{i+1} - R_i)||. Endpoints are unchanged; interior energies, gradients, evaluated flags, posterior variances, force variances, and cached NEB forces are invalidated in the same way as reparametrizeByArcLength().
Definition at line 1341 of file NEBPath.cpp.
| double gpr::neb::NEBPath::reparametrizeByMetricArcLengthKeepingImage | ( | const std::vector< Eigen::MatrixXd > & | segment_metric_factors, |
| int | anchor_index ) |
Metric pullback variant of reparametrizeByArcLengthKeepingImage().
Definition at line 1369 of file NEBPath.cpp.
|
inline |
Physical force magnitude without the climbing-image reflection.
|
inline |
|
inline |
|
inline |
Allow the energy-weighted spring taper.
With the taper allowed (the default) the springs are weighted by image energy whenever the whole profile is measured, or whenever none of it is, and sit at ~k_max~ on a mixed profile. A band that relaxes on a surrogate (measured endpoints, predicted interior) and is certified on measured rows passes through both states at the same geometry: the relaxation stops on uniform springs, the full-band measurement then reads the weighted springs, and the difference ~(k_+ - k_-) d~ on the basin-side images is reported as a true NEB force that no surrogate step can remove. Such a band turns the taper off so that every image carries the same spring law whichever of its rows are measured.
Definition at line 414 of file NEBPath.h.
| void gpr::neb::NEBPath::setExternalFixedAtoms | ( | bool | present | ) |
Fixed atoms that pin the frame but are not part of the band coordinates (the band carries only the moving atoms). A periodic band then keeps its net translation: it is a real displacement against the fixed atoms, not a free slide of the crystal.
Definition at line 436 of file NEBPath.cpp.
| void gpr::neb::NEBPath::setForceVariance | ( | int | i, |
| const Eigen::VectorXd & | variance ) |
Per-degree-of-freedom force variance for image i, from the surrogate. When set, computeNEBForces removes the tangent component in the Sigma^{-1} metric instead of the Euclidean one (UA-NEB, Yu and Wang, DOI 10.48550/arxiv.2605.24401), so a direction the model has not resolved does not steer the band as strongly as one it has. Passing an empty vector, or never calling this, keeps the classical projection.
Definition at line 857 of file NEBPath.cpp.
| void gpr::neb::NEBPath::setFromObservation | ( | const Observation & | obs, |
| int | start_image = 1 ) |
Set energies and gradients for images from an Observation.
Definition at line 1242 of file NEBPath.cpp.
|
inline |
Toggle the geometric (cubic-potential) spring on the intermediate-image NEB force. With geometric=true the parallel spring force becomes ~F_par = k * (d_n^2 - d_p^2) * tau~ (derived from U = (k/3) sum ||R_{i+1}-R_i||^3); the perpendicular component cancels exactly under right-triangle perturbations of dense meshes and ~K_eff = 4 k s~ scales linearly in spacing. The energy-weighted ~spring_constant_min_~ tapering is ignored when geometric mode is on – the cubic potential's natural softening replaces it.
Definition at line 390 of file NEBPath.h.
| void gpr::neb::NEBPath::setMolecularRigidMotion | ( | bool | enabled | ) |
Remove whole-molecule rigid motion from an isolated, unfrozen path. Generic coordinate paths retain their Cartesian geometry by default.
Definition at line 491 of file NEBPath.cpp.
| void gpr::neb::NEBPath::setMovingAtoms | ( | std::vector< char > | moving_atoms | ) |
Zero entries stay at the reactant coordinate and carry no NEB force. Empty means every atom moves.
Definition at line 424 of file NEBPath.cpp.
| void gpr::neb::NEBPath::setPeriodicCell | ( | const std::array< double, 9 > & | cell | ) |
ASE row-major cell. A lattice other than the 25 A vacuum box makes inter-image chords, tangents, springs and arc-length resampling use the minimum image on the periodic axes. A zero cell keeps the Cartesian difference.
Definition at line 414 of file NEBPath.cpp.
|
inline |
Set the signal-scaled posterior-variance confidence threshold.
The GP-OIE outer loop sets this each iteration to ~unc_convergence * magnSigma2(now)~ (a scale-free fraction of the GP signal variance). Image posterior variances below it mark the GP as confident about that image's energy at its current geometry.
Definition at line 603 of file NEBPath.h.
|
inline |
Set the spring constant bounds for the energy-weighted variable-spring force computation.
Mirrors the eOn ~WeightedSpring~ parameters (~neb_options.spring.weighting.k_min~ and ~.k_max~). Springs in the saddle region (E_pair near E_max) approach ~k_max~; springs in the basins (E_pair near or below E_ref) drop to ~k_min~. See ~computeNEBForces~ for the alpha-blend formula.
Default ~k_min~ derived from the constructor's spring_constant as ~0.1 * spring_constant~ for backwards compatibility; the spring_constant ctor parameter is the k_max value.
Definition at line 373 of file NEBPath.h.
| void gpr::neb::NEBPath::setSpringCoordinates | ( | std::vector< Eigen::Index > | coordinates, |
| std::vector< double > | weights = {} ) |
Band coordinates that carry the springs; empty means all.
With a non-empty set the spring of a segment measures the displacement of these coordinates alone and acts along the tangent restricted to them. The perpendicular projection keeps the full tangent. The restricted direction has a positive projection on the tangent, so a stationary band still has zero perpendicular force and balanced springs on every image: the path is the same nudged elastic band, with its images spaced by the motion of these coordinates.
A spring acts along the tangent, where the true force is projected out. A spectator mode softer than the spring constant (the free layers of a slab sliding rigidly over its fixed layers) that enters the tangent is then held by nothing but the spring, which drives it. Restricting the springs to the coordinates the reaction moves leaves such modes to the true force alone.
Spring rest lengths, when set, are lengths in the same measure. weights parallels coordinates. A weight is the share of the configured spring that coordinate carries: 1 is the full spring, 0 leaves the coordinate out of the length and the force. Empty weights are 1 on every listed coordinate.
Definition at line 441 of file NEBPath.cpp.
| void gpr::neb::NEBPath::setSpringRestLengths | ( | std::vector< double > | rest_lengths | ) |
Per-segment spring rest lengths (numImages()-1 entries).
When set, the intermediate-image spring force is ~k_max ((d_plus - l_plus) - (d_minus - l_minus))~ with the uniform ~k_max~, so the relaxed band reproduces the rest lengths up to a common offset, and every arc-length reparametrization places the images at the cumulative rest-length fractions instead of at equal spacing. The inverse-distance geodesic reparameterizer applies the same fractions along its q-space arc. An empty vector restores the zero-rest-length energy-weighted spring and equal spacing. The rest lengths are the equidistribution of the chord-tangent leak (gpr::neb::detail::chordLeakSpringRestLengths).
Definition at line 1102 of file NEBPath.cpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
nodiscard |
Stiffness the tangent adds to image i across the path.
The band force of an image, -g + (g . tau) tau, depends on the image's own position through its tangent as well as through the gradient. With the unnormalised tangent t = a tau_plus + b tau_minus the derivative of the force with respect to that position is -(H + s (I - tau tau^T)) up to terms that vanish with the perpendicular force, where s = -(g . tau) (b - a) / abs(t). On a rising profile the tangent is the forward chord (a = 1, b = 0) and on a falling one the backward chord (a = 0, b = 1), so s = abs(g . tau) / abs(t): the image is held across the path by the parallel gradient over the chord length in addition to the curvature of the surface. A climbing image carries the term twice. The value is negative where the gradient opposes the energy ordering, and zero for endpoints, non-finite energies and a vanishing tangent.
A relaxation that preconditions with the Hessian alone overshoots every mode softer than this stiffness.
Definition at line 838 of file NEBPath.cpp.
|
inlinenodiscardnoexcept |