Molassembler  3.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 Member Functions

 Impl (const Graph &graph, Shapes::Shape shape, AtomIndex centerAtom, RankingInformation ranking)
 Constructor. More...
 
 Impl (AtomIndex centerAtom, Shapes::Shape shape, RankingInformation ranking, const FeasiblesGenerator &feasibility, const ThermalizationPredicate &thermalization, const std::vector< std::vector< SiteIndex >> &siteGroups={})
 
void assign (boost::optional< unsigned > assignment, const std::vector< std::vector< SiteIndex >> &siteGroups={})
 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 SiteCentroids &centroids, const FeasiblesGenerator &feasibility, const ThermalizationPredicate &thermalization)
 
boost::optional< PropagatedStatepropagate (RankingInformation newRanking, boost::optional< Shapes::Shape > shapeOption, const FeasiblesGenerator &feasibility, const ThermalizationPredicate &thermalization)
 
void propagateVertexRemoval (AtomIndex removedIndex)
 
void setShape (Shapes::Shape shape, const FeasiblesGenerator &feasibility, const ThermalizationPredicate &thermalization, const std::vector< std::vector< SiteIndex >> &siteGroups={})
 If the shape is changed, we must adapt.
 
void thermalize (bool thermalization)
 Unconditionally alter the thermalization of stereopermutations.
 
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...
 
SiteCentroids sitePositions (const AngstromPositions &wrapper, const std::vector< std::pair< AtomIndex, AtomIndex >> &substitutions={}) const
 Generate site centroid positions from a whole-molecule set of positions.
 
bool thermalized () const
 
const Stereopermutators::AbstractgetAbstract () const
 Returns the underlying AbstractStereopermutation. More...
 
const std::vector< unsigned > & getFeasible () const
 Returns the list of feasible abstract permutations.
 
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 (AtomIndex centerAtom, Shapes::Shape shape, const RankingInformation &ranking, const Graph &graph)
 Whether the stereopermutations interconvert rapidly at selected temp.
 
- Static Public Member Functions inherited from Scine::Molassembler::Temple::Crtp::LexicographicComparable< Impl >
static constexpr const Impl & derived (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.
 
std::vector< unsigned > feasibles_
 List of abstract permutation indices that are feasible in three dimensions.
 
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 SiteCentroids centroids,
const FeasiblesGenerator feasibility,
const ThermalizationPredicate thermalization 
)

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 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 ( RankingInformation  newRanking,
boost::optional< Shapes::Shape shapeOption,
const FeasiblesGenerator feasibility,
const ThermalizationPredicate thermalization 
)

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: