RDKit Namespace Reference

Includes a bunch of functionality for handling Atom and Bond queries. More...

## Namespaces

| AtomPairs
| Canon
| common_properties
| Descriptors
| DGeomHelpers
| Drawing
| FileParserUtils
| Fingerprints
| FMCS
| Local
| MACCSFingerprints
| MMFF
| MolAlign
| MolDraw2D_detail
| MolFragmenter
| MolHash
| MolOps
| Groups a variety of molecular query and transformation operations.
| MolShapes
| MorganFingerprints
| SLNParse
| SmartsWrite
| SmilesWrite
| Subgraphs
| UFF
| Utils

## Classes

class | AromaticAtomIterator_
| Iterate over aromatic atoms, this is bidirectional. More...
class | Atom
| The class for representing atoms. More...
class | atomicData
class | AtomIterator_
| A general random access iterator. More...
class | AtomMonomerInfo
| The abstract base class for atom-level monomer info. More...
class | AtomPDBResidueInfo
| Captures atom-level information about peptide residues. More...
class | AtomRingQuery
class | BadFileException
| used by various file parsing classes to indicate a bad file More...
class | Bond
| class for representing a bond More...
class | BondIterator_
| iterator for a molecule's bonds, currently BiDirectional, but it theoretically ought to be RandomAccess. More...
struct | charptr_functor
| functor for comparing two strings More...
class | ChemicalReaction
| This is a class for storing and applying general chemical reactions. More...
class | ChemicalReactionException
| used to indicate an error in the chemical reaction engine More...
class | ChemicalReactionParserException
| used to indicate an error in parsing reaction data More...
class | Conformer
| The class for representing 2D or 3D conformation of a molecule. More...
class | ConformerException
| used to indicate errors from incorrect confomer access More...
class | ConstBondIterator_
| const iterator for a molecule's bonds, currently BiDirectional, but it theoretically ought to be RandomAccess. More...
class | Dict
| The `Dict` class can be used to store objects of arbitrary type keyed by `strings`. More...
class | DiscreteDistMat
class | DiscreteValueVect
| a class for efficiently storing vectors of discrete values More...
class | FeatureFileParseException
| class used to indicate errors in parsing feature definition files. More...
class | FileParseException
| used by various file parsing classes to indicate a parse error More...
class | ForwardSDMolSupplier
class | FragCatalogEntry
class | FragCatGenerator
class | FragCatParams
| container for user parameters used to create a fragment catalog More...
class | FragFPGenerator
class | GasteigerParams
class | HasPropQuery
class | HasPropWithValueQuery
class | HasPropWithValueQuery< TargetPtr, std::string >
class | HeteroatomIterator_
| Iterate over heteroatoms, this is bidirectional. More...
struct | larger_of
| functor for returning the larger of two values More...
struct | ltDouble
| functor to compare two doubles with a tolerance More...
class | MatchingAtomIterator_
| Iterate over atoms matching a query function. This is bidirectional. More...
struct | MCSAtomCompareParameters
struct | MCSBondCompareParameters
struct | MCSParameters
struct | MCSProgressData
struct | MCSResult
class | MolCatalogEntry
| This class is used to store ROMol objects in a MolCatalog. More...
class | MolCatalogParams
| container for user parameters used to create a mol catalog More...
class | MolChemicalFeature
class | MolChemicalFeatureDef
class | MolChemicalFeatureFactory
| The class for finding chemical features in molecules. More...
class | MolDraw2D
class | MolDraw2DCairo
class | MolDraw2DQt
class | MolDraw2DSVG
class | MolDraw2Dwx
struct | MolDrawOptions
class | MolPickler
| handles pickling (serializing) molecules More...
class | MolPicklerException
| used to indicate exceptions whilst pickling (serializing) molecules More...
class | MolSanitizeException
| class for flagging sanitization errors More...
class | MolSupplier
class | MolWriter
class | PDBMolSupplier
| lazy file parser for PDB files More...
class | PDBWriter
class | PeriodicTable
| singleton class for retrieving information about atoms More...
class | QueryAtom
| Class for storing atomic queries. More...
class | QueryAtomIterator_
| Iterate over atoms matching a query. This is bidirectional. More...
class | QueryBond
| Class for storing Bond queries. More...
struct | ReactionFingerprintParams
class | ReactionPickler
| handles pickling (serializing) reactions More...
class | ReactionPicklerException
| used to indicate exceptions whilst pickling (serializing) reactions More...
class | RecursiveStructureQuery
| allows use of recursive structure queries (e.g. recursive SMARTS) More...
class | RingInfo
| A class to store information about a molecule's rings. More...
class | ROMol
| ROMol is a molecule class that is intended to have a fixed topology. More...
class | RWMol
| RWMol is a molecule class that is intended to be edited. More...
class | SDMolSupplier
class | SDWriter
class | SLNParseException
class | SmilesMolSupplier
| lazy file parser for Smiles tables More...
class | SmilesParseException
class | SmilesWriter
class | SparseIntVect
| a class for efficiently storing sparse vectors of ints More...
class | TDTMolSupplier
| lazy file parser for TDT files More...
class | TDTWriter

## Typedefs

typedef boost::shared_ptr< Atom > | ATOM_SPTR
typedef boost::shared_ptr< ROMol > | ROMOL_SPTR
typedef boost::shared_ptr< Conformer > | CONFORMER_SPTR
typedef boost::uint16_t | atomindex_t
typedef std::vector< RWMOL_SPTR > | RWMOL_SPTR_VECT
typedef bool(* | MCSFinalMatchCheckFunction) (const short unsigned c1[], const short unsigned c2[], const ROMol &mol1, const FMCS::Graph &query, const ROMol &mol2, const FMCS::Graph &target, const MCSParameters *p)
typedef bool(* | MCSAtomCompareFunction) (const MCSAtomCompareParameters &p, const ROMol &mol1, unsigned int atom1, const ROMol &mol2, unsigned int atom2, void *userData)
typedef bool(* | MCSBondCompareFunction) (const MCSBondCompareParameters &p, const ROMol &mol1, unsigned int bond1, const ROMol &mol2, unsigned int bond2, void *userData)
typedef bool(* | MCSProgressCallback) (const MCSProgressData &stat, const MCSParameters &params, void *userData)
typedef RDCatalog::HierarchCatalog< FragCatalogEntry, FragCatParams, int > | FragCatalog
typedef std::vector< boost::shared_ptr< ROMol > > | MOL_SPTR_VECT
typedef std::vector< std::pair< int, int > > | MatchVectType
| used to return matches from substructure searching, The format is (queryAtomIdx, molAtomIdx) More...
typedef RDCatalog::HierarchCatalog< MolCatalogEntry, MolCatalogParams, int > | MolCatalog
| a hierarchical catalog for holding molecules More...
typedef boost::shared_ptr< MolChemicalFeature > | FeatSPtr
typedef std::list< FeatSPtr > | FeatSPtrList
typedef FeatSPtrList::iterator | FeatSPtrList_I
typedef boost::tuple< float, float, float > | DrawColour
typedef std::vector< unsigned int > | DashPattern
typedef std::vector< double > | INVAR_VECT
typedef INVAR_VECT::iterator | INVAR_VECT_I
typedef INVAR_VECT::const_iterator | INVAR_VECT_CI
typedef Queries::Query< bool, Atom const *, true > | ATOM_BOOL_QUERY
typedef Queries::Query< bool, Bond const *, true > | BOND_BOOL_QUERY
typedef Queries::AndQuery< int, Atom const *, true > | ATOM_AND_QUERY
typedef Queries::AndQuery< int, Bond const *, true > | BOND_AND_QUERY
typedef Queries::OrQuery< int, Atom const *, true > | ATOM_OR_QUERY
typedef Queries::OrQuery< int, Bond const *, true > | BOND_OR_QUERY
typedef Queries::XOrQuery< int, Atom const *, true > | ATOM_XOR_QUERY
typedef Queries::XOrQuery< int, Bond const *, true > | BOND_XOR_QUERY
typedef Queries::EqualityQuery< int, Atom const *, true > | ATOM_EQUALS_QUERY
typedef Queries::EqualityQuery< int, Bond const *, true > | BOND_EQUALS_QUERY
typedef Queries::GreaterQuery< int, Atom const *, true > | ATOM_GREATER_QUERY
typedef Queries::GreaterQuery< int, Bond const *, true > | BOND_GREATER_QUERY
typedef Queries::GreaterEqualQuery< int, Atom const *, true > | ATOM_GREATEREQUAL_QUERY
typedef Queries::GreaterEqualQuery< int, Bond const *, true > | BOND_GREATEREQUAL_QUERY
typedef Queries::LessQuery< int, Atom const *, true > | ATOM_LESS_QUERY
typedef Queries::LessQuery< int, Bond const *, true > | BOND_LESS_QUERY
typedef Queries::LessEqualQuery< int, Atom const *, true > | ATOM_LESSEQUAL_QUERY
typedef Queries::LessEqualQuery< int, Bond const *, true > | BOND_LESSEQUAL_QUERY
typedef Queries::RangeQuery< int, Atom const *, true > | ATOM_RANGE_QUERY
typedef Queries::RangeQuery< int, Bond const *, true > | BOND_RANGE_QUERY
typedef Queries::SetQuery< int, Atom const *, true > | ATOM_SET_QUERY
typedef Queries::SetQuery< int, Bond const *, true > | BOND_SET_QUERY
typedef Queries::Query< int, Bond const *, true > | BOND_NULL_QUERY
typedef Queries::Query< int, Atom const *, true > | ATOM_NULL_QUERY
typedef Atom const * | ConstAtomPtr
typedef Bond const * | ConstBondPtr
typedef Queries::EqualityQuery< int, Atom const *, true > | ATOM_PROP_QUERY
typedef Queries::EqualityQuery< int, Bond const *, true > | BOND_PROP_QUERY
typedef boost::shared_ptr< Bond > | BOND_SPTR
typedef boost::adjacency_list< boost::vecS, boost::vecS, boost::undirectedS, ATOM_SPTR, BOND_SPTR > | MolGraph
| This is the BGL type used to store the topology: More...
typedef std::vector< ROMol > | MOL_VECT
typedef std::vector< ROMol * > | MOL_PTR_VECT
typedef MOL_PTR_VECT::const_iterator | MOL_PTR_VECT_CI
typedef MOL_PTR_VECT::iterator | MOL_PTR_VECT_I
typedef boost::shared_ptr< RWMol > | RWMOL_SPTR
typedef std::vector< int > | PATH_TYPE
typedef std::list< PATH_TYPE > | PATH_LIST
typedef PATH_LIST::const_iterator | PATH_LIST_CI
typedef std::map< int, PATH_LIST > | INT_PATH_LIST_MAP
typedef INT_PATH_LIST_MAP::const_iterator | INT_PATH_LIST_MAP_CI
typedef INT_PATH_LIST_MAP::iterator | INT_PATH_LIST_MAP_I
typedef std::vector< std::string > | STR_VECT
typedef long long int | LONGINT
typedef unsigned int | UINT
typedef unsigned short | USHORT
typedef unsigned char | UCHAR
typedef std::vector< int > | INT_VECT
typedef INT_VECT::iterator | INT_VECT_I
typedef INT_VECT::const_iterator | INT_VECT_CI
typedef INT_VECT::reverse_iterator | INT_VECT_RI
typedef INT_VECT::const_reverse_iterator | INT_VECT_CRI
typedef std::list< int > | INT_LIST
typedef INT_LIST::iterator | INT_LIST_I
typedef INT_LIST::const_iterator | INT_LIST_CI
typedef std::list< INT_VECT > | LIST_INT_VECT
typedef LIST_INT_VECT::iterator | LIST_INT_VECT_I
typedef LIST_INT_VECT::const_iterator | LIST_INT_VECT_CI
typedef std::vector< INT_VECT > | VECT_INT_VECT
typedef VECT_INT_VECT::iterator | VECT_INT_VECT_I
typedef VECT_INT_VECT::const_iterator | VECT_INT_VECT_CI
typedef std::vector< UINT >::const_iterator | UINT_VECT_CI
typedef std::vector< UINT > | UINT_VECT
typedef std::vector< std::string >::const_iterator | STR_VECT_CI
typedef std::vector< std::string >::iterator | STR_VECT_I
typedef std::vector< double > | DOUBLE_VECT
typedef DOUBLE_VECT::iterator | DOUBLE_VECT_I
typedef DOUBLE_VECT::const_iterator | DOUBLE_VECT_CI
typedef std::vector< DOUBLE_VECT > | VECT_DOUBLE_VECT
typedef VECT_DOUBLE_VECT::iterator | VECT_DOUBLE_VECT_I
typedef VECT_DOUBLE_VECT::const_iterator | VECT_DOUBLE_VECT_CI
typedef std::map< std::string, UINT > | STR_UINT_MAP
typedef std::map< std::string, UINT >::const_iterator | STR_UINT_MAP_CI
typedef std::map< int, INT_VECT > | INT_INT_VECT_MAP
typedef INT_INT_VECT_MAP::const_iterator | INT_INT_VECT_MAP_CI
typedef std::map< int, int > | INT_MAP_INT
typedef INT_MAP_INT::iterator | INT_MAP_INT_I
typedef INT_MAP_INT::const_iterator | INT_MAP_INT_CI
typedef std::deque< int > | INT_DEQUE
typedef INT_DEQUE::iterator | INT_DEQUE_I
typedef INT_DEQUE::const_iterator | INT_DEQUE_CI
typedef std::map< int, INT_DEQUE > | INT_INT_DEQ_MAP
typedef INT_INT_DEQ_MAP::const_iterator | INT_INT_DEQ_MAP_CI
typedef std::set< int > | INT_SET
typedef INT_SET::iterator | INT_SET_I
typedef INT_SET::const_iterator | INT_SET_CI
typedef std::map< double, int, ltDouble > | DOUBLE_INT_MAP
| std::map from double to integer. More...
typedef boost::minstd_rand | rng_type
typedef boost::uniform_int | uniform_int
typedef boost::uniform_real | uniform_double
typedef boost::variate_generator< rng_type &, uniform_int > | int_source_type
typedef boost::variate_generator< rng_type &, uniform_double > | double_source_type

## Enumerations

enum | FingerprintType { AtomPairFP = 1, TopologicalTorsion, MorganFP, RDKitFP, PatternFP }
enum | ReactionMoleculeType { Reactant, Product, Agent }
enum | Mol2Type { CORINA =0 }
enum | AtomComparator { AtomCompareAny, AtomCompareElements, AtomCompareIsotopes }
enum | BondComparator { BondCompareAny, BondCompareOrder, BondCompareOrderExact }
enum | EEndian { LITTLE_ENDIAN_ORDER, BIG_ENDIAN_ORDER }

## Functions

