#include <ctype.h>
#include <iostream>
#include <iomanip>
#include "mol.h"
#include "bitvec.h"
#include "parsmart.h"
Namespaces | |
namespace | OpenBabel |
Defines | |
#define | True 1 |
#define | False 0 |
#define | VERBOSE |
#define | UnusedArgument(x) |
#define | ELEMMAX 104 |
#define | ATOMEXPRPOOL 1 |
#define | BONDEXPRPOOL 1 |
#define | ATOMPOOL 1 |
#define | BONDPOOL 1 |
#define | BF_NONRINGUNSPEC 0x0001 |
#define | BF_NONRINGDOWN 0x0002 |
#define | BF_NONRINGUP 0x0004 |
#define | BF_NONRINGDOUBLE 0x0008 |
#define | BF_NONRINGTRIPLE 0x0010 |
#define | BF_RINGUNSPEC 0x0020 |
#define | BF_RINGDOWN 0x0040 |
#define | BF_RINGUP 0x0080 |
#define | BF_RINGAROM 0x0100 |
#define | BF_RINGDOUBLE 0x0200 |
#define | BF_RINGTRIPLE 0x0400 |
#define | BS_ALL 0x07FF |
#define | BS_SINGLE 0x00E7 |
#define | BS_DOUBLE 0x0208 |
#define | BS_TRIPLE 0x0410 |
#define | BS_AROM 0x0100 |
#define | BS_UP 0x0084 |
#define | BS_DOWN 0x0042 |
#define | BS_UPUNSPEC 0x00A5 |
#define | BS_DOWNUNSPEC 0x0063 |
#define | BS_RING 0x07E0 |
#define | BS_DEFAULT 0x01E7 |
#define | BUFMAX 1024 |
#define | OB_EVAL_STACKSIZE 40 |
#define | RECURSIVE |
Functions | |
static bool | match (OBMol &mol, Pattern *pat, std::vector< std::vector< int > > &mlist, bool single=false) |
static bool | EvalAtomExpr (AtomExpr *expr, OBAtom *atom) |
static bool | EvalBondExpr (BondExpr *expr, OBBond *bond) |
static int | GetVectorBinding () |
static int | CreateAtom (Pattern *, AtomExpr *, int, int vb=0) |
static void | FatalAllocationError (char *ptr) |
static void | FreePattern (Pattern *) |
static Pattern * | CopyPattern (Pattern *) |
static AtomExpr * | AllocAtomExpr (void) |
static AtomExpr * | CopyAtomExpr (AtomExpr *expr) |
static void | FreeAtomExpr (AtomExpr *expr) |
static AtomExpr * | BuildAtomLeaf (int prop, int val) |
static AtomExpr * | BuildAtomNot (AtomExpr *expr) |
static AtomExpr * | BuildAtomBin (int op, AtomExpr *lft, AtomExpr *rgt) |
static AtomExpr * | BuildAtomRecurs (Pattern *pat) |
static AtomExpr * | GenerateElement (int elem) |
static AtomExpr * | GenerateAromElem (int elem, int flag) |
static int | IsInvalidAtom (AtomExpr *expr) |
static BondExpr * | AllocBondExpr (void) |
static BondExpr * | CopyBondExpr (BondExpr *expr) |
static bool | EquivalentBondExpr (BondExpr *expr1, BondExpr *expr2) |
static void | FreeBondExpr (BondExpr *expr) |
static BondExpr * | BuildBondLeaf (int prop, int val) |
static BondExpr * | BuildBondNot (BondExpr *expr) |
static BondExpr * | BuildBondBin (int op, BondExpr *lft, BondExpr *rgt) |
static BondExpr * | GenerateDefaultBond (void) |
static Pattern * | AllocPattern (void) |
static int | CreateBond (Pattern *pat, BondExpr *expr, int src, int dst) |
static Pattern * | ParseSMARTSPattern (void) |
static Pattern * | ParseSMARTSPart (Pattern *, int) |
static Pattern * | SMARTSError (Pattern *pat) |
static AtomExpr * | ParseSimpleAtomPrimitive (void) |
static AtomExpr * | ParseComplexAtomPrimitive (void) |
static AtomExpr * | ParseAtomExpr (int level) |
static BondExpr * | ParseBondPrimitive (void) |
static BondExpr * | ParseBondExpr (int level) |
static Pattern * | ParseSMARTSError (Pattern *pat, BondExpr *expr) |
static Pattern * | SMARTSParser (Pattern *pat, ParseState *stat, int prev, int part) |
static void | MarkGrowBonds (Pattern *pat) |
static int | GetChiralFlag (AtomExpr *expr) |
static Pattern * | ParseSMARTSString (char *ptr) |
Pattern * | ParseSMARTSRecord (char *ptr) |
static void | TraverseSMARTS (Pattern *pat, int i) |
static AtomExpr * | NotAtomExpr (AtomExpr *) |
static AtomExpr * | AndAtomExpr (AtomExpr *, AtomExpr *) |
static AtomExpr * | OrAtomExpr (AtomExpr *, AtomExpr *) |
static int | IsBooleanAtomLeaf (AtomExpr *expr) |
static int | IsNegatingAtomLeaf (AtomExpr *expr) |
static int | EqualAtomExpr (AtomExpr *lft, AtomExpr *rgt) |
static int | OrderAtomExpr (AtomExpr *lft, AtomExpr *rgt) |
static int | AtomLeafConflict (AtomExpr *lft, AtomExpr *rgt) |
static int | AtomExprConflict (AtomExpr *lft, AtomExpr *rgt) |
static int | AtomLeafImplies (AtomExpr *lft, AtomExpr *rgt) |
static int | AtomExprImplied (AtomExpr *lft, AtomExpr *rgt) |
static AtomExpr * | AtomExprImplies (AtomExpr *lft, AtomExpr *rgt) |
static AtomExpr * | AndAtomExprLeaf (AtomExpr *lft, AtomExpr *rgt) |
static AtomExpr * | ConstrainRecursion (AtomExpr *recur, AtomExpr *expr) |
static AtomExpr * | OrAtomExprLeaf (AtomExpr *lft, AtomExpr *rgt) |
static int | GetBondLeafIndex (BondExpr *expr) |
static int | GetBondExprIndex (BondExpr *expr) |
static BondExpr * | NotBondExpr (BondExpr *expr) |
static BondExpr * | TransformBondExpr (BondExpr *expr) |
void | SetupAtomMatchTable (std::vector< std::vector< bool > > &ttab, Pattern *pat, OBMol &mol) |
static void | FastSingleMatch (OBMol &mol, Pattern *pat, std::vector< std::vector< int > > &mlist) |
static int | GetExprOrder (BondExpr *expr) |
void | SmartsLexReplace (std::string &s, std::vector< std::pair< std::string, std::string > > &vlex) |
Variables | |
std::vector< std::pair< Pattern *, std::vector< bool > > > | RSCACHE |
static char * | MainPtr |
static char * | LexPtr |
static char | Buffer [BUFMAX] |
static char | Descr [BUFMAX] |
#define True 1 |
#define False 0 |
#define VERBOSE |
#define UnusedArgument | ( | x | ) |
#define ELEMMAX 104 |
#define ATOMEXPRPOOL 1 |
#define BONDEXPRPOOL 1 |
#define ATOMPOOL 1 |
#define BONDPOOL 1 |
#define BF_NONRINGUNSPEC 0x0001 |
#define BF_NONRINGDOWN 0x0002 |
#define BF_NONRINGUP 0x0004 |
#define BF_NONRINGDOUBLE 0x0008 |
#define BF_NONRINGTRIPLE 0x0010 |
#define BF_RINGUNSPEC 0x0020 |
#define BF_RINGDOWN 0x0040 |
#define BF_RINGUP 0x0080 |
#define BF_RINGAROM 0x0100 |
#define BF_RINGDOUBLE 0x0200 |
#define BF_RINGTRIPLE 0x0400 |
#define BS_ALL 0x07FF |
#define BS_SINGLE 0x00E7 |
#define BS_DOUBLE 0x0208 |
#define BS_TRIPLE 0x0410 |
#define BS_AROM 0x0100 |
#define BS_UP 0x0084 |
#define BS_DOWN 0x0042 |
#define BS_UPUNSPEC 0x00A5 |
#define BS_DOWNUNSPEC 0x0063 |
#define BS_RING 0x07E0 |
#define BS_DEFAULT 0x01E7 |
#define BUFMAX 1024 |
#define OB_EVAL_STACKSIZE 40 |
#define RECURSIVE |