11 #ifndef INCLUDE_MOLASSEMBLER_INTERPRET_H
12 #define INCLUDE_MOLASSEMBLER_INTERPRET_H
14 #include "Molassembler/Export.h"
16 #include "boost/optional.hpp"
22 enum class ElementType : unsigned;
24 class BondOrderCollection;
25 using ElementTypeCollection = std::vector<ElementType>;
28 namespace Molassembler {
32 class AngstromPositions;
79 MASM_NO_EXPORT std::vector<AngstromPositions> apply(
const AngstromPositions& positions)
const;
81 MASM_NO_EXPORT std::vector<PeriodicBoundaryDuplicates> apply(
82 const std::unordered_set<unsigned>& uninterestingAtoms,
83 const std::unordered_map<unsigned, unsigned>& ghostAtomMap
87 inline unsigned size()
const {
return map.size(); }
89 unsigned countComponents()
const;
93 using Iterator = std::vector<unsigned>::iterator;
94 using ConstIterator = std::vector<unsigned>::const_iterator;
95 inline Iterator begin() {
return std::begin(
map); }
96 inline Iterator end() {
return std::end(
map); }
97 inline ConstIterator begin()
const {
return std::begin(
map); }
98 inline ConstIterator end()
const {
return std::end(
map); }
101 std::vector<unsigned>
map;
135 const boost::optional<double>& stereopermutatorThreshold = 1.4
157 const boost::optional<double>& stereopermutatorThreshold = 1.4
187 const boost::optional<double>& stereopermutatorThreshold = 1.4
224 const std::unordered_set<unsigned>& uninterestingAtoms,
225 const std::unordered_map<unsigned, unsigned>& ghostAtomMap,
227 const boost::optional<double>& stereopermutatorThreshold = 1.4
253 const boost::optional<double>& stereopermutatorThreshold = 1.4
318 return probability < other.probability;
MoleculesResult molecules(const Utils::ElementTypeCollection &elements, const AngstromPositions &angstromWrapper, const Utils::BondOrderCollection &bondOrders, BondDiscretizationOption discretization=BondDiscretizationOption::Binary, const boost::optional< double > &stereopermutatorThreshold=1.4)
The function that actually does all the work with the library-internal wrapper.
Result type of an interpret call.
Definition: Interpret.h:105
BondDiscretizationOption
How floating-point bond orders are discretized into bond types.
Definition: Interpret.h:38
A wrapper class around Utils' PositionCollection to emphasize that the positions stored therein are i...
Definition: AngstromPositions.h:25
std::vector< Graph > graphs
Individual graphs found.
Definition: Interpret.h:259
Bond orders are rounded to the nearest integer.
std::vector< Molecule > molecules
The list of individual molecules found in the 3D information.
Definition: Interpret.h:107
Extras for dealing with periodic boundaries.
std::vector< FalsePositive > badHapticLigandBonds(const Utils::AtomCollection &atomCollection, const Utils::BondOrderCollection &bondOrders)
Suggests false positive haptic ligand bonds from a binary interpretation of bond orders.
ComponentMap componentMap
A map from an index within the AtomCollection to its index in molecules member.
Definition: Interpret.h:109
Utils::BondOrderCollection removeFalsePositives(const Utils::AtomCollection &atoms, Utils::BondOrderCollection bonds)
Iteratively applies false positive detection schemes.
ComponentMap componentMap
Mapping from atom collection index to graph component index.
Definition: Interpret.h:261
All bond orders >= 0.5 are considered single bonds.
unsigned long atomIndex
Atom index.
Definition: Interpret.h:51
Type used to represent a map from an atom collection index to an interpreted object.
Definition: Interpret.h:46
constexpr auto map(const ArrayType< T, size > &array, UnaryFunction &&function)
Maps all elements of any array-like container with a unary function.
Definition: Containers.h:63
unsigned component
Index of component.
Definition: Interpret.h:49
unsigned size() const
Size of the map.
Definition: Interpret.h:87
Result type of a graph interpret call.
Definition: Interpret.h:257
Fn result datatype.
Definition: Interpret.h:312
Definition: Interpret.h:47
GraphsResult graphs(const Utils::ElementTypeCollection &elements, const AngstromPositions &angstromWrapper, const Utils::BondOrderCollection &bondOrders, BondDiscretizationOption discretization=BondDiscretizationOption::Binary)
The function that actually does all the work with the library-internal wrapper.
std::vector< FalsePositive > uncertainBonds(const Utils::AtomCollection &atomCollection, const Utils::BondOrderCollection &bondOrders)
Suggests false positives from a binary interpretation of bond orders.