bool | isMoleculeReactantOfReaction (const ChemicalReaction &rxn, const ROMol &mol, unsigned int &which)
bool | isMoleculeReactantOfReaction (const ChemicalReaction &rxn, const ROMol &mol)
bool | isMoleculeProductOfReaction (const ChemicalReaction &rxn, const ROMol &mol, unsigned int &which)
bool | isMoleculeProductOfReaction (const ChemicalReaction &rxn, const ROMol &mol)
bool | isMoleculeAgentOfReaction (const ChemicalReaction &rxn, const ROMol &mol, unsigned int &which)
bool | isMoleculeAgentOfReaction (const ChemicalReaction &rxn, const ROMol &mol)
VECT_INT_VECT | getReactingAtoms (const ChemicalReaction &rxn, bool mappedAtomsOnly=false)
void | addRecursiveQueriesToReaction (ChemicalReaction &rxn, const std::map< std::string, ROMOL_SPTR > &queries, std::string propName, std::vector< std::vector< std::pair< unsigned int, std::string > > > *reactantLabels=NULL)
| add the recursive queries to the reactants of a reaction More...
const ReactionFingerprintParams | DefaultStructuralFPParams (true, 0.2, 1, 1, 4096, PatternFP)
const ReactionFingerprintParams | DefaultDifferenceFPParams (true, 0.0, 10, 1, 2048, AtomPairFP)
ExplicitBitVect * | StructuralFingerprintChemReaction (const ChemicalReaction &rxn, const ReactionFingerprintParams &params=DefaultStructuralFPParams)
SparseIntVect< boost::uint32_t > * | DifferenceFingerprintChemReaction (const ChemicalReaction &rxn, const ReactionFingerprintParams &params=DefaultDifferenceFPParams)
ChemicalReaction * | RxnBlockToChemicalReaction (const std::string &rxnBlock)
| Parse a text block in MDL rxn format into a ChemicalReaction. More...
ChemicalReaction * | RxnFileToChemicalReaction (const std::string &fileName)
| Parse a file in MDL rxn format into a ChemicalReaction. More...
ChemicalReaction * | RxnDataStreamToChemicalReaction (std::istream &rxnStream, unsigned int &line)
| Parse a text stream in MDL rxn format into a ChemicalReaction. More...
ChemicalReaction * | RxnSmartsToChemicalReaction (const std::string &text, std::map< std::string, std::string > *replacements=0, bool useSmiles=false)
| Parse a string containing "Reaction SMARTS" into a ChemicalReaction. More...
ChemicalReaction * | RxnMolToChemicalReaction (const ROMol &mol)
| Parse a ROMol into a ChemicalReaction, RXN role must be set before. More...
std::string | ChemicalReactionToRxnSmarts (const ChemicalReaction &rxn)
| returns the reaction SMARTS for a reaction More...
std::string | ChemicalReactionToRxnSmiles (const ChemicalReaction &rxn, bool canonical=true)
| returns the reaction SMILES for a reaction More...
std::string | ChemicalReactionToRxnBlock (const ChemicalReaction &rxn, bool separateAgents=false)
| returns an RXN block for a reaction More...
ROMol * | ChemicalReactionToRxnMol (const ChemicalReaction &rxn)
| returns a ROMol with RXN roles used to describe the reaction More...
std::vector< MOL_SPTR_VECT > | run_Reactants (const ChemicalReaction &rxn, const MOL_SPTR_VECT &reactants)
| Runs the reaction on a set of reactants. More...
MOL_SPTR_VECT::const_iterator | getStartIterator (const ChemicalReaction &rxn, ReactionMoleculeType t)
MOL_SPTR_VECT::const_iterator | getEndIterator (const ChemicalReaction &rxn, ReactionMoleculeType t)
bool | hasReactantTemplateSubstructMatch (const ChemicalReaction &rxn, const ChemicalReaction &query_rxn)
bool | hasProductTemplateSubstructMatch (const ChemicalReaction &rxn, const ChemicalReaction &query_rxn)
bool | hasAgentTemplateSubstructMatch (const ChemicalReaction &rxn, const ChemicalReaction &query_rxn)
bool | hasReactionSubstructMatch (const ChemicalReaction &rxn, const ChemicalReaction &query_rxn, bool includeAgents=false)
bool | hasReactionAtomMapping (const ChemicalReaction &rxn)
bool | isReactionTemplateMoleculeAgent (const ROMol &mol, double agentThreshold)
void | updateProductsStereochem (ChemicalReaction *rxn)
ROMol * | deleteSubstructs (const ROMol &mol, const ROMol &query, bool onlyFrags=false)
| Returns a copy of an ROMol with the atoms and bonds that match a pattern removed. More...
std::vector< ROMOL_SPTR > | replaceSubstructs (const ROMol &mol, const ROMol &query, const ROMol &replacement, bool replaceAll=false, unsigned int replacementConnectionPoint=0)
| Returns a list of copies of an ROMol with the atoms and bonds that match a pattern replaced with the atoms contained in another molecule. More...
ROMol * | replaceSidechains (const ROMol &mol, const ROMol &coreQuery)
| Returns a copy of an ROMol with the atoms and bonds that don't fall within a substructure match removed. More...
ROMol * | replaceCore (const ROMol &mol, const ROMol &coreQuery, bool replaceDummies=true, bool labelByIndex=false, bool requireDummyMatch=false)
| Returns a copy of an ROMol with the atoms and bonds that do fall within a substructure match removed. More...
ROMol * | MurckoDecompose (const ROMol &mol)
| Carries out a Murcko decomposition on the molecule provided. More...
ROMol * | combineMols (const ROMol &mol1, const ROMol &mol2, RDGeom::Point3D offset=RDGeom::Point3D(0, 0, 0))
| Combined two molecules to create a new one. More...
void | addRecursiveQueries (ROMol &mol, const std::map< std::string, ROMOL_SPTR > &queries, std::string propName, std::vector< std::pair< unsigned int, std::string > > *reactantLabels=NULL)
| Adds named recursive queries to a molecule's atoms based on atom labels. More...
void | parseQueryDefFile (std::string filename, std::map< std::string, ROMOL_SPTR > &queryDefs, bool standardize=true, std::string delimiter="\t", std::string comment="//", unsigned int nameColumn=0, unsigned int smartsColumn=1)
| parses a query definition file and sets up a set of definitions suitable for use by addRecursiveQueries() More...
void | parseQueryDefFile (std::istream *inStream, std::map< std::string, ROMOL_SPTR > &queryDefs, bool standardize=true, std::string delimiter="\t", std::string comment="//", unsigned int nameColumn=0, unsigned int smartsColumn=1)
void | parseQueryDefText (const std::string &queryDefText, std::map< std::string, ROMOL_SPTR > &queryDefs, bool standardize=true, std::string delimiter="\t", std::string comment="//", unsigned int nameColumn=0, unsigned int smartsColumn=1)
| equivalent to parseQueryDefFile() but the query definitions are explicitly passed in More...
std::string | strip (const std::string &orig)
RWMol * | MolDataStreamToMol (std::istream *inStream, unsigned int &line, bool sanitize=true, bool removeHs=true, bool strictParsing=true)
RWMol * | MolDataStreamToMol (std::istream &inStream, unsigned int &line, bool sanitize=true, bool removeHs=true, bool strictParsing=true)
RWMol * | MolBlockToMol (const std::string &molBlock, bool sanitize=true, bool removeHs=true, bool strictParsing=true)
RWMol * | MolFileToMol (std::string fName, bool sanitize=true, bool removeHs=true, bool strictParsing=true)
std::string | MolToMolBlock (const ROMol &mol, bool includeStereo=true, int confId=-1, bool kekulize=true, bool forceV3000=false)
void | MolToMolFile (const ROMol &mol, std::string fName, bool includeStereo=true, int confId=-1, bool kekulize=true, bool forceV3000=false)
RWMol * | TPLDataStreamToMol (std::istream *inStream, unsigned int &line, bool sanitize=true, bool skipFirstConf=false)
| translate TPL data (BioCad format) into a multi-conf molecule More...
RWMol * | TPLFileToMol (std::string fName, bool sanitize=true, bool skipFirstConf=false)
| construct a multi-conf molecule from a TPL (BioCad format) file More...
std::string | MolToTPLText (const ROMol &mol, std::string partialChargeProp="_GasteigerCharge", bool writeFirstConfTwice=false)
void | MolToTPLFile (const ROMol &mol, std::string fName, std::string partialChargeProp="_GasteigerCharge", bool writeFirstConfTwice=false)
RWMol * | Mol2FileToMol (std::string fName, bool sanitize=true, bool removeHs=true, Mol2Type variant=CORINA)
RWMol * | Mol2DataStreamToMol (std::istream *inStream, bool sanitize=true, bool removeHs=true, Mol2Type variant=CORINA)
RWMol * | Mol2DataStreamToMol (std::istream &inStream, bool sanitize=true, bool removeHs=true, Mol2Type variant=CORINA)
RWMol * | Mol2BlockToMol (const std::string &molBlock, bool sanitize=true, bool removeHs=true, Mol2Type variant=CORINA)
RWMol * | PDBBlockToMol (const char *str, bool sanitize=true, bool removeHs=true, unsigned int flavor=0)
RWMol * | PDBBlockToMol (const std::string &str, bool sanitize=true, bool removeHs=true, unsigned int flavor=0)
RWMol * | PDBDataStreamToMol (std::istream *inStream, bool sanitize=true, bool removeHs=true, unsigned int flavor=0)
RWMol * | PDBDataStreamToMol (std::istream &inStream, bool sanitize=true, bool removeHs=true, unsigned int flavor=0)
RWMol * | PDBFileToMol (const std::string &fname, bool sanitize=true, bool removeHs=true, unsigned int flavor=0)
std::string | MolToPDBBlock (const ROMol &mol, int confId=-1, unsigned int flavor=0)
void | MolToPDBFile (const ROMol &mol, const std::string &fname, int confId=-1, unsigned int flavor=0)
void | DetectAtomStereoChemistry (RWMol &mol, const Conformer *conf)
void | DetectBondStereoChemistry (ROMol &mol, const Conformer *conf)
void | WedgeMolBonds (ROMol &mol, const Conformer *conf)
INT_MAP_INT | pickBondsToWedge (const ROMol &mol)
void | ClearSingleBondDirFlags (ROMol &mol)
Bond::BondDir | DetermineBondWedgeState (const Bond *bond, const INT_MAP_INT &wedgeBonds, const Conformer *conf)
void | ConnectTheDots (RWMol *mol)
void | StandardPDBResidueBondOrders (RWMol *mol)

ExplicitBitVect *

RDKFingerprintMol (const ROMol &mol, unsigned int minPath=1, unsigned int maxPath=7, unsigned int fpSize=2048, unsigned int nBitsPerHash=2, bool useHs=true, double tgtDensity=0.0, unsigned int minSize=128, bool branchedPaths=true, bool useBondOrder=true, std::vector< boost::uint32_t > *atomInvariants=0, const std::vector< boost::uint32_t > *fromAtoms=0, std::vector< std::vector< boost::uint32_t > > *atomBits=0)

