Struct gosh_elastic::Connection
source · pub struct Connection { /* private fields */ }
Expand description
Represents elastic connection of center node i
with its neighbor j
Implementations§
source§impl Connection
impl Connection
sourcepub fn new(spring: Spring, displace: impl Into<[f64; 3]>) -> Self
pub fn new(spring: Spring, displace: impl Into<[f64; 3]>) -> Self
Create an elastic Connection
for central atom with its neighbor
Parameters
- spring: elastic Spring
- displace: the displacement vector from center to its neighbor
sourcepub fn set_displace(&mut self, displace: impl Into<[f64; 3]>)
pub fn set_displace(&mut self, displace: impl Into<[f64; 3]>)
Set displacement vector from the center to one of its immedidate neighbors.
sourcepub fn set_distance(&mut self, distance: f64)
pub fn set_distance(&mut self, distance: f64)
Set distance from the center to one of its immediate neighbors.
Trait Implementations§
source§impl Clone for Connection
impl Clone for Connection
source§fn clone(&self) -> Connection
fn clone(&self) -> Connection
Returns a copy 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 Connection
impl Debug for Connection
impl Copy for Connection
Auto Trait Implementations§
impl RefUnwindSafe for Connection
impl Send for Connection
impl Sync for Connection
impl Unpin for Connection
impl UnwindSafe for Connection
Blanket Implementations§
§impl<T> Pointable for T
impl<T> Pointable for T
§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>
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.