pub struct OptimizationState_blend {
pub geom_history: VecDeque<DVector<f64>>,
pub true_hess_history: VecDeque<DMatrix<f64>>,
pub grad_history: VecDeque<DVector<f64>>,
pub f_vec_history: VecDeque<DVector<f64>>,
pub e1_history: VecDeque<f64>,
pub energy_history: VecDeque<f64>,
pub max_history: usize,
pub prev_e1: Option<f64>,
pub trust_radius: f64,
}Expand description
Holds optimization state for the GDIIS_blend and GEDIIS_blend implementations.
§Key Difference from OptimizationState
The existing OptimizationState stores INVERSE Hessians in
hess_history. This struct stores TRUE Hessians in
true_hess_history, matching the convention where
Hm = mean(Hhist) and Hm^{-1} is computed by inversion.
§Note on naming
The name _blend suffix distinguishes this from the existing
OptimizationState and indicates that it is designed for the
GDIIS_blend (inverted mean Hessian error vectors) and GEDIIS_blend
(Taylor expansion B-matrix) methods.
Fields§
§geom_history: VecDeque<DVector<f64>>History of geometries as column vectors.
true_hess_history: VecDeque<DMatrix<f64>>History of TRUE Hessian matrices (NxN), NOT inverse Hessians.
Hhist/Bhist (list of NxN matrices).
Mean is inverted for error vectors: error_i = H_mean^{-1} @ F_i.
grad_history: VecDeque<DVector<f64>>History of MECP g-vectors (perpendicular component) in Ha/A.
f_vec_history: VecDeque<DVector<f64>>History of f-vectors (energy difference drive term) in Hartree (Ha).
e1_history: VecDeque<f64>History of E1 energies (used as RHS for EDIIS: y = [-E_hist, 1]).
energy_history: VecDeque<f64>History of E1 - E2 energy differences (stored for compatibility / debugging but NOT used in EDIIS RHS).
max_history: usizeMaximum number of history entries (keeps max 4).
prev_e1: Option<f64>E1 energy from the previous iteration (for trust-radius adjustment).
trust_radius: f64Current trust radius for adaptive step control.
Initialized from config.max_step_size and adjusted dynamically.
Implementations§
Source§impl OptimizationState_blend
impl OptimizationState_blend
Trait Implementations§
Source§impl Clone for OptimizationState_blend
impl Clone for OptimizationState_blend
Source§fn clone(&self) -> OptimizationState_blend
fn clone(&self) -> OptimizationState_blend
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for OptimizationState_blend
impl RefUnwindSafe for OptimizationState_blend
impl Send for OptimizationState_blend
impl Sync for OptimizationState_blend
impl Unpin for OptimizationState_blend
impl UnsafeUnpin for OptimizationState_blend
impl UnwindSafe for OptimizationState_blend
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.