Struct gosh_optim::Optimizer
source · [−]pub struct Optimizer { /* private fields */ }
Expand description
A generic interface for geometry optimization of Molecule.
Implementations
sourceimpl Optimizer
impl Optimizer
sourcepub fn new(fmax: f64, nmax: usize) -> Self
pub fn new(fmax: f64, nmax: usize) -> Self
New optimizer with max force (fmax) and max step (nmax) in iterations.
sourcepub fn checkpoint(self, ckpt: CheckpointDb) -> Self
pub fn checkpoint(self, ckpt: CheckpointDb) -> Self
Set checkpoint for resuming optimization later
sourceimpl Optimizer
impl Optimizer
sourcepub fn optimize_geometry<M: ChemicalModel>(
&self,
mol: &mut Molecule,
model: &mut M
) -> Result<Optimized>
pub fn optimize_geometry<M: ChemicalModel>(
&self,
mol: &mut Molecule,
model: &mut M
) -> Result<Optimized>
Optimize geometry of mol
in potential provided by model
.
Parameters
- mol: target molecule
- model: chemical model for evaluation energy and forces of
mol
at new positions.
Return
Returns the computed ModelProperties
on success in final geometry.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Optimizer
impl Send for Optimizer
impl Sync for Optimizer
impl Unpin for Optimizer
impl UnwindSafe for Optimizer
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> IntoSql for T
impl<T> IntoSql for T
impl<T> Pointable for T
impl<T> Pointable for T
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
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 more
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).
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.
fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts self
to the equivalent element of its superset.