11#ifndef RD_ABBREVIATIONS_H
12#define RD_ABBREVIATIONS_H
22namespace Abbreviations {
28 std::shared_ptr<ROMol>
mol;
35 return !(*
this == other);
39 std::vector<std::pair<int, int>>
match;
43 : match(std::move(matchArg)), abbrev(std::move(abbrevArg)) {}
46 return abbrev == other.
abbrev && match == other.
match;
49 return !(*
this == other);
52namespace common_properties {
90 bool allowConnectionToDummies =
false);
93 const std::string& text) {
107 const ROMol& mol,
const std::vector<AbbreviationDefinition>& abbrevs,
108 double maxCoverage = 0.4);
112 RWMol& mol,
const std::vector<AbbreviationMatch>& matches);
115 RWMol& mol,
const std::vector<AbbreviationMatch>& matches);
119 RWMol& mol,
const std::vector<AbbreviationDefinition>& abbrevs,
120 double maxCoverage = 0.4,
bool sanitize =
true);
124 RWMol& mol,
const std::vector<AbbreviationDefinition>& abbrevs,
125 double maxCoverage = 0.4);
RWMol is a molecule class that is intended to be edited.
#define RDKIT_ABBREVIATIONS_EXPORT
std::vector< AbbreviationDefinition > parseLinkers(const std::string &text)
equivalent to calling parseAbbreviations(text,true,true)
RDKIT_ABBREVIATIONS_EXPORT std::vector< AbbreviationDefinition > getDefaultLinkers()
returns the default set of linker definitions
RDKIT_ABBREVIATIONS_EXPORT std::vector< AbbreviationDefinition > parseAbbreviations(const std::string &text, bool removeExtraDummies=false, bool allowConnectionToDummies=false)
parses a string describing abbreviation matches and returns the result
RDKIT_ABBREVIATIONS_EXPORT std::vector< AbbreviationDefinition > getDefaultAbbreviations()
returns the default set of abbreviation definitions
RDKIT_ABBREVIATIONS_EXPORT const std::string numDummies
RDKIT_ABBREVIATIONS_EXPORT void applyMatches(RWMol &mol, const std::vector< AbbreviationMatch > &matches)
RDKIT_ABBREVIATIONS_EXPORT void condenseAbbreviationSubstanceGroups(RWMol &mol)
RDKIT_ABBREVIATIONS_EXPORT void labelMolAbbreviations(RWMol &mol, const std::vector< AbbreviationDefinition > &abbrevs, double maxCoverage=0.4)
RDKIT_ABBREVIATIONS_EXPORT void condenseMolAbbreviations(RWMol &mol, const std::vector< AbbreviationDefinition > &abbrevs, double maxCoverage=0.4, bool sanitize=true)
RDKIT_ABBREVIATIONS_EXPORT void labelMatches(RWMol &mol, const std::vector< AbbreviationMatch > &matches)
creates "SUP" SubstanceGroups on the molecule describing the abbreviation
RDKIT_ABBREVIATIONS_EXPORT std::vector< AbbreviationMatch > findApplicableAbbreviationMatches(const ROMol &mol, const std::vector< AbbreviationDefinition > &abbrevs, double maxCoverage=0.4)
returns all matches for the abbreviations across the molecule
std::vector< unsigned int > extraAttachAtoms
optional
bool operator==(const AbbreviationDefinition &other) const
optional
std::shared_ptr< ROMol > mol
bool operator!=(const AbbreviationDefinition &other) const
std::string displayLabelW
AbbreviationMatch(std::vector< std::pair< int, int > > matchArg, AbbreviationDefinition abbrevArg)
bool operator!=(const AbbreviationMatch &other) const
AbbreviationDefinition abbrev
std::vector< std::pair< int, int > > match
bool operator==(const AbbreviationMatch &other) const