RDKit
Open-source cheminformatics and machine learning.
Toggle main menu visibility
Loading...
Searching...
No Matches
BoundsMatrixBuilder.h
Go to the documentation of this file.
1
//
2
// Copyright (C) 2004-2026 Greg Landrum and other RDKit contributors
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
#include "
BoundsMatrixBuilderDetails.h
"
16
#include "
Embedder.h
"
17
18
namespace
RDKit
{
19
class
ROMol
;
20
namespace
DGeomHelpers
{
21
22
//! Set default upper and lower distance bounds in a distance matrix
23
/*!
24
\param mmat pointer to the bounds matrix to be altered
25
\param defaultMin default value for the lower distance bounds
26
\param defaultMax default value for the upper distance bounds
27
*/
28
RDKIT_DISTGEOMHELPERS_EXPORT
void
initBoundsMat
(
DistGeom::BoundsMatrix
*mmat,
29
double
defaultMin = 0.0,
30
double
defaultMax = 1000.0);
31
/*! \overload
32
*/
33
RDKIT_DISTGEOMHELPERS_EXPORT
void
initBoundsMat
(
DistGeom::BoundsMatPtr
mmat,
34
double
defaultMin = 0.0,
35
double
defaultMax = 1000.0);
36
37
RDKIT_DISTGEOMHELPERS_EXPORT
void
setTopolBounds
(
38
const
ROMol
&mol,
DistGeom::BoundsMatPtr
mmat,
39
const
EmbedParameters
¶ms,
bool
scaleVDW =
false
,
40
bool
set15bounds =
true
,
bool
set14bounds =
true
,
bool
set13bounds =
true
,
41
PATH14_VECT
*paths14 =
nullptr
,
42
const
EmbedFF
embedForceField =
EmbedFF::UFF
,
43
InternalCoordinates
*internalCoords =
nullptr
);
44
45
//! Set upper and lower distance bounds between atoms in a molecule based on
46
/// topology
47
/*!
48
This consists of setting 1-2, 1-3 and 1-4 distance based on bond lengths,
49
bond angles and torsion angle ranges. Optionally 1-5 bounds can also be set,
50
in particular, for path that contain rigid 1-4 paths.
51
The final step involves setting lower bound to the sum of the vdW radii for
52
the remaining atom pairs.
53
\param mol The molecule of interest
54
\param mmat Bounds matrix to the bounds are written
55
\param set15bounds If true try to set 1-5 bounds also based on topology
56
\param scaleVDW Ignored.
57
\param useMacrocycle14config If 1-4 distances bound heuristics for
58
macrocycles is used <b>Note</b> For some strained systems the bounds matrix
59
resulting from setting 1-5 bounds may fail triangle smoothing. In these cases
60
it is recommended to back out and recompute the bounds matrix with no 1-5
61
bounds and with vdW scaling.
62
\param forceTransAmides If true, amide bonds are enforced to be trans
63
\param set14bounds If true, set 1-4 distance bounds based on topology
64
\param set13bounds If true, set 1-3 distance bounds based on topology
65
*/
66
inline
void
setTopolBounds
(
const
ROMol
&mol,
DistGeom::BoundsMatPtr
mmat,
67
bool
set15bounds =
true
,
bool
scaleVDW =
false
,
68
bool
useMacrocycle14config =
false
,
69
bool
forceTransAmides =
true
,
70
bool
set14bounds =
true
,
bool
set13bounds =
true
,
71
const
EmbedFF
embedForceField =
EmbedFF::UFF
) {
72
EmbedParameters
params{.useMacrocycle14config = useMacrocycle14config,
73
.forceTransAmides = forceTransAmides};
74
setTopolBounds
(mol, mmat, params, scaleVDW, set15bounds, set14bounds,
75
set13bounds,
nullptr
, embedForceField);
76
}
77
78
/* ! \overload */
79
RDKIT_DISTGEOMHELPERS_EXPORT
void
setTopolBounds
(
80
const
ROMol
&mol,
DistGeom::BoundsMatPtr
mmat,
81
std::vector<std::pair<int, int>> &bonds,
82
std::vector<std::vector<int>> &angles,
const
EmbedParameters
¶ms,
83
bool
scaleVDW =
false
,
bool
set15bounds =
true
,
bool
set14bounds =
true
,
84
bool
set13bounds =
true
,
PATH14_VECT
*paths14 =
nullptr
,
85
const
EmbedFF
embedForceField =
EmbedFF::UFF
,
86
InternalCoordinates
*internalCoords =
nullptr
);
87
/*! \overload for experimental torsion angle preferences
88
*/
89
inline
void
setTopolBounds
(
const
ROMol
&mol,
DistGeom::BoundsMatPtr
mmat,
90
std::vector<std::pair<int, int>> &bonds,
91
std::vector<std::vector<int>> &angles,
92
bool
set15bounds =
true
,
bool
scaleVDW =
false
,
93
bool
useMacrocycle14config =
false
,
94
bool
forceTransAmides =
true
,
95
bool
set14bounds =
true
,
bool
set13bounds =
true
,
96
const
EmbedFF
embedForceField =
EmbedFF::UFF
) {
97
EmbedParameters
params{.useMacrocycle14config = useMacrocycle14config,
98
.forceTransAmides = forceTransAmides};
99
setTopolBounds
(mol, mmat, bonds, angles, params, scaleVDW, set15bounds,
100
set14bounds, set13bounds,
nullptr
, embedForceField);
101
}
102
103
//! generate the vectors of bonds and angles used by (ET)KDG
104
RDKIT_DISTGEOMHELPERS_EXPORT
void
collectBondsAndAngles
(
105
const
ROMol
&mol, std::vector<std::pair<int, int>> &bonds,
106
std::vector<std::vector<int>> &angles);
107
108
}
// namespace DGeomHelpers
109
}
// namespace RDKit
110
#endif
BoundsMatrixBuilderDetails.h
BoundsMatrix.h
Embedder.h
DistGeom::BoundsMatrix
Class to store the distance bound.
Definition
BoundsMatrix.h:26
RDKit::ROMol
Definition
ROMol.h:344
export.h
RDKIT_DISTGEOMHELPERS_EXPORT
#define RDKIT_DISTGEOMHELPERS_EXPORT
Definition
export.h:161
DistGeom::BoundsMatPtr
boost::shared_ptr< BoundsMatrix > BoundsMatPtr
Definition
BoundsMatrix.h:106
RDKit::DGeomHelpers
Definition
BoundsMatrixBuilder.h:20
RDKit::DGeomHelpers::collectBondsAndAngles
RDKIT_DISTGEOMHELPERS_EXPORT void collectBondsAndAngles(const ROMol &mol, std::vector< std::pair< int, int > > &bonds, std::vector< std::vector< int > > &angles)
generate the vectors of bonds and angles used by (ET)KDG
RDKit::DGeomHelpers::EmbedFF
EmbedFF
Definition
Embedder.h:62
RDKit::DGeomHelpers::EmbedFF::UFF
@ UFF
Definition
Embedder.h:63
RDKit::DGeomHelpers::PATH14_VECT
std::vector< Path14Configuration > PATH14_VECT
Definition
BoundsMatrixBuilderDetails.h:102
RDKit::DGeomHelpers::initBoundsMat
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.
RDKit::DGeomHelpers::setTopolBounds
RDKIT_DISTGEOMHELPERS_EXPORT void setTopolBounds(const ROMol &mol, DistGeom::BoundsMatPtr mmat, const EmbedParameters ¶ms, bool scaleVDW=false, bool set15bounds=true, bool set14bounds=true, bool set13bounds=true, PATH14_VECT *paths14=nullptr, const EmbedFF embedForceField=EmbedFF::UFF, InternalCoordinates *internalCoords=nullptr)
RDKit
Std stuff.
Definition
Abbreviations.h:19
RDKit::DGeomHelpers::EmbedParameters
Parameter object for controlling embedding.
Definition
Embedder.h:151
RDKit::DGeomHelpers::InternalCoordinates
Definition
ZMatrixBuilder.h:29
GraphMol
DistGeomHelpers
BoundsMatrixBuilder.h
Generated on
for RDKit by
1.17.0