20 #include <unordered_map> 25 #include <boost/smart_ptr.hpp> 34 :
public std::runtime_error {
60 typedef std::array<RDGeom::Point3D, 3>
Bracket;
69 return aIdx == other.
aIdx && lvIdx == other.
lvIdx &&
id == other.
id;
80 return bondIdx == other.
bondIdx;
106 unsigned int getIndexInMol()
const;
109 void addAtomWithIdx(
unsigned int idx);
110 void addParentAtomWithIdx(
unsigned int idx);
111 void addBondWithIdx(
unsigned int idx);
112 void addAtomWithBookmark(
int mark);
113 void addParentAtomWithBookmark(
int mark);
114 void addBondWithBookmark(
int mark);
116 void addBracket(
const Bracket &bracket);
118 void addAttachPoint(
unsigned int aIdx,
int lvIdx,
const std::string &idStr);
120 BondType getBondType(
unsigned int bondIdx)
const;
122 const std::vector<unsigned int> &
getAtoms()
const {
return d_atoms; }
124 const std::vector<unsigned int> &
getBonds()
const {
return d_bonds; }
126 const std::vector<Bracket> &
getBrackets()
const {
return d_brackets; }
127 const std::vector<CState> &
getCStates()
const {
return d_cstates; }
133 void setOwningMol(
ROMol *mol);
137 return dp_mol == other.dp_mol && d_atoms == other.d_atoms &&
138 d_patoms == other.d_patoms && d_bonds == other.d_bonds &&
139 d_saps == other.d_saps;
143 ROMol *dp_mol =
nullptr;
145 std::vector<unsigned int> d_atoms;
146 std::vector<unsigned int> d_patoms;
147 std::vector<unsigned int> d_bonds;
149 std::vector<Bracket> d_brackets;
150 std::vector<CState> d_cstates;
151 std::vector<AttachPoint> d_saps;
154 namespace SubstanceGroupChecks {
158 "SRU",
"MON",
"COP",
"CRO",
"GRA",
"MOD",
"MER",
"ANY",
162 "SUP",
"MUL",
"DAT",
"GEN"};
RDKIT_GRAPHMOL_EXPORT bool isValidConnectType(const std::string &type)
const std::vector< unsigned int > & getBonds() const
const std::vector< unsigned int > & getParentAtoms() const
The class for representing SubstanceGroups.
SubstanceGroupException(const char *msg)
construct with an error message
RDKIT_GRAPHMOL_EXPORT unsigned int addSubstanceGroup(ROMol &mol, SubstanceGroup sgroup)
bool operator==(const AttachPoint &other) const
const std::vector< Bracket > & getBrackets() const
SubstanceGroupException(const std::string &msg)
construct with an error message
RDKIT_GRAPHMOL_EXPORT bool isValidSubType(const std::string &type)
const std::vector< CState > & getCStates() const
const std::vector< std::string > sGroupSubtypes
const std::vector< unsigned int > & getAtoms() const
RDKIT_GRAPHMOL_EXPORT bool isValidType(const std::string &type)
BondType
Bond type (see V3000 spec)
RDKIT_GRAPHMOL_EXPORT std::vector< SubstanceGroup > & getSubstanceGroups(ROMol &mol)
#define RDKIT_GRAPHMOL_EXPORT
RDKIT_GRAPHMOL_EXPORT std::ostream & operator<<(std::ostream &target, const RDKit::SubstanceGroup &sg)
allows SubstanceGroup objects to be dumped to streams
bool operator==(const CState &other) const
bool operator==(const SubstanceGroup &other) const
used to indicate errors from incorrect sgroup access
ROMol & getOwningMol() const
Get the molecule that owns this conformation.
~SubstanceGroup()
Destructor.
const std::vector< AttachPoint > & getAttachPoints() const
const std::vector< std::string > sGroupConnectTypes
const std::vector< std::string > sGroupTypes
std::array< RDGeom::Point3D, 3 > Bracket
RDKIT_GRAPHMOL_EXPORT bool isSubstanceGroupIdFree(const ROMol &mol, unsigned int id)