Loading...
Searching...
No Matches
typer.h
Go to the documentation of this file.
/**********************************************************************
typer.h - Open Babel atom and aromaticity typer.
Copyright (C) 1998-2001 by OpenEye Scientific Software, Inc.
Some portions Copyright (C) 2001-2005 by Geoffrey R. Hutchison
This file is part of the Open Babel project.
For more information, see <http://openbabel.org/>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
***********************************************************************/
#ifndef OB_TYPER_H
#define OB_TYPER_H
#include <openbabel/babelconfig.h>
#include <openbabel/mol.h>
#include <vector>
#include <string>
#include <openbabel/parsmart.h>
#include <openbabel/data.h>
namespace OpenBabel
{
// Forward declaration
class OBSmartsPattern;
// class introduction in typer.cpp
class OBAPI OBAtomTyper : public OBGlobalDataBase
{
std::vector<std::pair<OBSmartsPattern*,int> > _vinthyb;
std::vector<std::pair<OBSmartsPattern*,std::string> > _vexttyp;
public:
OBAtomTyper();
OBAtomTyper(const OBAtomTyper& rhs) {abort();}
~OBAtomTyper();
//swig is requiring these, but I can't figure out how to make it not, so definte with abort
const OBAtomTyper& operator=(const OBAtomTyper& rhs) {abort();}
void ParseLine(const char*);
size_t GetSize() { return _vinthyb.size(); }
void AssignHyb(OBMol&);
void AssignTypes(OBMol&);
};
#ifndef THREAD_LOCAL
# define THREAD_LOCAL
#endif
#ifndef OB_EXTERN
#error OB_EXTERN
#endif
THREAD_LOCAL OB_EXTERN OBAtomTyper atomtyper;
// class introduction in typer.cpp
class OBAPI OBAromaticTyper
{
public:
OBAromaticTyper() {};
~OBAromaticTyper() {};
void AssignAromaticFlags(OBMol &);
};
THREAD_LOCAL OB_EXTERN OBAromaticTyper aromtyper;
// class introduction in typer.cpp
class OBAPI OBRingTyper : public OBGlobalDataBase
{
std::vector<std::pair<OBSmartsPattern*,std::string> > _ringtyp;
public:
OBRingTyper();
~OBRingTyper();
void ParseLine(const char*);
size_t GetSize() { return _ringtyp.size();}
void AssignTypes(OBMol&);
};
} //namespace OpenBabel
#endif // OB_TYPER_H
OB_EXTERN
#define OB_EXTERN
Definition atom.h:27
OpenBabel::OBAromaticTyper
Assigns aromatic typing to atoms and bonds.
Definition typer.h:74
OpenBabel::OBAromaticTyper::~OBAromaticTyper
~OBAromaticTyper()
Definition typer.h:77
OpenBabel::OBAromaticTyper::OBAromaticTyper
OBAromaticTyper()
Definition typer.h:76
OpenBabel::OBAtomTyper
Assigns atom types, hybridization, and formal charges.
Definition typer.h:40
OpenBabel::OBAtomTyper::OBAtomTyper
OBAtomTyper()
Definition typer.cpp:60
OpenBabel::OBAtomTyper::OBAtomTyper
OBAtomTyper(const OBAtomTyper &rhs)
Definition typer.h:46
OpenBabel::OBAtomTyper::operator=
const OBAtomTyper & operator=(const OBAtomTyper &rhs)
Definition typer.h:50
OpenBabel::OBAtomTyper::GetSize
size_t GetSize()
Definition typer.h:54
OpenBabel::OBGlobalDataBase::OBGlobalDataBase
OBGlobalDataBase()
Constructor.
Definition data.h:60
OpenBabel::OBMol
Molecule Class.
Definition mol.h:121
OpenBabel::OBRingTyper::GetSize
size_t GetSize()
Definition typer.h:97
OpenBabel::OBRingTyper::OBRingTyper
OBRingTyper()
Definition typer.cpp:243
OpenBabel::OBRingTyper::ParseLine
void ParseLine(const char *)
Specified by particular table classes (parses an individual data line).
Definition typer.cpp:253
OpenBabel::OBSmartsPattern
SMARTS (SMiles ARbitrary Target Specification) substructure searching.
Definition parsmart.h:155
data.h
Global data and resource file parsers.
mol.h
Handle molecules. Declarations of OBMol, OBAtom, OBBond, OBResidue. (the main header for Open Babel).
THREAD_LOCAL
#define THREAD_LOCAL
Definition mol.h:37
OpenBabel
Global namespace for all Open Babel code.
Definition alias.h:23
OpenBabel::atomtyper
THREAD_LOCAL OB_EXTERN OBAtomTyper atomtyper
Definition typer.h:70
OpenBabel::aromtyper
THREAD_LOCAL OB_EXTERN OBAromaticTyper aromtyper
Global OBAromaticTyper for detecting aromatic atoms and bonds.
Definition typer.h:84
parsmart.h
Daylight SMARTS parser.