pub struct Zero;Expand description
Set the energy of any system to 0.
hoomd-rs uses Zero in minimal examples that demonstrate MC simulations.
It returns 0 for all energies and delta energies.
Trait Implementations§
Source§impl<B, S, X, C> DeltaEnergyInsert<B, S, X, C> for Zero
impl<B, S, X, C> DeltaEnergyInsert<B, S, X, C> for Zero
Source§fn delta_energy_insert(
&self,
_initial_microstate: &Microstate<B, S, X, C>,
_new_body: &Body<B, S>,
) -> f64
fn delta_energy_insert( &self, _initial_microstate: &Microstate<B, S, X, C>, _new_body: &Body<B, S>, ) -> f64
Compute the change in energy. Read more
Source§impl<B, S, X, C> DeltaEnergyOne<B, S, X, C> for Zero
impl<B, S, X, C> DeltaEnergyOne<B, S, X, C> for Zero
Source§fn delta_energy_one(
&self,
_initial_microstate: &Microstate<B, S, X, C>,
_body_index: usize,
_final_body: &Body<B, S>,
) -> f64
fn delta_energy_one( &self, _initial_microstate: &Microstate<B, S, X, C>, _body_index: usize, _final_body: &Body<B, S>, ) -> f64
Compute the change in energy. Read more
Source§impl<B, S, X, C> DeltaEnergyRemove<B, S, X, C> for Zero
impl<B, S, X, C> DeltaEnergyRemove<B, S, X, C> for Zero
Source§fn delta_energy_remove(
&self,
_initial_microstate: &Microstate<B, S, X, C>,
_body_index: usize,
) -> f64
fn delta_energy_remove( &self, _initial_microstate: &Microstate<B, S, X, C>, _body_index: usize, ) -> f64
Compute the change in energy. Read more
Source§impl<'de> Deserialize<'de> for Zero
impl<'de> Deserialize<'de> for Zero
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<M> TotalEnergy<M> for Zero
impl<M> TotalEnergy<M> for Zero
impl StructuralPartialEq for Zero
Auto Trait Implementations§
impl Freeze for Zero
impl RefUnwindSafe for Zero
impl Send for Zero
impl Sync for Zero
impl Unpin for Zero
impl UnsafeUnpin for Zero
impl UnwindSafe for Zero
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