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

Methods

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 Copy for PairRestriction

impl PartialEq<PairRestriction> for PairRestriction

impl Clone for PairRestriction

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for PairRestriction

Auto Trait Implementations

impl Send for PairRestriction

impl Sync for PairRestriction

Blanket Implementations

impl<T> From for T[src]

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

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

type Owned = T

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

type Error = !

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

The type returned in the event of a conversion error.

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

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

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

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

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

The type returned in the event of a conversion error.

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