[]Struct lumol::energy::Wolf

pub struct Wolf { /* fields omitted */ }

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).

Methods

impl Wolf

pub fn new(cutoff: f64) -> Wolf

Create a new Wolf summation, using a real-space cutoff of cutoff.

Trait Implementations

impl CoulombicPotential for Wolf

impl GlobalCache for Wolf

impl GlobalPotential for Wolf

impl Clone for Wolf

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl FromToml for Wolf

Auto Trait Implementations

impl Send for Wolf

impl Sync for Wolf

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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