| Generates a topological (Daylight like) fingerprint for a molecule using an alternate (faster) hashing algorithm. More...
ExplicitBitVect * | LayeredFingerprintMol (const ROMol &mol, unsigned int layerFlags=0xFFFFFFFF, unsigned int minPath=1, unsigned int maxPath=7, unsigned int fpSize=2048, std::vector< unsigned int > *atomCounts=0, ExplicitBitVect *setOnlyBits=0, bool branchedPaths=true, const std::vector< boost::uint32_t > *fromAtoms=0)
| Generates a topological (Daylight like) fingerprint for a molecule using a layer-based hashing algorithm. More...
ExplicitBitVect * | PatternFingerprintMol (const ROMol &mol, unsigned int fpSize=2048, std::vector< unsigned int > *atomCounts=0, ExplicitBitVect *setOnlyBits=0)
| Generates a topological fingerprint for a molecule using a series of pre-defined structural patterns. More...
bool | MCSAtomCompareAny (const MCSAtomCompareParameters &p, const ROMol &mol1, unsigned int atom1, const ROMol &mol2, unsigned int atom2, void *userData)
bool | MCSAtomCompareElements (const MCSAtomCompareParameters &p, const ROMol &mol1, unsigned int atom1, const ROMol &mol2, unsigned int atom2, void *userData)
bool | MCSAtomCompareIsotopes (const MCSAtomCompareParameters &p, const ROMol &mol1, unsigned int atom1, const ROMol &mol2, unsigned int atom2, void *userData)
bool | MCSBondCompareAny (const MCSBondCompareParameters &p, const ROMol &mol1, unsigned int bond1, const ROMol &mol2, unsigned int bond2, void *userData)
bool | MCSBondCompareOrder (const MCSBondCompareParameters &p, const ROMol &mol1, unsigned int bond1, const ROMol &mol2, unsigned int bond2, void *userData)
bool | MCSBondCompareOrderExact (const MCSBondCompareParameters &p, const ROMol &mol1, unsigned int bond1, const ROMol &mol2, unsigned int bond2, void *userData)
bool | MCSProgressCallbackTimeout (const MCSProgressData &stat, const MCSParameters &params, void *userData)
void | parseMCSParametersJSON (const char *json, MCSParameters *params)
MCSResult | findMCS (const std::vector< ROMOL_SPTR > &mols, const MCSParameters *params=0)
MCSResult | findMCS_P (const std::vector< ROMOL_SPTR > &mols, const char *params_json)
MCSResult | findMCS (const std::vector< ROMOL_SPTR > &mols, bool maximizeBonds, double threshold=1.0, unsigned timeout=3600, bool verbose=false, bool matchValences=false, bool ringMatchesRingOnly=false, bool completeRingsOnly=false, bool matchChiralTag=false, AtomComparator atomComp=AtomCompareElements, BondComparator bondComp=BondCompareOrder)
bool | FinalChiralityCheckFunction (const short unsigned c1[], const short unsigned c2[], const ROMol &mol1, const FMCS::Graph &query, const ROMol &mol2, const FMCS::Graph &target, const MCSParameters *p)
MOL_SPTR_VECT | readFuncGroups (std::string fileName)
MOL_SPTR_VECT | readFuncGroups (std::istream &inStream, int nToRead=-1)
MatchVectType | findFuncGroupsOnMol (const ROMol &mol, const FragCatParams *params, INT_VECT &fgBonds)
ROMol * | prepareMol (const ROMol &mol, const FragCatParams *fparams, MatchVectType &aToFmap)
int | parseFeatureData (const std::string &defnText, MolChemicalFeatureDef::CollectionType &featDefs)
int | parseFeatureData (std::istream &istream, MolChemicalFeatureDef::CollectionType &featDefs)
int | parseFeatureFile (const std::string &fileName, MolChemicalFeatureDef::CollectionType &featDefs)
MolChemicalFeatureFactory * | buildFeatureFactory (std::istream &inStream)
| constructs a MolChemicalFeatureFactory from the data in a stream More...
MolChemicalFeatureFactory * | buildFeatureFactory (const std::string &featureData)
| constructs a MolChemicalFeatureFactory from the data in a string More...
void | computeGasteigerCharges (const ROMol *mol, int nIter=12, bool throwOnParamFailure=false)
void | computeGasteigerCharges (const ROMol &mol, int nIter=12, bool throwOnParamFailure=false)
void | computeGasteigerCharges (const ROMol &mol, std::vector< double > &charges, int nIter=12, bool throwOnParamFailure=false)
static int | queryAtomAromatic (Atom const *at)
static int | queryAtomAliphatic (Atom const *at)
static int | queryAtomExplicitDegree (Atom const *at)
static int | queryAtomTotalDegree (Atom const *at)
static int | queryAtomHeavyAtomDegree (Atom const *at)
static int | queryAtomHCount (Atom const *at)
static int | queryAtomImplicitHCount (Atom const *at)
static int | queryAtomHasImplicitH (Atom const *at)
static int | queryAtomImplicitValence (Atom const *at)
static int | queryAtomExplicitValence (Atom const *at)
static int | queryAtomTotalValence (Atom const *at)
static int | queryAtomUnsaturated (Atom const *at)
static int | queryAtomNum (Atom const *at)
static int | queryAtomMass (Atom const *at)
static int | queryAtomIsotope (Atom const *at)
static int | queryAtomFormalCharge (Atom const *at)
static int | queryAtomHybridization (Atom const *at)
unsigned int | queryAtomBondProduct (Atom const *at)
unsigned int | queryAtomAllBondProduct (Atom const *at)
static int | queryBondOrder (Bond const *bond)
static int | queryBondDir (Bond const *bond)
static int | queryIsBondInNRings (Bond const *at)
static int | queryIsAtomInNRings (Atom const *at)
static int | queryIsAtomInRing (Atom const *at)
static int | queryAtomHasRingBond (Atom const *at)
static int | queryIsBondInRing (Bond const *bond)
static int | queryAtomMinRingSize (Atom const *at)
static int | queryBondMinRingSize (Bond const *bond)
static int | queryAtomRingBondCount (Atom const *at)
template<int tgt>
int | queryAtomIsInRingOfSize (Atom const *at)
template<int tgt>
int | queryBondIsInRingOfSize (Bond const *bond)
template<class T >
T * | makeAtomSimpleQuery (int what, int func(Atom const *), const std::string &description="Atom Simple")
template<class T >
T * | makeAtomNumQuery (int what, const std::string &descr)
| returns a Query for matching atomic number More...
ATOM_EQUALS_QUERY * | makeAtomNumQuery (int what)
template<class T >
T * | makeAtomImplicitValenceQuery (int what, const std::string &descr)
| returns a Query for matching implicit valence More...
ATOM_EQUALS_QUERY * | makeAtomImplicitValenceQuery (int what)
template<class T >
T * | makeAtomExplicitValenceQuery (int what, const std::string &descr)
| returns a Query for matching explicit valence More...
ATOM_EQUALS_QUERY * | makeAtomExplicitValenceQuery (int what)
template<class T >
T * | makeAtomTotalValenceQuery (int what, const std::string &descr)
| returns a Query for matching total valence More...
ATOM_EQUALS_QUERY * | makeAtomTotalValenceQuery (int what)
template<class T >
T * | makeAtomExplicitDegreeQuery (int what, const std::string &descr)
| returns a Query for matching explicit degree More...
ATOM_EQUALS_QUERY * | makeAtomExplicitDegreeQuery (int what)
template<class T >
T * | makeAtomTotalDegreeQuery (int what, const std::string &descr)
| returns a Query for matching atomic degree More...
ATOM_EQUALS_QUERY * | makeAtomTotalDegreeQuery (int what)
template<class T >
T * | makeAtomHCountQuery (int what, const std::string &descr)
| returns a Query for matching hydrogen count More...
ATOM_EQUALS_QUERY * | makeAtomHCountQuery (int what)
template<class T >
T * | makeAtomHasImplicitHQuery (const std::string &descr)
| returns a Query for matching ring atoms More...
ATOM_EQUALS_QUERY * | makeAtomHasImplicitHQuery ()
template<class T >
T * | makeAtomImplicitHCountQuery (int what, const std::string &descr)
| returns a Query for matching implicit hydrogen count More...
ATOM_EQUALS_QUERY * | makeAtomImplicitHCountQuery (int what)
template<class T >
T * | makeAtomAromaticQuery (const std::string &descr)
| returns a Query for matching the `isAromatic` flag More...
ATOM_EQUALS_QUERY * | makeAtomAromaticQuery ()
template<class T >
T * | makeAtomAliphaticQuery (const std::string &descr)
| returns a Query for matching aliphatic atoms More...
ATOM_EQUALS_QUERY * | makeAtomAliphaticQuery ()
template<class T >
T * | makeAtomMassQuery (int what, const std::string &descr)
| returns a Query for matching atoms with a particular mass More...
ATOM_EQUALS_QUERY * | makeAtomMassQuery (int what)
template<class T >
T * | makeAtomIsotopeQuery (int what, const std::string &descr)
| returns a Query for matching atoms with a particular isotope More...
ATOM_EQUALS_QUERY * | makeAtomIsotopeQuery (int what)
template<class T >
T * | makeAtomFormalChargeQuery (int what, const std::string &descr)
| returns a Query for matching formal charge More...
ATOM_EQUALS_QUERY * | makeAtomFormalChargeQuery (int what)
template<class T >
T * | makeAtomHybridizationQuery (int what, const std::string &descr)
| returns a Query for matching hybridization More...
ATOM_EQUALS_QUERY * | makeAtomHybridizationQuery (int what)
template<class T >
T * | makeAtomUnsaturatedQuery (const std::string &descr)
| returns a Query for matching atoms with unsaturation: More...
ATOM_EQUALS_QUERY * | makeAtomUnsaturatedQuery ()
template<class T >
T * | makeAtomInRingQuery (const std::string &descr)
| returns a Query for matching ring atoms More...
ATOM_EQUALS_QUERY * | makeAtomInRingQuery ()
template<class T >
T * | makeAtomInNRingsQuery (int what, const std::string &descr)
| returns a Query for matching atoms in a particular number of rings More...
ATOM_EQUALS_QUERY * | makeAtomInNRingsQuery (int what)
ATOM_EQUALS_QUERY * | makeAtomInRingOfSizeQuery (int tgt)
| returns a Query for matching atoms in rings of a particular size More...
template<class T >
T * | makeAtomMinRingSizeQuery (int tgt, const std::string &descr)
| returns a Query for matching an atom's minimum ring size More...
ATOM_EQUALS_QUERY * | makeAtomMinRingSizeQuery (int tgt)
template<class T >
T * | makeAtomRingBondCountQuery (int what, const std::string &descr)
| returns a Query for matching atoms with a particular number of ring bonds More...
ATOM_EQUALS_QUERY * | makeAtomRingBondCountQuery (int what)
template<class T >
T * | makeAtomHasRingBondQuery (const std::string &descr)
| returns a Query for matching atoms with a particular number of ring bonds More...
ATOM_EQUALS_QUERY * | makeAtomHasRingBondQuery ()
BOND_EQUALS_QUERY * | makeBondOrderEqualsQuery (Bond::BondType what)
| returns a Query for matching bond orders More...
BOND_EQUALS_QUERY * | makeBondDirEqualsQuery (Bond::BondDir what)
| returns a Query for matching bond directions More...
BOND_EQUALS_QUERY * | makeBondIsInRingQuery ()
| returns a Query for matching ring bonds More...
BOND_EQUALS_QUERY * | makeBondInRingOfSizeQuery (int what)
| returns a Query for matching bonds in rings of a particular size More...
BOND_EQUALS_QUERY * | makeBondMinRingSizeQuery (int what)
| returns a Query for matching a bond's minimum ring size More...
BOND_EQUALS_QUERY * | makeBondInNRingsQuery (int tgt)
| returns a Query for matching bonds in a particular number of rings More...
BOND_NULL_QUERY * | makeBondNullQuery ()
| returns a Query for matching any bond More...
ATOM_NULL_QUERY * | makeAtomNullQuery ()
| returns a Query for matching any atom More...
static int | queryAtomRingMembership (Atom const *at)
template<typename T >
int | nullDataFun (T arg)
template<typename T >
bool | nullQueryFun (T arg)
template<class Target >
Queries::EqualityQuery< int, const Target *, true > * | makeHasPropQuery (const std::string &property)
| returns a Query for matching atoms that have a particular property More...
template<class Target , class T >
Queries::EqualityQuery< int, const Target *, true > * | makePropQuery (const std::string &propname, const T &val, const T &tolerance=T())
RWMol * | SLNToMol (std::string smi, bool sanitize=true, int debugParse=0)
RWMol * | SLNQueryToMol (std::string smi, bool mergeHs=true, int debugParse=0)
std::string | MolToSmarts (ROMol &mol, bool doIsomericSmarts=false)
| returns the SMARTS for a molecule More...
RWMol * | SmilesToMol (std::string smi, int debugParse=0, bool sanitize=1, std::map< std::string, std::string > *replacements=0)
| Construct a molecule from a SMILES string. More...
RWMol * | SmartsToMol (std::string sma, int debugParse=0, bool mergeHs=false, std::map< std::string, std::string > *replacements=0)
| Construct a molecule from a SMARTS string. More...
std::string | MolToSmiles (const ROMol &mol, bool doIsomericSmiles=false, bool doKekule=false, int rootedAtAtom=-1, bool canonical=true, bool allBondsExplicit=false, bool allHsExplicit=false)
| returns canonical SMILES for a molecule More...
std::string | MolFragmentToSmiles (const ROMol &mol, const std::vector< int > &atomsToUse, const std::vector< int > *bondsToUse=0, const std::vector< std::string > *atomSymbols=0, const std::vector< std::string > *bondSymbols=0, bool doIsomericSmiles=false, bool doKekule=false, int rootedAtAtom=-1, bool canonical=true, bool allBondsExplicit=false, bool allHsExplicit=false)
| returns canonical SMILES for part of a molecule More...
INT_PATH_LIST_MAP | findAllSubgraphsOfLengthsMtoN (const ROMol &mol, unsigned int lowerLen, unsigned int upperLen, bool useHs=false, int rootedAtAtom=-1)
| find all bond subgraphs in a range of sizes More...
PATH_LIST | findAllSubgraphsOfLengthN (const ROMol &mol, unsigned int targetLen, bool useHs=false, int rootedAtAtom=-1)
| find all bond subgraphs of a particular size More...
PATH_LIST | findUniqueSubgraphsOfLengthN (const ROMol &mol, unsigned int targetLen, bool useHs=false, bool useBO=true, int rootedAtAtom=-1)
| find unique bond subgraphs of a particular size More...
PATH_LIST | findAllPathsOfLengthN (const ROMol &mol, unsigned int targetLen, bool useBonds=true, bool useHs=false, int rootedAtAtom=-1)
| find all paths of a particular size More...
INT_PATH_LIST_MAP | findAllPathsOfLengthsMtoN (const ROMol &mol, unsigned int lowerLen, unsigned int upperLen, bool useBonds=true, bool useHs=false, int rootedAtAtom=-1)
PATH_TYPE | findAtomEnvironmentOfRadiusN (const ROMol &mol, unsigned int radius, unsigned int rootedAtAtom, bool useHs=false)
| find bond subgraphs of a particular radius around an atom More...
bool | SubstructMatch (const ROMol &mol, const ROMol &query, MatchVectType &matchVect, bool recursionPossible=true, bool useChirality=false, bool useQueryQueryMatches=false)
| Find a substructure match for a query in a molecule. More...
unsigned int | SubstructMatch (const ROMol &mol, const ROMol &query, std::vector< MatchVectType > &matchVect, bool uniquify=true, bool recursionPossible=true, bool useChirality=false, bool useQueryQueryMatches=false, unsigned int maxMatches=1000)
| Find all substructure matches for a query in a molecule. More...
double | toPrime (const MatchVectType &v)
void | removeDuplicates (std::vector< MatchVectType > &v, unsigned int nAtoms)
bool | atomCompat (const ATOM_SPTR &a1, const ATOM_SPTR &a2, bool useQueryQueryMatches=false)
bool | chiralAtomCompat (const ATOM_SPTR &a1, const ATOM_SPTR &a2)
bool | bondCompat (const BOND_SPTR &b1, const BOND_SPTR &b2, bool useQueryQueryMatches=false)
DiscreteDistMat * | getDiscreteDistMat ()
unsigned int | computeL1Norm (const DiscreteValueVect &v1, const DiscreteValueVect &v2)
DiscreteValueVect | operator+ (const DiscreteValueVect &p1, const DiscreteValueVect &p2)
DiscreteValueVect | operator- (const DiscreteValueVect &p1, const DiscreteValueVect &p2)
template<typename IndexType , typename SequenceType >
void | updateFromSequence (SparseIntVect< IndexType > &vect, const SequenceType &seq)
template<typename IndexType >
double | DiceSimilarity (const SparseIntVect< IndexType > &v1, const SparseIntVect< IndexType > &v2, bool returnDistance=false, double bounds=0.0)
template<typename IndexType >
double | TverskySimilarity (const SparseIntVect< IndexType > &v1, const SparseIntVect< IndexType > &v2, double a, double b, bool returnDistance=false, double bounds=0.0)
template<typename IndexType >
double | TanimotoSimilarity (const SparseIntVect< IndexType > &v1, const SparseIntVect< IndexType > &v2, bool returnDistance=false, double bounds=0.0)
template<typename CompareFunc >
bool | hanoi (int *base, int nel, int *temp, int *count, int *changed, CompareFunc compar)
template<typename CompareFunc >
void | hanoisort (int *base, int nel, int *count, int *changed, CompareFunc compar)
template<class T , unsigned int size>
T | SwapBytes (T value)
template<EEndian from, EEndian to, class T >
T | EndianSwapBytes (T value)
template<EEndian from, EEndian to>
char | EndianSwapBytes (char value)
template<EEndian from, EEndian to>
unsigned char | EndianSwapBytes (unsigned char value)
template<EEndian from, EEndian to>
signed char | EndianSwapBytes (signed char value)
void | appendPackedIntToStream (std::stringstream &ss, boost::uint32_t num)
| Packs an integer and outputs it to a stream. More...
boost::uint32_t | readPackedIntFromStream (std::stringstream &ss)
| Reads an integer from a stream in packed format and returns the result. More...
boost::uint32_t | pullPackedIntFromString (const char *&text)
template<typename T >
void | streamWrite (std::ostream &ss, const T &val)
| does a binary write of an object to a stream More...
template<typename T >
void | streamRead (std::istream &ss, T &loc)
| does a binary read of an object from a stream More...
std::string | getLine (std::istream *inStream)
| grabs the next line from an instream and returns it. More...
std::string | getLine (std::istream &inStream)
| grabs the next line from an instream and returns it. More...
void | Union (const INT_VECT &r1, const INT_VECT &r2, INT_VECT &res)
| calculate the union of two INT_VECTs and put the results in a third vector More...
void | Intersect (const INT_VECT &r1, const INT_VECT &r2, INT_VECT &res)
| calculate the intersection of two INT_VECTs and put the results in a third vector More...
void | Union (const VECT_INT_VECT &rings, INT_VECT &res, const INT_VECT *exclude=NULL)
| calculating the union of the INT_VECT's in a VECT_INT_VECT More...
int | nextCombination (INT_VECT &comb, int tot)
| given a current combination of numbers change it to the next possible combination More...
double | round (double v)
| rounds a value to the closest int More...
double | computeIntVectPrimesProduct (const INT_VECT &ring)
| compute the product of the set of primes corresponding to the values in an INT_VECT More...
bool | feq (double v1, double v2, double tol=1e-4)
| floating point comparison with a tolerance More...
rng_type & | getRandomGenerator (int seed=-1)
| Optionally seed and return a reference to the global (Boost) random generator. More...
double | getRandomVal (int seed=-1)
double_source_type & | getDoubleRandomSource ()
| return a reference to the global (Boost) random source More...
template<class T >
unsigned int | countSwapsToInterconvert (const T &ref, T probe)

## Variables

const std::string | periodicTableAtomData
const std::string | isotopesAtomData []
const int | MOLFILE_MAXLINE =256
static int | defaultConfId =-1
const std::string | RDKFingerprintMolVersion ="2.0.0"
const unsigned int | maxFingerprintLayers =10
const std::string | LayeredFingerprintMolVersion ="0.7.0"
const unsigned int | substructLayers =0x07
std::string | paramData
std::string | additionalParamData
const double | IONXH = 20.02
const double | DAMP_SCALE = 0.5
const double | DAMP = 0.5
static int | massIntegerConversionFactor =1000
const int | ci_RIGHTMOST_ATOM
const int | ci_LEADING_BOND
const int | ci_ATOM_HOLDER
const int | NUM_PRIMES_AVAIL = 1000
| the number of primes available and stored More...
int | firstThousandPrimes [NUM_PRIMES_AVAIL]
const unsigned int | BITS_PER_INT =32
const double | MAX_DOUBLE = std::numeric_limits<double>::max()
const double | EPS_DOUBLE = std::numeric_limits<double>::epsilon()
const double | SMALL_DOUBLE = 1.0e-8
const double | MAX_INT = static_cast<double>(std::numeric_limits<int>::max())
const double | MAX_LONGINT = static_cast<double>(std::numeric_limits<LONGINT>::max())
const int | FILE_MAXLINE =256
| an assumed maximum length for lines read from files More...
const char * | rdkitVersion ="2015.03.1"
const char * | boostVersion ="1_58"

## Detailed Description

Includes a bunch of functionality for handling Atom and Bond queries.

Std stuff.

## Typedef Documentation

typedef Queries::AndQuery<int,Atom const *,true> RDKit::ATOM_AND_QUERY

Definition at line 30 of file QueryOps.h.

typedef Queries::Query<bool,Atom const *,true> RDKit::ATOM_BOOL_QUERY

Definition at line 27 of file QueryOps.h.

typedef Queries::EqualityQuery<int,Atom const *,true> RDKit::ATOM_EQUALS_QUERY

Definition at line 39 of file QueryOps.h.

typedef Queries::GreaterQuery<int,Atom const *,true> RDKit::ATOM_GREATER_QUERY

Definition at line 42 of file QueryOps.h.

typedef Queries::GreaterEqualQuery<int,Atom const *,true> RDKit::ATOM_GREATEREQUAL_QUERY

Definition at line 45 of file QueryOps.h.

typedef Queries::LessQuery<int,Atom const *,true> RDKit::ATOM_LESS_QUERY

Definition at line 48 of file QueryOps.h.

typedef Queries::LessEqualQuery<int,Atom const *,true> RDKit::ATOM_LESSEQUAL_QUERY

Definition at line 51 of file QueryOps.h.

typedef Queries::Query<int,Atom const *,true> RDKit::ATOM_NULL_QUERY

Definition at line 61 of file QueryOps.h.

typedef Queries::OrQuery<int,Atom const *,true> RDKit::ATOM_OR_QUERY

Definition at line 33 of file QueryOps.h.

typedef Queries::EqualityQuery< int,Atom const *,true> RDKit::ATOM_PROP_QUERY

Definition at line 529 of file QueryOps.h.

typedef Queries::RangeQuery<int,Atom const *,true> RDKit::ATOM_RANGE_QUERY

Definition at line 54 of file QueryOps.h.

typedef Queries::SetQuery<int,Atom const *,true> RDKit::ATOM_SET_QUERY

Definition at line 57 of file QueryOps.h.

typedef boost::shared_ptr< Atom > RDKit::ATOM_SPTR

Definition at line 26 of file Bond.h.

typedef Queries::XOrQuery<int,Atom const *,true> RDKit::ATOM_XOR_QUERY

Definition at line 36 of file QueryOps.h.

typedef boost::uint16_t RDKit::atomindex_t

Definition at line 13 of file details.h.

typedef Queries::AndQuery<int,Bond const *,true> RDKit::BOND_AND_QUERY

Definition at line 31 of file QueryOps.h.

typedef Queries::Query<bool,Bond const *,true> RDKit::BOND_BOOL_QUERY

Definition at line 28 of file QueryOps.h.

typedef Queries::EqualityQuery<int,Bond const *,true> RDKit::BOND_EQUALS_QUERY

Definition at line 40 of file QueryOps.h.

typedef Queries::GreaterQuery<int,Bond const *,true> RDKit::BOND_GREATER_QUERY

Definition at line 43 of file QueryOps.h.

typedef Queries::GreaterEqualQuery<int,Bond const *,true> RDKit::BOND_GREATEREQUAL_QUERY

Definition at line 46 of file QueryOps.h.

typedef Queries::LessQuery<int,Bond const *,true> RDKit::BOND_LESS_QUERY

Definition at line 49 of file QueryOps.h.

typedef Queries::LessEqualQuery<int,Bond const *,true> RDKit::BOND_LESSEQUAL_QUERY

Definition at line 52 of file QueryOps.h.

typedef Queries::Query<int,Bond const *,true> RDKit::BOND_NULL_QUERY

Definition at line 60 of file QueryOps.h.

typedef Queries::OrQuery<int,Bond const *,true> RDKit::BOND_OR_QUERY

Definition at line 34 of file QueryOps.h.

typedef Queries::EqualityQuery< int,Bond const *,true> RDKit::BOND_PROP_QUERY

Definition at line 531 of file QueryOps.h.

typedef Queries::RangeQuery<int,Bond const *,true> RDKit::BOND_RANGE_QUERY

Definition at line 55 of file QueryOps.h.

typedef Queries::SetQuery<int,Bond const *,true> RDKit::BOND_SET_QUERY

Definition at line 58 of file QueryOps.h.

typedef boost::shared_ptr< Bond > RDKit::BOND_SPTR

Definition at line 38 of file ROMol.h.

typedef Queries::XOrQuery<int,Bond const *,true> RDKit::BOND_XOR_QUERY

Definition at line 37 of file QueryOps.h.

typedef boost::shared_ptr<Conformer> RDKit::CONFORMER_SPTR

Definition at line 135 of file Conformer.h.

typedef Atom const* RDKit::ConstAtomPtr

Definition at line 374 of file QueryOps.h.

typedef Bond const* RDKit::ConstBondPtr

Definition at line 486 of file QueryOps.h.

typedef std::vector<unsigned int> RDKit::DashPattern

Definition at line 38 of file MolDraw2D.h.

typedef std::map<double, int, ltDouble> RDKit::DOUBLE_INT_MAP

std::map from double to integer.

Definition at line 217 of file types.h.

