RDKit
Open-source cheminformatics and machine learning.
RGroupData.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2017 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_DATA
11 #define RGROUP_DATA
12 
13 #include "../RDKitBase.h"
14 #include "RGroupUtils.h"
16 #include <set>
17 #include <vector>
18 
19 namespace RDKit {
20 
21 //! A single rgroup attached to a given core.
23  boost::shared_ptr<RWMol> combinedMol;
24  std::vector<boost::shared_ptr<ROMol>> mols; // All the mols in the rgroup
25  std::vector<std::string> smilesVect; // used for rgroup equivalence
26  std::string
27  smiles; // smiles for all the mols in the rgroup (with attachments)
28  std::set<int> attachments; // core attachment points
29  std::unique_ptr<ExplicitBitVect>
30  fingerprint; // fingerprint for score calculations
31  std::vector<int> fingerprintOnBits;
32  bool is_hydrogen = false;
33  bool single_fragment = true;
34  bool is_linker = false;
35  bool labelled = false;
36 
37  public:
39 
40  void add(boost::shared_ptr<ROMol> newMol,
41  const std::vector<int> &rlabel_attachments);
42 
43  std::map<int, int> getNumBondsToRlabels() const;
44 
45  std::string toString() const;
46 
47  private:
48  void computeIsHydrogen();
49 
50  bool isMolHydrogen(ROMol &mol);
51 
52  //! compute the canonical smiles for the attachments (bug: removes dupes since
53  //! we are using a set...)
54  std::string getSmiles() const;
55 };
56 } // namespace RDKit
57 
58 #endif
#define RDKIT_RGROUPDECOMPOSITION_EXPORT
Definition: export.h:401
Std stuff.
Definition: Abbreviations.h:19
A single rgroup attached to a given core.
Definition: RGroupData.h:22
boost::shared_ptr< RWMol > combinedMol
Definition: RGroupData.h:23
std::vector< boost::shared_ptr< ROMol > > mols
Definition: RGroupData.h:24
std::set< int > attachments
Definition: RGroupData.h:28
std::vector< int > fingerprintOnBits
Definition: RGroupData.h:31
std::string toString() const
std::vector< std::string > smilesVect
Definition: RGroupData.h:25
std::string smiles
Definition: RGroupData.h:27
std::map< int, int > getNumBondsToRlabels() const
void add(boost::shared_ptr< ROMol > newMol, const std::vector< int > &rlabel_attachments)
std::unique_ptr< ExplicitBitVect > fingerprint
Definition: RGroupData.h:30