[]Enum lumol::energy::PairRestriction

pub enum PairRestriction {
    None,
    IntraMolecular,
    InterMolecular,
    Exclude12,
    Exclude13,
    Exclude14,
    Scale14(f64),
}

Possible restrictions on the pair interactions.

In some force fields, interactions are restricted to a subset of the possible pairs. For example, we may want to have Lennard-Jones interactions between atoms in different molecules only, or scale the coulombic interactions if the particles are at 1-4 distance.

Variants

None

No pair should be excluded.

IntraMolecular

Only apply the interaction to intra-molecular pairs.

InterMolecular

Only apply the interaction to inter-molecular pairs.

Exclude12

Only apply the interaction to pairs which are not in 1-2 position (separated by one bond).

Exclude13

Only apply the interaction to pairs which are not in 1-2 or 1-3 position (separated by one or two bonds).

Exclude14

Only apply the interaction to pairs which are not in 1-2, 1-3 or 1-4 position (separated by one, two or three bonds).

Scale14(f64)

Only apply the interaction to pairs which are not in 1-2 or 1-3 position, and scale the interaction for pairs in 1-4 position (separated by three bonds).

Implementations

impl PairRestriction

pub fn information(&self, path: BondPath) -> RestrictionInfo

Get the restriction at the given bond path.

Example

let restriction = PairRestriction::None;
assert_eq!(restriction.information(BondPath::ThreeBonds).excluded, false);
assert_eq!(restriction.information(BondPath::TwoBonds).scaling, 1.0);

let restriction = PairRestriction::Exclude13;
assert_eq!(restriction.information(BondPath::TwoBonds).excluded, true);
assert_eq!(restriction.information(BondPath::ThreeBonds).excluded, false);

let restriction = PairRestriction::Scale14(0.5);
assert_eq!(restriction.information(BondPath::TwoBonds).excluded, true);
assert_eq!(restriction.information(BondPath::ThreeBonds).excluded, false);
assert_eq!(restriction.information(BondPath::TwoBonds).scaling, 1.0);
assert_eq!(restriction.information(BondPath::ThreeBonds).scaling, 0.5);

Trait Implementations

impl Clone for PairRestriction

impl Copy for PairRestriction

impl Debug for PairRestriction

impl PartialEq<PairRestriction> for PairRestriction

impl StructuralPartialEq for PairRestriction

Auto Trait Implementations

impl RefUnwindSafe for PairRestriction

impl Send for PairRestriction

impl Sync for PairRestriction

impl Unpin for PairRestriction

impl UnwindSafe for PairRestriction

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

impl<T> Pointable for T

type Init = T

The type for initializers.

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

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,