[−]Struct lumol::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).
Implementations
impl SharedEwald
pub fn new(ewald: Ewald) -> SharedEwald
Wrap ewald
in a thread-safe structure.
Example
let ewald = SharedEwald::new(Ewald::new(12.5, 10, None)); let boxed: Box<dyn CoulombicPotential> = Box::new(ewald);
Trait Implementations
impl Clone for SharedEwald
pub fn clone(&self) -> SharedEwald
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl CoulombicPotential for SharedEwald
pub fn set_restriction(&mut self, restriction: PairRestriction)
impl GlobalCache for SharedEwald
pub fn move_molecule_cost(
&self,
configuration: &Configuration,
molecule_id: usize,
new_positions: &[Vector3D]
) -> f64
&self,
configuration: &Configuration,
molecule_id: usize,
new_positions: &[Vector3D]
) -> f64
pub fn update(&self)
impl GlobalPotential for SharedEwald
pub fn cutoff(&self) -> Option<f64>
pub fn energy(&self, configuration: &Configuration) -> f64
pub fn forces(&self, configuration: &Configuration, forces: &mut [Vector3D])
pub fn atomic_virial(&self, configuration: &Configuration) -> Matrix3
pub fn molecular_virial(&self, configuration: &Configuration) -> Matrix3
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,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,