RDKit
Open-source cheminformatics and machine learning.
Loading...
Searching...
No Matches
RDKit::SLNParse Namespace Reference

Classes

class  AttribType
 

Typedefs

typedef std::vector< std::pair< AttribCombineOp, boost::shared_ptr< AttribType > > > AttribListType
 

Enumerations

enum  AttribCombineOp { AttribLowPriAnd = 0 , AttribOr , AttribAnd , AttribNot }
 

Functions

void parseAtomAttribs (Atom *atom, AttribListType attribs, bool doingQuery)
 
void parseFinalAtomAttribs (Atom *atom, bool doingQuery)
 
void parseBondAttribs (Bond *bond, AttribListType attribs, bool doingQuery)
 
void parseFinalBondAttribs (Bond *bond, bool doingQuery)
 
void parseMolAttribs (ROMol *mol, AttribListType attribs)
 
void adjustAtomChiralities (RWMol *mol)
 
RDKIT_SLNPARSE_EXPORT void finalizeQueryMol (ROMol *mol, bool mergeHs)
 
void CleanupAfterParse (RWMol *mol)
 
template<typename AtomType >
int startMol (std::vector< RWMol * > &molList, AtomType *firstAtom, bool doingQuery)
 initialize a molecule
 
template<typename AtomType , typename BondType >
void addAtomToMol (std::vector< RWMol * > &molList, unsigned int idx, AtomType *atom, BondType *bond, bool doingQuery)
 adds an atom to a molecule
 
template<typename AtomType >
void addAtomToMol (std::vector< RWMol * > &molList, unsigned int idx, AtomType *atom, bool doingQuery)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<typename BondType >
void closeRingBond (std::vector< RWMol * > &molList, unsigned int molIdx, unsigned int ringIdx, BondType *bond, bool postponeAllowed=true)
 
void closeRingBond (std::vector< RWMol * > &molList, unsigned int molIdx, unsigned int ringIdx)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<typename BondType >
int addBranchToMol (std::vector< RWMol * > &molList, unsigned int molIdx, unsigned int branchIdx, BondType *&bond)
 
int addBranchToMol (std::vector< RWMol * > &molList, unsigned int molIdx, unsigned int branchIdx)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
int addFragToMol (std::vector< RWMol * > &molList, unsigned int molIdx, unsigned int fragIdx)
 
template<typename T >
std::string convertToString (T val)
 convenience function to convert the argument to a string
 

Typedef Documentation

◆ AttribListType

typedef std::vector<std::pair<AttribCombineOp, boost::shared_ptr<AttribType> > > RDKit::SLNParse::AttribListType

Definition at line 65 of file SLNAttribs.h.

Enumeration Type Documentation

◆ AttribCombineOp

Enumerator
AttribLowPriAnd 
AttribOr 
AttribAnd 
AttribNot 

Definition at line 47 of file SLNAttribs.h.

Function Documentation

◆ addAtomToMol() [1/2]

template<typename AtomType , typename BondType >
void RDKit::SLNParse::addAtomToMol ( std::vector< RWMol * > & molList,
unsigned int idx,
AtomType * atom,
BondType * bond,
bool doingQuery )

adds an atom to a molecule

Definition at line 116 of file SLNParseOps.h.

References RDKit::Atom::getIdx(), PRECONDITION, RDKit::rdvalue_is(), and RDKit::Bond::SINGLE.

Referenced by addAtomToMol().

◆ addAtomToMol() [2/2]

template<typename AtomType >
void RDKit::SLNParse::addAtomToMol ( std::vector< RWMol * > & molList,
unsigned int idx,
AtomType * atom,
bool doingQuery )

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

Definition at line 146 of file SLNParseOps.h.

References addAtomToMol(), RDKit::rdvalue_is(), and RDKit::Bond::SINGLE.

◆ addBranchToMol() [1/2]

int RDKit::SLNParse::addBranchToMol ( std::vector< RWMol * > & molList,
unsigned int molIdx,
unsigned int branchIdx )

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

