 |
RDKit
Open-source cheminformatics and machine learning.
|
Go to the documentation of this file.
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;
112 unsigned int getIndexInMol()
const;
115 void addAtomWithIdx(
unsigned int idx);
116 void addParentAtomWithIdx(
unsigned int idx);
117 void addBondWithIdx(
unsigned int idx);
118 void addAtomWithBookmark(
int mark);
119 void addParentAtomWithBookmark(
int mark);
120 void addBondWithBookmark(
int mark);
122 void addBracket(
const Bracket &bracket);
124 void addAttachPoint(
unsigned int aIdx,
int lvIdx,
const std::string &idStr);
126 BondType getBondType(
unsigned int bondIdx)
const;
128 const std::vector<unsigned int> &
getAtoms()
const {
return d_atoms; }
130 const std::vector<unsigned int> &
getBonds()
const {
return d_bonds; }
132 const std::vector<Bracket> &
getBrackets()
const {
return d_brackets; }
133 const std::vector<CState> &
getCStates()
const {
return d_cstates; }
139 void setOwningMol(
ROMol *mol);
143 return dp_mol == other.dp_mol && d_atoms == other.d_atoms &&
144 d_patoms == other.d_patoms && d_bonds == other.d_bonds &&
145 d_saps == other.d_saps;
149 ROMol *dp_mol =
nullptr;
151 std::vector<unsigned int> d_atoms;
152 std::vector<unsigned int> d_patoms;
153 std::vector<unsigned int> d_bonds;
155 std::vector<Bracket> d_brackets;
156 std::vector<CState> d_cstates;
157 std::vector<AttachPoint> d_saps;
160 namespace SubstanceGroupChecks {
164 "SRU",
"MON",
"COP",
"CRO",
"GRA",
"MOD",
"MER",
"ANY",
168 "SUP",
"MUL",
"DAT",
"GEN"};
198 SubstanceGroup sgroup);
SubstanceGroupException(const char *msg)
construct with an error message
used to indicate errors from incorrect sgroup access
const std::vector< unsigned int > & getBonds() const
RDKIT_GRAPHMOL_EXPORT bool isValidSubType(const std::string &type)
const std::vector< unsigned int > & getParentAtoms() const
RDKIT_GRAPHMOL_EXPORT unsigned int addSubstanceGroup(ROMol &mol, SubstanceGroup sgroup)
bool hasOwningMol() const
returns whether or not this belongs to a molecule
The class for representing SubstanceGroups.
const std::vector< CState > & getCStates() const
const std::vector< std::string > sGroupSubtypes
bool operator==(const AttachPoint &other) const
RDKIT_GRAPHMOL_EXPORT bool isValidConnectType(const std::string &type)
BondType
Bond type (see V3000 spec)
RDKIT_GRAPHMOL_EXPORT std::ostream & operator<<(std::ostream &target, const RDKit::SubstanceGroup &sg)
allows SubstanceGroup objects to be dumped to streams
RDKIT_GRAPHMOL_EXPORT bool isValidType(const std::string &type)
const std::vector< unsigned int > & getAtoms() const
const std::vector< Bracket > & getBrackets() const
bool operator==(const SubstanceGroup &other) const
#define RDKIT_GRAPHMOL_EXPORT
~SubstanceGroup()
Destructor.
bool operator==(const CState &other) const
const std::vector< std::string > sGroupTypes
const std::vector< std::string > sGroupConnectTypes
RDKIT_GRAPHMOL_EXPORT bool isSubstanceGroupIdFree(const ROMol &mol, unsigned int id)
std::array< RDGeom::Point3D, 3 > Bracket
ROMol & getOwningMol() const
Get the molecule that owns this instance.
#define PRECONDITION(expr, mess)
SubstanceGroupException(const std::string &msg)
construct with an error message
RDKIT_GRAPHMOL_EXPORT std::vector< SubstanceGroup > & getSubstanceGroups(ROMol &mol)
const std::vector< AttachPoint > & getAttachPoints() const