pub struct SplineConfig {
pub n_points: usize,
pub rsq_min: Option<f64>,
pub rsq_max: Option<f64>,
pub shift_energy: bool,
pub shift_force: bool,
pub grid_type: GridType,
pub grid_trim: GridTrim,
}Expand description
Configuration for spline table construction
Fields§
§n_points: usizeNumber of grid points (default: 2000)
rsq_min: Option<f64>Minimum r² value (default: 0.01 or auto-detected)
rsq_max: Option<f64>Maximum r² value / cutoff² (default: from Cutoff trait)
shift_energy: boolShift energy to zero at cutoff (default: true)
shift_force: boolApply shift-force correction (default: false) When true, both U(rc) = 0 and F(rc) = 0
grid_type: GridTypeGrid spacing strategy (default: PowerLaw(2.0))
grid_trim: GridTrimPolicy for auto-trimming grid boundaries (default: no trimming)
Implementations§
Source§impl SplineConfig
impl SplineConfig
Sourcepub fn high_accuracy() -> Self
pub fn high_accuracy() -> Self
High accuracy configuration (4000 points)
Sourcepub const fn with_rsq_min(self, rsq_min: f64) -> Self
pub const fn with_rsq_min(self, rsq_min: f64) -> Self
Set minimum r² explicitly
Sourcepub const fn with_rsq_max(self, rsq_max: f64) -> Self
pub const fn with_rsq_max(self, rsq_max: f64) -> Self
Set maximum r² explicitly (overrides cutoff)
Sourcepub const fn with_grid_type(self, grid_type: GridType) -> Self
pub const fn with_grid_type(self, grid_type: GridType) -> Self
Set grid type (UniformR recommended for steep potentials)
Sourcepub const fn with_grid_trim(self, trim: GridTrim) -> Self
pub const fn with_grid_trim(self, trim: GridTrim) -> Self
Set grid trim policy for auto-adjusting grid boundaries
Trait Implementations§
Source§impl Clone for SplineConfig
impl Clone for SplineConfig
Source§fn clone(&self) -> SplineConfig
fn clone(&self) -> SplineConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SplineConfig
impl Debug for SplineConfig
Auto Trait Implementations§
impl Freeze for SplineConfig
impl RefUnwindSafe for SplineConfig
impl Send for SplineConfig
impl Sync for SplineConfig
impl Unpin for SplineConfig
impl UnsafeUnpin for SplineConfig
impl UnwindSafe for SplineConfig
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<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.