typedef boost::variate_generator<rng_type &,uniform_double> RDKit::double_source_type

Definition at line 36 of file utils.h.

typedef std::vector<double> RDKit::DOUBLE_VECT

Definition at line 172 of file types.h.

typedef DOUBLE_VECT::const_iterator RDKit::DOUBLE_VECT_CI

Definition at line 174 of file types.h.

typedef DOUBLE_VECT::iterator RDKit::DOUBLE_VECT_I

Definition at line 173 of file types.h.

typedef boost::tuple<float,float,float> RDKit::DrawColour

Definition at line 37 of file MolDraw2D.h.

typedef boost::shared_ptr<MolChemicalFeature> RDKit::FeatSPtr

Definition at line 18 of file MolChemicalFeatureFactory.h.

typedef std::list< FeatSPtr > RDKit::FeatSPtrList

Definition at line 20 of file MolChemicalFeatureFactory.h.

typedef FeatSPtrList::iterator RDKit::FeatSPtrList_I

Definition at line 21 of file MolChemicalFeatureFactory.h.

typedef RDCatalog::HierarchCatalog< FragCatalogEntry, FragCatParams, int > RDKit::FragCatalog

Definition at line 19 of file FragCatGenerator.h.

typedef std::deque<int> RDKit::INT_DEQUE

Definition at line 189 of file types.h.

typedef INT_DEQUE::const_iterator RDKit::INT_DEQUE_CI

Definition at line 191 of file types.h.

typedef INT_DEQUE::iterator RDKit::INT_DEQUE_I

Definition at line 190 of file types.h.

typedef std::map<int, INT_DEQUE> RDKit::INT_INT_DEQ_MAP

Definition at line 193 of file types.h.

typedef INT_INT_DEQ_MAP::const_iterator RDKit::INT_INT_DEQ_MAP_CI

Definition at line 194 of file types.h.

typedef std::map<int, INT_VECT> RDKit::INT_INT_VECT_MAP

Definition at line 182 of file types.h.

typedef INT_INT_VECT_MAP::const_iterator RDKit::INT_INT_VECT_MAP_CI

Definition at line 183 of file types.h.

typedef std::list<int> RDKit::INT_LIST

Definition at line 152 of file types.h.

typedef INT_LIST::const_iterator RDKit::INT_LIST_CI

Definition at line 154 of file types.h.

typedef INT_LIST::iterator RDKit::INT_LIST_I

Definition at line 153 of file types.h.

typedef std::map<int, int> RDKit::INT_MAP_INT

Definition at line 185 of file types.h.

typedef INT_MAP_INT::const_iterator RDKit::INT_MAP_INT_CI

Definition at line 187 of file types.h.

typedef INT_MAP_INT::iterator RDKit::INT_MAP_INT_I

Definition at line 186 of file types.h.

typedef std::map<int, PATH_LIST> RDKit::INT_PATH_LIST_MAP

Definition at line 45 of file Subgraphs.h.

typedef INT_PATH_LIST_MAP::const_iterator RDKit::INT_PATH_LIST_MAP_CI

Definition at line 46 of file Subgraphs.h.

typedef INT_PATH_LIST_MAP::iterator RDKit::INT_PATH_LIST_MAP_I

Definition at line 47 of file Subgraphs.h.

typedef std::set<int> RDKit::INT_SET

Definition at line 196 of file types.h.

typedef INT_SET::const_iterator RDKit::INT_SET_CI

Definition at line 198 of file types.h.

typedef INT_SET::iterator RDKit::INT_SET_I

Definition at line 197 of file types.h.

typedef boost::variate_generator<rng_type &,uniform_int> RDKit::int_source_type

Definition at line 35 of file utils.h.

typedef std::vector<int> RDKit::INT_VECT

Definition at line 146 of file types.h.

typedef INT_VECT::const_iterator RDKit::INT_VECT_CI

Definition at line 148 of file types.h.

typedef INT_VECT::const_reverse_iterator RDKit::INT_VECT_CRI

Definition at line 150 of file types.h.

typedef INT_VECT::iterator RDKit::INT_VECT_I

Definition at line 147 of file types.h.

typedef INT_VECT::reverse_iterator RDKit::INT_VECT_RI

Definition at line 149 of file types.h.

typedef std::vector<double> RDKit::INVAR_VECT

Definition at line 25 of file MolOps.h.

typedef INVAR_VECT::const_iterator RDKit::INVAR_VECT_CI

Definition at line 28 of file MolOps.h.

typedef INVAR_VECT::iterator RDKit::INVAR_VECT_I

Definition at line 27 of file MolOps.h.

typedef std::list<INT_VECT> RDKit::LIST_INT_VECT

Definition at line 156 of file types.h.

typedef LIST_INT_VECT::const_iterator RDKit::LIST_INT_VECT_CI

Definition at line 158 of file types.h.

typedef LIST_INT_VECT::iterator RDKit::LIST_INT_VECT_I

Definition at line 157 of file types.h.

typedef long long int RDKit::LONGINT

Definition at line 125 of file types.h.

typedef std::vector< std::pair< int, int > > RDKit::MatchVectType

used to return matches from substructure searching, The format is (queryAtomIdx, molAtomIdx)

Definition at line 22 of file FragFPGenerator.h.

typedef bool(* RDKit::MCSAtomCompareFunction) (const MCSAtomCompareParameters &p, const ROMol &mol1, unsigned int atom1, const ROMol &mol2, unsigned int atom2, void *userData)

Definition at line 37 of file FMCS.h.

typedef bool(* RDKit::MCSBondCompareFunction) (const MCSBondCompareParameters &p, const ROMol &mol1, unsigned int bond1, const ROMol &mol2, unsigned int bond2, void *userData)

Definition at line 38 of file FMCS.h.

typedef bool(* RDKit::MCSFinalMatchCheckFunction) (const short unsigned c1[], const short unsigned c2[], const ROMol &mol1, const FMCS::Graph &query, const ROMol &mol2, const FMCS::Graph &target, const MCSParameters *p)

Definition at line 35 of file FMCS.h.

typedef bool(* RDKit::MCSProgressCallback) (const MCSProgressData &stat, const MCSParameters &params, void *userData)

Definition at line 58 of file FMCS.h.

typedef std::vector<ROMol *> RDKit::MOL_PTR_VECT

Definition at line 750 of file ROMol.h.

typedef MOL_PTR_VECT::const_iterator RDKit::MOL_PTR_VECT_CI

Definition at line 753 of file ROMol.h.

typedef MOL_PTR_VECT::iterator RDKit::MOL_PTR_VECT_I

Definition at line 754 of file ROMol.h.

typedef std::vector< ROMOL_SPTR > RDKit::MOL_SPTR_VECT

Definition at line 20 of file FragCatParams.h.

typedef std::vector<ROMol> RDKit::MOL_VECT

Definition at line 748 of file ROMol.h.

typedef RDCatalog::HierarchCatalog<MolCatalogEntry, MolCatalogParams, int> RDKit::MolCatalog

a hierarchical catalog for holding molecules

Definition at line 15 of file MolCatalog.h.

typedef boost::adjacency_list< boost::vecS, boost::vecS, boost::undirectedS, ATOM_SPTR, BOND_SPTR> RDKit::MolGraph

This is the BGL type used to store the topology:

Definition at line 45 of file ROMol.h.

typedef std::list< PATH_TYPE > RDKit::PATH_LIST

Definition at line 42 of file Subgraphs.h.

typedef PATH_LIST::const_iterator RDKit::PATH_LIST_CI

Definition at line 43 of file Subgraphs.h.

typedef std::vector<int> RDKit::PATH_TYPE

Definition at line 37 of file Subgraphs.h.

typedef boost::minstd_rand RDKit::rng_type

Definition at line 32 of file utils.h.

typedef boost::shared_ptr< ROMol > RDKit::ROMOL_SPTR

Definition at line 20 of file ChemTransforms.h.

typedef boost::shared_ptr<RWMol> RDKit::RWMOL_SPTR

Definition at line 233 of file RWMol.h.

typedef std::vector< RWMOL_SPTR > RDKit::RWMOL_SPTR_VECT

Definition at line 30 of file FileParsers.h.

typedef std::map<std::string, UINT> RDKit::STR_UINT_MAP

Definition at line 179 of file types.h.

typedef std::map<std::string, UINT>::const_iterator RDKit::STR_UINT_MAP_CI

Definition at line 180 of file types.h.

typedef std::vector< std::string > RDKit::STR_VECT

Definition at line 26 of file Dict.h.

typedef std::vector<std::string>::const_iterator RDKit::STR_VECT_CI

Definition at line 167 of file types.h.

typedef std::vector<std::string>::iterator RDKit::STR_VECT_I

Definition at line 168 of file types.h.

typedef unsigned char RDKit::UCHAR

Definition at line 144 of file types.h.

typedef unsigned int RDKit::UINT

Definition at line 142 of file types.h.

typedef std::vector<UINT> RDKit::UINT_VECT

Definition at line 165 of file types.h.

typedef std::vector<UINT>::const_iterator RDKit::UINT_VECT_CI

Definition at line 164 of file types.h.

typedef boost::uniform_real RDKit::uniform_double

Definition at line 34 of file utils.h.

typedef boost::uniform_int RDKit::uniform_int

Definition at line 33 of file utils.h.

typedef unsigned short RDKit::USHORT

Definition at line 143 of file types.h.

typedef std::vector<DOUBLE_VECT> RDKit::VECT_DOUBLE_VECT

Definition at line 175 of file types.h.

typedef VECT_DOUBLE_VECT::const_iterator RDKit::VECT_DOUBLE_VECT_CI

Definition at line 177 of file types.h.

typedef VECT_DOUBLE_VECT::iterator RDKit::VECT_DOUBLE_VECT_I

Definition at line 176 of file types.h.

typedef std::vector<INT_VECT> RDKit::VECT_INT_VECT

Definition at line 160 of file types.h.

typedef VECT_INT_VECT::const_iterator RDKit::VECT_INT_VECT_CI

Definition at line 162 of file types.h.

typedef VECT_INT_VECT::iterator RDKit::VECT_INT_VECT_I

Definition at line 161 of file types.h.

## Enumeration Type Documentation

enum RDKit::AtomComparator

Enumerator
AtomCompareAny |
AtomCompareElements |
AtomCompareIsotopes |

Definition at line 105 of file FMCS.h.

enum RDKit::BondComparator

Enumerator
BondCompareAny |
BondCompareOrder |
BondCompareOrderExact |

Definition at line 110 of file FMCS.h.

enum RDKit::EEndian

Enumerator
LITTLE_ENDIAN_ORDER |
BIG_ENDIAN_ORDER |

Definition at line 24 of file StreamOps.h.

enum RDKit::FingerprintType

Enumerator
AtomPairFP |
TopologicalTorsion |
MorganFP |
RDKitFP |
PatternFP |

Definition at line 41 of file ReactionFingerprints.h.

enum RDKit::Mol2Type

Enumerator
CORINA |

Definition at line 153 of file FileParsers.h.

enum RDKit::ReactionMoleculeType

Enumerator
Reactant |
Product |
Agent |

Definition at line 39 of file ReactionUtils.h.

## Function Documentation

void RDKit::addRecursiveQueries | ( | ROMol & | mol,
|  | const std::map< std::string, ROMOL_SPTR > & | queries,
|  | std::string | propName,
|  | std::vector< std::pair< unsigned int, std::string > > * | reactantLabels = `NULL`
| ) |  |

Adds named recursive queries to a molecule's atoms based on atom labels.

Parameters

  mol | - the molecule to be modified
  queries | - the dictionary of named queries to add
  propName | - the atom property to use to get query names
  reactantLabels | - to store pairs of (atom index, query string)

NOTES:

- existing query information, if present, will be supplemented (AND logic)
- non-query atoms will be replaced with query atoms using only the query logic
- query names can be present as comma separated lists, they will then be combined using OR logic.
- throws a KeyErrorException if a particular query name is not present in `queries`

void RDKit::addRecursiveQueriesToReaction | ( | ChemicalReaction & | rxn,
|  | const std::map< std::string, ROMOL_SPTR > & | queries,
|  | std::string | propName,
|  | std::vector< std::vector< std::pair< unsigned int, std::string > > > * | reactantLabels = `NULL`
| ) |  |

add the recursive queries to the reactants of a reaction

This does its work using RDKit::addRecursiveQueries()

Parameters

  rxn | the reaction we are interested in
  queries | - the dictionary of named queries to add
  propName | - the atom property to use to get query names optional:
  reactantLabels | - to store pairs of (atom index, query string) per reactant

NOTES:

- existing query information, if present, will be supplemented (AND logic)
- non-query atoms will be replaced with query atoms using only the query logic
- query names can be present as comma separated lists, they will then be combined using OR logic.
- throws a KeyErrorException if a particular query name is not present in `queries`

void RDKit::appendPackedIntToStream | ( | std::stringstream & | ss,
|  | boost::uint32_t | num
| ) |  |

inline

Packs an integer and outputs it to a stream.

Definition at line 101 of file StreamOps.h.

References CHECK_INVARIANT.

bool RDKit::atomCompat | ( | const ATOM_SPTR & | a1,
|  | const ATOM_SPTR & | a2,
|  | bool | useQueryQueryMatches = `false`
| ) |  |

bool RDKit::bondCompat | ( | const BOND_SPTR & | b1,
|  | const BOND_SPTR & | b2,
|  | bool | useQueryQueryMatches = `false`
| ) |  |

MolChemicalFeatureFactory* RDKit::buildFeatureFactory | ( | std::istream & | inStream | ) |

constructs a MolChemicalFeatureFactory from the data in a stream

MolChemicalFeatureFactory* RDKit::buildFeatureFactory | ( | const std::string & | featureData | ) |

constructs a MolChemicalFeatureFactory from the data in a string

std::string RDKit::ChemicalReactionToRxnBlock | ( | const ChemicalReaction & | rxn,
|  | bool | separateAgents = `false`
| ) |  |

returns an RXN block for a reaction

Parameters

  rxn | chemical reaction
  separateAgents | flag to decide if agents were put in a seperate block, otherwise they were included in the reactants block (default)

ROMol* RDKit::ChemicalReactionToRxnMol | ( | const ChemicalReaction & | rxn | ) |

returns a ROMol with RXN roles used to describe the reaction

std::string RDKit::ChemicalReactionToRxnSmarts | ( | const ChemicalReaction & | rxn | ) |

returns the reaction SMARTS for a reaction

std::string RDKit::ChemicalReactionToRxnSmiles | ( | const ChemicalReaction & | rxn,
|  | bool | canonical = `true`
| ) |  |

returns the reaction SMILES for a reaction

bool RDKit::chiralAtomCompat | ( | const ATOM_SPTR & | a1,
|  | const ATOM_SPTR & | a2
| ) |  |

void RDKit::ClearSingleBondDirFlags | ( | ROMol & | mol | ) |

ROMol* RDKit::combineMols | ( | const ROMol & | mol1,
|  | const ROMol & | mol2,
|  | RDGeom::Point3D | offset = `RDGeom::Point3D(0, 0, 0)`
| ) |  |

Combined two molecules to create a new one.

Parameters

  mol1 | - the first ROMol to be combined
  mol2 | - the second ROMol to be combined
  offset | - a constant offset to be added to every atom position in mol2

Returns
  a new ROMol with the two molecules combined. The new molecule has not been sanitized. The client is responsible for deleting this molecule.

void RDKit::computeGasteigerCharges | ( | const ROMol * | mol,
|  | int | nIter = `12`,
|  | bool | throwOnParamFailure = `false`
| ) |  |

void RDKit::computeGasteigerCharges | ( | const ROMol & | mol,
|  | int | nIter = `12`,
|  | bool | throwOnParamFailure = `false`
| ) |  |

void RDKit::computeGasteigerCharges | ( | const ROMol & | mol,
|  | std::vector< double > & | charges,
|  | int | nIter = `12`,
|  | bool | throwOnParamFailure = `false`
| ) |  |

double RDKit::computeIntVectPrimesProduct | ( | const INT_VECT & | ring | ) |

compute the product of the set of primes corresponding to the values in an INT_VECT

unsigned int RDKit::computeL1Norm | ( | const DiscreteValueVect & | v1,
|  | const DiscreteValueVect & | v2
| ) |  |

void RDKit::ConnectTheDots | ( | RWMol * | mol | ) |

template<class T >

unsigned int RDKit::countSwapsToInterconvert | ( | const T & | ref,
|  | T | probe
| ) |  |

Definition at line 50 of file utils.h.

References CHECK_INVARIANT, and PRECONDITION.

const ReactionFingerprintParams RDKit::DefaultDifferenceFPParams | ( | true | ,
|  | 0. | 0,
|  | 10 | ,
|  | 1 | ,
|  | 2048 | ,
|  | AtomPairFP |
| ) |  |

const ReactionFingerprintParams RDKit::DefaultStructuralFPParams | ( | true | ,
|  | 0. | 2,
|  | 1 | ,
|  | 1 | ,
|  | 4096 | ,
|  | PatternFP |
| ) |  |

ROMol* RDKit::deleteSubstructs | ( | const ROMol & | mol,
|  | const ROMol & | query,
|  | bool | onlyFrags = `false`
| ) |  |

Returns a copy of an ROMol with the atoms and bonds that match a pattern removed.

Parameters

  mol | the ROMol of interest
  query | the query ROMol
  onlyFrags | if this is set, atoms will only be removed if the entire fragment in which they are found is matched by the query.

