Loading...
Searching...
No Matches
RGroupData.h
Go to the documentation of this file.
//
// Copyright (C) 2017 Novartis Institutes for BioMedical Research
//
// @@ All Rights Reserved @@
// This file is part of the RDKit.
// The contents are covered by the terms of the BSD license
// which is included in the file license.txt, found at the root
// of the RDKit source tree.
//
#ifndef RGROUP_DATA
#define RGROUP_DATA
#include "../RDKitBase.h"
#include "RGroupUtils.h"
#include <DataStructs/ExplicitBitVect.h>
#include <set>
#include <vector>
namespace RDKit {
//! A single rgroup attached to a given core.
struct RDKIT_RGROUPDECOMPOSITION_EXPORT RGroupData {
RWMOL_SPTR combinedMol;
std::vector<ROMOL_SPTR> mols; // All the mols in the rgroup
std::vector<std::string> smilesVect; // used for rgroup equivalence
std::string
smiles; // smiles for all the mols in the rgroup (with attachments)
std::set<int> attachments; // core attachment points
std::unique_ptr<ExplicitBitVect>
fingerprint; // fingerprint for score calculations
std::vector<int> fingerprintOnBits;
bool is_hydrogen = false;
bool single_fragment = true;
bool is_linker = false;
bool labelled = false;
public:
RGroupData() {}
void add(const ROMOL_SPTR &newMol,
const std::vector<int> &rlabel_attachments);
std::map<int, int> getNumBondsToRlabels() const;
std::string toString() const;
static std::string getRGroupLabel(int rlabel);
static const std::string &getCoreLabel();
static const std::string &getMolLabel();
static bool isMolHydrogen(const ROMol &mol);
private:
void computeIsHydrogen();
//! compute the canonical smiles for the attachments (bug: removes dupes since
//! we are using a set...)
std::string getSmiles() const;
//! merge mol into combinedMol, including atom and bond highlights if present
void mergeIntoCombinedMol(const ROMOL_SPTR &mol);
std::map<int, std::vector<int>> rlabelAtomIndicesMap;
std::map<int, std::vector<int>> rlabelBondIndicesMap;
};
} // namespace RDKit
#endif
ExplicitBitVect.h
RDKitBase.h
pulls in the core RDKit functionality
RGroupUtils.h
RDKit::ROMol
Definition ROMol.h:319
RDKIT_RGROUPDECOMPOSITION_EXPORT
#define RDKIT_RGROUPDECOMPOSITION_EXPORT
Definition export.h:481
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)