[]Struct lumol::sys::Bonding

pub struct Bonding { /* fields omitted */ }

The basic building block for a topology. A Bonding contains data about the connectivity (bonds, angles, dihedrals) between particles in a single molecule.


impl Bonding

pub fn new(i: usize) -> Bonding

Create a new Bonding containing only the atom i

pub fn size(&self) -> usize

Get the number of atoms in the molecule

pub fn start(&self) -> usize

Get the first atom of this molecule

pub fn end(&self) -> usize

Get the index of the first atom after this molecule

pub fn contains(&self, i: usize) -> bool

Does this molecule contains the particle i

pub fn merge_with(&mut self, other: Bonding)

Merge this molecule with other. The first particle in other should be the particle just after the last one in self.

pub fn translate_by(&mut self, delta: isize)

Translate all indexes in this molecule by delta.

pub fn add_bond(&mut self, i: usize, j: usize)

Add a bond between the particles at indexes i and j. These particles are assumed to be in the molecule

pub fn remove_particle(&mut self, i: usize)

Removes particle at index i and any associated bonds, angle or dihedral. This function also update the indexes for the bonds/angles/dihedral by remove 1 to all the values > i

pub fn bonds(&self) -> &HashSet<Bond, RandomState>

Get the internal list of bonds

pub fn angles(&self) -> &HashSet<Angle, RandomState>

Get the internal list of angles

pub fn dihedrals(&self) -> &HashSet<Dihedral, RandomState>

Get the internal list of dihedrals

pub fn bond_distances(&self, i: usize, j: usize) -> BondDistances

Get the all the possible bond paths the particles i and j in this molecule

pub fn indexes(&self) -> Range<usize>

Get the indexes of the particles in this molecule. All atoms in the returned range are inside this molecule.

Trait Implementations

impl Clone for Bonding

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

impl Debug for Bonding

Auto Trait Implementations

impl Send for Bonding

impl Sync for Bonding

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 

impl<T> ToOwned for T where
    T: Clone

type Owned = T

impl<T, U> TryFrom for T where
    T: From<U>, 

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

impl<T> BorrowMut for T where
    T: ?Sized

impl<T, U> TryInto for T where
    U: TryFrom<T>, 

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