indigoX
Bond Class Reference

#include <indigox/classes/bond.hpp>

Classes

struct  Impl
 

Public Types

using BondAtoms = std::array< Atom, 2 >
 Container for storing Atom references assigned to an Bond. More...
 
enum  Order
 Enum for the different possible bond orders. More...
 
enum  Stereo
 Enum for the different possible bond stereochemistry states. More...
 

Public Member Functions

 Bond ()=default
 
 Bond (const Bond &)=default
 
 Bond (Bond &&)=default
 
 ~ Bond ()=default
 
const BondAtomsGetAtoms () const
 Get the atoms of the bond. More...
 
int64_t GetID () const
 
int64_t GetIndex () const
 Get the index from the molecule. More...
 
const MoleculeGetMolecule () const
 Molecule this bond is associated with. More...
 
Order GetOrder () const
 Get the bond order of the bond. More...
 
Stereo GetStereochemistry () const
 Get the stereochemistry of the bond. More...
 
int64_t GetTag () const
 Tag of the bond. More...
 
const FFBondGetType () const
 Get the type of the bond. More...
 
bool HasType () const
 
bool IsAmideBond () const
 
bool IsCarbonylBond () const
 
constexpr int64_t NumAtoms () const
 Number of atoms this bond is between. More...
 
 operator bool () const
 
bool operator!= (const Bond &bnd) const
 
bool operator< (const Bond &bnd) const
 
bool operator<= (const Bond &bnd) const
 
Bondoperator= (const Bond &)=default
 
Bondoperator= (Bond &&)=default
 
bool operator== (const Bond &bnd) const
 
bool operator> (const Bond &bnd) const
 
bool operator>= (const Bond &bnd) const
 
void SetOrder (Order order)
 Set the bond order. More...
 
void SetStereochemistry (Stereo stereo)
 Set the stereochemistry of the bond. More...
 
void SetTag (int64_t tag)
 Set the tag of this bond. More...
 
void SetType (const FFBond &type)
 Set the type of the bond. More...
 

Friends

class cereal::access
 Friendship allows serialisation. More...
 
class indigox::Molecule
 Friendship allows IXMolecule to create new bonds. More...
 
std::ostream & operator<< (std::ostream &os, const Bond &bnd)
 

Member Typedef Documentation

◆ BondAtoms

using BondAtoms = std::array<Atom, 2>

Container for storing Atom references assigned to an Bond.

Member Enumeration Documentation

◆ Order

enum Order
strong

Enum for the different possible bond orders.

Enumerator
UNDEFINED 

No defined bond order.

SINGLE 

Bond order of 1.

DOUBLE 

Bond order of 2.

TRIPLE 

Bond order of 3.

QUADRUPLE 

Bond order of 4.

AROMATIC 

Aromatic bond.

ONEANDAHALF 

Non-aromatic bond order of 1.5.

TWOANDAHALF 

Bond order of 2.5.

◆ Stereo

enum Stereo
strong

Enum for the different possible bond stereochemistry states.

Enumerator
UNDEFINED 

No defined stereochemistry.

NONE 

Defined as no stereochemistry.

E isomer.

Z isomer.

Constructor & Destructor Documentation

◆ Bond() [1/3]

Bond ( )
default

◆ Bond() [2/3]

Bond ( const Bond )
default

◆ Bond() [3/3]

Bond ( Bond &&  )
default

◆ ~ Bond()

~ Bond ( )
default

Member Function Documentation

◆ GetAtoms()

const BondAtoms& GetAtoms ( ) const

Get the atoms of the bond.

Returns
pair of the atoms of the bond.

◆ GetID()

int64_t GetID ( ) const

◆ GetIndex()

int64_t GetIndex ( ) const

Get the index from the molecule.

Calculates the index of the bond in the container of bonds of the molecule it is a part of. If the molecule is dead, the index returned is the tag of the bond.

Returns
the index of the bond.

◆ GetMolecule()

const Molecule& GetMolecule ( ) const

Molecule this bond is associated with.

The returned shared_ptr is empty if the bond is not assigned to a valid molecule.

Returns
the molecule associated with this bond.

◆ GetOrder()

Order GetOrder ( ) const

Get the bond order of the bond.

Returns
the bond order.
Todo:
Obtain order based on molecule data.

◆ GetStereochemistry()

Stereo GetStereochemistry ( ) const

Get the stereochemistry of the bond.

Returns
the stereochemistry of the bond.
Todo:
Obtain stereochemistry based on molecule data.

◆ GetTag()

int64_t GetTag ( ) const

Tag of the bond.

This value may be modified without warning. Use with caution. For a constant identifier to the bond, use IXBond::GetUniqeID().

Returns
the tag assigned to the bond.

◆ GetType()

const FFBond& GetType ( ) const

Get the type of the bond.

Returns
the type of the bond.

◆ HasType()

bool HasType ( ) const

◆ IsAmideBond()

bool IsAmideBond ( ) const

◆ IsCarbonylBond()

bool IsCarbonylBond ( ) const

◆ NumAtoms()

constexpr int64_t NumAtoms ( ) const
inline

Number of atoms this bond is between.

Returns
2.

◆ operator bool()

operator bool ( ) const
inline

◆ operator!=()

bool operator!= ( const Bond bnd) const
inline

◆ operator<()

bool operator< ( const Bond bnd) const

◆ operator<=()

bool operator<= ( const Bond bnd) const
inline

◆ operator=() [1/2]

Bond& operator= ( Bond &&  )
default

◆ operator=() [2/2]

Bond& operator= ( const Bond )
default

◆ operator==()

bool operator== ( const Bond bnd) const

◆ operator>()

bool operator> ( const Bond bnd) const

◆ operator>=()

bool operator>= ( const Bond bnd) const
inline

◆ SetOrder()

void SetOrder ( Order  order)

Set the bond order.

Parameters
orderthe bond order to set.

◆ SetStereochemistry()

void SetStereochemistry ( Stereo  stereo)

Set the stereochemistry of the bond.

Parameters
stereothe stereochemistry to set.

◆ SetTag()

void SetTag ( int64_t  tag)

Set the tag of this bond.

The tag of a bond should not be considered stable. Use with caution.

Parameters
tagthe tag to set.

◆ SetType()

void SetType ( const FFBond type)

Set the type of the bond.

Parameters
typethe type of bond to set.

Friends And Related Function Documentation

◆ cereal::access

friend class cereal::access
friend

Friendship allows serialisation.

◆ indigox::Molecule

friend class indigox::Molecule
friend

Friendship allows IXMolecule to create new bonds.

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const Bond bnd 
)
friend

The documentation for this class was generated from the following file: