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

Type used to represent a map from an atom collection index to an interpreted object. More...

#include <Interpret.h>

Data Structures

struct  ComponentIndexPair
 

Public Member Functions

ComponentIndexPair apply (unsigned index) const
 Transform index from original atom collection to component and atom index.
 
unsigned invert (const ComponentIndexPair &pair) const
 Transform component and atom index to index from original atom collection.
 
std::vector< std::vector
< unsigned > > 
invert () const
 Yields mapping from indices in components to original input indices. More...
 
std::vector
< Utils::AtomCollection
apply (const Utils::AtomCollection &atomCollection) const
 Splits an AtomCollection just like the interpret split the positions into parts. More...
 
std::vector< AngstromPositionsapply (const AngstromPositions &positions) const
 
std::vector
< PeriodicBoundaryDuplicates
apply (const std::unordered_set< unsigned > &uninterestingAtoms, const std::unordered_map< unsigned, unsigned > &ghostAtomMap) const
 
unsigned size () const
 Size of the map.
 
unsigned countComponents () const
 

Data Fields

std::vector< unsigned > map
 

Iterators

using Iterator = std::vector< unsigned >::iterator
 
using ConstIterator = std::vector< unsigned >::const_iterator
 
Iterator begin ()
 
Iterator end ()
 
ConstIterator begin () const
 
ConstIterator end () const
 

Detailed Description

Type used to represent a map from an atom collection index to an interpreted object.

Member Function Documentation

std::vector<Utils::AtomCollection> Scine::Molassembler::Interpret::ComponentMap::apply ( const Utils::AtomCollection atomCollection) const

Splits an AtomCollection just like the interpret split the positions into parts.

Parameters
atomCollectionAtomCollection to split
Returns
As many atom collections as molecules from interpretation
std::vector< std::vector<unsigned> > Scine::Molassembler::Interpret::ComponentMap::invert ( ) const

Yields mapping from indices in components to original input indices.

Returns
List of flat maps from indices within components to the original input index

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