Definition at line 290 of file SLNParseOps.h.

References addBranchToMol(), RDKit::rdvalue_is(), and RDKit::Bond::SINGLE.

◆ addBranchToMol() [2/2]

template<typename BondType >
int RDKit::SLNParse::addBranchToMol ( std::vector< RWMol * > & molList,
unsigned int molIdx,
unsigned int branchIdx,
BondType *& bond )

◆ addFragToMol()

int RDKit::SLNParse::addFragToMol ( std::vector< RWMol * > & molList,
unsigned int molIdx,
unsigned int fragIdx )

adds the atoms and bonds from a fragment to the molecule, sets no bond between them

Definition at line 306 of file SLNParseOps.h.

References addBranchToMol(), RDKit::Bond::IONIC, and RDKit::rdvalue_is().

◆ adjustAtomChiralities()

void RDKit::SLNParse::adjustAtomChiralities ( RWMol * mol)

◆ CleanupAfterParse()

void RDKit::SLNParse::CleanupAfterParse ( RWMol * mol)

◆ closeRingBond() [1/2]

void RDKit::SLNParse::closeRingBond ( std::vector< RWMol * > & molList,
unsigned int molIdx,
unsigned int ringIdx )

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

Definition at line 189 of file SLNParseOps.h.

References closeRingBond(), RDKit::rdvalue_is(), and RDKit::Bond::SINGLE.

◆ closeRingBond() [2/2]

template<typename BondType >
void RDKit::SLNParse::closeRingBond ( std::vector< RWMol * > & molList,
unsigned int molIdx,
unsigned int ringIdx,
BondType * bond,
bool postponeAllowed = true )

closes an indexed ring in a molecule using the bond provided The bond is formed from the atom in the molecule with the corresponding bookmark to the active atom

Definition at line 157 of file SLNParseOps.h.

References CHECK_INVARIANT, PRECONDITION, RDKit::rdvalue_is(), and RDKit::Atom::setOwningMol().

Referenced by addBranchToMol(), and closeRingBond().

◆ convertToString()

template<typename T >
std::string RDKit::SLNParse::convertToString ( T val)

convenience function to convert the argument to a string

Definition at line 321 of file SLNParseOps.h.

References RDKit::rdvalue_is().

◆ finalizeQueryMol()

RDKIT_SLNPARSE_EXPORT void RDKit::SLNParse::finalizeQueryMol ( ROMol * mol,
bool mergeHs )

◆ parseAtomAttribs()

void RDKit::SLNParse::parseAtomAttribs ( Atom * atom,
AttribListType attribs,
bool doingQuery )

parses the attributes provided for an atom and sets the appropriate RD properties/queries. NOTES: 1) Some SLN query values cannot be properly set until the molecule is fully/ initialized. These are handled by parseFinalAtomAttribs()

◆ parseBondAttribs()

void RDKit::SLNParse::parseBondAttribs ( Bond * bond,
AttribListType attribs,
bool doingQuery )

parses the attributes provided for a bond and sets the appropriate RD properties/queries. NOTES: 1) Some SLN query values cannot be properly set until the molecule is fully/ initialized. These are handled by parseFinalBondAttribs()

◆ parseFinalAtomAttribs()

void RDKit::SLNParse::parseFinalAtomAttribs ( Atom * atom,
bool doingQuery )

◆ parseFinalBondAttribs()

void RDKit::SLNParse::parseFinalBondAttribs ( Bond * bond,
bool doingQuery )

◆ parseMolAttribs()

void RDKit::SLNParse::parseMolAttribs ( ROMol * mol,
AttribListType attribs )

parses the attributes provided for a ctab and sets the appropriate RD properties/queries.

◆ startMol()

template<typename AtomType >
int RDKit::SLNParse::startMol ( std::vector< RWMol * > & molList,
AtomType * firstAtom,
bool doingQuery )

initialize a molecule

Definition at line 90 of file SLNParseOps.h.

References PRECONDITION, RDKit::rdvalue_is(), and RDKit::Bond::SINGLE.