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

Stereopermutator implementation details. More...

Data Structures

struct  Abstract
 Class to compute the set of abstract permutations from ranking and shape. More...
 
struct  BaseAtom
 Data class for cycleModelContradictsGraph() input. More...
 
struct  Feasible
 

Functions

bool cycleModelContradictsGraph (const std::vector< Utils::ElementType > &elementTypes, const std::vector< double > &cycleEdgeLengths, const std::vector< BaseAtom > &bases)
 Checks whether spatially modeling a cycle contradicts the graph. More...
 
bool triangleBondTooClose (const double a, const double b, const double angle, const double bondRadius)
 Checks whether the far bond in a triangle is too close to the originating atom. More...
 

Detailed Description

Stereopermutator implementation details.

Function Documentation

bool Scine::Molassembler::Stereopermutators::cycleModelContradictsGraph ( const std::vector< Utils::ElementType > &  elementTypes,
const std::vector< double > &  cycleEdgeLengths,
const std::vector< BaseAtom > &  bases 
)

Checks whether spatially modeling a cycle contradicts the graph.

Parameters
elementTypesElement types of the cycle, laid out as A, I, J, ..., X, B
cycleEdgeLengthsEdge lengths forming a cyclic polygon, laid out as A-I, I-J, ..., X-B, B-A
basesBase atoms to check distances to atoms of the cyclic polygon against. Each base is distanceToLeft away from A and distanceToRight away from B

Complexity \(\Theta(N)\)

Returns
If any distances to atoms of the cyclic polygon are shorter than a single bond
bool Scine::Molassembler::Stereopermutators::triangleBondTooClose ( const double  a,
const double  b,
const double  angle,
const double  bondRadius 
)

Checks whether the far bond in a triangle is too close to the originating atom.

Parameters
aBond length to first atom of triangle
bBond length to second atom of triangle
angleAngle between bonds a and b
bondRadiusBond radius of the originating atom

Complexity \(\Theta(1)\)

Returns
Whether the altitude of the originating atom in the resulting triangle is shorter or equal to the bond radius