Returns
  a copy of `mol` with the matching atoms and bonds (if any) removed.

void RDKit::DetectAtomStereoChemistry | ( | RWMol & | mol,
|  | const Conformer * | conf
| ) |  |

void RDKit::DetectBondStereoChemistry | ( | ROMol & | mol,
|  | const Conformer * | conf
| ) |  |

Bond::BondDir RDKit::DetermineBondWedgeState | ( | const Bond * | bond,
|  | const INT_MAP_INT & | wedgeBonds,
|  | const Conformer * | conf
| ) |  |

template<typename IndexType >

double RDKit::DiceSimilarity | ( | const SparseIntVect< IndexType > & | v1,
|  | const SparseIntVect< IndexType > & | v2,
|  | bool | returnDistance = `false`,
|  | double | bounds = `0.0`
| ) |  |

Definition at line 471 of file SparseIntVect.h.

References RDKit::SparseIntVect< IndexType >::getLength(), and RDKit::SparseIntVect< IndexType >::getTotalVal().

SparseIntVect<boost::uint32_t>* RDKit::DifferenceFingerprintChemReaction | ( | const ChemicalReaction & | rxn,
|  | const ReactionFingerprintParams & | params = `DefaultDifferenceFPParams`
| ) |  |

Generates a difference fingerprint for a reaction to use in similarity search of reactions

A difference fingerprint is generated as a SparseIntVect to use for similarity search of reactions. By default the fingerprint is generated as 2048 bit hashed fingerprint subtracting AtompairFP of the reactants from the products' AtompairFP and tentatively the agent AtompairFP is added

Parameters

  rxn | the reaction to be fingerprinted
  params | specific settings to manipulate fingerprint generation

Returns
  the reaction fingerprint, as an SparseIntVec

Notes:

- the caller is responsible for `delete`ing the result

template<EEndian from, EEndian to, class T >

T RDKit::EndianSwapBytes | ( | T | value | ) |

inline

Definition at line 68 of file StreamOps.h.

template<EEndian from, EEndian to>

char RDKit::EndianSwapBytes | ( | char | value | ) |

inline

Definition at line 84 of file StreamOps.h.

template<EEndian from, EEndian to>

unsigned char RDKit::EndianSwapBytes | ( | unsigned char | value | ) |

inline

Definition at line 89 of file StreamOps.h.

template<EEndian from, EEndian to>

signed char RDKit::EndianSwapBytes | ( | signed char | value | ) |

inline

Definition at line 94 of file StreamOps.h.

bool RDKit::feq | ( | double | v1,
|  | double | v2,
|  | double | tol = `1e-4`
| ) |  |

floating point comparison with a tolerance

Referenced by RDPickers::MaxMinPicker::lazyPick().

bool RDKit::FinalChiralityCheckFunction | ( | const short unsigned | c1[],
|  | const short unsigned | c2[],
|  | const ROMol & | mol1,
|  | const FMCS::Graph & | query,
|  | const ROMol & | mol2,
|  | const FMCS::Graph & | target,
|  | const MCSParameters * | p
| ) |  |

PATH_LIST RDKit::findAllPathsOfLengthN | ( | const ROMol & | mol,
|  | unsigned int | targetLen,
|  | bool | useBonds = `true`,
|  | bool | useHs = `false`,
|  | int | rootedAtAtom = `-1`
| ) |  |

find all paths of a particular size

Parameters

  mol | - the molecule to be considered
  targetLen | - the length of the paths to be returned
  useBonds | - if set, the path indices will be bond indices, not atom indices
  useHs | - if set, hydrogens in the graph will be considered eligible to be in paths. NOTE: this will not add Hs to the graph.
  rootedAtAtom | - if non-negative, only subgraphs that start at this atom will be returned.

The result is a list of paths (i.e. list of list of bond indices)

INT_PATH_LIST_MAP RDKit::findAllPathsOfLengthsMtoN | ( | const ROMol & | mol,
|  | unsigned int | lowerLen,
|  | unsigned int | upperLen,
|  | bool | useBonds = `true`,
|  | bool | useHs = `false`,
|  | int | rootedAtAtom = `-1`
| ) |  |

PATH_LIST RDKit::findAllSubgraphsOfLengthN | ( | const ROMol & | mol,
|  | unsigned int | targetLen,
|  | bool | useHs = `false`,
|  | int | rootedAtAtom = `-1`
| ) |  |

find all bond subgraphs of a particular size

Parameters

  mol | - the molecule to be considered
  targetLen | - the length of the subgraphs to be returned
  useHs | - if set, hydrogens in the graph will be considered eligible to be in paths. NOTE: this will not add Hs to the graph.
  rootedAtAtom | - if non-negative, only subgraphs that start at this atom will be returned.

The result is a list of paths (i.e. list of list of bond indices)

INT_PATH_LIST_MAP RDKit::findAllSubgraphsOfLengthsMtoN | ( | const ROMol & | mol,
|  | unsigned int | lowerLen,
|  | unsigned int | upperLen,
|  | bool | useHs = `false`,
|  | int | rootedAtAtom = `-1`
| ) |  |

find all bond subgraphs in a range of sizes

Parameters

  mol | - the molecule to be considered
  lowerLen | - the minimum subgraph size to find
  upperLen | - the maximum subgraph size to find
  useHs | - if set, hydrogens in the graph will be considered eligible to be in paths. NOTE: this will not add Hs to the graph.
  rootedAtAtom | - if non-negative, only subgraphs that start at this atom will be returned.

The result is a map from subgraph size -> list of paths (i.e. list of list of bond indices)

PATH_TYPE RDKit::findAtomEnvironmentOfRadiusN | ( | const ROMol & | mol,
|  | unsigned int | radius,
|  | unsigned int | rootedAtAtom,
|  | bool | useHs = `false`
| ) |  |

find bond subgraphs of a particular radius around an atom

Parameters

  mol | - the molecule to be considered
  radius | - the radius of the subgraphs to be considered
  rootedAtAtom | - the atom to consider
  useHs | - if set, hydrogens in the graph will be considered eligible to be in paths. NOTE: this will not add Hs to the graph.

The result is a path (a vector of bond indices)

MatchVectType RDKit::findFuncGroupsOnMol | ( | const ROMol & | mol,
|  | const FragCatParams * | params,
|  | INT_VECT & | fgBonds
| ) |  |

MCSResult RDKit::findMCS | ( | const std::vector< ROMOL_SPTR > & | mols,
|  | const MCSParameters * | params = `0`
| ) |  |

MCSResult RDKit::findMCS | ( | const std::vector< ROMOL_SPTR > & | mols,
|  | bool | maximizeBonds,
|  | double | threshold = `1.0`,
|  | unsigned | timeout = `3600`,
|  | bool | verbose = `false`,
|  | bool | matchValences = `false`,
|  | bool | ringMatchesRingOnly = `false`,
|  | bool | completeRingsOnly = `false`,
|  | bool | matchChiralTag = `false`,
|  | AtomComparator | atomComp = `AtomCompareElements`,
|  | BondComparator | bondComp = `BondCompareOrder`
| ) |  |

MCSResult RDKit::findMCS_P | ( | const std::vector< ROMOL_SPTR > & | mols,
|  | const char * | params_json
| ) |  |

PATH_LIST RDKit::findUniqueSubgraphsOfLengthN | ( | const ROMol & | mol,
|  | unsigned int | targetLen,
|  | bool | useHs = `false`,
|  | bool | useBO = `true`,
|  | int | rootedAtAtom = `-1`
| ) |  |

find unique bond subgraphs of a particular size

Parameters

  mol | - the molecule to be considered
  targetLen | - the length of the subgraphs to be returned
  useHs | - if set, hydrogens in the graph will be considered eligible to be in paths. NOTE: this will not add Hs to the graph.
  useBO | - if set, bond orders will be considered when uniquifying the paths
  rootedAtAtom | - if non-negative, only subgraphs that start at this atom will be returned.

The result is a list of paths (i.e. list of list of bond indices)

DiscreteDistMat* RDKit::getDiscreteDistMat | ( |  | ) |

double_source_type& RDKit::getDoubleRandomSource | ( |  | ) |

return a reference to the global (Boost) random source

MOL_SPTR_VECT::const_iterator RDKit::getEndIterator | ( | const ChemicalReaction & | rxn,
|  | ReactionMoleculeType | t
| ) |  |

std::string RDKit::getLine | ( | std::istream * | inStream | ) |

inline

grabs the next line from an instream and returns it.

Definition at line 248 of file StreamOps.h.

Referenced by getLine().

std::string RDKit::getLine | ( | std::istream & | inStream | ) |

inline

grabs the next line from an instream and returns it.

Definition at line 257 of file StreamOps.h.

References getLine().

rng_type& RDKit::getRandomGenerator | ( | int | seed = `-1` | ) |

Optionally seed and return a reference to the global (Boost) random generator.

double RDKit::getRandomVal | ( | int | seed = `-1` | ) |

Return a random double value between 0.0 and 1.0 Optionally seed the random number generator

VECT_INT_VECT RDKit::getReactingAtoms | ( | const ChemicalReaction & | rxn,
|  | bool | mappedAtomsOnly = `false`
| ) |  |

returns indices of the atoms in each reactant that are changed in the reaction

Parameters

  rxn | the reaction we are interested in
  mappedAtomsOnly | if set, atoms that are not mapped will not be included in the list of changed atoms (otherwise they are automatically included)

How are changed atoms recognized? 1) Atoms whose degree changes 2) Atoms whose bonding pattern changes 3) unmapped atoms (unless the mappedAtomsOnly flag is set) 4) Atoms connected to unmapped atoms 5) Atoms whose atomic number changes (unless the corresponding product atom is a dummy) 6) Atoms with more than one atomic number query (unless the corresponding product atom is a dummy)

Note that the atomic number of a query atom depends on how it's constructed. When coming from SMARTS: if the first query is an atomic label/number that sets the atomic number, otherwise it's zero. For example [O;] is atomic number 8 while [;O] is atomic number 0. When coming from RXN: the atomic number of the atom in the rxn file sets the value.

MOL_SPTR_VECT::const_iterator RDKit::getStartIterator | ( | const ChemicalReaction & | rxn,
|  | ReactionMoleculeType | t
| ) |  |

template<typename CompareFunc >

bool RDKit::hanoi | ( | int * | base,
|  | int | nel,
|  | int * | temp,
|  | int * | count,
|  | int * | changed,
|  | CompareFunc | compar
| ) |  |

changed ||

changed ||

Definition at line 22 of file hanoiSort.h.

Referenced by hanoisort().

template<typename CompareFunc >

void RDKit::hanoisort | ( | int * | base,
|  | int | nel,
|  | int * | count,
|  | int * | changed,
|  | CompareFunc | compar
| ) |  |

Definition at line 126 of file hanoiSort.h.

References hanoi().

Referenced by RDKit::Canon::RefinePartitions().

bool RDKit::hasAgentTemplateSubstructMatch | ( | const ChemicalReaction & | rxn,
|  | const ChemicalReaction & | query_rxn
| ) |  |

bool RDKit::hasProductTemplateSubstructMatch | ( | const ChemicalReaction & | rxn,
|  | const ChemicalReaction & | query_rxn
| ) |  |

bool RDKit::hasReactantTemplateSubstructMatch | ( | const ChemicalReaction & | rxn,
|  | const ChemicalReaction & | query_rxn
| ) |  |

bool RDKit::hasReactionAtomMapping | ( | const ChemicalReaction & | rxn | ) |

bool RDKit::hasReactionSubstructMatch | ( | const ChemicalReaction & | rxn,
|  | const ChemicalReaction & | query_rxn,
|  | bool | includeAgents = `false`
| ) |  |

void RDKit::Intersect | ( | const INT_VECT & | r1,
|  | const INT_VECT & | r2,
|  | INT_VECT & | res
| ) |  |

calculate the intersection of two INT_VECTs and put the results in a third vector

bool RDKit::isMoleculeAgentOfReaction | ( | const ChemicalReaction & | rxn,
|  | const ROMol & | mol,
|  | unsigned int & | which
| ) |  |

tests whether or not the molecule has a substructure match to any of the reaction's agents the `which` argument is used to return which of the agents the molecule matches. If there's no match, it is equal to the number of agents on return

bool RDKit::isMoleculeAgentOfReaction | ( | const ChemicalReaction & | rxn,
|  | const ROMol & | mol
| ) |  |

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

bool RDKit::isMoleculeProductOfReaction | ( | const ChemicalReaction & | rxn,
|  | const ROMol & | mol,
|  | unsigned int & | which
| ) |  |

tests whether or not the molecule has a substructure match to any of the reaction's products the `which` argument is used to return which of the products the molecule matches. If there's no match, it is equal to the number of products on return

bool RDKit::isMoleculeProductOfReaction | ( | const ChemicalReaction & | rxn,
|  | const ROMol & | mol
| ) |  |

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

bool RDKit::isMoleculeReactantOfReaction | ( | const ChemicalReaction & | rxn,
|  | const ROMol & | mol,
|  | unsigned int & | which
| ) |  |

tests whether or not the molecule has a substructure match to any of the reaction's reactants the `which` argument is used to return which of the reactants the molecule matches. If there's no match, it is equal to the number of reactants on return

bool RDKit::isMoleculeReactantOfReaction | ( | const ChemicalReaction & | rxn,
|  | const ROMol & | mol
| ) |  |

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

bool RDKit::isReactionTemplateMoleculeAgent | ( | const ROMol & | mol,
|  | double | agentThreshold
| ) |  |

ExplicitBitVect* RDKit::LayeredFingerprintMol | ( | const ROMol & | mol,
|  | unsigned int | layerFlags = `0xFFFFFFFF`,
|  | unsigned int | minPath = `1`,
|  | unsigned int | maxPath = `7`,
|  | unsigned int | fpSize = `2048`,
|  | std::vector< unsigned int > * | atomCounts = `0`,
|  | ExplicitBitVect * | setOnlyBits = `0`,
|  | bool | branchedPaths = `true`,
|  | const std::vector< boost::uint32_t > * | fromAtoms = `0`
| ) |  |

Generates a topological (Daylight like) fingerprint for a molecule using a layer-based hashing algorithm.

Experimental: This function is experimental. The API or results may change from release to release.

Parameters

  mol | the molecule to be fingerprinted
  layerFlags | the layers to be included (see below)
  minPath | the minimum path length (in bonds) to be included
  maxPath | the minimum path length (in bonds) to be included
  fpSize | the size of the fingerprint
  atomCounts | if provided, this will be used to provide the count of the number of paths that set bits each atom is involved in. The vector should have at least as many entries as the molecule has atoms and is not zeroed out here.
  setOnlyBits | if provided, only bits that are set in this bit vector will be set in the result. This is essentially the same as doing: (*res) &= (*setOnlyBits); but also has an impact on the atomCounts (if being used)
  branchedPaths | toggles generation of branched subgraphs, not just linear paths

Returns
  the molecular fingerprint, as an ExplicitBitVect

Notes:

- the caller is responsible for `delete`ing the result

Layer definitions:

- 0x01: pure topology
- 0x02: bond order
- 0x04: atom types
- 0x08: presence of rings
- 0x10: ring sizes
- 0x20: aromaticity

template<class T >

T* RDKit::makeAtomAliphaticQuery | ( | const std::string & | descr | ) |

returns a Query for matching aliphatic atoms

Definition at line 258 of file QueryOps.h.

References queryAtomAliphatic().

ATOM_EQUALS_QUERY* RDKit::makeAtomAliphaticQuery | ( |  | ) |

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<class T >

T* RDKit::makeAtomAromaticQuery | ( | const std::string & | descr | ) |

returns a Query for matching the `isAromatic` flag

Definition at line 250 of file QueryOps.h.

References queryAtomAromatic().

ATOM_EQUALS_QUERY* RDKit::makeAtomAromaticQuery | ( |  | ) |

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<class T >

T* RDKit::makeAtomExplicitDegreeQuery | ( | int | what,
|  | const std::string & | descr
| ) |  |

returns a Query for matching explicit degree

Definition at line 209 of file QueryOps.h.

References queryAtomExplicitDegree().

ATOM_EQUALS_QUERY* RDKit::makeAtomExplicitDegreeQuery | ( | int | what | ) |

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<class T >

T* RDKit::makeAtomExplicitValenceQuery | ( | int | what,
|  | const std::string & | descr
| ) |  |

returns a Query for matching explicit valence

Definition at line 193 of file QueryOps.h.

References queryAtomExplicitValence().

ATOM_EQUALS_QUERY* RDKit::makeAtomExplicitValenceQuery | ( | int | what | ) |

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<class T >

T* RDKit::makeAtomFormalChargeQuery | ( | int | what,
|  | const std::string & | descr
| ) |  |

returns a Query for matching formal charge

Definition at line 282 of file QueryOps.h.

References queryAtomFormalCharge().

ATOM_EQUALS_QUERY* RDKit::makeAtomFormalChargeQuery | ( | int | what | ) |

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<class T >

T* RDKit::makeAtomHasImplicitHQuery | ( | const std::string & | descr | ) |

returns a Query for matching ring atoms

Definition at line 233 of file QueryOps.h.

References queryAtomHasImplicitH().

ATOM_EQUALS_QUERY* RDKit::makeAtomHasImplicitHQuery | ( |  | ) |

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<class T >

T* RDKit::makeAtomHasRingBondQuery | ( | const std::string & | descr | ) |

returns a Query for matching atoms with a particular number of ring bonds

