Molassembler  1.0.0
Molecule graph and conformer library
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Scine::Molassembler::Editing Struct Reference

Class with static functions providing higher-level molecule operations. More...

#include <Editing.h>

Static Public Member Functions

static std::pair< Molecule,
Molecule
cleave (const Molecule &a, BondIndex bridge)
 Splits a molecule along a bridge edge. More...
 
static Molecule insert (Molecule log, const Molecule &wedge, BondIndex logBond, AtomIndex firstWedgeAtom, AtomIndex secondWedgeAtom)
 Inserts a molecule into a bond of another molecule. More...
 
static Molecule superpose (Molecule top, const Molecule &bottom, AtomIndex topAtom, AtomIndex bottomAtom)
 Fuses two molecules, adding all adjacencies and continuations of one Molecule's atoms to another. More...
 
static Molecule substitute (const Molecule &left, const Molecule &right, BondIndex leftBond, BondIndex rightBond)
 Connect two molecules by substituting away the lighter side of a pair of bonds of separate molecules. More...
 
static Molecule connect (Molecule a, const Molecule &b, AtomIndex aConnectAtom, AtomIndex bConnectAtom, BondType bondType)
 Connect molecules by creating a new bond between two atoms from separate molecules. More...
 
static Molecule addLigand (Molecule a, const Molecule &ligand, AtomIndex complexatingAtom, const std::vector< AtomIndex > &ligandBindingAtoms)
 Connects two molecules by connecting multiple atoms from one to a single atom of the other via single bonds. More...
 

Detailed Description

Class with static functions providing higher-level molecule operations.

Member Function Documentation

static Molecule Scine::Molassembler::Editing::addLigand ( Molecule  a,
const Molecule ligand,
AtomIndex  complexatingAtom,
const std::vector< AtomIndex > &  ligandBindingAtoms 
)
static

Connects two molecules by connecting multiple atoms from one to a single atom of the other via single bonds.

Complexity \(\Theta(N)\)

Parameters
aThe molecule the ligand is being connected to
ligandThe ligand molecule being bound to complexatingAtom
complexatingAtomThe atom in a that ligand is being bound to
ligandBindingAtomsThe atoms of ligand that should be connected to a
Returns
A joined molecule
static std::pair<Molecule, Molecule> Scine::Molassembler::Editing::cleave ( const Molecule a,
BondIndex  bridge 
)
static

Splits a molecule along a bridge edge.

Complexity \(\Theta(N)\)

Exceptions
std::logic_errorIf bridge is not a bridge edge, i.e. the graph is not disconnected by cleaving the indicated bonds. This can be tested for using
a.graph().canRemove(bridge) == false)
.
Returns
A pair of molecules, ordered corresponding to the bond's atoms' position in the supplied bond index (i.e. .first contains the atom at bridge.first)
static Molecule Scine::Molassembler::Editing::connect ( Molecule  a,
const Molecule b,
AtomIndex  aConnectAtom,
AtomIndex  bConnectAtom,
BondType  bondType 
)
static

Connect molecules by creating a new bond between two atoms from separate molecules.

Complexity \(\Theta(N)\)

Parameters
aThe first molecule to connect
bThe second molecule to connect
aConnectAtomThe atom index to connect to in a
bConnectAtomThe atom index to connect to in b
bondTypeThe type of the new bond
Note
This function is symmetric on exchanging the tuples (a, aConnectAtom), (b, bConnectAtom), i.e. the order of the molecule and atom index arguments does not matter as long as the atom indices are properly associated to their respective molecule.
Returns
A single molecule connected by the specified bond type at the indicated atoms
static Molecule Scine::Molassembler::Editing::insert ( Molecule  log,
const Molecule wedge,
BondIndex  logBond,
AtomIndex  firstWedgeAtom,
AtomIndex  secondWedgeAtom 
)
static

Inserts a molecule into a bond of another molecule.

Complexity \(\Theta(N)\)

Parameters
logThe molecule being inserted into
wedgeThe molecule being inserted
logBondThe bond in log into which wedge is being inserted into
firstWedgeAtomThe atom of wedge to bond to the first atom in logBond
secondWedgeAtomThe atom of wedge to bond to the second atom in logBond
Note
The bond type of the bond inserted into is reused in the new bonds to firstWedgeAtom and secondWedgeAtom.
Returns
A molecule inserted into the bond of another molecule
static Molecule Scine::Molassembler::Editing::substitute ( const Molecule left,
const Molecule right,
BondIndex  leftBond,
BondIndex  rightBond 
)
static

Connect two molecules by substituting away the lighter side of a pair of bonds of separate molecules.

Complexity \(\Theta(N)\)

Parameters
leftThe first molecule
rightThe second molecule
leftBondleft's bond from which to substitute the lighter part away
rightBondright's bond from which to substitute the lighter part away
Note
The heavy side is chosen by number of atoms first, then molecular weight if the number of atoms is equal. Should both sides be equal in both, which side is picked is undefined.
static Molecule Scine::Molassembler::Editing::superpose ( Molecule  top,
const Molecule bottom,
AtomIndex  topAtom,
AtomIndex  bottomAtom 
)
static

Fuses two molecules, adding all adjacencies and continuations of one Molecule's atoms to another.

Adds all adjacent atoms and continuations of bottomAtom in bottom to topAtom in top. topAtom's element type is unchanged as it is the 'top' of the superimposition / overlay.

Complexity \(\Theta(N)\)

Parameters
topThe molecule that is at the top of the superposition.
bottomThe molecule that is set at the bottom of the superposition.
topAtomAn atom index of top that is placed 'atop' bottom's bottomAtom
bottomAtomAn atom index of bottom that is placed 'beneath' top's topAtom
Returns
A single molecule fused at the specified atoms

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