RDKit
Open-source cheminformatics and machine learning.
Toggle main menu visibility
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
"
15
#include <
DataStructs/ExplicitBitVect.h
>
16
#include <set>
17
#include <vector>
18
19
namespace
RDKit
{
20
21
//! A single rgroup attached to a given core.
22
struct
RDKIT_RGROUPDECOMPOSITION_EXPORT
RGroupData
{
23
RWMOL_SPTR
combinedMol
;
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
:
38
RGroupData
() {}
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
ExplicitBitVect.h
RDKitBase.h
pulls in the core RDKit functionality
RGroupUtils.h
RDKit::ROMol
Definition
ROMol.h:344
RDKIT_RGROUPDECOMPOSITION_EXPORT
#define RDKIT_RGROUPDECOMPOSITION_EXPORT
Definition
export.h:601
RDKit
Std stuff.
Definition
Abbreviations.h:19
RDKit::ROMOL_SPTR
boost::shared_ptr< ROMol > ROMOL_SPTR
Definition
ChemTransforms.h:23
RDKit::RWMOL_SPTR
boost::shared_ptr< RWMol > RWMOL_SPTR
Definition
RWMol.h:222
RDKit::RGroupData::getRGroupLabel
static std::string getRGroupLabel(int rlabel)
RDKit::RGroupData::is_linker
bool is_linker
Definition
RGroupData.h:34
RDKit::RGroupData::single_fragment
bool single_fragment
Definition
RGroupData.h:33
RDKit::RGroupData::attachments
std::set< int > attachments
Definition
RGroupData.h:28
RDKit::RGroupData::combinedMol
RWMOL_SPTR combinedMol
Definition
RGroupData.h:23
RDKit::RGroupData::fingerprintOnBits
std::vector< int > fingerprintOnBits
Definition
RGroupData.h:31
RDKit::RGroupData::add
void add(const ROMOL_SPTR &newMol, const std::vector< int > &rlabel_attachments)
RDKit::RGroupData::getNumBondsToRlabels
std::map< int, int > getNumBondsToRlabels() const
RDKit::RGroupData::toString
std::string toString() const
RDKit::RGroupData::getMolLabel
static const std::string & getMolLabel()
RDKit::RGroupData::getCoreLabel
static const std::string & getCoreLabel()
RDKit::RGroupData::RGroupData
RGroupData()
Definition
RGroupData.h:38
RDKit::RGroupData::smilesVect
std::vector< std::string > smilesVect
Definition
RGroupData.h:25
RDKit::RGroupData::smiles
std::string smiles
Definition
RGroupData.h:27
RDKit::RGroupData::mols
std::vector< ROMOL_SPTR > mols
Definition
RGroupData.h:24
RDKit::RGroupData::labelled
bool labelled
Definition
RGroupData.h:35
RDKit::RGroupData::is_hydrogen
bool is_hydrogen
Definition
RGroupData.h:32
RDKit::RGroupData::fingerprint
std::unique_ptr< ExplicitBitVect > fingerprint
Definition
RGroupData.h:30
RDKit::RGroupData::isMolHydrogen
static bool isMolHydrogen(const ROMol &mol)
GraphMol
RGroupDecomposition
RGroupData.h
Generated on
for RDKit by
1.17.0