[]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

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

Trait Implementations

impl CoulombicPotential for Wolf

Set the pair restriction scheme to use to the given restriction. All future call to GlobalPotential::energy, GlobalPotential::force or GlobalPotential::virial should use this restriction. Read more

impl GlobalCache for Wolf

Get the cost of moving a rigid molecule in the system. Read more

Update the cache as needed after a call to move_molecule_cost. Read more

impl GlobalPotential for Wolf

Return the cut off radius.

Compute the energetic contribution of this potential

Compute the force contribution of this potential. This function should return a vector containing the force acting on each particle in the configuration. Read more

Compute the total virial contribution of this potential, using the atomic virial definition Read more

Compute the total virial contribution of this potential, using the molecular virial definition. This default to atomic_virial. Read more

impl Clone for Wolf

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl FromToml for Wolf

Do the conversion from table to Self.

Auto Trait Implementations

impl Send for Wolf

impl Sync for Wolf

Blanket Implementations

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

Creates owned data from borrowed data, usually by cloning. Read more

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

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T> From for T
[src]

Performs the conversion.

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

Performs the conversion.

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

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

The type returned in the event of a conversion error.

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

Performs the conversion.

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

Important traits for &'a mut R

Immutably borrows from an owned value. Read more

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

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

The type returned in the event of a conversion error.

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

Performs the conversion.

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

Important traits for &'a mut R

Mutably borrows from an owned value. Read more

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

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

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more