pub enum DampingStrategy {
None,
Fixed(f64),
Auto {
initial: f64,
},
}Expand description
Strategy for damping charge updates during SCF iterations.
Variants§
None
No damping is applied (equivalent to damping = 1.0).
Fastest convergence for simple, well-behaved systems, but prone to oscillation or divergence in complex cases (e.g., LiH, large systems).
Fixed(f64)
A fixed damping factor (0.0 < d <= 1.0).
A constant mixing rate. Lower values (e.g., 0.1) are more stable but slower. Higher values (e.g., 0.8) are faster but risk instability.
Auto
Automatically adjusts damping based on convergence behavior.
Starts with an initial value. If the error increases (divergence), it reduces damping (brakes). If the error decreases significantly (convergence), it increases damping (accelerates). This is the recommended strategy for general use.
Trait Implementations§
Source§impl Clone for DampingStrategy
impl Clone for DampingStrategy
Source§fn clone(&self) -> DampingStrategy
fn clone(&self) -> DampingStrategy
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DampingStrategy
impl Debug for DampingStrategy
Source§impl PartialEq for DampingStrategy
impl PartialEq for DampingStrategy
impl Copy for DampingStrategy
impl StructuralPartialEq for DampingStrategy
Auto Trait Implementations§
impl Freeze for DampingStrategy
impl RefUnwindSafe for DampingStrategy
impl Send for DampingStrategy
impl Sync for DampingStrategy
impl Unpin for DampingStrategy
impl UnsafeUnpin for DampingStrategy
impl UnwindSafe for DampingStrategy
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more