pub struct ArcPotential(pub Arc<dyn IsotropicTwobodyEnergy>);Expand description
Thread-safe shared wrapper for dynamic isotropic potentials.
This is a newtype wrapper around Arc<dyn IsotropicTwobodyEnergy> that
implements IsotropicTwobodyEnergy, working around Rust’s orphan rules
which prevent implementing foreign traits for Arc<T> directly.
Tuple Fields§
§0: Arc<dyn IsotropicTwobodyEnergy>Implementations§
Source§impl ArcPotential
impl ArcPotential
Sourcepub fn new<T: IsotropicTwobodyEnergy + 'static>(potential: T) -> Self
pub fn new<T: IsotropicTwobodyEnergy + 'static>(potential: T) -> Self
Create a new thread-safe shared potential wrapper.
Trait Implementations§
Source§impl Clone for ArcPotential
impl Clone for ArcPotential
Source§fn clone(&self) -> ArcPotential
fn clone(&self) -> ArcPotential
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 Cutoff for ArcPotential
impl Cutoff for ArcPotential
Source§impl Debug for ArcPotential
impl Debug for ArcPotential
Auto Trait Implementations§
impl Freeze for ArcPotential
impl !RefUnwindSafe for ArcPotential
impl Send for ArcPotential
impl Sync for ArcPotential
impl Unpin for ArcPotential
impl UnsafeUnpin for ArcPotential
impl !UnwindSafe for ArcPotential
Blanket Implementations§
Source§impl<T> AnisotropicTwobodyEnergy for Twhere
T: IsotropicTwobodyEnergy,
impl<T> AnisotropicTwobodyEnergy for Twhere
T: IsotropicTwobodyEnergy,
Source§fn anisotropic_twobody_energy(&self, orientation: &RelativeOrientation) -> f64
fn anisotropic_twobody_energy(&self, orientation: &RelativeOrientation) -> f64
Interaction energy between a pair of anisotropic particles, 𝑈(𝒓).
Source§fn anisotropic_twobody_force(
&self,
orientation: &RelativeOrientation,
) -> Vector3<f64>
fn anisotropic_twobody_force( &self, orientation: &RelativeOrientation, ) -> Vector3<f64>
Force magnitude due to an anisotropic interaction potential, 𝐹(𝒓) = -𝞩𝑈(𝒓)
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.