Molassembler  1.0.0
Molecule graph and conformer library
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Scine::Molassembler::AtomStereopermutator::Impl Class Reference
Inheritance diagram for Scine::Molassembler::AtomStereopermutator::Impl:

Public Types

using StereopermutationType = Stereopermutations::Stereopermutation
 

Public Member Functions

 Impl (const Graph &graph, Shapes::Shape shape, AtomIndex centerAtom, RankingInformation ranking)
 Constructor. More...
 
void assign (boost::optional< unsigned > assignment)
 Changes the assignment of the stereopermutator.
 
void assign (std::vector< Shapes::Vertex > vertexMapping)
 Assign with a vertex mapping. More...
 
void assignRandom (Random::Engine &engine)
 Assigns the Stereopermutator randomly using relative stereopermutation weights.
 
void applyPermutation (const std::vector< AtomIndex > &permutation)
 Applies an atom index permutation. More...
 
boost::optional< ShapeMapfit (const Graph &graph, const AngstromPositions &angstromWrapper)
 
boost::optional< PropagatedStatepropagate (const Graph &graph, RankingInformation newRanking, boost::optional< Shapes::Shape > shapeOption)
 
void propagateVertexRemoval (AtomIndex removedIndex)
 
void setShape (Shapes::Shape shape, const Graph &graph)
 If the shape is changed, we must adapt.
 
double angle (SiteIndex i, SiteIndex j) const
 Returns the angle between two site indices in the idealized shape.
 
boost::optional< unsigned > assigned () const
 Returns the permutation index within the set of possible permutations, if set. More...
 
AtomIndex placement () const
 Returns a single-element vector containing the central atom.
 
boost::optional< unsigned > indexOfPermutation () const
 Returns IOP within the set of symbolic ligand permutations. More...
 
std::vector
< MinimalChiralConstraint
minimalChiralConstraints (bool enforce=false) const
 Returns a minimal representation of chiral constraints. More...
 
std::string info () const
 Returns an information string for diagnostic purposes.
 
std::string rankInfo () const
 Returns an information string for ranking equality checking purposes.
 
std::vector< std::vector
< SiteIndex > > 
siteGroups () const
 Returns site indices grouped by rotational interconversion. More...
 
const Stereopermutators::AbstractgetAbstract () const
 Returns the underlying AbstractStereopermutation. More...
 
const Stereopermutators::FeasiblegetFeasible () const
 Returns the underlying FeasibleStereopermutation. More...
 
const RankingInformationgetRanking () const
 Returns the underlying ranking.
 
Shapes::Shape getShape () const
 Returns the underlying shape.
 
const ShapeMapgetShapePositionMap () const
 Yields the mapping from site indices to shape positions. More...
 
unsigned numAssignments () const
 Returns the number of possible permutations. More...
 
unsigned numStereopermutations () const
 Returns the number of symbolic ligand permutations. More...
 
auto tie () const
 
- Public Member Functions inherited from Scine::Molassembler::Temple::Crtp::LexicographicComparable< Impl >
constexpr bool operator== (const LexicographicComparable &other) const
 
constexpr bool operator!= (const LexicographicComparable &other) const
 
constexpr bool operator< (const LexicographicComparable &other) const
 
constexpr bool operator<= (const LexicographicComparable &other) const
 
constexpr bool operator> (const LexicographicComparable &other) const
 
constexpr bool operator>= (const LexicographicComparable &other) const
 

Static Public Member Functions

Static functions
static Shapes::Shape up (Shapes::Shape shape)
 Picks a shape retaining as much chiral state as possible on a shape size increase. More...
 
static Shapes::Shape down (Shapes::Shape shape, Shapes::Vertex removedVertex)
 Picks a shape retaining as much chiral state as possible on a shape size decrease. More...
 
static boost::optional
< std::vector< Shapes::Vertex > > 
selectTransitionMapping (const Shapes::Properties::ShapeTransitionGroup &mappingsGroup, const ChiralStatePreservation &preservationOption)
 Selects a shape vertex mapping from a shape transition group.
 
static bool thermalized (const Graph &graph, AtomIndex centerAtom, const Shapes::Shape shape, const RankingInformation &ranking)
 Whether the stereopermutations interconvert rapidly at selected temp.
 
- Static Public Member Functions inherited from Scine::Molassembler::Temple::Crtp::LexicographicComparable< Impl >
static constexpr const Impl & getDerived (const LexicographicComparable &base)
 

Private Attributes

AtomIndex centerAtom_
 Central atom of the Stereopermutator.
 
Shapes::Shape shape_
 The shape the stereopermutator represents.
 
RankingInformation ranking_
 Ranking information of substituents.
 
Stereopermutators::Abstract abstract_
 Abstract stereopermutations and intermediate state.
 
Stereopermutators::Feasible feasible_
 Models abstract stereopermutations and decides three-dimensional feasibility.
 
boost::optional< unsigned > assignmentOption_
 The current state of assignment (if or not, and if so, which)
 
ShapeMap shapePositionMap_
 Derived property of assignmentOption_.
 
