MaximumAllowableInteractionRange

Trait MaximumAllowableInteractionRange 

Source
pub trait MaximumAllowableInteractionRange {
    // Required method
    fn maximum_allowable_interaction_range(&self) -> f64;
}
Expand description

Compute the largest value of the maximum interaction range.

In hoomd-rs, sites interact only with the minimum images of other sites. In periodic boundary conditions, there is a maximum allowable interaction range beyond which sites would start interacting with multiple images. The MaximumAllowableInteractionRange trait computes that distance for a given shape.

Periodic uses MaximumAllowableInteractionRange to trigger an error when the caller requires an interaction range larger than is possible.

Required Methods§

Source

fn maximum_allowable_interaction_range(&self) -> f64

The largest value that the maximum interaction range can take.

Implementations on Foreign Types§

Source§

impl MaximumAllowableInteractionRange for EightEight

Source§

fn maximum_allowable_interaction_range(&self) -> f64

The largest value that the maximum interaction range can take.

This bound is determined by the edge length of the octagon.

Source§

impl<const N: usize> MaximumAllowableInteractionRange for Hypercuboid<N>

Source§

fn maximum_allowable_interaction_range(&self) -> f64

The largest value that the maximum interaction range can take.

For a cuboid, the maximum is

\frac{L_\mathrm{min}}{2}

where $L_\mathrm{min}$ is the smallest edge length.

§Example
use hoomd_geometry::shape::Hypercuboid;
use hoomd_microstate::boundary::MaximumAllowableInteractionRange;

let rectangular_prism = Hypercuboid {
    edge_lengths: [2.0.try_into()?, 3.0.try_into()?, 9.0.try_into()?],
};

assert_eq!(rectangular_prism.maximum_allowable_interaction_range(), 1.0);

Implementors§