Open Babel  3.0
distgeom.h
Go to the documentation of this file.
1 /**********************************************************************
2 distgeom.h - Distance Geometry generation and sampling
3 
4  Copyright (C) 2011 by Tim Vandermeersch
5  Copyright (C) 2012 by Geoffrey Hutchison
6 
7 This file is part of the Open Babel project.
8 For more information, see <http://openbabel.org/>
9 
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation version 2 of the License.
13 
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18 ***********************************************************************/
19 
20 #ifndef OB_DISTGEOM_H
21 #define OB_DISTGEOM_H
22 
23 #include <openbabel/babelconfig.h>
24 #include <openbabel/mol.h>
25 
26 #ifndef OBAPI
27  #define OBAPI
28 #endif
29 
30 #ifdef HAVE_EIGEN
31 
32 #include <Eigen/Core>
33 
34 namespace OpenBabel {
35 
36  class DistanceGeometryPrivate;
37  class OBCisTransStereo;
38 
39  class OBAPI OBDistanceGeometry {
40  public:
41  OBDistanceGeometry();
42  OBDistanceGeometry(const OBMol &mol, bool useCurrentGeometry);
43  ~OBDistanceGeometry();
44 
54  bool Setup(const OBMol &mol, bool useCurrentGeom = false);
55 
56  void AddConformer();
57  void GetConformers(OBMol &mol);
58 
64  bool GetGeometry(OBMol &mol, bool useCurrentGeom = false);
65 
67  Eigen::MatrixXf GetBoundsMatrix();
72  bool SetBoundsMatrix(const Eigen::MatrixXf bounds);
73 
74  private:
75  OBMol _mol;
76  DistanceGeometryPrivate *_d;
77 
80  void SetUpperBounds();
83  void Set12Bounds(bool useCurrentGeom);
86  void Set13Bounds(bool useCurrentGeom);
88  void SetAromaticRingBounds();
90  void Set14Bounds();
92  void Set15Bounds();
94  int AreInSameRing(OBAtom *a, OBAtom *b);
96  void TriangleSmooth(int iterations = 8);
98  void SetLowerBounds();
99 
101  OBCisTransStereo *GetCisTransStereo(OBBond *bond);
102 
104  void CorrectStereoConstraints(double scale = 1.0);
107  bool CheckStereoConstraints();
108 
110  bool CheckBounds();
111  };
112 
113 
114 }
115 
116 #endif
117 
118 #endif
119 
Handle molecules. Declarations of OBMol, OBAtom, OBBond, OBResidue. (the main header for Open Babel) ...
Global namespace for all Open Babel code.
Definition: alias.h:22