16#include "../Descriptor.h"
17#include "../Digraph.h"
32 static int parity4(
const std::vector<T> &
trg,
const std::vector<T> &ref) {
33 if (ref.size() != 4 ||
trg.size() != ref.size()) {
34 throw std::runtime_error(
"Parity vectors must have size 4.");
37 if (ref[0] ==
trg[0]) {
38 if (ref[1] ==
trg[1]) {
40 if (ref[2] ==
trg[2] && ref[3] ==
trg[3]) {
44 if (ref[2] ==
trg[3] && ref[3] ==
trg[2]) {
47 }
else if (ref[1] ==
trg[2]) {
49 if (ref[2] ==
trg[1] && ref[3] ==
trg[3]) {
53 if (ref[2] ==
trg[3] && ref[3] ==
trg[1]) {
56 }
else if (ref[1] ==
trg[3]) {
58 if (ref[2] ==
trg[2] && ref[3] ==
trg[1]) {
62 if (ref[2] ==
trg[1] && ref[3] ==
trg[2]) {
66 }
else if (ref[0] ==
trg[1]) {
67 if (ref[1] ==
trg[0]) {
69 if (ref[2] ==
trg[2] && ref[3] ==
trg[3]) {
73 if (ref[2] ==
trg[3] && ref[3] ==
trg[2]) {
76 }
else if (ref[1] ==
trg[2]) {
78 if (ref[2] ==
trg[0] && ref[3] ==
trg[3]) {
82 if (ref[2] ==
trg[3] && ref[3] ==
trg[0]) {
85 }
else if (ref[1] ==
trg[3]) {
87 if (ref[2] ==
trg[2] && ref[3] ==
trg[0]) {
91 if (ref[2] ==
trg[0] && ref[3] ==
trg[2]) {
95 }
else if (ref[0] ==
trg[2]) {
96 if (ref[1] ==
trg[1]) {
98 if (ref[2] ==
trg[0] && ref[3] ==
trg[3]) {
102 if (ref[2] ==
trg[3] && ref[3] ==
trg[0]) {
105 }
else if (ref[1] ==
trg[0]) {
107 if (ref[2] ==
trg[1] && ref[3] ==
trg[3]) {
111 if (ref[2] ==
trg[3] && ref[3] ==
trg[1]) {
114 }
else if (ref[1] ==
trg[3]) {
116 if (ref[2] ==
trg[0] && ref[3] ==
trg[1]) {
120 if (ref[2] ==
trg[1] && ref[3] ==
trg[0]) {
124 }
else if (ref[0] ==
trg[3]) {
125 if (ref[1] ==
trg[1]) {
127 if (ref[2] ==
trg[2] && ref[3] ==
trg[0]) {
131 if (ref[2] ==
trg[0] && ref[3] ==
trg[2]) {
134 }
else if (ref[1] ==
trg[2]) {
136 if (ref[2] ==
trg[1] && ref[3] ==
trg[0]) {
140 if (ref[2] ==
trg[0] && ref[3] ==
trg[1]) {
143 }
else if (ref[1] ==
trg[0]) {
145 if (ref[2] ==
trg[2] && ref[3] ==
trg[1]) {
149 if (ref[2] ==
trg[1] && ref[3] ==
trg[2]) {
202 std::vector<Atom *> d_foci;
210 std::vector<Atom *> d_carriers;
The class for representing atoms.
void setCarriers(std::vector< Atom * > &&carriers)
virtual Descriptor label(Node *node, Digraph &digraph, const Rules &comp)
bool isDuplicateOrHydrogenEdge(const Edge *edge)
const std::vector< Atom * > & getFoci() const
void removeDuplicatesAndHs(std::vector< Edge * > &edges)
const std::vector< Atom * > & getCarriers() const
Edge * findInternalEdge(const std::vector< Edge * > &edges, Atom *f1, Atom *f2)
virtual void setPrimaryLabel(Descriptor desc)=0
void removeInternalEdges(std::vector< Edge * > &edges, Atom *f1, Atom *f2)
bool isInternalEdge(const Edge *edge, Atom *f1, Atom *f2)
Configuration(const CIPMol &mol, Atom *focus)
virtual Descriptor label(const Rules &comp)=0
Configuration(const CIPMol &mol, std::vector< Atom * > &&foci, bool atropisomerMode=false)
static int parity4(const std::vector< T > &trg, const std::vector< T > &ref)
bool rdvalue_is(const RDValue_cast_t)