1
1
/**********************************************************************
2
2
phmodel.h - Read pH rules and assign charges.
4
4
Copyright (C) 1998-2001 by OpenEye Scientific Software, Inc.
5
Some portions Copyright (c) 2001-2003 by Geoffrey R. Hutchison
5
Some portions Copyright (C) 2001-2005 by Geoffrey R. Hutchison
7
7
This file is part of the Open Babel project.
8
8
For more information, see <http://openbabel.sourceforge.net/>
10
10
This program is free software; you can redistribute it and/or modify
11
11
it under the terms of the GNU General Public License as published by
12
12
the Free Software Foundation version 2 of the License.
14
14
This program is distributed in the hope that it will be useful,
15
15
but WITHOUT ANY WARRANTY; without even the implied warranty of
16
16
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
23
#include "parsmart.h"
28
29
// class introduction in phmodel.cpp
30
class OBAPI OBChemTsfm
31
std::vector<int> _vadel;
32
std::vector<std::pair<int,int> > _vele;
33
std::vector<std::pair<int,int> > _vchrg;
34
std::vector<std::pair<int,int> > _vbdel;
35
std::vector<std::pair<std::pair<int,int>,int> > _vbond;
36
OBSmartsPattern _bgn,_end;
32
std::vector<int> _vadel;
33
std::vector<std::pair<int,int> > _vele;
34
std::vector<std::pair<int,int> > _vchrg;
35
std::vector<std::pair<int,int> > _vbdel;
36
std::vector<std::pair<std::pair<int,int>,int> > _vbond;
37
OBSmartsPattern _bgn,_end;
40
bool Init(std::string&,std::string&);
41
//! Initialize this transformation with the supplied SMARTS patterns
42
bool Init(std::string&start, std::string &end);
43
//! Apply this transformation to all matches in the supplied OBMol
44
47
//! \brief Corrections for pH used by OBMol::CorrectForPH()
45
48
class OBPhModel : public OBGlobalDataBase
47
std::vector<std::vector<int> > _mlist;
48
std::vector<OBChemTsfm*> _vtsfm;
49
std::vector<std::pair<OBSmartsPattern*,std::vector<double> > > _vschrg;
50
std::vector<std::vector<int> > _mlist;
51
std::vector<OBChemTsfm*> _vtsfm;
52
std::vector<std::pair<OBSmartsPattern*,std::vector<double> > > _vschrg;
54
void ParseLine(const char*);
55
void AssignSeedPartialCharge(OBMol&);
56
void CorrectForPH(OBMol&);
57
void ParseLine(const char*);
58
//! \return the number of chemical transformations
59
unsigned int GetSize() { return _vtsfm.size();}
60
void AssignSeedPartialCharge(OBMol&);
61
void CorrectForPH(OBMol&);