Skip to main content

SiteForceAndVirial

Trait SiteForceAndVirial 

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

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

Compute the force and virial on a single site as a function of its properties.

The SiteForceAndVirial trait describes a type that can compute the force and virial on a site as a function only of that site’s properties.

The external module provides a number of commonly used implementations. Combine them with External 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_force_and_virial( &self, site_properties: &S, ) -> (Self::Force, <Self::Force as Outer>::Tensor)

Evaluate the force and virial as a function of a single site’s properties.

Implementors§

Source§

impl<S, V> SiteForceAndVirial<S> for ConstantForce<V>
where V: InnerProduct + Outer, S: Position<Position = V>,

Source§

type Force = V