Definition at line 342 of file QueryOps.h.

References queryAtomHasRingBond().

ATOM_EQUALS_QUERY* RDKit::makeAtomHasRingBondQuery | ( |  | ) |

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<class T >

T* RDKit::makeAtomHCountQuery | ( | int | what,
|  | const std::string & | descr
| ) |  |

returns a Query for matching hydrogen count

Definition at line 225 of file QueryOps.h.

References queryAtomHCount().

ATOM_EQUALS_QUERY* RDKit::makeAtomHCountQuery | ( | int | what | ) |

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<class T >

T* RDKit::makeAtomHybridizationQuery | ( | int | what,
|  | const std::string & | descr
| ) |  |

returns a Query for matching hybridization

Definition at line 290 of file QueryOps.h.

References queryAtomHybridization().

ATOM_EQUALS_QUERY* RDKit::makeAtomHybridizationQuery | ( | int | what | ) |

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<class T >

T* RDKit::makeAtomImplicitHCountQuery | ( | int | what,
|  | const std::string & | descr
| ) |  |

returns a Query for matching implicit hydrogen count

Definition at line 242 of file QueryOps.h.

References queryAtomImplicitHCount().

ATOM_EQUALS_QUERY* RDKit::makeAtomImplicitHCountQuery | ( | int | what | ) |

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<class T >

T* RDKit::makeAtomImplicitValenceQuery | ( | int | what,
|  | const std::string & | descr
| ) |  |

returns a Query for matching implicit valence

Definition at line 185 of file QueryOps.h.

References queryAtomImplicitValence().

ATOM_EQUALS_QUERY* RDKit::makeAtomImplicitValenceQuery | ( | int | what | ) |

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<class T >

T* RDKit::makeAtomInNRingsQuery | ( | int | what,
|  | const std::string & | descr
| ) |  |

returns a Query for matching atoms in a particular number of rings

Definition at line 315 of file QueryOps.h.

References queryIsAtomInNRings().

ATOM_EQUALS_QUERY* RDKit::makeAtomInNRingsQuery | ( | int | what | ) |

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

ATOM_EQUALS_QUERY* RDKit::makeAtomInRingOfSizeQuery | ( | int | tgt | ) |

returns a Query for matching atoms in rings of a particular size

template<class T >

T* RDKit::makeAtomInRingQuery | ( | const std::string & | descr | ) |

returns a Query for matching ring atoms

Definition at line 307 of file QueryOps.h.

References queryIsAtomInRing().

ATOM_EQUALS_QUERY* RDKit::makeAtomInRingQuery | ( |  | ) |

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<class T >

T* RDKit::makeAtomIsotopeQuery | ( | int | what,
|  | const std::string & | descr
| ) |  |

returns a Query for matching atoms with a particular isotope

Definition at line 274 of file QueryOps.h.

References queryAtomIsotope().

ATOM_EQUALS_QUERY* RDKit::makeAtomIsotopeQuery | ( | int | what | ) |

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<class T >

T* RDKit::makeAtomMassQuery | ( | int | what,
|  | const std::string & | descr
| ) |  |

returns a Query for matching atoms with a particular mass

Definition at line 266 of file QueryOps.h.

References queryAtomMass().

ATOM_EQUALS_QUERY* RDKit::makeAtomMassQuery | ( | int | what | ) |

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<class T >

T* RDKit::makeAtomMinRingSizeQuery | ( | int | tgt,
|  | const std::string & | descr
| ) |  |

returns a Query for matching an atom's minimum ring size

Definition at line 326 of file QueryOps.h.

References queryAtomMinRingSize().

ATOM_EQUALS_QUERY* RDKit::makeAtomMinRingSizeQuery | ( | int | tgt | ) |

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

ATOM_NULL_QUERY* RDKit::makeAtomNullQuery | ( |  | ) |

returns a Query for matching any atom

template<class T >

T* RDKit::makeAtomNumQuery | ( | int | what,
|  | const std::string & | descr
| ) |  |

returns a Query for matching atomic number

Definition at line 177 of file QueryOps.h.

References queryAtomNum().

ATOM_EQUALS_QUERY* RDKit::makeAtomNumQuery | ( | int | what | ) |

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<class T >

T* RDKit::makeAtomRingBondCountQuery | ( | int | what,
|  | const std::string & | descr
| ) |  |

returns a Query for matching atoms with a particular number of ring bonds

Definition at line 334 of file QueryOps.h.

References queryAtomRingBondCount().

ATOM_EQUALS_QUERY* RDKit::makeAtomRingBondCountQuery | ( | int | what | ) |

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<class T >

T* RDKit::makeAtomSimpleQuery | ( | int | what,
|  | int | funcAtom const *,
|  | const std::string & | description = `"Atom Simple"`
| ) |  |

Definition at line 166 of file QueryOps.h.

template<class T >

T* RDKit::makeAtomTotalDegreeQuery | ( | int | what,
|  | const std::string & | descr
| ) |  |

returns a Query for matching atomic degree

Definition at line 217 of file QueryOps.h.

References queryAtomTotalDegree().

ATOM_EQUALS_QUERY* RDKit::makeAtomTotalDegreeQuery | ( | int | what | ) |

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<class T >

T* RDKit::makeAtomTotalValenceQuery | ( | int | what,
|  | const std::string & | descr
| ) |  |

returns a Query for matching total valence

Definition at line 201 of file QueryOps.h.

References queryAtomTotalValence().

ATOM_EQUALS_QUERY* RDKit::makeAtomTotalValenceQuery | ( | int | what | ) |

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<class T >

T* RDKit::makeAtomUnsaturatedQuery | ( | const std::string & | descr | ) |

returns a Query for matching atoms with unsaturation:

Definition at line 298 of file QueryOps.h.

References queryAtomUnsaturated().

ATOM_EQUALS_QUERY* RDKit::makeAtomUnsaturatedQuery | ( |  | ) |

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

BOND_EQUALS_QUERY* RDKit::makeBondDirEqualsQuery | ( | Bond::BondDir | what | ) |

returns a Query for matching bond directions

BOND_EQUALS_QUERY* RDKit::makeBondInNRingsQuery | ( | int | tgt | ) |

returns a Query for matching bonds in a particular number of rings

BOND_EQUALS_QUERY* RDKit::makeBondInRingOfSizeQuery | ( | int | what | ) |

returns a Query for matching bonds in rings of a particular size

BOND_EQUALS_QUERY* RDKit::makeBondIsInRingQuery | ( |  | ) |

returns a Query for matching ring bonds

BOND_EQUALS_QUERY* RDKit::makeBondMinRingSizeQuery | ( | int | what | ) |

returns a Query for matching a bond's minimum ring size

BOND_NULL_QUERY* RDKit::makeBondNullQuery | ( |  | ) |

returns a Query for matching any bond

BOND_EQUALS_QUERY* RDKit::makeBondOrderEqualsQuery | ( | Bond::BondType | what | ) |

returns a Query for matching bond orders

template<class Target >

Queries::EqualityQuery<int,const Target *,true>* RDKit::makeHasPropQuery | ( | const std::string & | property | ) |

returns a Query for matching atoms that have a particular property

Definition at line 535 of file QueryOps.h.

template<class Target , class T >

Queries::EqualityQuery<int, const Target *, true>* RDKit::makePropQuery | ( | const std::string & | propname,
|  | const T & | val,
|  | const T & | tolerance = `T()`
| ) |  |

Definition at line 661 of file QueryOps.h.

bool RDKit::MCSAtomCompareAny | ( | const MCSAtomCompareParameters & | p,
|  | const ROMol & | mol1,
|  | unsigned int | atom1,
|  | const ROMol & | mol2,
|  | unsigned int | atom2,
|  | void * | userData
| ) |  |

bool RDKit::MCSAtomCompareElements | ( | const MCSAtomCompareParameters & | p,
|  | const ROMol & | mol1,
|  | unsigned int | atom1,
|  | const ROMol & | mol2,
|  | unsigned int | atom2,
|  | void * | userData
| ) |  |

bool RDKit::MCSAtomCompareIsotopes | ( | const MCSAtomCompareParameters & | p,
|  | const ROMol & | mol1,
|  | unsigned int | atom1,
|  | const ROMol & | mol2,
|  | unsigned int | atom2,
|  | void * | userData
| ) |  |

bool RDKit::MCSBondCompareAny | ( | const MCSBondCompareParameters & | p,
|  | const ROMol & | mol1,
|  | unsigned int | bond1,
|  | const ROMol & | mol2,
|  | unsigned int | bond2,
|  | void * | userData
| ) |  |

bool RDKit::MCSBondCompareOrder | ( | const MCSBondCompareParameters & | p,
|  | const ROMol & | mol1,
|  | unsigned int | bond1,
|  | const ROMol & | mol2,
|  | unsigned int | bond2,
|  | void * | userData
| ) |  |

bool RDKit::MCSBondCompareOrderExact | ( | const MCSBondCompareParameters & | p,
|  | const ROMol & | mol1,
|  | unsigned int | bond1,
|  | const ROMol & | mol2,
|  | unsigned int | bond2,
|  | void * | userData
| ) |  |

bool RDKit::MCSProgressCallbackTimeout | ( | const MCSProgressData & | stat,
|  | const MCSParameters & | params,
|  | void * | userData
| ) |  |

RWMol* RDKit::Mol2BlockToMol | ( | const std::string & | molBlock,
|  | bool | sanitize = `true`,
|  | bool | removeHs = `true`,
|  | Mol2Type | variant = `CORINA`
| ) |  |

Parameters

  molBlock | - string containing the mol block
  sanitize | - toggles sanitization of the molecule
  removeHs | - toggles removal of Hs from the molecule. H removal is only done if the molecule is sanitized
  variant | - the atom type definitions to use

RWMol* RDKit::Mol2DataStreamToMol | ( | std::istream * | inStream,
|  | bool | sanitize = `true`,
|  | bool | removeHs = `true`,
|  | Mol2Type | variant = `CORINA`
| ) |  |

Parameters

  inStream | - stream containing the data
  sanitize | - toggles sanitization of the molecule
  removeHs | - toggles removal of Hs from the molecule. H removal is only done if the molecule is sanitized
  variant | - the atom type definitions to use

RWMol* RDKit::Mol2DataStreamToMol | ( | std::istream & | inStream,
|  | bool | sanitize = `true`,
|  | bool | removeHs = `true`,
|  | Mol2Type | variant = `CORINA`
| ) |  |

RWMol* RDKit::Mol2FileToMol | ( | std::string | fName,
|  | bool | sanitize = `true`,
|  | bool | removeHs = `true`,
|  | Mol2Type | variant = `CORINA`
| ) |  |

Parameters

  fName | - string containing the file name
  sanitize | - toggles sanitization of the molecule
  removeHs | - toggles removal of Hs from the molecule. H removal is only done if the molecule is sanitized
  variant | - the atom type definitions to use

RWMol* RDKit::MolBlockToMol | ( | const std::string & | molBlock,
|  | bool | sanitize = `true`,
|  | bool | removeHs = `true`,
|  | bool | strictParsing = `true`
| ) |  |

Parameters

  molBlock | - string containing the mol block
  sanitize | - toggles sanitization and stereochemistry perception of the molecule
  removeHs | - toggles removal of Hs from the molecule. H removal is only done if the molecule is sanitized
  strictParsing | - if set, the parser is more lax about correctness of the contents.

RWMol* RDKit::MolDataStreamToMol | ( | std::istream * | inStream,
|  | unsigned int & | line,
|  | bool | sanitize = `true`,
|  | bool | removeHs = `true`,
|  | bool | strictParsing = `true`
| ) |  |

Parameters

  inStream | - stream containing the data
  line | - current line number (used for error reporting)
  sanitize | - toggles sanitization and stereochemistry perception of the molecule
  removeHs | - toggles removal of Hs from the molecule. H removal is only done if the molecule is sanitized
  line | - current line number (used for error reporting)
  strictParsing | - if not set, the parser is more lax about correctness of the contents.

RWMol* RDKit::MolDataStreamToMol | ( | std::istream & | inStream,
|  | unsigned int & | line,
|  | bool | sanitize = `true`,
|  | bool | removeHs = `true`,
|  | bool | strictParsing = `true`
| ) |  |

RWMol* RDKit::MolFileToMol | ( | std::string | fName,
|  | bool | sanitize = `true`,
|  | bool | removeHs = `true`,
|  | bool | strictParsing = `true`
| ) |  |

Parameters

  fName | - string containing the file name
  sanitize | - toggles sanitization and stereochemistry perception of the molecule
  removeHs | - toggles removal of Hs from the molecule. H removal is only done if the molecule is sanitized
  strictParsing | - if set, the parser is more lax about correctness of the contents.

std::string RDKit::MolFragmentToSmiles | ( | const ROMol & | mol,
|  | const std::vector< int > & | atomsToUse,
|  | const std::vector< int > * | bondsToUse = `0`,
|  | const std::vector< std::string > * | atomSymbols = `0`,
|  | const std::vector< std::string > * | bondSymbols = `0`,
|  | bool | doIsomericSmiles = `false`,
|  | bool | doKekule = `false`,
|  | int | rootedAtAtom = `-1`,
|  | bool | canonical = `true`,
|  | bool | allBondsExplicit = `false`,
|  | bool | allHsExplicit = `false`
| ) |  |

returns canonical SMILES for part of a molecule

