8 #ifndef INCLUDE_MOLASSEMBLER_STEREOPERMUTATOR_LIST_IMPL_H
9 #define INCLUDE_MOLASSEMBLER_STEREOPERMUTATOR_LIST_IMPL_H
14 #include <unordered_map>
17 namespace Molassembler {
20 using AtomMapType = std::unordered_map<AtomIndex, AtomStereopermutator>;
21 using BondMapType = std::unordered_map<BondIndex, BondStereopermutator, boost::hash<BondIndex>>;
178 boost::optional<const AtomStereopermutator&>
option(
AtomIndex index)
const;
184 boost::optional<const BondStereopermutator&>
option(
const BondIndex& edge)
const;
202 unsigned size()
const;
unsigned A() const
Returns the number of AtomStereopermutators.
boost::optional< AtomStereopermutator & > option(AtomIndex index)
Fetch a reference-option to an AtomStereopermutator.
void applyPermutation(const std::vector< AtomIndex > &permutation)
Apply an index mapping to the list of stereopermutators.
BondMapType bondStereopermutators
The underlying storage for bond stereopermutators.
Definition: StereopermutatorListImpl.h:218
AtomStereopermutator & at(AtomIndex index)
Access atom stereopermutator at an atom.
AtomMapType atomStereopermutators
The underlying storage for atom stereopermutators.
Definition: StereopermutatorListImpl.h:215
AtomEnvironmentComponents
For bitmasks grouping components of immediate atom environments.
Definition: Types.h:103
Handles the steric permutation of substituents of a non-terminal central atom.
Definition: AtomStereopermutator.h:79
Handles specific relative arrangements of two atom stereopermutators joined by a bond.
Definition: BondStereopermutator.h:46
unsigned size() const
Combined size of atom and bond-stereopermutator lists.
void clearBonds()
Remove all stereopermutators on bonds.
AtomStereopermutator & add(AtomStereopermutator stereopermutator)
Add a new AtomStereopermutator to the list.
void try_remove(AtomIndex index)
Removes the AtomStereopermutator on a specified index, if present.
std::size_t AtomIndex
Unsigned integer atom index type. Used to refer to particular atoms.
Definition: Types.h:51
void clear()
Remove all stereopermutators.
Handle rotational arrangements of adjacent atom-centered shapes.
bool compare(const Impl &other, AtomEnvironmentComponents componentBitmask) const
Modular comparison with another StereopermutatorList using a bitmask.
Type used to refer to particular bonds. Orders first < second.
Definition: Types.h:54
bool hasUnassignedStereopermutators() const
Returns true if there are unassigned stereopermutators.
bool hasZeroAssignmentStereopermutators() const
Returns true if there are any stereopermutators with zero possible assignments.
bool operator==(const Impl &other) const
Strict equality comparison.
bool empty() const
Returns true if there are no stereopermutators.
void propagateVertexRemoval(AtomIndex removedIndex)
Communicates the removal of a vertex index to all stereopermutators in the list.
Owning class storing all stereopermutators in a molecule.
Definition: StereopermutatorListImpl.h:19
unsigned B() const
Returns the number of BondStereopermutators.