8 #ifndef INCLUDE_MOLASSEMBLER_IO_SMILES_PARSER_DATA_H
9 #define INCLUDE_MOLASSEMBLER_IO_SMILES_PARSER_DATA_H
11 #include <boost/fusion/adapted/struct/adapt_struct.hpp>
12 #include <boost/fusion/include/adapt_struct.hpp>
16 #include "boost/optional.hpp"
20 namespace Molassembler {
25 bool aromatic =
false;
30 static inline ElementData aromaticElement(Utils::ElementType e) {
45 boost::optional<ChiralData> chiralOptional;
46 boost::optional<unsigned> hCount;
47 boost::optional<int> chargeOptional;
48 bool atomBracket =
false;
50 inline Utils::ElementType getElement()
const {
51 if(partialElement.Z == 0) {
52 return Utils::ElementType::none;
63 enum class SmilesBondType {
74 static BondType toBondType(SmilesBondType b) {
76 case SmilesBondType::Single:
77 case SmilesBondType::Aromatic:
78 case SmilesBondType::Forward:
79 case SmilesBondType::Backward:
80 return BondType::Single;
81 case SmilesBondType::Double:
82 return BondType::Double;
83 case SmilesBondType::Triple:
84 return BondType::Triple;
85 case SmilesBondType::Quadruple:
86 return BondType::Quadruple;
88 throw std::logic_error(
"Unhandled bond type");
92 boost::optional<SmilesBondType> type;
93 boost::optional<unsigned> ringNumber;
100 BOOST_FUSION_ADAPT_STRUCT(
106 BOOST_FUSION_ADAPT_STRUCT(
109 (
unsigned, chiralIndex)
112 BOOST_FUSION_ADAPT_STRUCT(
116 (boost::optional<Scine::Molassembler::IO::ChiralData>, chiralOptional),
117 (boost::optional<unsigned>, hCount),
118 (boost::optional<int>, chargeOptional),
122 BOOST_FUSION_ADAPT_STRUCT(
124 (boost::optional<Scine::Molassembler::BondType>, type),
125 (boost::optional<unsigned>, ringNumber)
Defines symmetry names and total count.
Defines basic types widely shared across the project.
static ElementType isotope(unsigned z, unsigned a)
static constexpr unsigned Z(const ElementType e) noexcept
static ElementType element(unsigned z)
ShapeResult shape(const PositionCollection &normalizedPositions, Shape shape)
Forwarding function to calculate the continuous shape measure.
Shape
Enumeration of all contained symmetry names.
Definition: Shapes.h:28
BondType
Discrete bond type numeration.
Definition: Types.h:26
Definition: SmilesParseData.h:42
Definition: SmilesParseData.h:73
Definition: SmilesParseData.h:37
Definition: SmilesParseData.h:23