File: BoundsMatrixBuilder.h

package info (click to toggle)
rdkit 201809.1%2Bdfsg-6
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 123,688 kB
  • sloc: cpp: 230,509; python: 70,501; java: 6,329; ansic: 5,427; sql: 1,899; yacc: 1,739; lex: 1,243; makefile: 445; xml: 229; fortran: 183; sh: 123; cs: 93
file content (66 lines) | stat: -rw-r--r-- 2,654 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
//
//  Copyright (C) 2004-2006 Rational Discovery LLC
//
//   @@ All Rights Reserved @@
//  This file is part of the RDKit.
//  The contents are covered by the terms of the BSD license
//  which is included in the file license.txt, found at the root
//  of the RDKit source tree.
//
#include <RDGeneral/export.h>
#ifndef _RD_BOUNDS_MATRIX_BUILDER_H_
#define _RD_BOUNDS_MATRIX_BUILDER_H_

#include <DistGeom/BoundsMatrix.h>

namespace RDKit {
class ROMol;
namespace DGeomHelpers {
//! Set default upper and lower distance bounds in a distance matrix
/*!
  \param mmat        pointer to the bounds matrix to be altered
  \param defaultMin  default value for the lower distance bounds
  \param defaultMax  default value for the upper distance bounds

*/
RDKIT_DISTGEOMHELPERS_EXPORT void initBoundsMat(DistGeom::BoundsMatrix *mmat, double defaultMin = 0.0,
                   double defaultMax = 1000.0);
RDKIT_DISTGEOMHELPERS_EXPORT void initBoundsMat(DistGeom::BoundsMatPtr mmat, double defaultMin = 0.0,
                   double defaultMax = 1000.0);

//! Set upper and lower distance bounds between atoms in a molecule based on
// topology
/*!
  This consists of setting 1-2, 1-3 and 1-4 distance based on bond lengths,
  bond angles and torsion angle ranges. Optionally 1-5 bounds can also be set,
  in particular, for path that contain rigid 1-4 paths.

  The final step involves setting lower bound to the sum of the vdW radii for
  the remaining atom pairs.

  \param mol          The molecule of interest
  \param mmat         Bounds matrix to the bounds are written
  \param set15bounds  If true try to set 1-5 bounds also based on topology
  \param scaleVDW     If true scale the sum of the vdW radii while setting lower
  bounds
                      so that a smaller value (0.7*(vdw1 + vdw2) ) is used for
  paths
                      that are less five bonds apart.

  <b>Note</b>
  For some strained systems the bounds matrix resulting from setting 1-5 bounds
  may
  fail triangle smoothing. In these cases it is recommended to back out and
  recompute the bounds matrix with no 1-5 bounds and with vdW scaling.
*/
RDKIT_DISTGEOMHELPERS_EXPORT void setTopolBounds(const ROMol &mol, DistGeom::BoundsMatPtr mmat,
                    bool set15bounds = true, bool scaleVDW = false);

/*! Overload for experimental torsion angle preferences */
RDKIT_DISTGEOMHELPERS_EXPORT void setTopolBounds(const ROMol &mol, DistGeom::BoundsMatPtr mmat,
                    std::vector<std::pair<int, int> > &bonds,
                    std::vector<std::vector<int> > &angles,
                    bool set15bounds = true, bool scaleVDW = false);
}
}
#endif