pub struct PositionConstraintContrib { /* private fields */ }Implementations§
Source§impl PositionConstraintContrib
impl PositionConstraintContrib
pub fn new( owner: &ForceField, idx: usize, max_displ: f64, force_constant: f64, ) -> PositionConstraintContrib
pub fn new_relative( owner: &ForceField, idx: usize, relative: bool, max_displ: f64, force_constant: f64, ) -> PositionConstraintContrib
pub fn max_displ(&self) -> f64
pub fn pos0(&self) -> ForceFieldVec3
pub fn get_energy(&self, pos: &[f64]) -> f64
pub fn get_grad(&self, pos: &[f64], grad: &mut [f64])
Trait Implementations§
Source§impl Clone for PositionConstraintContrib
impl Clone for PositionConstraintContrib
Source§fn clone(&self) -> PositionConstraintContrib
fn clone(&self) -> PositionConstraintContrib
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 PositionConstraintContrib
impl Debug for PositionConstraintContrib
Source§impl ForceFieldContrib for PositionConstraintContrib
impl ForceFieldContrib for PositionConstraintContrib
fn copy(&self) -> Box<dyn ForceFieldContrib>
fn set_force_field(&mut self, owner: *const ForceField)
fn get_energy(&self, pos: &[f64]) -> f64
fn get_grad(&self, pos: &[f64], grad: &mut [f64])
Source§impl PartialEq for PositionConstraintContrib
impl PartialEq for PositionConstraintContrib
Source§fn eq(&self, other: &PositionConstraintContrib) -> bool
fn eq(&self, other: &PositionConstraintContrib) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PositionConstraintContrib
Auto Trait Implementations§
impl !RefUnwindSafe for PositionConstraintContrib
impl !Send for PositionConstraintContrib
impl !Sync for PositionConstraintContrib
impl !UnwindSafe for PositionConstraintContrib
impl Freeze for PositionConstraintContrib
impl Unpin for PositionConstraintContrib
impl UnsafeUnpin for PositionConstraintContrib
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> 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