[−]Struct lumol::Wolf
Wolf summation for coulombic interactions.
This is a fast, direct, pairwise summation for coulombic potential [Wolf1999].
Examples
// A relatively large cutoff is needed for Wolf summation let wolf = Wolf::new(12.0); // Setup a system containing a NaCl pair let mut system = System::with_cell(UnitCell::cubic(30.0)); let mut na = Particle::new("Na"); na.charge = 1.0; na.position = Vector3D::new(0.0, 0.0, 0.0); let mut cl = Particle::new("Cl"); cl.charge = -1.0; cl.position = Vector3D::new(2.0, 0.0, 0.0); system.add_molecule(Molecule::new(na)); system.add_molecule(Molecule::new(cl)); // Use Wolf summation for electrostatic interactions system.set_coulomb_potential(Box::new(wolf)); assert_eq!(system.potential_energy(), -0.0729290269539354);
[Wolf1999]: Wolf, D. et al. J. Chem. Phys. 110, 8254 (1999).
Implementations
impl Wolf
Trait Implementations
impl Clone for Wolf
pub fn clone(&self) -> Wolf
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl CoulombicPotential for Wolf
pub fn set_restriction(&mut self, restriction: PairRestriction)
impl FromToml for Wolf
impl GlobalCache for Wolf
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 Wolf
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 Wolf
impl Send for Wolf
impl Sync for Wolf
impl Unpin for Wolf
impl UnwindSafe for Wolf
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>,