Parameters

  mol | : the molecule in question.
  atomsToUse | : indices of the atoms in the fragment
  bondsToUse | : indices of the bonds in the fragment. If this is not provided, all bonds between the atoms in atomsToUse will be included
  atomSymbols | : symbols to use for the atoms in the output SMILES
  bondSymbols | : sybmols to use for the bonds in the output SMILES
  doIsomericSmiles | : include stereochemistry and isotope information in the SMILES
  doKekule | : do Kekule smiles (i.e. don't use aromatic bonds)
  rootedAtAtom | : make sure the SMILES starts at the specified atom. The resulting SMILES is not, of course, canonical.
  canonical | : if false, no attempt will be made to canonicalize the SMILES
  allBondsExplicit | : if true, symbols will be included for all bonds.
  allHsExplicit | : if true, hydrogen counts will be provided for every atom.

NOTE: the bondSymbols are not currently used in the canonicalization.

std::string RDKit::MolToMolBlock | ( | const ROMol & | mol,
|  | bool | includeStereo = `true`,
|  | int | confId = `-1`,
|  | bool | kekulize = `true`,
|  | bool | forceV3000 = `false`
| ) |  |

Parameters

  mol | - the molecule in question
  includeStereo | - toggles inclusion of stereochemistry information
  confId | - selects the conformer to be used
  kekulize | - triggers kekulization of the molecule before it is written
  forceV3000 | - force generation a V3000 mol block (happens automatically with more than 999 atoms or bonds)

void RDKit::MolToMolFile | ( | const ROMol & | mol,
|  | std::string | fName,
|  | bool | includeStereo = `true`,
|  | int | confId = `-1`,
|  | bool | kekulize = `true`,
|  | bool | forceV3000 = `false`
| ) |  |

Parameters

  mol | - the molecule in question
  fName | - the name of the file to use
  includeStereo | - toggles inclusion of stereochemistry information
  confId | - selects the conformer to be used
  kekulize | - triggers kekulization of the molecule before it is written
  forceV3000 | - force generation a V3000 mol block (happens automatically with more than 999 atoms or bonds)

std::string RDKit::MolToPDBBlock | ( | const ROMol & | mol,
|  | int | confId = `-1`,
|  | unsigned int | flavor = `0`
| ) |  |

Parameters

  mol | - the molecule in question
  confId | - selects the conformer to be used
  flavor | - controls what gets written: flavor & 1 : Write MODEL/ENDMDL lines around each record flavor & 2 : Don't write any CONECT records flavor & 4 : Write CONECT records in both directions flavor & 8 : Don't use multiple CONECTs to encode bond order flavor & 16 : Write MASTER record flavor & 32 : Write TER record

void RDKit::MolToPDBFile | ( | const ROMol & | mol,
|  | const std::string & | fname,
|  | int | confId = `-1`,
|  | unsigned int | flavor = `0`
| ) |  |

Parameters

  mol | - the molecule in question
  fName | - the name of the file to use
  confId | - selects the conformer to be used
  flavor | - controls what gets written: flavor & 1 : Write MODEL/ENDMDL lines around each record flavor & 2 : Don't write any CONECT records flavor & 4 : Write CONECT records in both directions flavor & 8 : Don't use multiple CONECTs to encode bond order flavor & 16 : Write MASTER record flavor & 32 : Write TER record

std::string RDKit::MolToSmarts | ( | ROMol & | mol,
|  | bool | doIsomericSmarts = `false`
| ) |  |

returns the SMARTS for a molecule

std::string RDKit::MolToSmiles | ( | const ROMol & | mol,
|  | bool | doIsomericSmiles = `false`,
|  | bool | doKekule = `false`,
|  | int | rootedAtAtom = `-1`,
|  | bool | canonical = `true`,
|  | bool | allBondsExplicit = `false`,
|  | bool | allHsExplicit = `false`
| ) |  |

returns canonical SMILES for a molecule

Parameters

  mol | : the molecule in question.
  doIsomericSmiles | : include stereochemistry and isotope information in the SMILES
  doKekule | : do Kekule smiles (i.e. don't use aromatic bonds)
  rootedAtAtom | : make sure the SMILES starts at the specified atom. The resulting SMILES is not, of course, canonical.
  canonical | : if false, no attempt will be made to canonicalize the SMILES
  allBondsExplicit | : if true, symbols will be included for all bonds.
  allHsExplicit | : if true, hydrogen counts will be provided for every atom.

void RDKit::MolToTPLFile | ( | const ROMol & | mol,
|  | std::string | fName,
|  | std::string | partialChargeProp = `"_GasteigerCharge"`,
|  | bool | writeFirstConfTwice = `false`
| ) |  |

std::string RDKit::MolToTPLText | ( | const ROMol & | mol,
|  | std::string | partialChargeProp = `"_GasteigerCharge"`,
|  | bool | writeFirstConfTwice = `false`
| ) |  |

ROMol* RDKit::MurckoDecompose | ( | const ROMol & | mol | ) |

Carries out a Murcko decomposition on the molecule provided.

Parameters

  mol | - the ROMol of interest

Returns
  a new ROMol with the Murcko scaffold The client is responsible for deleting this molecule.

int RDKit::nextCombination | ( | INT_VECT & | comb,
|  | int | tot
| ) |  |

given a current combination of numbers change it to the next possible combination

Parameters

  comb | the sorted vector to consider
  tot | the maximum number possible in the vector

Returns
  -1 on failure, the index of the last number changed on success. Example: for all combinations 3 of numbers between 0 and tot=5 given (0,1,2) the function wil return (0,1,3) etc.

template<typename T >

int RDKit::nullDataFun | ( | T | arg | ) |

Definition at line 482 of file QueryOps.h.

template<typename T >

bool RDKit::nullQueryFun | ( | T | arg | ) |

Definition at line 484 of file QueryOps.h.

DiscreteValueVect RDKit::operator+ | ( | const DiscreteValueVect & | p1,
|  | const DiscreteValueVect & | p2
| ) |  |

DiscreteValueVect RDKit::operator- | ( | const DiscreteValueVect & | p1,
|  | const DiscreteValueVect & | p2
| ) |  |

int RDKit::parseFeatureData | ( | const std::string & | defnText,
|  | MolChemicalFeatureDef::CollectionType & | featDefs
| ) |  |

int RDKit::parseFeatureData | ( | std::istream & | istream,
|  | MolChemicalFeatureDef::CollectionType & | featDefs
| ) |  |

int RDKit::parseFeatureFile | ( | const std::string & | fileName,
|  | MolChemicalFeatureDef::CollectionType & | featDefs
| ) |  |

void RDKit::parseMCSParametersJSON | ( | const char * | json,
|  | MCSParameters * | params
| ) |  |

void RDKit::parseQueryDefFile | ( | std::string | filename,
|  | std::map< std::string, ROMOL_SPTR > & | queryDefs,
|  | bool | standardize = `true`,
|  | std::string | delimiter = `"\t"`,
|  | std::string | comment = `"//"`,
|  | unsigned int | nameColumn = `0`,
|  | unsigned int | smartsColumn = `1`
| ) |  |

parses a query definition file and sets up a set of definitions suitable for use by addRecursiveQueries()

Parameters

  filename | - the name of the file to be read
  queryDefs | - the dictionary of named queries (return value)
  standardize | - if true, query names will be converted to lower case
  delimiter | - the line delimiter in the file
  comment | - text used to recognize comment lines
  nameColumn | - column with the names of queries
  smartsColumn | - column with the SMARTS definitions of the queries

void RDKit::parseQueryDefFile | ( | std::istream * | inStream,
|  | std::map< std::string, ROMOL_SPTR > & | queryDefs,
|  | bool | standardize = `true`,
|  | std::string | delimiter = `"\t"`,
|  | std::string | comment = `"//"`,
|  | unsigned int | nameColumn = `0`,
|  | unsigned int | smartsColumn = `1`
| ) |  |

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

void RDKit::parseQueryDefText | ( | const std::string & | queryDefText,
|  | std::map< std::string, ROMOL_SPTR > & | queryDefs,
|  | bool | standardize = `true`,
|  | std::string | delimiter = `"\t"`,
|  | std::string | comment = `"//"`,
|  | unsigned int | nameColumn = `0`,
|  | unsigned int | smartsColumn = `1`
| ) |  |

equivalent to parseQueryDefFile() but the query definitions are explicitly passed in

ExplicitBitVect* RDKit::PatternFingerprintMol | ( | const ROMol & | mol,
|  | unsigned int | fpSize = `2048`,
|  | std::vector< unsigned int > * | atomCounts = `0`,
|  | ExplicitBitVect * | setOnlyBits = `0`
| ) |  |

Generates a topological fingerprint for a molecule using a series of pre-defined structural patterns.

Experimental: This function is experimental. The API or results may change from release to release.

Parameters

  mol | the molecule to be fingerprinted
  fpSize | the size of the fingerprint
  atomCounts | if provided, this will be used to provide the count of the number of paths that set bits each atom is involved in. The vector should have at least as many entries as the molecule has atoms and is not zeroed out here.
  setOnlyBits | if provided, only bits that are set in this bit vector will be set in the result. This is essentially the same as doing: (*res) &= (*setOnlyBits); but also has an impact on the atomCounts (if being used)

Returns
  the molecular fingerprint, as an ExplicitBitVect

Notes:

- the caller is responsible for `delete`ing the result

RWMol* RDKit::PDBBlockToMol | ( | const char * | str,
|  | bool | sanitize = `true`,
|  | bool | removeHs = `true`,
|  | unsigned int | flavor = `0`
| ) |  |

RWMol* RDKit::PDBBlockToMol | ( | const std::string & | str,
|  | bool | sanitize = `true`,
|  | bool | removeHs = `true`,
|  | unsigned int | flavor = `0`
| ) |  |

RWMol* RDKit::PDBDataStreamToMol | ( | std::istream * | inStream,
|  | bool | sanitize = `true`,
|  | bool | removeHs = `true`,
|  | unsigned int | flavor = `0`
| ) |  |

RWMol* RDKit::PDBDataStreamToMol | ( | std::istream & | inStream,
|  | bool | sanitize = `true`,
|  | bool | removeHs = `true`,
|  | unsigned int | flavor = `0`
| ) |  |

RWMol* RDKit::PDBFileToMol | ( | const std::string & | fname,
|  | bool | sanitize = `true`,
|  | bool | removeHs = `true`,
|  | unsigned int | flavor = `0`
| ) |  |

INT_MAP_INT RDKit::pickBondsToWedge | ( | const ROMol & | mol | ) |

ROMol* RDKit::prepareMol | ( | const ROMol & | mol,
|  | const FragCatParams * | fparams,
|  | MatchVectType & | aToFmap
| ) |  |

boost::uint32_t RDKit::pullPackedIntFromString | ( | const char *& | text | ) |

inline

Reads an integer from a char * in packed format and returns the result. The argument is advanced

Definition at line 187 of file StreamOps.h.

static int RDKit::queryAtomAliphatic | ( | Atom const * | at | ) |

static

Definition at line 67 of file QueryOps.h.

References RDKit::Atom::getIsAromatic().

Referenced by makeAtomAliphaticQuery().

unsigned int RDKit::queryAtomAllBondProduct | ( | Atom const * | at | ) |

static int RDKit::queryAtomAromatic | ( | Atom const * | at | ) |

static

Definition at line 66 of file QueryOps.h.

References RDKit::Atom::getIsAromatic().

Referenced by makeAtomAromaticQuery().

unsigned int RDKit::queryAtomBondProduct | ( | Atom const * | at | ) |

static int RDKit::queryAtomExplicitDegree | ( | Atom const * | at | ) |

static

Definition at line 68 of file QueryOps.h.

References RDKit::Atom::getDegree().

Referenced by makeAtomExplicitDegreeQuery().

static int RDKit::queryAtomExplicitValence | ( | Atom const * | at | ) |

static

Definition at line 75 of file QueryOps.h.

References RDKit::Atom::getExplicitValence(), and RDKit::Atom::getNumExplicitHs().

Referenced by makeAtomExplicitValenceQuery().

static int RDKit::queryAtomFormalCharge | ( | Atom const * | at | ) |

static

Definition at line 86 of file QueryOps.h.

References RDKit::Atom::getFormalCharge().

Referenced by makeAtomFormalChargeQuery().

static int RDKit::queryAtomHasImplicitH | ( | Atom const * | at | ) |

static

Definition at line 73 of file QueryOps.h.

References RDKit::Atom::getTotalNumHs().

Referenced by makeAtomHasImplicitHQuery().

static int RDKit::queryAtomHasRingBond | ( | Atom const * | at | ) |

static

Definition at line 112 of file QueryOps.h.

References RDKit::ROMol::getAtomBonds(), RDKit::Atom::getOwningMol(), RDKit::ROMol::getRingInfo(), RDKit::ROMol::getTopology(), and RDKit::RingInfo::numBondRings().

Referenced by makeAtomHasRingBondQuery().

static int RDKit::queryAtomHCount | ( | Atom const * | at | ) |

static

Definition at line 71 of file QueryOps.h.

References RDKit::Atom::getTotalNumHs().

Referenced by makeAtomHCountQuery().

static int RDKit::queryAtomHeavyAtomDegree | ( | Atom const * | at | ) |

static

Definition at line 70 of file QueryOps.h.

References RDKit::Atom::getTotalDegree(), and RDKit::Atom::getTotalNumHs().

static int RDKit::queryAtomHybridization | ( | Atom const * | at | ) |

static

Definition at line 89 of file QueryOps.h.

References RDKit::Atom::getHybridization().

Referenced by makeAtomHybridizationQuery().

static int RDKit::queryAtomImplicitHCount | ( | Atom const * | at | ) |

static

Definition at line 72 of file QueryOps.h.

References RDKit::Atom::getTotalNumHs().

Referenced by makeAtomImplicitHCountQuery().

static int RDKit::queryAtomImplicitValence | ( | Atom const * | at | ) |

static

Definition at line 74 of file QueryOps.h.

References RDKit::Atom::getImplicitValence().

Referenced by makeAtomImplicitValenceQuery().

template<int tgt>

int RDKit::queryAtomIsInRingOfSize | ( | Atom const * | at | ) |

Definition at line 148 of file QueryOps.h.

References RDKit::Atom::getIdx(), RDKit::Atom::getOwningMol(), RDKit::ROMol::getRingInfo(), and RDKit::RingInfo::isAtomInRingOfSize().

static int RDKit::queryAtomIsotope | ( | Atom const * | at | ) |

static

Definition at line 83 of file QueryOps.h.

References RDKit::Atom::getIsotope().

Referenced by makeAtomIsotopeQuery().

static int RDKit::queryAtomMass | ( | Atom const * | at | ) |

static

Definition at line 80 of file QueryOps.h.

References RDKit::Atom::getMass(), and round().

Referenced by makeAtomMassQuery().

static int RDKit::queryAtomMinRingSize | ( | Atom const * | at | ) |

static

Definition at line 126 of file QueryOps.h.

References RDKit::Atom::getIdx(), RDKit::Atom::getOwningMol(), RDKit::ROMol::getRingInfo(), and RDKit::RingInfo::minAtomRingSize().

Referenced by makeAtomMinRingSizeQuery().

static int RDKit::queryAtomNum | ( | Atom const * | at | ) |

static

Definition at line 78 of file QueryOps.h.

References RDKit::Atom::getAtomicNum().

Referenced by makeAtomNumQuery().

static int RDKit::queryAtomRingBondCount | ( | Atom const * | at | ) |

static

Definition at line 133 of file QueryOps.h.

References RDKit::ROMol::getAtomBonds(), RDKit::Atom::getOwningMol(), RDKit::ROMol::getRingInfo(), RDKit::ROMol::getTopology(), and RDKit::RingInfo::numBondRings().

Referenced by makeAtomRingBondCountQuery().

static int RDKit::queryAtomRingMembership | ( | Atom const * | at | ) |

static

Definition at line 366 of file QueryOps.h.

References RDKit::Atom::getIdx(), RDKit::Atom::getOwningMol(), RDKit::ROMol::getRingInfo(), and RDKit::RingInfo::numAtomRings().

Referenced by RDKit::AtomRingQuery::AtomRingQuery().

static int RDKit::queryAtomTotalDegree | ( | Atom const * | at | ) |

static

Definition at line 69 of file QueryOps.h.

References RDKit::Atom::getTotalDegree().

Referenced by makeAtomTotalDegreeQuery().

static int RDKit::queryAtomTotalValence | ( | Atom const * | at | ) |

static

Definition at line 76 of file QueryOps.h.

References RDKit::Atom::getExplicitValence(), and RDKit::Atom::getImplicitValence().

Referenced by makeAtomTotalValenceQuery().

static int RDKit::queryAtomUnsaturated | ( | Atom const * | at | ) |

static

Definition at line 77 of file QueryOps.h.

References RDKit::Atom::getDegree(), and RDKit::Atom::getExplicitValence().

Referenced by makeAtomUnsaturatedQuery().

static int RDKit::queryBondDir | ( | Bond const * | bond | ) |

static

Definition at line 98 of file QueryOps.h.

References RDKit::Bond::getBondDir().

template<int tgt>

int RDKit::queryBondIsInRingOfSize | ( | Bond const * | bond | ) |

Definition at line 156 of file QueryOps.h.

References RDKit::Bond::getIdx(), RDKit::Bond::getOwningMol(), RDKit::ROMol::getRingInfo(), and RDKit::RingInfo::isBondInRingOfSize().

static int RDKit::queryBondMinRingSize | ( | Bond const * | bond | ) |

static

Definition at line 129 of file QueryOps.h.

References RDKit::Bond::getIdx(), RDKit::Bond::getOwningMol(), RDKit::ROMol::getRingInfo(), and RDKit::RingInfo::minBondRingSize().

static int RDKit::queryBondOrder | ( | Bond const * | bond | ) |

static

Definition at line 97 of file QueryOps.h.

References RDKit::Bond::getBondType().

static int RDKit::queryIsAtomInNRings | ( | Atom const * | at | ) |

static

Definition at line 106 of file QueryOps.h.

References RDKit::Atom::getIdx(), RDKit::Atom::getOwningMol(), RDKit::ROMol::getRingInfo(), and RDKit::RingInfo::numAtomRings().

Referenced by makeAtomInNRingsQuery().

static int RDKit::queryIsAtomInRing | ( | Atom const * | at | ) |

static

Definition at line 109 of file QueryOps.h.

References RDKit::Atom::getIdx(), RDKit::Atom::getOwningMol(), RDKit::ROMol::getRingInfo(), and RDKit::RingInfo::numAtomRings().

Referenced by makeAtomInRingQuery().

static int RDKit::queryIsBondInNRings | ( | Bond const * | at | ) |

static

Definition at line 99 of file QueryOps.h.

References RDKit::Bond::getIdx(), RDKit::Bond::getOwningMol(), RDKit::ROMol::getRingInfo(), and RDKit::RingInfo::numBondRings().

static int RDKit::queryIsBondInRing | ( | Bond const * | bond | ) |

static

Definition at line 123 of file QueryOps.h.

References RDKit::Bond::getIdx(), RDKit::Bond::getOwningMol(), RDKit::ROMol::getRingInfo(), and RDKit::RingInfo::numBondRings().

ExplicitBitVect* RDKit::RDKFingerprintMol | ( | const ROMol & | mol,
|  | unsigned int | minPath = `1`,
|  | unsigned int | maxPath = `7`,
|  | unsigned int | fpSize = `2048`,
|  | unsigned int | nBitsPerHash = `2`,
|  | bool | useHs = `true`,
|  | double | tgtDensity = `0.0`,
|  | unsigned int | minSize = `128`,
|  | bool | branchedPaths = `true`,
|  | bool | useBondOrder = `true`,
|  | std::vector< boost::uint32_t > * | atomInvariants = `0`,
|  | const std::vector< boost::uint32_t > * | fromAtoms = `0`,
|  | std::vector< std::vector< boost::uint32_t > > * | atomBits = `0`
| ) |  |

Generates a topological (Daylight like) fingerprint for a molecule using an alternate (faster) hashing algorithm.

Parameters

  mol | the molecule to be fingerprinted
  minPath | the minimum path length (in bonds) to be included
  maxPath | the minimum path length (in bonds) to be included
  fpSize | the size of the fingerprint
  nBitsPerHash | the number of bits to be set by each path
  useHs | toggles inclusion of Hs in paths (if the molecule has explicit Hs)
  tgtDensity | if the generated fingerprint is below this density, it will be folded until the density is reached.
  minSize | the minimum size to which the fingerprint will be folded
  branchedPaths | toggles generation of branched subgraphs, not just linear paths
  useBondOrders | toggles inclusion of bond orders in the path hashes
  atomInvariants | a vector of atom invariants to use while hashing the paths
  fromAtoms | only paths starting at these atoms will be included
  atomBits | used to return the bits that each atom is involved in (should be at least `mol.numAtoms` long)

Returns
  the molecular fingerprint, as an ExplicitBitVect

Notes:

- the caller is responsible for `delete`ing the result

MOL_SPTR_VECT RDKit::readFuncGroups | ( | std::string | fileName | ) |

MOL_SPTR_VECT RDKit::readFuncGroups | ( | std::istream & | inStream,
|  | int | nToRead = `-1`
| ) |  |

boost::uint32_t RDKit::readPackedIntFromStream | ( | std::stringstream & | ss | ) |

inline

Reads an integer from a stream in packed format and returns the result.

Definition at line 146 of file StreamOps.h.

void RDKit::removeDuplicates | ( | std::vector< MatchVectType > & | v,
|  | unsigned int | nAtoms
| ) |  |

ROMol* RDKit::replaceCore | ( | const ROMol & | mol,
|  | const ROMol & | coreQuery,
|  | bool | replaceDummies = `true`,
|  | bool | labelByIndex = `false`,
|  | bool | requireDummyMatch = `false`
| ) |  |

Returns a copy of an ROMol with the atoms and bonds that do fall within a substructure match removed.

dummy atoms are left to indicate attachment points.

Note that this is essentially identical to the replaceSidechains function, except we invert the query and replace the atoms that do match the query.

Parameters

  mol | - the ROMol of interest
  coreQuery | - a query ROMol to be used to match the core
  replaceDummies | - if set, atoms matching dummies in the core will also be replaced
  labelByIndex | - if set, the dummy atoms at attachment points are labelled with the index+1 of the corresponding atom in the core
  requireDummyMatch | - if set, only side chains that are connected to atoms in the core that have attached dummies will be considered. Molecules that have sidechains that are attached at other points will be rejected (NULL returned).

Returns
  a copy of `mol` with the non-matching atoms and bonds (if any) removed and dummies at the connection points. The client is responsible for deleting this molecule. If the core query is not matched, NULL is returned.

ROMol* RDKit::replaceSidechains | ( | const ROMol & | mol,
|  | const ROMol & | coreQuery
| ) |  |

Returns a copy of an ROMol with the atoms and bonds that don't fall within a substructure match removed.

dummy atoms are left to indicate attachment points.

Parameters

  mol | the ROMol of interest
  coreQuery | a query ROMol to be used to match the core

Returns
  a copy of `mol` with the non-matching atoms and bonds (if any) removed and dummies at the connection points.

std::vector<ROMOL_SPTR> RDKit::replaceSubstructs | ( | const ROMol & | mol,
|  | const ROMol & | query,
|  | const ROMol & | replacement,
|  | bool | replaceAll = `false`,
|  | unsigned int | replacementConnectionPoint = `0`
| ) |  |

Returns a list of copies of an ROMol with the atoms and bonds that match a pattern replaced with the atoms contained in another molecule.

Bonds are created between the joining atom in the existing molecule and the atoms in the new molecule. So, using SMILES instead of molecules: replaceSubstructs('OC(=O)NCCNC(=O)O','C(=O)O','[X]') -> ['[X]NCCNC(=O)O','OC(=O)NCCN[X]'] replaceSubstructs('OC(=O)NCCNC(=O)O','C(=O)O','[X]',true) -> ['[X]NCCN[X]'] Chains should be handled "correctly": replaceSubstructs('CC(=O)C','C(=O)','[X]') -> ['C[X]C'] As should rings: replaceSubstructs('C1C(=O)C1','C(=O)','[X]') -> ['C1[X]C1'] And higher order branches: replaceSubstructs('CC(=O)(C)C','C(=O)','[X]') -> ['C[X](C)C'] Note that the client is responsible for making sure that the resulting molecule actually makes sense - this function does not perform sanitization.

Parameters

  mol | the ROMol of interest
  query | the query ROMol
  replacement | the ROMol to be inserted
  replaceAll | if this is true, only a single result, with all occurances of the substructure replaced, will be returned.
  replacementConnectionPoint | index of the atom in the replacement that the bond should made to

Returns
  a vector of pointers to copies of `mol` with the matching atoms and bonds (if any) replaced

double RDKit::round | ( | double | v | ) |

rounds a value to the closest int

Referenced by queryAtomMass().

std::vector<MOL_SPTR_VECT> RDKit::run_Reactants | ( | const ChemicalReaction & | rxn,
|  | const MOL_SPTR_VECT & | reactants
| ) |  |

Runs the reaction on a set of reactants.

Parameters

  rxn | the template reaction we are interested
  reactants | the reactants to be used. The length of this must be equal to rxn->getNumReactantTemplates() Caution: The order of the reactant templates determines the order of the reactants!

Returns
  a vector of vectors of products. Each subvector will be rxn->getNumProductTemplates() long.

We return a vector of vectors of products because each individual template may map multiple times onto its reactant. This leads to multiple possible result sets.

ChemicalReaction* RDKit::RxnBlockToChemicalReaction | ( | const std::string & | rxnBlock | ) |

Parse a text block in MDL rxn format into a ChemicalReaction.

ChemicalReaction* RDKit::RxnDataStreamToChemicalReaction | ( | std::istream & | rxnStream,
|  | unsigned int & | line
| ) |  |

Parse a text stream in MDL rxn format into a ChemicalReaction.

ChemicalReaction* RDKit::RxnFileToChemicalReaction | ( | const std::string & | fileName | ) |

Parse a file in MDL rxn format into a ChemicalReaction.

ChemicalReaction* RDKit::RxnMolToChemicalReaction | ( | const ROMol & | mol | ) |

Parse a ROMol into a ChemicalReaction, RXN role must be set before.

Alternative to build a reaction from a molecule (fragments) which have RXN roles set as atom properties: common_properties::molRxnRole (1=reactant, 2=product, 3=agent)

Parameters

  mol | ROMol with RXN roles set

ChemicalReaction* RDKit::RxnSmartsToChemicalReaction | ( | const std::string & | text,
|  | std::map< std::string, std::string > * | replacements = `0`,
|  | bool | useSmiles = `false`
| ) |  |

Parse a string containing "Reaction SMARTS" into a ChemicalReaction.

Our definition of Reaction SMARTS is something that looks a lot like reaction SMILES, except that SMARTS queries are allowed on the reactant side and that atom-map numbers are required (at least for now)

Parameters

  text | the SMARTS to convert
  replacements | a string->string map of replacement strings.

See also
  SmilesToMol for more information about replacements

Parameters

  useSmiles | if set, the SMILES parser will be used instead of the SMARTS parserfor the individual components

RWMol* RDKit::SLNQueryToMol | ( | std::string | smi,
|  | bool | mergeHs = `true`,
|  | int | debugParse = `0`
| ) |  |

RWMol* RDKit::SLNToMol | ( | std::string | smi,
|  | bool | sanitize = `true`,
|  | int | debugParse = `0`
| ) |  |

RWMol* RDKit::SmartsToMol | ( | std::string | sma,
|  | int | debugParse = `0`,
|  | bool | mergeHs = `false`,
|  | std::map< std::string, std::string > * | replacements = `0`
| ) |  |

Construct a molecule from a SMARTS string.

Parameters

  sma | the SMARTS to convert
  debugParse | toggles verbose debugging information from the parser
  mergeHs | toggles merging H atoms in the SMARTS into neighboring atoms
  replacements | a string->string map of replacement strings.

See also
  SmilesToMol for more information about replacements

Returns
  a pointer to the new molecule; the caller is responsible for free'ing this.

RWMol* RDKit::SmilesToMol | ( | std::string | smi,
|  | int | debugParse = `0`,
|  | bool | sanitize = `1`,
|  | std::map< std::string, std::string > * | replacements = `0`
| ) |  |

Construct a molecule from a SMILES string.

Parameters

  smi | the SMILES to convert
  debugParse | toggles verbose debugging information from the parser
  sanitize | toggles H removal and sanitization of the molecule
  replacements | a string->string map of replacement strings. See below for more information about replacements.

Returns
  a pointer to the new molecule; the caller is responsible for free'ing this.

The optional replacements map can be used to do string substitution of abbreviations in the input SMILES. The set of substitutions is repeatedly looped through until the string no longer changes. It is the responsiblity of the caller to make sure that substitutions results in legal and sensible SMILES.

Examples of substitutions:

CC{Q}C with {"{Q}":"OCCO"} -> CCOCCOC
C{A}C{Q}C with {"{Q}":"OCCO", "{A}":"C1(CC1)"} -> CC1(CC1)COCCOC
C{A}C{Q}C with {"{Q}":"{X}CC{X}", "{A}":"C1CC1", "{X}":"N"} -> CC1CC1CCNCCNC

void RDKit::StandardPDBResidueBondOrders | ( | RWMol * | mol | ) |

template<typename T >

void RDKit::streamRead | ( | std::istream & | ss,
|  | T & | loc
| ) |  |

does a binary read of an object from a stream

Definition at line 241 of file StreamOps.h.

Referenced by RDCatalog::HierarchCatalog< entryType, paramType, orderType >::initFromStream().

template<typename T >

void RDKit::streamWrite | ( | std::ostream & | ss,
|  | const T & | val
| ) |  |

does a binary write of an object to a stream

Definition at line 235 of file StreamOps.h.

Referenced by RDCatalog::HierarchCatalog< entryType, paramType, orderType >::toStream(), and RDKit::SparseIntVect< IndexType >::toString().

std::string RDKit::strip | ( | const std::string & | orig | ) |

ExplicitBitVect* RDKit::StructuralFingerprintChemReaction | ( | const ChemicalReaction & | rxn,
|  | const ReactionFingerprintParams & | params = `DefaultStructuralFPParams`
| ) |  |

Generates a structural fingerprint for a reaction to use in screening

A structural fingerprint is generated as an ExplicitBitVect to use for searching e.g. substructure in reactions. By default the fingerprint is generated as 4096 BitVect using a PatternFP for reactants and products and tentatively agents which were finally concatenated

Parameters

  rxn | the reaction to be fingerprinted
  params | specific settings to manipulate fingerprint generation

Returns
  the reaction fingerprint, as an ExplicitBitVect

Notes:

- the caller is responsible for `delete`ing the result

bool RDKit::SubstructMatch | ( | const ROMol & | mol,
|  | const ROMol & | query,
|  | MatchVectType & | matchVect,
|  | bool | recursionPossible = `true`,
|  | bool | useChirality = `false`,
|  | bool | useQueryQueryMatches = `false`
| ) |  |

Find a substructure match for a query in a molecule.

Parameters

  mol | The ROMol to be searched
  query | The query ROMol
  matchVect | Used to return the match (pre-existing contents will be deleted)
  recursionPossible | flags whether or not recursive matches are allowed
  useChirality | use atomic CIP codes as part of the comparison
  useQueryQueryMatches | if set, the contents of atom and bond queries will be used as part of the matching

Returns
  whether or not a match was found

unsigned int RDKit::SubstructMatch | ( | const ROMol & | mol,
|  | const ROMol & | query,
|  | std::vector< MatchVectType > & | matchVect,
|  | bool | uniquify = `true`,
|  | bool | recursionPossible = `true`,
|  | bool | useChirality = `false`,
|  | bool | useQueryQueryMatches = `false`,
|  | unsigned int | maxMatches = `1000`
| ) |  |

Find all substructure matches for a query in a molecule.

Parameters

  mol | The ROMol to be searched
  query | The query ROMol
  matchVect | Used to return the matches (pre-existing contents will be deleted)
  uniquify | Toggles uniquification (by atom index) of the results
  recursionPossible | flags whether or not recursive matches are allowed
  useChirality | use atomic CIP codes as part of the comparison
  useQueryQueryMatches | if set, the contents of atom and bond queries will be used as part of the matching
  maxMatches | The maximum number of matches that will be returned. In high-symmetry cases with medium-sized molecules, it is very easy to end up with a combinatorial explosion in the number of possible matches. This argument prevents that from having unintended consequences

Returns
  the number of matches found

template<class T , unsigned int size>

T RDKit::SwapBytes | ( | T | value | ) |

inline

Definition at line 40 of file StreamOps.h.

template<typename IndexType >

double RDKit::TanimotoSimilarity | ( | const SparseIntVect< IndexType > & | v1,
|  | const SparseIntVect< IndexType > & | v2,
|  | bool | returnDistance = `false`,
|  | double | bounds = `0.0`
| ) |  |

Definition at line 545 of file SparseIntVect.h.

References TverskySimilarity().

double RDKit::toPrime | ( | const MatchVectType & | v | ) |

RWMol* RDKit::TPLDataStreamToMol | ( | std::istream * | inStream,
|  | unsigned int & | line,
|  | bool | sanitize = `true`,
|  | bool | skipFirstConf = `false`
| ) |  |

translate TPL data (BioCad format) into a multi-conf molecule

Parameters

  inStream | the stream from which to read
  line | used to track the line number of errors
  sanitize | toggles sanitization and stereochemistry perception of the molecule

  skipFirstConf

  according to the TPL format description, the atomic coords in the atom-information block describe the first conformation and the first conf block describes second conformation. The CombiCode, on the other hand, writes the first conformation data both to the atom-information block and to the first conf block. We want to be able to read CombiCode-style tpls, so we'll allow this mis-feature to be parsed when this flag is set.

RWMol* RDKit::TPLFileToMol | ( | std::string | fName,
|  | bool | sanitize = `true`,
|  | bool | skipFirstConf = `false`
| ) |  |

construct a multi-conf molecule from a TPL (BioCad format) file

Parameters

  fName | the name of the file from which to read
  sanitize | toggles sanitization and stereochemistry perception of the molecule

  skipFirstConf

  according to the TPL format description, the atomic coords in the atom-information block describe the first conformation and the first conf block describes second conformation. The CombiCode, on the other hand, writes the first conformation data both to the atom-information block and to the first conf block. We want to be able to read CombiCode-style tpls, so we'll allow this mis-feature to be parsed when this flag is set.

template<typename IndexType >

double RDKit::TverskySimilarity | ( | const SparseIntVect< IndexType > & | v1,
|  | const SparseIntVect< IndexType > & | v2,
|  | double | a,
|  | double | b,
|  | bool | returnDistance = `false`,
|  | double | bounds = `0.0`
| ) |  |

Definition at line 517 of file SparseIntVect.h.

References RDKit::SparseIntVect< IndexType >::getLength().

Referenced by TanimotoSimilarity().

void RDKit::Union | ( | const INT_VECT & | r1,
|  | const INT_VECT & | r2,
|  | INT_VECT & | res
| ) |  |

calculate the union of two INT_VECTs and put the results in a third vector

void RDKit::Union | ( | const VECT_INT_VECT & | rings,
|  | INT_VECT & | res,
|  | const INT_VECT * | exclude = `NULL`
| ) |  |

calculating the union of the INT_VECT's in a VECT_INT_VECT

Parameters

  rings | the INT_VECT's to consider
  res | used to return results
  exclude | any values in this optional INT_VECT will be excluded from the union.

template<typename IndexType , typename SequenceType >

void RDKit::updateFromSequence | ( | SparseIntVect< IndexType > & | vect,
|  | const SequenceType & | seq
| ) |  |

Definition at line 405 of file SparseIntVect.h.

References RDKit::SparseIntVect< IndexType >::getVal(), and RDKit::SparseIntVect< IndexType >::setVal().

void RDKit::updateProductsStereochem | ( | ChemicalReaction * | rxn | ) |

void RDKit::WedgeMolBonds | ( | ROMol & | mol,
|  | const Conformer * | conf
| ) |  |

## Variable Documentation

std::string RDKit::additionalParamData

const unsigned int RDKit::BITS_PER_INT =32

Definition at line 20 of file DiscreteValueVect.h.

const char* RDKit::boostVersion ="1_58"

Definition at line 13 of file versions.h.

const int RDKit::ci_ATOM_HOLDER

const int RDKit::ci_LEADING_BOND

const int RDKit::ci_RIGHTMOST_ATOM

const double RDKit::DAMP = 0.5

Definition at line 27 of file GasteigerParams.h.

const double RDKit::DAMP_SCALE = 0.5

Definition at line 26 of file GasteigerParams.h.

int RDKit::defaultConfId =-1

static

Definition at line 22 of file MolWriters.h.

const double RDKit::EPS_DOUBLE = std::numeric_limits<double>::epsilon()

Definition at line 137 of file types.h.

const int RDKit::FILE_MAXLINE =256

an assumed maximum length for lines read from files

Definition at line 23 of file utils.h.

int RDKit::firstThousandPrimes

Definition at line 21 of file utils.h.

const double RDKit::IONXH = 20.02

Definition at line 24 of file GasteigerParams.h.

const std::string RDKit::isotopesAtomData[]

const std::string RDKit::LayeredFingerprintMolVersion ="0.7.0"

Definition at line 109 of file Fingerprints.h.

int RDKit::massIntegerConversionFactor =1000

static

Definition at line 79 of file QueryOps.h.

const double RDKit::MAX_DOUBLE = std::numeric_limits<double>::max()

Definition at line 136 of file types.h.

Referenced by RDPickers::MaxMinPicker::lazyPick().

const double RDKit::MAX_INT = static_cast<double>(std::numeric_limits<int>::max())

Definition at line 139 of file types.h.

const double RDKit::MAX_LONGINT = static_cast<double>(std::numeric_limits<LONGINT>::max())

Definition at line 140 of file types.h.

const unsigned int RDKit::maxFingerprintLayers =10

Definition at line 108 of file Fingerprints.h.

const int RDKit::MOLFILE_MAXLINE =256

Definition at line 24 of file FileParsers.h.

const int RDKit::NUM_PRIMES_AVAIL = 1000

the number of primes available and stored

Definition at line 14 of file primes.h.

std::string RDKit::paramData

const std::string RDKit::periodicTableAtomData

const std::string RDKit::RDKFingerprintMolVersion ="2.0.0"

Definition at line 61 of file Fingerprints.h.

const char* RDKit::rdkitVersion ="2015.03.1"

Definition at line 8 of file versions.h.

const double RDKit::SMALL_DOUBLE = 1.0e-8

Definition at line 138 of file types.h.

const unsigned int RDKit::substructLayers =0x07

Definition at line 110 of file Fingerprints.h.