RDKit
Open-source cheminformatics and machine learning.
TriangleSmooth.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2004-2006 Rational Discovery LLC
3 //
4 // @@ All Rights Reserved @@
5 // This file is part of the RDKit.
6 // The contents are covered by the terms of the BSD license
7 // which is included in the file license.txt, found at the root
8 // of the RDKit source tree.
9 //
10 #ifndef __RD_TRIANGLE_SMOOTH_H__
11 #define __RD_TRIANGLE_SMOOTH_H__
12 
13 #include "BoundsMatrix.h"
14 
15 
16 namespace DistGeom {
17  //! Smooth the upper and lower bound in a metric matrix so that triangle
18  //! inequality is not violated
19  /*!
20  This an implementation of the O(N^3) algorithm given on pages 252-253 of
21  "Distance Geometry and Molecular Conformation" by G.M.Crippen and T.F.Havel
22  Research Studies Press, 1988. There are other (slightly) more implementations
23  (see pages 301-302 in the above book), but that is for later
24 
25  \param boundsMat A pointer to the distance bounds matrix
26  \param tol a tolerance (percent) for errors in the smoothing process
27 
28  */
29  bool triangleSmoothBounds(BoundsMatrix *boundsMat,double tol=0.);
30  //! \overload
31  bool triangleSmoothBounds(BoundsMatPtr boundsMat,double tol=0.);
32 }
33 
34 #endif
35 
boost::shared_ptr< BoundsMatrix > BoundsMatPtr
Definition: BoundsMatrix.h:113
bool triangleSmoothBounds(BoundsMatrix *boundsMat, double tol=0.)