pub struct Xplor<F> {
pub f: F,
pub r_cut: f64,
pub r_smooth: f64,
}Expand description
Smoothly shift a potential (and its force) to 0 at some r_cut, beginning at r_smooth.
U(r) = S(r) \cdot f(r)where:
S(r) =
\begin{cases}
1 & r < r_{\mathrm{on}} \\
\frac{(r_{\mathrm{cut}}^2 - r^2)^2 \cdot
(r_{\mathrm{cut}}^2 + 2r^2 -
3r_{\mathrm{on}}^2)}{(r_{\mathrm{cut}}^2 -
r_{\mathrm{on}}^2)^3}
& r_{\mathrm{on}} < r \le r_{\mathrm{cut}} \\
0 & r \ge r_{\mathrm{cut}} \\
\end{cases}§Example
use hoomd_interaction::univariate::{LennardJones, Xplor};
let epsilon = 1.5;
let sigma = 1.0;
let r_cut = 2.5 * sigma;
let r_smooth = 1.5 * sigma;
let xplor_lj = Xplor { f: LennardJones::<12,6> { epsilon, sigma }, r_cut, r_smooth };Fields§
§f: FThe original potential.
r_cut: f64r value ([length]) where the smoothed potential will be 0.
r_smooth: f64r value ([length]) where the smoothing function is enabled. Should be less than r_cut
Trait Implementations§
Source§impl<'de, F> Deserialize<'de> for Xplor<F>where
F: Deserialize<'de>,
impl<'de, F> Deserialize<'de> for Xplor<F>where
F: 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
Source§impl<F: UnivariateEnergy> UnivariateEnergy for Xplor<F>
impl<F: UnivariateEnergy> UnivariateEnergy for Xplor<F>
Source§impl<F: UnivariateForce + UnivariateEnergy> UnivariateForce for Xplor<F>
impl<F: UnivariateForce + UnivariateEnergy> UnivariateForce for Xplor<F>
impl<F> StructuralPartialEq for Xplor<F>
Auto Trait Implementations§
impl<F> Freeze for Xplor<F>where
F: Freeze,
impl<F> RefUnwindSafe for Xplor<F>where
F: RefUnwindSafe,
impl<F> Send for Xplor<F>where
F: Send,
impl<F> Sync for Xplor<F>where
F: Sync,
impl<F> Unpin for Xplor<F>where
F: Unpin,
impl<F> UnwindSafe for Xplor<F>where
F: 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