1 |
/********************************************************************** |
2 |
bondtyper.h - Bond typer to perceive connectivity and bond orders/types. |
3 |
|
4 |
Copyright (C) 2003-2005 by Geoffrey R. Hutchison |
5 |
|
6 |
This file is part of the Open Babel project. |
7 |
For more information, see <http://openbabel.sourceforge.net/> |
8 |
|
9 |
This program is free software; you can redistribute it and/or modify |
10 |
it under the terms of the GNU General Public License as published by |
11 |
the Free Software Foundation version 2 of the License. |
12 |
|
13 |
This program is distributed in the hope that it will be useful, |
14 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 |
GNU General Public License for more details. |
17 |
***********************************************************************/ |
18 |
|
19 |
#ifndef OB_BONDTYPER_H |
20 |
#define OB_BONDTYPER_H |
21 |
|
22 |
#include "parsmart.hpp" |
23 |
#include "data.hpp" |
24 |
|
25 |
namespace OpenBabel |
26 |
{ |
27 |
|
28 |
// class introduction in bondtyper.cpp |
29 |
// Used for "perceiving" bonds, e.g. in XYZ or QM files with no bond info. |
30 |
class OBAPI OBBondTyper : public OBGlobalDataBase |
31 |
{ |
32 |
//! SMARTS patterns for functional group typing |
33 |
std::vector<std::pair<OBSmartsPattern*, std::vector<int> > > _fgbonds; |
34 |
public: |
35 |
OBBondTyper(); |
36 |
~OBBondTyper(); |
37 |
|
38 |
//! \name OBBondTyper Database Utilities |
39 |
//@{ |
40 |
void ParseLine(const char*); |
41 |
//! \return the size of the database (for error checking) |
42 |
unsigned int GetSize() { return _fgbonds.size();} |
43 |
//@} |
44 |
|
45 |
//! \name Bond Perception Routines |
46 |
//@{ |
47 |
//! Assign bonds to functional groups based on the bond typer database |
48 |
void AssignFunctionalGroupBonds(OBMol &mol); |
49 |
//@} |
50 |
}; |
51 |
|
52 |
} |
53 |
|
54 |
#endif // OB_BONDTYPER_H |
55 |
|
56 |
//! \file bondtyper.h |
57 |
//! \brief Bond typer to perceive connectivity and bond orders/types. |