[]Struct lumol::energy::SharedEwald

pub struct SharedEwald(_);

Thread-sade wrapper around Ewald implementing CoulombicPotential.

This wrapper allow to share a Ewald solver between threads (make it Send + Sync) while still using caching in Monte Carlo simulations (with interior mutability).


impl SharedEwald

pub fn new(ewald: Ewald) -> SharedEwald

Wrap ewald in a thread-safe structure.


let ewald = SharedEwald::new(Ewald::new(12.5, 10, None));
let boxed: Box<dyn CoulombicPotential> = Box::new(ewald);

Trait Implementations

impl Clone for SharedEwald

impl CoulombicPotential for SharedEwald

impl GlobalCache for SharedEwald

impl GlobalPotential for SharedEwald

Auto Trait Implementations

impl RefUnwindSafe for SharedEwald

impl Send for SharedEwald

impl Sync for SharedEwald

impl Unpin for SharedEwald

impl UnwindSafe for SharedEwald

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,