# [−]Enum lumol::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);

## Blanket Implementations

### 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.