RDKit
Open-source cheminformatics and machine learning.
Loading...
Searching...
No Matches
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
19namespace RDKit {
20
21//! A single rgroup attached to a given core.
24 std::vector<ROMOL_SPTR> 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(const ROMOL_SPTR &newMol,
41 const std::vector<int> &rlabel_attachments);
42
43 std::map<int, int> getNumBondsToRlabels() const;
44
45 std::string toString() const;
46 static std::string getRGroupLabel(int rlabel);
47 static const std::string &getCoreLabel();
48 static const std::string &getMolLabel();
49 static bool isMolHydrogen(const ROMol &mol);
50
51 private:
52 void computeIsHydrogen();
53
54 //! compute the canonical smiles for the attachments (bug: removes dupes since
55 //! we are using a set...)
56 std::string getSmiles() const;
57 //! merge mol into combinedMol, including atom and bond highlights if present
58 void mergeIntoCombinedMol(const ROMOL_SPTR &mol);
59 std::map<int, std::vector<int>> rlabelAtomIndicesMap;
60 std::map<int, std::vector<int>> rlabelBondIndicesMap;
61};
62} // namespace RDKit
63
64#endif
#define RDKIT_RGROUPDECOMPOSITION_EXPORT
Definition export.h:433
Std stuff.
boost::shared_ptr< ROMol > ROMOL_SPTR
boost::shared_ptr< RWMol > RWMOL_SPTR
Definition RWMol.h:222
A single rgroup attached to a given core.
Definition RGroupData.h:22
static std::string getRGroupLabel(int rlabel)
std::set< int > attachments
Definition RGroupData.h:28
RWMOL_SPTR combinedMol
Definition RGroupData.h:23
std::vector< int > fingerprintOnBits
Definition RGroupData.h:31
void add(const ROMOL_SPTR &newMol, const std::vector< int > &rlabel_attachments)
std::map< int, int > getNumBondsToRlabels() const
std::string toString() const
static const std::string & getMolLabel()
static const std::string & getCoreLabel()
std::vector< std::string > smilesVect
Definition RGroupData.h:25
std::string smiles
Definition RGroupData.h:27
std::vector< ROMOL_SPTR > mols
Definition RGroupData.h:24
std::unique_ptr< ExplicitBitVect > fingerprint
Definition RGroupData.h:30
static bool isMolHydrogen(const ROMol &mol)