/usr/include/rdkit/DistGeom/DistGeomUtils.h is in librdkit-dev 201503-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | //
// Copyright (C) 2004-2007 Greg Landrum and 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.
//
#ifndef _RD_DISTGEOMUTILS_H_
#define _RD_DISTGEOMUTILS_H_
#include "BoundsMatrix.h"
#include <Numerics/SymmMatrix.h>
#include <map>
#include <Geometry/point.h>
#include "ChiralSet.h"
#include <RDGeneral/utils.h>
namespace ForceFields {
class ForceField;
}
namespace DistGeom {
//! Pick a distance matrix at random such that the
//! distance satisfy the bounds in the BoundsMatrix
/*!
\param mmat Bounds matrix
\param distmat Storage for randomly chosen distances
\param seed the random number seed to use
\return the largest element of the distance matrix
*/
double pickRandomDistMat(const BoundsMatrix &mmat,
RDNumeric::SymmMatrix<double> &distmat,
int seed=-1);
//! \overload
double pickRandomDistMat(const BoundsMatrix &mmat,
RDNumeric::SymmMatrix<double> &distmat,
RDKit::double_source_type &rng);
//! Compute an initial embedded in 3D based on a distance matrix
/*!
This function follows the embed algorithm mentioned in
"Distance Geometry and Molecular Conformation" by G.M.Crippen and T.F.Havel
(pages 312-313)
\param distmat Distance matrix
\param positions A vector of pointers to Points to write out the resulting coordinates
\param randNegEig If set to true and if any of the eigen values are negative, we will
pick the corresponding components of the coordinates at random
\param numZeroFail Fail embedding is more this many (or more) eigen values are zero
\param seed the random number seed to use
\return true if the embedding was successful
*/
bool computeInitialCoords(const RDNumeric::SymmMatrix<double> &distmat,
RDGeom::PointPtrVect &positions, bool randNegEig=false,
unsigned int numZeroFail=2,
int seed=-1);
//! \overload
bool computeInitialCoords(const RDNumeric::SymmMatrix<double> &distmat,
RDGeom::PointPtrVect &positions,
RDKit::double_source_type &rng,
bool randNegEig=false,
unsigned int numZeroFail=2
);
//! places atoms randomly in a box
/*!
\param positions A vector of pointers to Points to write out the resulting coordinates
\param boxSize the side-length of the cubic box
\param seed the random number seed to use
\return true if the coordinate generation was successful
*/
bool computeRandomCoords(RDGeom::PointPtrVect &positions, double boxSize,
int seed=-1);
//! \overload
bool computeRandomCoords(RDGeom::PointPtrVect &positions, double boxSize,
RDKit::double_source_type &rng);
//! Setup the error function for violation of distance bounds as a forcefield
/*!
This is based on function E3 on page 311 of "Distance Geometry in Molecular
Modeling" Jeffrey M.Blaney and J.Scott Dixon, Review in Computational Chemistry,
Volume V
\param mmat Distance bounds matrix
\param positions A vector of pointers to Points to write out the resulting coordinates
\param csets The vector of chiral points (type: ChiralSet)
\param weightChiral weight to be used to enforce chirality
\param weightFourthDim another chiral weight
\param extraWeights an optional set of weights for distance bounds violations
\param basinSizeTol Optional: any distance bound with a basin (distance between max and
min bounds) larger than this value will not be included in the force
field used to cleanup the structure.
\return a pointer to a ForceField suitable for cleaning up the violations.
<b>NOTE:</b> the caller is responsible for deleting this force field.
*/
ForceFields::ForceField *constructForceField(const BoundsMatrix &mmat,
RDGeom::PointPtrVect &positions, const VECT_CHIRALSET &csets,
double weightChiral=1.0,
double weightFourthDim=0.1,
std::map< std::pair<int,int>,double> *extraWeights=0,
double basinSizeTol=5.0);
}
#endif
|