Open Babel  3.0
Namespaces | Macros | Functions | Variables
parsmart.cpp File Reference
#include <openbabel/babelconfig.h>
#include <ctype.h>
#include <iomanip>
#include <cstring>
#include <openbabel/mol.h>
#include <openbabel/atom.h>
#include <openbabel/bond.h>
#include <openbabel/parsmart.h>
#include <openbabel/stereo/stereo.h>
#include <openbabel/stereo/tetrahedral.h>

Namespaces

 OpenBabel
 

Macros

#define ATOMPOOL   1
 
#define BONDPOOL   1
 
#define AE_ANDHI   1
 
#define AE_ANDLO   2
 
#define AE_OR   3
 
#define AE_RECUR   4
 
#define AE_NOT   5
 
#define AE_TRUE   6
 
#define AE_FALSE   7
 
#define AE_AROMATIC   8
 
#define AE_ALIPHATIC   9
 
#define AE_CYCLIC   10
 
#define AE_ACYCLIC   11
 
#define AE_MASS   12
 
#define AE_ELEM   13
 
#define AE_AROMELEM   14
 
#define AE_ALIPHELEM   15
 
#define AE_HCOUNT   16
 
#define AE_CHARGE   17
 
#define AE_CONNECT   18
 
#define AE_DEGREE   19
 
#define AE_IMPLICIT   20
 
#define AE_RINGS   21
 
#define AE_SIZE   22
 
#define AE_VALENCE   23
 
#define AE_CHIRAL   24
 
#define AE_HYB   25
 
#define AE_RINGCONNECT   26
 
#define AL_CLOCKWISE   1
 
#define AL_ANTICLOCKWISE   2
 
#define AL_UNSPECIFIED   0
 
#define BE_ANDHI   1
 
#define BE_ANDLO   2
 
#define BE_OR   3
 
#define BE_NOT   4
 
#define BE_ANY   5
 
#define BE_DEFAULT   6
 
#define BE_SINGLE   7
 
#define BE_DOUBLE   8
 
#define BE_TRIPLE   9
 
#define BE_QUAD   10
 
#define BE_AROM   11
 
#define BE_RING   12
 
#define BE_UP   13
 
#define BE_DOWN   14
 
#define BE_UPUNSPEC   15
 
#define BE_DOWNUNSPEC   16
 

Functions

static int CreateAtom (Pattern *, AtomExpr *, int, int vb=0)
 
static void FatalAllocationError (const char *ptr)
 
static void FreePattern (Pattern *)
 
static Pattern * CopyPattern (Pattern *)
 
static AtomExpr * CopyAtomExpr (AtomExpr *expr)
 
static void FreeAtomExpr (AtomExpr *expr)
 
static AtomExpr * BuildAtomPred (int type)
 
static AtomExpr * BuildAtomLeaf (int type, 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 BondExpr * CopyBondExpr (BondExpr *expr)
 
static bool EquivalentBondExpr (BondExpr *expr1, BondExpr *expr2)
 
static void FreeBondExpr (BondExpr *expr)
 
static BondExpr * BuildBondLeaf (int type)
 
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 void MarkGrowBonds (Pattern *pat)
 
static int GetChiralFlag (AtomExpr *expr)
 
static int GetExprOrder (BondExpr *expr)
 
static int GetExprCharge (AtomExpr *expr)
 
static int GetExprAtomicNum (AtomExpr *expr)
 
void SmartsLexReplace (std::string &s, std::vector< std::pair< std::string, std::string > > &vlex)
 

Variables

const int SmartsImplicitRef = -9999
 

Detailed Description

Implementation of Daylight SMARTS parser.

Macro Definition Documentation

◆ ATOMPOOL

#define ATOMPOOL   1

Referenced by OpenBabel::CreateAtom().

◆ BONDPOOL

#define BONDPOOL   1

Referenced by OpenBabel::CreateBond().

◆ AE_ANDHI

#define AE_ANDHI   1

◆ AE_ANDLO

#define AE_ANDLO   2

◆ AE_OR

#define AE_OR   3

◆ AE_RECUR

#define AE_RECUR   4

◆ AE_NOT

#define AE_NOT   5

◆ AE_TRUE

#define AE_TRUE   6

◆ AE_FALSE

#define AE_FALSE   7

◆ AE_AROMATIC

#define AE_AROMATIC   8

◆ AE_ALIPHATIC

#define AE_ALIPHATIC   9

◆ AE_CYCLIC

#define AE_CYCLIC   10

◆ AE_ACYCLIC

#define AE_ACYCLIC   11

◆ AE_MASS

#define AE_MASS   12

◆ AE_ELEM

#define AE_ELEM   13

◆ AE_AROMELEM

#define AE_AROMELEM   14

◆ AE_ALIPHELEM

#define AE_ALIPHELEM   15

◆ AE_HCOUNT

#define AE_HCOUNT   16

◆ AE_CHARGE

#define AE_CHARGE   17

◆ AE_CONNECT

#define AE_CONNECT   18

◆ AE_DEGREE

#define AE_DEGREE   19

◆ AE_IMPLICIT

#define AE_IMPLICIT   20

◆ AE_RINGS

#define AE_RINGS   21

◆ AE_SIZE

#define AE_SIZE   22

◆ AE_VALENCE

#define AE_VALENCE   23

◆ AE_CHIRAL

#define AE_CHIRAL   24

◆ AE_HYB

#define AE_HYB   25

◆ AE_RINGCONNECT

#define AE_RINGCONNECT   26

◆ AL_CLOCKWISE

#define AL_CLOCKWISE   1

◆ AL_ANTICLOCKWISE

#define AL_ANTICLOCKWISE   2

◆ AL_UNSPECIFIED

#define AL_UNSPECIFIED   0

◆ BE_ANDHI

#define BE_ANDHI   1

◆ BE_ANDLO

#define BE_ANDLO   2

◆ BE_OR

#define BE_OR   3

◆ BE_NOT

#define BE_NOT   4

◆ BE_ANY

#define BE_ANY   5

◆ BE_DEFAULT

#define BE_DEFAULT   6

◆ BE_SINGLE

#define BE_SINGLE   7

◆ BE_DOUBLE

#define BE_DOUBLE   8

◆ BE_TRIPLE

#define BE_TRIPLE   9

◆ BE_QUAD

#define BE_QUAD   10

◆ BE_AROM

#define BE_AROM   11

◆ BE_RING

#define BE_RING   12

◆ BE_UP

#define BE_UP   13

Referenced by OpenBabel::GetExprOrder().

◆ BE_DOWN

#define BE_DOWN   14

Referenced by OpenBabel::GetExprOrder().

◆ BE_UPUNSPEC

#define BE_UPUNSPEC   15

Referenced by OpenBabel::GetExprOrder().

◆ BE_DOWNUNSPEC

#define BE_DOWNUNSPEC   16

Referenced by OpenBabel::GetExprOrder().