pub struct Patch<V> {
pub director: Unit<V>,
pub cos_delta: f64,
}Expand description
A single patch in the AngularMask potential.
The width of the patch is given as the cosine of its half-angle.
§Example
use hoomd_interaction::pairwise::angular_mask::Patch;
use std::f64::consts::PI;
let patch = Patch {
director: [0.0, 1.0, 0.0].try_into()?,
cos_delta: (PI / 4.0).cos(),
};Fields§
§director: Unit<V>Vector pointing from the center of the particle to the center of the mask [unitless].
cos_delta: f64Cosine of the half-angle width of the mask [unitless].
Trait Implementations§
Source§impl<'de, V> Deserialize<'de> for Patch<V>where
V: Deserialize<'de>,
impl<'de, V> Deserialize<'de> for Patch<V>where
V: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<V> StructuralPartialEq for Patch<V>
Auto Trait Implementations§
impl<V> Freeze for Patch<V>where
V: Freeze,
impl<V> RefUnwindSafe for Patch<V>where
V: RefUnwindSafe,
impl<V> Send for Patch<V>where
V: Send,
impl<V> Sync for Patch<V>where
V: Sync,
impl<V> Unpin for Patch<V>where
V: Unpin,
impl<V> UnsafeUnpin for Patch<V>where
V: UnsafeUnpin,
impl<V> UnwindSafe for Patch<V>where
V: UnwindSafe,
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