Skip to main content

SitePairForceAndVirial

Trait SitePairForceAndVirial 

Source
pub trait SitePairForceAndVirial<S> {
    type Force: Outer;

    // Required method
    fn site_pair_force_and_virial(
        &self,
        site_properties_i: &S,
        site_properties_j: &S,
    ) -> (Self::Force, <Self::Force as Outer>::Tensor);
}
Expand description

Compute the pairwise force and virial on one site from another site.

The SitePairForceAndVirial trait describes a type that can compute the force and virial on a site by another site as a function of the two sites’ properties.

The pairwise module provides a number of commonly used implementations. Combine them with PairwiseCutoff newtype for use with MD simulations.

The generic type names are:

Required Associated Types§

Source

type Force: Outer

The type of the result force.

Required Methods§

Source

fn site_pair_force_and_virial( &self, site_properties_i: &S, site_properties_j: &S, ) -> (Self::Force, <Self::Force as Outer>::Tensor)

Evaluate the force and virial on site i caused by site j.

Implementors§

Source§

impl<V, S, E> SitePairForceAndVirial<S> for Isotropic<E>
where V: Default + InnerProduct + Outer, S: Position<Position = V>, E: UnivariateForce, V::Tensor: Default,

Source§

type Force = V