RDKit
Open-source cheminformatics and machine learning.
BoundsMatrixBuilder.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 #include <RDGeneral/export.h>
11 #ifndef _RD_BOUNDS_MATRIX_BUILDER_H_
12 #define _RD_BOUNDS_MATRIX_BUILDER_H_
13 
14 #include <DistGeom/BoundsMatrix.h>
15 
16 namespace RDKit {
17 class ROMol;
18 namespace DGeomHelpers {
19 //! Set default upper and lower distance bounds in a distance matrix
20 /*!
21  \param mmat pointer to the bounds matrix to be altered
22  \param defaultMin default value for the lower distance bounds
23  \param defaultMax default value for the upper distance bounds
24 
25 */
26 RDKIT_DISTGEOMHELPERS_EXPORT void initBoundsMat(DistGeom::BoundsMatrix *mmat, double defaultMin = 0.0,
27  double defaultMax = 1000.0);
28 RDKIT_DISTGEOMHELPERS_EXPORT void initBoundsMat(DistGeom::BoundsMatPtr mmat, double defaultMin = 0.0,
29  double defaultMax = 1000.0);
30 
31 //! Set upper and lower distance bounds between atoms in a molecule based on
32 // topology
33 /*!
34  This consists of setting 1-2, 1-3 and 1-4 distance based on bond lengths,
35  bond angles and torsion angle ranges. Optionally 1-5 bounds can also be set,
36  in particular, for path that contain rigid 1-4 paths.
37 
38  The final step involves setting lower bound to the sum of the vdW radii for
39  the remaining atom pairs.
40 
41  \param mol The molecule of interest
42  \param mmat Bounds matrix to the bounds are written
43  \param set15bounds If true try to set 1-5 bounds also based on topology
44  \param scaleVDW If true scale the sum of the vdW radii while setting lower
45  bounds
46  so that a smaller value (0.7*(vdw1 + vdw2) ) is used for
47  paths
48  that are less five bonds apart.
49 
50  <b>Note</b>
51  For some strained systems the bounds matrix resulting from setting 1-5 bounds
52  may
53  fail triangle smoothing. In these cases it is recommended to back out and
54  recompute the bounds matrix with no 1-5 bounds and with vdW scaling.
55 */
57  bool set15bounds = true, bool scaleVDW = false);
58 
59 /*! Overload for experimental torsion angle preferences */
61  std::vector<std::pair<int, int> > &bonds,
62  std::vector<std::vector<int> > &angles,
63  bool set15bounds = true, bool scaleVDW = false);
64 }
65 }
66 #endif
RDKIT_DISTGEOMHELPERS_EXPORT void initBoundsMat(DistGeom::BoundsMatrix *mmat, double defaultMin=0.0, double defaultMax=1000.0)
Set default upper and lower distance bounds in a distance matrix.
boost::shared_ptr< BoundsMatrix > BoundsMatPtr
Definition: BoundsMatrix.h:117
RDKIT_DISTGEOMHELPERS_EXPORT void setTopolBounds(const ROMol &mol, DistGeom::BoundsMatPtr mmat, bool set15bounds=true, bool scaleVDW=false)
Set upper and lower distance bounds between atoms in a molecule based on.
Std stuff.
Definition: Atom.h:30
#define RDKIT_DISTGEOMHELPERS_EXPORT
Definition: export.h:151
Class to store the distance bound.
Definition: BoundsMatrix.h:27