RDKit
Open-source cheminformatics and machine learning.
RGroupCore.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2020 Novartis Institutes for BioMedical Research
3 //
4 // @@ All Rights Reserved @@
5 // This file is part of the RDKit.
6 // The contents are covered by the terms of the BSD license
7 // which is included in the file license.txt, found at the root
8 // of the RDKit source tree.
9 //
10 #ifndef RGROUP_CORE
11 #define RGROUP_CORE
12 
13 #include "../RDKitBase.h"
14 #include "RGroupUtils.h"
15 
16 namespace RDKit {
17 
18 //! RCore is the core common to a series of molecules
19 struct RCore {
20  boost::shared_ptr<RWMol> core;
21  boost::shared_ptr<RWMol> labelledCore;
23  RCore(){};
24  RCore(const RWMol &c, bool onlyMatchAtRGroups = false) : core(new RWMol(c)) {
25  if (onlyMatchAtRGroups) {
27  }
28  }
30  // First find all the core atoms that have user
31  // label and but their indices into core_atoms_with_user_labels
32  for (const auto atom : core->atoms()) {
33  if (atom->hasProp(RLABEL)) {
34  core_atoms_with_user_labels.insert(atom->getIdx());
35  }
36  }
37  }
38 };
39 
40 } // namespace RDKit
41 #endif
RWMol is a molecule class that is intended to be edited.
Definition: RWMol.h:31
Std stuff.
Definition: Abbreviations.h:17
const std::string RLABEL
RCore is the core common to a series of molecules.
Definition: RGroupCore.h:19
void findIndicesWithRLabel()
Definition: RGroupCore.h:29
boost::shared_ptr< RWMol > core
Definition: RGroupCore.h:20
boost::shared_ptr< RWMol > labelledCore
Definition: RGroupCore.h:21
RCore(const RWMol &c, bool onlyMatchAtRGroups=false)
Definition: RGroupCore.h:24
std::set< int > core_atoms_with_user_labels
Definition: RGroupCore.h:22