8 #ifndef INCLUDE_MOLASSEMBLER_SHARED_TYPES_H
9 #define INCLUDE_MOLASSEMBLER_SHARED_TYPES_H
11 #include "Molassembler/Export.h"
13 #include <type_traits>
18 namespace Molassembler {
78 bool operator < (
const BondIndex& other)
const;
80 bool operator == (
const BondIndex& other)
const;
105 ElementTypes = (1 << 0),
106 BondOrders = (1 << 1),
108 Stereopermutations = (1 << 3),
109 All = ElementTypes | BondOrders | Shapes | Stereopermutations
128 static_cast<std::underlying_type_t<T>
>(a)
129 &
static_cast<std::underlying_type_t<T>
>(b)
142 return static_cast<T
>(
143 static_cast<std::underlying_type_t<T>
>(a)
144 |
static_cast<std::underlying_type_t<T>
>(b)
LengthUnit
Length units.
Definition: Types.h:45
AtomIndex second
Larger atom index.
Definition: Types.h:67
const AtomIndex * const_iterator
Definition: Types.h:62
AtomEnvironmentComponents
For bitmasks grouping components of immediate atom environments.
Definition: Types.h:103
AtomIndex first
Smaller atom index.
Definition: Types.h:65
constexpr unsigned nBondTypes
Number of distinct bond types present in the library.
Definition: Types.h:42
constexpr Scine::Molassembler::AtomEnvironmentComponents operator|(const Scine::Molassembler::AtomEnvironmentComponents a, const Scine::Molassembler::AtomEnvironmentComponents b)
Compose an atom environment components bitmask from parts.
Definition: Types.h:136
std::size_t AtomIndex
Unsigned integer atom index type. Used to refer to particular atoms.
Definition: Types.h:51
BondType
Discrete bond type numeration.
Definition: Types.h:26
constexpr bool operator&(const Scine::Molassembler::AtomEnvironmentComponents a, const Scine::Molassembler::AtomEnvironmentComponents b)
Test whether two atom environment bitmasks share components.
Definition: Types.h:122
Type used to refer to particular bonds. Orders first < second.
Definition: Types.h:54
std::size_t hash_value(const BondIndex &bond)
Hash for BondIndex so it can be used as a key type in unordered containers.
Internal bond order to mark haptic binding sites.