RDKit
Open-source cheminformatics and machine learning.
RGroupUtils.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_UTILS
11 #define RGROUP_UTILS
12 
13 #include <GraphMol/RDKitBase.h>
14 #include <map>
15 namespace RDKit {
16 extern const std::string RLABEL;
17 extern const std::string SIDECHAIN_RLABELS;
18 extern const std::string done;
19 
20 const unsigned int EMPTY_CORE_LABEL = -100000;
21 
22 // Various places where rgroups can be labeled
23 // the order of precedence
24 enum class Labelling {
31 };
32 
33 //! return the user friendly name for the given labelling
34 std::string labellingToString(Labelling type);
35 
36 //! Get the RLabels,atom mapping for the current molecule
37 std::map<int, Atom *> getRlabels(const RWMol &mol);
38 
39 //! Remove the user labels from the atom
40 void clearInputLabels(Atom *atom);
41 
42 //! Set the rgroup label for the current atom, this also sets the
43 // appropriate MDL or other label
44 bool setLabel(Atom *atom, int label, std::set<int> &labels, int &maxLabel,
45  bool relabel, Labelling type);
46 
47 //! Returns true if the core has a dummy atom
48 bool hasDummy(const RWMol &core);
49 }
50 
51 #endif
pulls in the core RDKit functionality
The class for representing atoms.
Definition: Atom.h:69
RWMol is a molecule class that is intended to be edited.
Definition: RWMol.h:31
Std stuff.
Definition: Abbreviations.h:17
std::map< int, Atom * > getRlabels(const RWMol &mol)
Get the RLabels,atom mapping for the current molecule.
std::string labellingToString(Labelling type)
return the user friendly name for the given labelling
bool setLabel(Atom *atom, int label, std::set< int > &labels, int &maxLabel, bool relabel, Labelling type)
Set the rgroup label for the current atom, this also sets the.
void clearInputLabels(Atom *atom)
Remove the user labels from the atom.
const std::string done
bool hasDummy(const RWMol &core)
Returns true if the core has a dummy atom.
const std::string SIDECHAIN_RLABELS
const std::string RLABEL
const unsigned int EMPTY_CORE_LABEL
Definition: RGroupUtils.h:20