13 #include "../RDKitBase.h"
18 #include <boost/scoped_ptr.hpp>
29 std::vector<boost::shared_ptr<ROMol>>
mols;
45 void add(boost::shared_ptr<ROMol> newMol,
46 const std::vector<int> &rlabel_attachments) {
48 for (
auto &mol :
mols) {
49 if (newMol.get() == mol.get()) {
55 std::copy(rlabel_attachments.begin(), rlabel_attachments.end(),
58 mols.push_back(newMol);
79 std::map<int, int> rlabelsUsedCount;
81 for (ROMol::AtomIterator atIt =
combinedMol->beginAtoms();
86 rlabelsUsedCount[rlabel] += 1;
89 return rlabelsUsedCount;
93 void computeIsHydrogen() {
94 for (
const auto &mol :
mols) {
95 for (ROMol::AtomIterator atIt = mol->beginAtoms();
96 atIt != mol->endAtoms(); ++atIt) {
97 if ((*atIt)->getAtomicNum() > 1) {
107 std::string getSmiles()
const {
The class for representing atoms.
bool getPropIfPresent(const std::string &key, T &res) const
RWMol is a molecule class that is intended to be edited.
RDKIT_RDGENERAL_EXPORT const std::string internalRgroupSmiles
RDKIT_SMILESPARSE_EXPORT std::string MolToSmiles(const ROMol &mol, bool doIsomericSmiles=true, bool doKekule=false, int rootedAtAtom=-1, bool canonical=true, bool allBondsExplicit=false, bool allHsExplicit=false, bool doRandom=false)
returns canonical SMILES for a molecule
RDKIT_CHEMTRANSFORMS_EXPORT ROMol * combineMols(const ROMol &mol1, const ROMol &mol2, RDGeom::Point3D offset=RDGeom::Point3D(0, 0, 0))
Combined two molecules to create a new one.
A single rgroup attached to a given core.
boost::shared_ptr< RWMol > combinedMol
std::vector< boost::shared_ptr< ROMol > > mols
std::set< int > attachments
bool multiple_attachments
std::map< int, int > getNumBondsToRlabels() const
std::set< std::string > smilesSet
void add(boost::shared_ptr< ROMol > newMol, const std::vector< int > &rlabel_attachments)