~ubuntu-branches/ubuntu/feisty/openbabel/feisty

« back to all changes in this revision

Viewing changes to src/phmodel.h

  • Committer: Bazaar Package Importer
  • Author(s): Michael Banck
  • Date: 2006-05-14 19:46:01 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060514194601-h3j1wovvc42cigxl
Tags: 2.0.1-1
* New upstream release. (Closes: #341628)
* debian/patches/04_zipstream_fix.diff: Removed, applied upstream.
* debian/rules (DEB_MAKE_CHECK_TARGET): Readded.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/**********************************************************************
2
2
phmodel.h - Read pH rules and assign charges.
3
 
 
 
3
 
4
4
Copyright (C) 1998-2001 by OpenEye Scientific Software, Inc.
5
 
Some portions Copyright (c) 2001-2003 by Geoffrey R. Hutchison
6
 
 
 
5
Some portions Copyright (C) 2001-2005 by Geoffrey R. Hutchison
 
6
 
7
7
This file is part of the Open Babel project.
8
8
For more information, see <http://openbabel.sourceforge.net/>
9
 
 
 
9
 
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.
13
 
 
 
13
 
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"
24
24
#include "data.h"
25
25
 
26
 
namespace OpenBabel {
 
26
namespace OpenBabel
 
27
{
27
28
 
28
29
// class introduction in phmodel.cpp
29
 
class OBChemTsfm
 
30
class OBAPI OBChemTsfm
30
31
{
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;
37
38
public:
38
 
  OBChemTsfm() {}
39
 
  ~OBChemTsfm() {}
40
 
  bool Init(std::string&,std::string&);
41
 
  bool Apply(OBMol&);
 
39
    OBChemTsfm()    {}
 
40
    ~OBChemTsfm()   {}
 
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
    bool Apply(OBMol&);
42
45
};
43
46
 
44
47
//! \brief Corrections for pH used by OBMol::CorrectForPH()
45
48
class OBPhModel : public OBGlobalDataBase
46
49
{
47
 
  std::vector<std::vector<int> >                      _mlist;
48
 
  std::vector<OBChemTsfm*>                            _vtsfm;
49
 
  std::vector<std::pair<OBSmartsPattern*,std::vector<double> > > _vschrg;
50
 
 public:
51
 
  OBPhModel();
52
 
  ~OBPhModel();
 
50
    std::vector<std::vector<int> >                      _mlist;
 
51
    std::vector<OBChemTsfm*>                            _vtsfm;
 
52
    std::vector<std::pair<OBSmartsPattern*,std::vector<double> > > _vschrg;
 
53
public:
 
54
    OBPhModel();
 
55
    ~OBPhModel();
53
56
 
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&);
57
62
};
58
63
 
59
64
 
61
66
} //namespace OpenBabel
62
67
 
63
68
#endif // OB_PHMODEL_H
 
69
 
 
70
//! \file phmodel.h
 
71
//! \brief Read pH rules and assign charges.