bool thermalized_
 Whether all feasible assignments interconvert thermally.
 

Constructor & Destructor Documentation

Scine::Molassembler::AtomStereopermutator::Impl::Impl ( const Graph graph,
Shapes::Shape  shape,
AtomIndex  centerAtom,
RankingInformation  ranking 
)

Constructor.

Parameters
graphBase graph
shapeShape the stereopermutator represents
centerAtomPlacement
rankingRanking of its substituents

Member Function Documentation

void Scine::Molassembler::AtomStereopermutator::Impl::applyPermutation ( const std::vector< AtomIndex > &  permutation)

Applies an atom index permutation.

Parameters
permutationThe permutation to apply
void Scine::Molassembler::AtomStereopermutator::Impl::assign ( std::vector< Shapes::Vertex vertexMapping)

Assign with a vertex mapping.

Precondition
Requires that this mapping was generated with centroid last!
boost::optional<unsigned> Scine::Molassembler::AtomStereopermutator::Impl::assigned ( ) const

Returns the permutation index within the set of possible permutations, if set.

Returns the (public) information of whether the stereopermutator is assigned or not, and if so, which assignment it is.

static Shapes::Shape Scine::Molassembler::AtomStereopermutator::Impl::down ( Shapes::Shape  shape,
Shapes::Vertex  removedVertex 
)
static

Picks a shape retaining as much chiral state as possible on a shape size decrease.

Exceptions
std::logic_errorIf there are no smaller shapes
Note
Behavior is dependent on ChiralStatePreservation option
boost::optional<ShapeMap> Scine::Molassembler::AtomStereopermutator::Impl::fit ( const Graph graph,
const AngstromPositions angstromWrapper 
)

The shape and assignment are determined based on three-dimensional positions using angle and chiral distortions from the respective idealized shapes.

const Stereopermutators::Abstract& Scine::Molassembler::AtomStereopermutator::Impl::getAbstract ( ) const

Returns the underlying AbstractStereopermutation.

Note
This is library-internal and not part of the public API
const Stereopermutators::Feasible& Scine::Molassembler::AtomStereopermutator::Impl::getFeasible ( ) const

Returns the underlying FeasibleStereopermutation.

Note
This is library-internal and not part of the public API
const ShapeMap& Scine::Molassembler::AtomStereopermutator::Impl::getShapePositionMap ( ) const

Yields the mapping from site indices to shape positions.

Exceptions
std::logic_errorif the stereopermutator is unassigned.
boost::optional<unsigned> Scine::Molassembler::AtomStereopermutator::Impl::indexOfPermutation ( ) const

Returns IOP within the set of symbolic ligand permutations.

This is different to the assignment. The assignment denotes the index within the set of possible (more specifically, not obviously infeasible) stereopermutations.

std::vector<MinimalChiralConstraint> Scine::Molassembler::AtomStereopermutator::Impl::minimalChiralConstraints ( bool  enforce = false) const

Returns a minimal representation of chiral constraints.

Every minimal representation consists only of ligand indices.

The minimal representation assumes that all shape tetrahedron definitions are defined to be Positive targets, which is checked in the shapes tests.

Parameters
enforceEmit minimal representations of chiral constraints even if the stereopermutator does not have any chiral state, i.e. numStereopermutators() <= 1, as long as it is assigned.
unsigned Scine::Molassembler::AtomStereopermutator::Impl::numAssignments ( ) const

Returns the number of possible permutations.

Fetches the number of different assignments possible with the current substituent ranking and connectivity information. This is also the upper exclusive bound on the assignment indices that can be used to change the arrangement of substituents.

unsigned Scine::Molassembler::AtomStereopermutator::Impl::numStereopermutations ( ) const

Returns the number of symbolic ligand permutations.

Fetches the number of permutations determined by symbolic ligand calculation, not considering linking or haptic ligand cones.

boost::optional<PropagatedState> Scine::Molassembler::AtomStereopermutator::Impl::propagate ( const Graph graph,
RankingInformation  newRanking,
boost::optional< Shapes::Shape shapeOption 
)

In case a graph modification changes the ranking of this stereopermutator's substituents, it must be redetermined whether the new configuration is a stereopermutator and if so, which assignment corresponds to the previous one.

void Scine::Molassembler::AtomStereopermutator::Impl::propagateVertexRemoval ( AtomIndex  removedIndex)

Prepares for the removal of an atom on the graph level, which involves the generation of new atom indices.

std::vector<std::vector<SiteIndex> > Scine::Molassembler::AtomStereopermutator::Impl::siteGroups ( ) const

Returns site indices grouped by rotational interconversion.

Precondition
The stereopermutator must be assigned

Complexity \(\Theta(S^2)\)

Exceptions
std::runtime_errorIf the stereopermutator is unassigned
static Shapes::Shape Scine::Molassembler::AtomStereopermutator::Impl::up ( Shapes::Shape  shape)
static

Picks a shape retaining as much chiral state as possible on a shape size increase.

Exceptions
std::logic_errorIf there are no larger shapes
Note
Behavior is dependent on ChiralStatePreservation option

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