mirror of
https://github.com/rdkit/rdkit.git
synced 2026-06-03 21:44:30 +08:00
clang-tidy-7 pass (#2408)
This commit is contained in:
committed by
Brian Kelley
parent
c644cef1fd
commit
ec31bea97b
@@ -149,7 +149,8 @@ class HierarchCatalog : public Catalog<entryType, paramType> {
|
||||
boost::vecS, // FIX: should be using setS for edges so that parallel
|
||||
// edges are never added (page 225 BGL book)
|
||||
// but that seems result in compile errors
|
||||
boost::bidirectionalS, EntryProperty> CatalogGraph;
|
||||
boost::bidirectionalS, EntryProperty>
|
||||
CatalogGraph;
|
||||
|
||||
typedef boost::graph_traits<CatalogGraph> CAT_GRAPH_TRAITS;
|
||||
typedef typename CAT_GRAPH_TRAITS::vertex_iterator VER_ITER;
|
||||
@@ -281,7 +282,9 @@ class HierarchCatalog : public Catalog<entryType, paramType> {
|
||||
}
|
||||
|
||||
//------------------------------------
|
||||
unsigned int getNumEntries() const { return static_cast<unsigned int>(boost::num_vertices(d_graph)); }
|
||||
unsigned int getNumEntries() const {
|
||||
return static_cast<unsigned int>(boost::num_vertices(d_graph));
|
||||
}
|
||||
|
||||
//------------------------------------
|
||||
//! fills the contents of this object from a string containing a \c pickle
|
||||
@@ -311,7 +314,8 @@ class HierarchCatalog : public Catalog<entryType, paramType> {
|
||||
fpl++;
|
||||
this->setFPLength(fpl);
|
||||
}
|
||||
unsigned int eid = static_cast<unsigned int>(boost::add_vertex(EntryProperty(entry), d_graph));
|
||||
unsigned int eid = static_cast<unsigned int>(
|
||||
boost::add_vertex(EntryProperty(entry), d_graph));
|
||||
orderType etype = entry->getOrder();
|
||||
// REVIEW: this initialization is not required: the STL map, in
|
||||
// theory, will create a new object when operator[] is called
|
||||
@@ -474,6 +478,6 @@ class LinearCatalog : public Catalog<entryType, orderType> {
|
||||
private:
|
||||
std::vector<entryType *> d_vector;
|
||||
};
|
||||
}
|
||||
} // namespace RDCatalog
|
||||
|
||||
#endif
|
||||
|
||||
@@ -41,8 +41,8 @@ class RDKIT_CATALOGS_EXPORT CatalogEntry {
|
||||
|
||||
private:
|
||||
int d_bitId; //!< our bit Id. This needs to be signed so that we can mark
|
||||
//uninitialized entries.
|
||||
// uninitialized entries.
|
||||
};
|
||||
}
|
||||
} // namespace RDCatalog
|
||||
|
||||
#endif
|
||||
|
||||
@@ -37,6 +37,6 @@ class RDKIT_CATALOGS_EXPORT CatalogParams {
|
||||
protected:
|
||||
std::string d_typeStr; //!< our type string
|
||||
};
|
||||
}
|
||||
} // namespace RDCatalog
|
||||
|
||||
#endif
|
||||
|
||||
@@ -33,6 +33,6 @@ class ChemicalFeature {
|
||||
// returns the position of the feature
|
||||
virtual RDGeom::Point3D getPos() const = 0;
|
||||
};
|
||||
}
|
||||
} // namespace ChemicalFeatures
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,7 +19,8 @@ namespace ChemicalFeatures {
|
||||
//------------------------------------------------------
|
||||
//! Class for chemical features that do not orignate from molecules
|
||||
// e.g. pharamcophores, site-maps etc.
|
||||
class RDKIT_CHEMICALFEATURES_EXPORT FreeChemicalFeature : public ChemicalFeature {
|
||||
class RDKIT_CHEMICALFEATURES_EXPORT FreeChemicalFeature
|
||||
: public ChemicalFeature {
|
||||
public:
|
||||
//! start with everything specified
|
||||
FreeChemicalFeature(const std::string &family, std::string type,
|
||||
@@ -89,6 +90,6 @@ class RDKIT_CHEMICALFEATURES_EXPORT FreeChemicalFeature : public ChemicalFeature
|
||||
std::string d_type;
|
||||
RDGeom::Point3D d_position;
|
||||
};
|
||||
}
|
||||
} // namespace ChemicalFeatures
|
||||
|
||||
#endif
|
||||
|
||||
@@ -49,6 +49,6 @@ double TanimotoSimilarityMetric(const T1 &bv1, const T2 &bv2,
|
||||
return SimilarityWrapper(
|
||||
bv1, bv2, (double (*)(const T1 &, const T2 &))TanimotoSimilarity);
|
||||
};
|
||||
}
|
||||
} // namespace RDDataManip
|
||||
|
||||
#endif
|
||||
|
||||
@@ -101,6 +101,6 @@ class MetricMatrixCalc {
|
||||
*/
|
||||
double (*dp_metricFunc)(const entryType &, const entryType &, unsigned int);
|
||||
};
|
||||
};
|
||||
}; // namespace RDDataManip
|
||||
|
||||
#endif
|
||||
|
||||
@@ -67,13 +67,16 @@ double SimilarityWrapper(const T& bv1, const T& bv2, double a, double b,
|
||||
return res;
|
||||
}
|
||||
|
||||
RDKIT_DATASTRUCTS_EXPORT bool AllProbeBitsMatch(const char* probe, const char* ref);
|
||||
RDKIT_DATASTRUCTS_EXPORT bool AllProbeBitsMatch(const std::string& probe, const std::string& ref);
|
||||
RDKIT_DATASTRUCTS_EXPORT bool AllProbeBitsMatch(const char* probe,
|
||||
const char* ref);
|
||||
RDKIT_DATASTRUCTS_EXPORT bool AllProbeBitsMatch(const std::string& probe,
|
||||
const std::string& ref);
|
||||
RDKIT_DATASTRUCTS_EXPORT bool AllProbeBitsMatch(const ExplicitBitVect& probe,
|
||||
const ExplicitBitVect& ref);
|
||||
const ExplicitBitVect& ref);
|
||||
|
||||
template <typename T1>
|
||||
RDKIT_DATASTRUCTS_EXPORT bool AllProbeBitsMatch(const T1& probe, const std::string& pkl);
|
||||
RDKIT_DATASTRUCTS_EXPORT bool AllProbeBitsMatch(const T1& probe,
|
||||
const std::string& pkl);
|
||||
|
||||
template <typename T1>
|
||||
RDKIT_DATASTRUCTS_EXPORT bool AllProbeBitsMatch(const T1& probe, const T1& ref);
|
||||
@@ -85,14 +88,16 @@ RDKIT_DATASTRUCTS_EXPORT bool AllProbeBitsMatch(const T1& probe, const T1& ref);
|
||||
template <typename T1, typename T2>
|
||||
RDKIT_DATASTRUCTS_EXPORT int NumOnBitsInCommon(const T1& bv1, const T2& bv2);
|
||||
|
||||
RDKIT_DATASTRUCTS_EXPORT int NumOnBitsInCommon(const ExplicitBitVect& bv1, const ExplicitBitVect& bv2);
|
||||
RDKIT_DATASTRUCTS_EXPORT int NumOnBitsInCommon(const ExplicitBitVect& bv1,
|
||||
const ExplicitBitVect& bv2);
|
||||
|
||||
//! returns the Tanimoto similarity between two bit vects
|
||||
/*!
|
||||
\return <tt>(bv1&bv2)_o / [bv1_o + bv2_o - (bv1&bv2)_o]</tt>
|
||||
*/
|
||||
template <typename T1, typename T2>
|
||||
RDKIT_DATASTRUCTS_EXPORT double TanimotoSimilarity(const T1& bv1, const T2& bv2);
|
||||
RDKIT_DATASTRUCTS_EXPORT double TanimotoSimilarity(const T1& bv1,
|
||||
const T2& bv2);
|
||||
|
||||
//! returns the Cosine similarity between two bit vects
|
||||
/*!
|
||||
@@ -106,7 +111,8 @@ RDKIT_DATASTRUCTS_EXPORT double CosineSimilarity(const T1& bv1, const T2& bv2);
|
||||
\return <tt>(bv1&bv2)_o * [bv1_o + bv2_o] / [2 * bv1_o * bv2_o]</tt>
|
||||
*/
|
||||
template <typename T1, typename T2>
|
||||
RDKIT_DATASTRUCTS_EXPORT double KulczynskiSimilarity(const T1& bv1, const T2& bv2);
|
||||
RDKIT_DATASTRUCTS_EXPORT double KulczynskiSimilarity(const T1& bv1,
|
||||
const T2& bv2);
|
||||
|
||||
//! returns the Dice similarity between two bit vects
|
||||
/*!
|
||||
@@ -126,7 +132,8 @@ RDKIT_DATASTRUCTS_EXPORT double DiceSimilarity(const T1& bv1, const T2& bv2);
|
||||
|
||||
*/
|
||||
template <typename T1, typename T2>
|
||||
RDKIT_DATASTRUCTS_EXPORT double TverskySimilarity(const T1& bv1, const T2& bv2, double a, double b);
|
||||
RDKIT_DATASTRUCTS_EXPORT double TverskySimilarity(const T1& bv1, const T2& bv2,
|
||||
double a, double b);
|
||||
|
||||
//! returns the Sokal similarity between two bit vects
|
||||
/*!
|
||||
@@ -141,21 +148,24 @@ RDKIT_DATASTRUCTS_EXPORT double SokalSimilarity(const T1& bv1, const T2& bv2);
|
||||
bv2_o)</tt>
|
||||
*/
|
||||
template <typename T1, typename T2>
|
||||
RDKIT_DATASTRUCTS_EXPORT double McConnaugheySimilarity(const T1& bv1, const T2& bv2);
|
||||
RDKIT_DATASTRUCTS_EXPORT double McConnaugheySimilarity(const T1& bv1,
|
||||
const T2& bv2);
|
||||
|
||||
//! returns the Asymmetric similarity between two bit vects
|
||||
/*!
|
||||
\return <tt>(bv1&bv2)_o / min(bv1_o,bv2_o)</tt>
|
||||
*/
|
||||
template <typename T1, typename T2>
|
||||
RDKIT_DATASTRUCTS_EXPORT double AsymmetricSimilarity(const T1& bv1, const T2& bv2);
|
||||
RDKIT_DATASTRUCTS_EXPORT double AsymmetricSimilarity(const T1& bv1,
|
||||
const T2& bv2);
|
||||
|
||||
//! returns the Braun-Blanquet similarity between two bit vects
|
||||
/*!
|
||||
\return <tt>(bv1&bv2)_o / max(bv1_o,bv2_o)</tt>
|
||||
*/
|
||||
template <typename T1, typename T2>
|
||||
RDKIT_DATASTRUCTS_EXPORT double BraunBlanquetSimilarity(const T1& bv1, const T2& bv2);
|
||||
RDKIT_DATASTRUCTS_EXPORT double BraunBlanquetSimilarity(const T1& bv1,
|
||||
const T2& bv2);
|
||||
|
||||
//! returns the Russel similarity between two bit vects
|
||||
/*!
|
||||
@@ -174,7 +184,8 @@ RDKIT_DATASTRUCTS_EXPORT double RusselSimilarity(const T1& bv1, const T2& bv2);
|
||||
+ (bv1_n - bv1_o - bv2_o + (bv1&bv2)_o) / (2*bv1_n - bv1_o - bv2_o) </tt>
|
||||
*/
|
||||
template <typename T1, typename T2>
|
||||
RDKIT_DATASTRUCTS_EXPORT double RogotGoldbergSimilarity(const T1& bv1, const T2& bv2);
|
||||
RDKIT_DATASTRUCTS_EXPORT double RogotGoldbergSimilarity(const T1& bv1,
|
||||
const T2& bv2);
|
||||
|
||||
//! returns the on bit similarity between two bit vects
|
||||
/*!
|
||||
@@ -190,7 +201,8 @@ RDKIT_DATASTRUCTS_EXPORT double OnBitSimilarity(const T1& bv1, const T2& bv2);
|
||||
template <typename T1, typename T2>
|
||||
RDKIT_DATASTRUCTS_EXPORT int NumBitsInCommon(const T1& bv1, const T2& bv2);
|
||||
|
||||
RDKIT_DATASTRUCTS_EXPORT int NumBitsInCommon(const ExplicitBitVect& bv1, const ExplicitBitVect& bv2);
|
||||
RDKIT_DATASTRUCTS_EXPORT int NumBitsInCommon(const ExplicitBitVect& bv1,
|
||||
const ExplicitBitVect& bv2);
|
||||
|
||||
//! returns the common-bit similarity (on and off) between two bit vects
|
||||
//! This is also called Manhattan similarity.
|
||||
@@ -217,7 +229,8 @@ RDKIT_DATASTRUCTS_EXPORT IntVect OffBitsInCommon(const T1& bv1, const T2& bv2);
|
||||
- <tt>(bv1&bv2)_o / bv2_o</tt>
|
||||
*/
|
||||
template <typename T1, typename T2>
|
||||
RDKIT_DATASTRUCTS_EXPORT DoubleVect OnBitProjSimilarity(const T1& bv1, const T2& bv2);
|
||||
RDKIT_DATASTRUCTS_EXPORT DoubleVect OnBitProjSimilarity(const T1& bv1,
|
||||
const T2& bv2);
|
||||
|
||||
//! returns the on-bit projected similarities between two bit vects
|
||||
/*!
|
||||
@@ -229,7 +242,8 @@ RDKIT_DATASTRUCTS_EXPORT DoubleVect OnBitProjSimilarity(const T1& bv1, const T2&
|
||||
|
||||
*/
|
||||
template <typename T1, typename T2>
|
||||
RDKIT_DATASTRUCTS_EXPORT DoubleVect OffBitProjSimilarity(const T1& bv1, const T2& bv2);
|
||||
RDKIT_DATASTRUCTS_EXPORT DoubleVect OffBitProjSimilarity(const T1& bv1,
|
||||
const T2& bv2);
|
||||
|
||||
//! folds a bit vector \c factor times and returns the result
|
||||
/*!
|
||||
@@ -242,7 +256,8 @@ RDKIT_DATASTRUCTS_EXPORT DoubleVect OffBitProjSimilarity(const T1& bv1, const T2
|
||||
<b>Note:</b> The caller is responsible for <tt>delete</tt>ing the result.
|
||||
*/
|
||||
template <typename T1>
|
||||
RDKIT_DATASTRUCTS_EXPORT T1* FoldFingerprint(const T1& bv1, unsigned int factor = 2);
|
||||
RDKIT_DATASTRUCTS_EXPORT T1* FoldFingerprint(const T1& bv1,
|
||||
unsigned int factor = 2);
|
||||
|
||||
//! returns a text representation of a bit vector (a string of 0s and 1s)
|
||||
/*!
|
||||
@@ -283,7 +298,8 @@ RDKIT_DATASTRUCTS_EXPORT std::string BitVectToBinaryText(const T1& bv1);
|
||||
|
||||
*/
|
||||
template <typename T1>
|
||||
RDKIT_DATASTRUCTS_EXPORT void UpdateBitVectFromFPSText(T1& bv1, const std::string& fps);
|
||||
RDKIT_DATASTRUCTS_EXPORT void UpdateBitVectFromFPSText(T1& bv1,
|
||||
const std::string& fps);
|
||||
|
||||
//! updates a bit vector from a binary string representation of a bit vector (an
|
||||
// array of bytes)
|
||||
@@ -294,18 +310,24 @@ RDKIT_DATASTRUCTS_EXPORT void UpdateBitVectFromFPSText(T1& bv1, const std::strin
|
||||
|
||||
*/
|
||||
template <typename T1>
|
||||
RDKIT_DATASTRUCTS_EXPORT void UpdateBitVectFromBinaryText(T1& bv1, const std::string& fps);
|
||||
RDKIT_DATASTRUCTS_EXPORT void UpdateBitVectFromBinaryText(
|
||||
T1& bv1, const std::string& fps);
|
||||
|
||||
// FIX: docs and tests please
|
||||
|
||||
RDKIT_DATASTRUCTS_EXPORT unsigned int CalcBitmapPopcount(const unsigned char* bv1, unsigned int nBytes);
|
||||
RDKIT_DATASTRUCTS_EXPORT unsigned int CalcBitmapPopcount(
|
||||
const unsigned char* bv1, unsigned int nBytes);
|
||||
|
||||
RDKIT_DATASTRUCTS_EXPORT double CalcBitmapTanimoto(const unsigned char* bv1, const unsigned char* bv2,
|
||||
unsigned int nBytes);
|
||||
RDKIT_DATASTRUCTS_EXPORT double CalcBitmapDice(const unsigned char* bv1, const unsigned char* bv2,
|
||||
unsigned int nBytes);
|
||||
RDKIT_DATASTRUCTS_EXPORT double CalcBitmapTversky(const unsigned char* bv1, const unsigned char* bv2,
|
||||
unsigned int nBytes, double ca, double cb);
|
||||
RDKIT_DATASTRUCTS_EXPORT bool CalcBitmapAllProbeBitsMatch(const unsigned char* probe,
|
||||
const unsigned char* ref, unsigned int nBytes);
|
||||
RDKIT_DATASTRUCTS_EXPORT double CalcBitmapTanimoto(const unsigned char* bv1,
|
||||
const unsigned char* bv2,
|
||||
unsigned int nBytes);
|
||||
RDKIT_DATASTRUCTS_EXPORT double CalcBitmapDice(const unsigned char* bv1,
|
||||
const unsigned char* bv2,
|
||||
unsigned int nBytes);
|
||||
RDKIT_DATASTRUCTS_EXPORT double CalcBitmapTversky(const unsigned char* bv1,
|
||||
const unsigned char* bv2,
|
||||
unsigned int nBytes,
|
||||
double ca, double cb);
|
||||
RDKIT_DATASTRUCTS_EXPORT bool CalcBitmapAllProbeBitsMatch(
|
||||
const unsigned char* probe, const unsigned char* ref, unsigned int nBytes);
|
||||
#endif
|
||||
|
||||
@@ -30,5 +30,6 @@ RDKIT_DATASTRUCTS_EXPORT void FromBitString(T &sbv, const std::string &s);
|
||||
<b>Note:</b> the caller is responsible for <tt>delete</tt>ing this.
|
||||
|
||||
*/
|
||||
RDKIT_DATASTRUCTS_EXPORT ExplicitBitVect *convertToExplicit(const SparseBitVect *sbv);
|
||||
RDKIT_DATASTRUCTS_EXPORT ExplicitBitVect *convertToExplicit(
|
||||
const SparseBitVect *sbv);
|
||||
#endif
|
||||
|
||||
@@ -37,12 +37,12 @@
|
||||
|
||||
namespace RDKit {
|
||||
class DataStructsExplicitBitVecPropHandler : public CustomPropHandler {
|
||||
public:
|
||||
public:
|
||||
const char *getPropName() const { return "ExplicitBVProp"; }
|
||||
bool canSerialize(const RDValue &value) const {
|
||||
return rdvalue_is<ExplicitBitVect>(value);
|
||||
}
|
||||
|
||||
|
||||
bool read(std::istream &ss, RDValue &value) const {
|
||||
std::string v;
|
||||
int version = 0;
|
||||
@@ -51,13 +51,14 @@ public:
|
||||
value = bv;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool write(std::ostream &ss, const RDValue &value) const {
|
||||
try {
|
||||
std::string output = rdvalue_cast<const ExplicitBitVect&>(value).toString();
|
||||
std::string output =
|
||||
rdvalue_cast<const ExplicitBitVect &>(value).toString();
|
||||
streamWrite(ss, output);
|
||||
return true;
|
||||
} catch ( boost::bad_any_cast & ) {
|
||||
} catch (boost::bad_any_cast &) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -65,9 +66,7 @@ public:
|
||||
CustomPropHandler *clone() const {
|
||||
return new DataStructsExplicitBitVecPropHandler;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
} // namespace RDKit
|
||||
#endif
|
||||
|
||||
|
||||
@@ -26,5 +26,5 @@ class RDKIT_DATASTRUCTS_EXPORT DiscreteDistMat {
|
||||
unsigned int d_fourBitTab[256 * 256];
|
||||
};
|
||||
extern DiscreteDistMat *getDiscreteDistMat();
|
||||
}
|
||||
} // namespace RDKit
|
||||
#endif
|
||||
|
||||
@@ -132,13 +132,13 @@ class RDKIT_DATASTRUCTS_EXPORT DiscreteValueVect {
|
||||
void initFromText(const char *pkl, const unsigned int len);
|
||||
};
|
||||
|
||||
RDKIT_DATASTRUCTS_EXPORT unsigned int computeL1Norm(const DiscreteValueVect &v1,
|
||||
const DiscreteValueVect &v2);
|
||||
RDKIT_DATASTRUCTS_EXPORT unsigned int computeL1Norm(
|
||||
const DiscreteValueVect &v1, const DiscreteValueVect &v2);
|
||||
|
||||
RDKIT_DATASTRUCTS_EXPORT DiscreteValueVect operator+(const DiscreteValueVect &p1,
|
||||
const DiscreteValueVect &p2);
|
||||
RDKIT_DATASTRUCTS_EXPORT DiscreteValueVect operator-(const DiscreteValueVect &p1,
|
||||
const DiscreteValueVect &p2);
|
||||
}
|
||||
RDKIT_DATASTRUCTS_EXPORT DiscreteValueVect
|
||||
operator+(const DiscreteValueVect &p1, const DiscreteValueVect &p2);
|
||||
RDKIT_DATASTRUCTS_EXPORT DiscreteValueVect
|
||||
operator-(const DiscreteValueVect &p1, const DiscreteValueVect &p2);
|
||||
} // namespace RDKit
|
||||
|
||||
#endif
|
||||
|
||||
@@ -44,7 +44,8 @@ class RDKIT_DATASTRUCTS_EXPORT ExplicitBitVect : public BitVect {
|
||||
//! construct directly from a dynamic_bitset pointer
|
||||
// takes ownership of the pointer
|
||||
ExplicitBitVect(boost::dynamic_bitset<> *bits)
|
||||
: dp_bits(bits), d_size(static_cast<unsigned int>(bits->size())),
|
||||
: dp_bits(bits),
|
||||
d_size(static_cast<unsigned int>(bits->size())),
|
||||
d_numOnBits(static_cast<unsigned int>(bits->count())){};
|
||||
|
||||
~ExplicitBitVect();
|
||||
|
||||
@@ -169,17 +169,17 @@ class RDKIT_DATASTRUCTS_EXPORT FPBReader {
|
||||
to be done
|
||||
|
||||
*/
|
||||
std::vector<std::pair<double, unsigned int> > getTanimotoNeighbors(
|
||||
std::vector<std::pair<double, unsigned int>> getTanimotoNeighbors(
|
||||
const std::uint8_t *bv, double threshold = 0.7,
|
||||
bool usePopcountScreen = true) const;
|
||||
//! \overload
|
||||
std::vector<std::pair<double, unsigned int> > getTanimotoNeighbors(
|
||||
std::vector<std::pair<double, unsigned int>> getTanimotoNeighbors(
|
||||
boost::shared_array<std::uint8_t> bv, double threshold = 0.7,
|
||||
bool usePopcountScreen = true) const {
|
||||
return getTanimotoNeighbors(bv.get(), threshold, usePopcountScreen);
|
||||
};
|
||||
//! \overload
|
||||
std::vector<std::pair<double, unsigned int> > getTanimotoNeighbors(
|
||||
std::vector<std::pair<double, unsigned int>> getTanimotoNeighbors(
|
||||
const ExplicitBitVect &ebv, double threshold = 0.7,
|
||||
bool usePopcountScreen = true) const;
|
||||
|
||||
@@ -218,17 +218,17 @@ class RDKIT_DATASTRUCTS_EXPORT FPBReader {
|
||||
to be done
|
||||
|
||||
*/
|
||||
std::vector<std::pair<double, unsigned int> > getTverskyNeighbors(
|
||||
std::vector<std::pair<double, unsigned int>> getTverskyNeighbors(
|
||||
const std::uint8_t *bv, double ca, double cb, double threshold = 0.7,
|
||||
bool usePopcountScreen = true) const;
|
||||
//! \overload
|
||||
std::vector<std::pair<double, unsigned int> > getTverskyNeighbors(
|
||||
std::vector<std::pair<double, unsigned int>> getTverskyNeighbors(
|
||||
boost::shared_array<std::uint8_t> bv, double ca, double cb,
|
||||
double threshold = 0.7, bool usePopcountScreen = true) const {
|
||||
return getTverskyNeighbors(bv.get(), ca, cb, threshold, usePopcountScreen);
|
||||
};
|
||||
//! \overload
|
||||
std::vector<std::pair<double, unsigned int> > getTverskyNeighbors(
|
||||
std::vector<std::pair<double, unsigned int>> getTverskyNeighbors(
|
||||
const ExplicitBitVect &ebv, double ca, double cb, double threshold = 0.7,
|
||||
bool usePopcountScreen = true) const;
|
||||
|
||||
@@ -276,5 +276,5 @@ class RDKIT_DATASTRUCTS_EXPORT FPBReader {
|
||||
df_lazyRead = lazyRead;
|
||||
}
|
||||
};
|
||||
}
|
||||
} // namespace RDKit
|
||||
#endif
|
||||
|
||||
@@ -185,15 +185,15 @@ class RDKIT_DATASTRUCTS_EXPORT MultiFPBReader {
|
||||
/*! (i.e. where all the bits set in the query are also set in the db
|
||||
molecule)
|
||||
*/
|
||||
std::vector<std::pair<unsigned int, unsigned int> > getContainingNeighbors(
|
||||
std::vector<std::pair<unsigned int, unsigned int>> getContainingNeighbors(
|
||||
const std::uint8_t *bv, int numThreads = 1) const;
|
||||
//! \overload
|
||||
std::vector<std::pair<unsigned int, unsigned int> > getContainingNeighbors(
|
||||
std::vector<std::pair<unsigned int, unsigned int>> getContainingNeighbors(
|
||||
boost::shared_array<std::uint8_t> bv, int numThreads = 1) const {
|
||||
return getContainingNeighbors(bv.get(), numThreads);
|
||||
};
|
||||
//! \overload
|
||||
std::vector<std::pair<unsigned int, unsigned int> > getContainingNeighbors(
|
||||
std::vector<std::pair<unsigned int, unsigned int>> getContainingNeighbors(
|
||||
const ExplicitBitVect &ebv, int numThreads = 1) const;
|
||||
|
||||
private:
|
||||
@@ -207,5 +207,5 @@ class RDKIT_DATASTRUCTS_EXPORT MultiFPBReader {
|
||||
MultiFPBReader(const MultiFPBReader &);
|
||||
MultiFPBReader &operator=(const MultiFPBReader &);
|
||||
};
|
||||
}
|
||||
} // namespace RDKit
|
||||
#endif
|
||||
|
||||
@@ -57,7 +57,7 @@ class RDKIT_DATASTRUCTS_EXPORT SparseBitVect : public BitVect {
|
||||
|
||||
bool operator[](const unsigned int which) const;
|
||||
SparseBitVect operator|(const SparseBitVect &) const;
|
||||
SparseBitVect operator&(const SparseBitVect &) const;
|
||||
SparseBitVect operator&(const SparseBitVect &)const;
|
||||
SparseBitVect operator^(const SparseBitVect &) const;
|
||||
SparseBitVect operator~() const;
|
||||
|
||||
@@ -72,8 +72,12 @@ class RDKIT_DATASTRUCTS_EXPORT SparseBitVect : public BitVect {
|
||||
bool getBit(const IntVectIter which) const;
|
||||
bool getBit(const IntSetIter which) const;
|
||||
|
||||
unsigned int getNumOnBits() const { return static_cast<unsigned int>(dp_bits->size()); };
|
||||
unsigned int getNumOffBits() const { return d_size - static_cast<unsigned int>(dp_bits->size()); };
|
||||
unsigned int getNumOnBits() const {
|
||||
return static_cast<unsigned int>(dp_bits->size());
|
||||
};
|
||||
unsigned int getNumOffBits() const {
|
||||
return d_size - static_cast<unsigned int>(dp_bits->size());
|
||||
};
|
||||
|
||||
std::string toString() const;
|
||||
|
||||
|
||||
@@ -464,7 +464,7 @@ void calcVectParams(const SparseIntVect<IndexType> &v1,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace
|
||||
|
||||
template <typename IndexType>
|
||||
double DiceSimilarity(const SparseIntVect<IndexType> &v1,
|
||||
@@ -543,6 +543,6 @@ double TanimotoSimilarity(const SparseIntVect<IndexType> &v1,
|
||||
bool returnDistance = false, double bounds = 0.0) {
|
||||
return TverskySimilarity(v1, v2, 1.0, 1.0, returnDistance, bounds);
|
||||
}
|
||||
}
|
||||
} // namespace RDKit
|
||||
|
||||
#endif
|
||||
|
||||
@@ -21,7 +21,8 @@
|
||||
<b>Note:</b> The caller is responsible for calling \c delete[] on the
|
||||
char array returned by this function.
|
||||
*/
|
||||
RDKIT_DATASTRUCTS_EXPORT char *Base64Encode(const unsigned char *, const unsigned int);
|
||||
RDKIT_DATASTRUCTS_EXPORT char *Base64Encode(const unsigned char *,
|
||||
const unsigned int);
|
||||
|
||||
//! return the base64 encoding of an array of chars
|
||||
/*!
|
||||
|
||||
@@ -35,5 +35,5 @@ RWMOL_SPTR_VECT enumerateLibrary(RWMol *mol, VECT_RWMOL_SPTR_VECT &sidechains,
|
||||
RWMOL_SPTR_VECT enumFromFiles(const char *templateName,
|
||||
std::vector<const char *> &sidechainName);
|
||||
|
||||
} // end of TemplateEnum namespace
|
||||
} // namespace TemplateEnum
|
||||
#endif
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
namespace RDKit {
|
||||
class ROMol;
|
||||
class MolSupplier;
|
||||
}
|
||||
} // namespace RDKit
|
||||
|
||||
class RDMolSupplier : public IRDMolSupplier {
|
||||
public:
|
||||
|
||||
@@ -24,7 +24,8 @@ namespace DistGeom {
|
||||
with lower distance bounds on the lower traingle and upper bounds in the upper
|
||||
triangle
|
||||
*/
|
||||
class RDKIT_DISTGEOMETRY_EXPORT BoundsMatrix : public RDNumeric::SquareMatrix<double> {
|
||||
class RDKIT_DISTGEOMETRY_EXPORT BoundsMatrix
|
||||
: public RDNumeric::SquareMatrix<double> {
|
||||
public:
|
||||
typedef boost::shared_array<double> DATA_SPTR;
|
||||
|
||||
@@ -115,6 +116,6 @@ class RDKIT_DISTGEOMETRY_EXPORT BoundsMatrix : public RDNumeric::SquareMatrix<do
|
||||
};
|
||||
|
||||
typedef boost::shared_ptr<BoundsMatrix> BoundsMatPtr;
|
||||
}
|
||||
} // namespace DistGeom
|
||||
|
||||
#endif
|
||||
|
||||
@@ -53,6 +53,6 @@ class RDKIT_DISTGEOMETRY_EXPORT ChiralSet {
|
||||
|
||||
typedef boost::shared_ptr<ChiralSet> ChiralSetPtr;
|
||||
typedef std::vector<ChiralSetPtr> VECT_CHIRALSET;
|
||||
}
|
||||
} // namespace DistGeom
|
||||
|
||||
#endif
|
||||
|
||||
@@ -13,7 +13,8 @@ class ChiralSet;
|
||||
|
||||
//! A term to capture the violation of chirality at an atom center
|
||||
//!
|
||||
class RDKIT_DISTGEOMETRY_EXPORT ChiralViolationContrib : public ForceFields::ForceFieldContrib {
|
||||
class RDKIT_DISTGEOMETRY_EXPORT ChiralViolationContrib
|
||||
: public ForceFields::ForceFieldContrib {
|
||||
public:
|
||||
ChiralViolationContrib()
|
||||
: d_idx1(0),
|
||||
@@ -40,7 +41,7 @@ class RDKIT_DISTGEOMETRY_EXPORT ChiralViolationContrib : public ForceFields::For
|
||||
double getEnergy(double *pos) const;
|
||||
|
||||
//! calculate the contribution of this contrib to the gradient at a given
|
||||
//state
|
||||
// state
|
||||
void getGrad(double *pos, double *grad) const;
|
||||
virtual ChiralViolationContrib *copy() const {
|
||||
return new ChiralViolationContrib(*this);
|
||||
@@ -97,6 +98,6 @@ class RDKIT_DISTGEOMETRY_EXPORT ChiralViolationContrib : public ForceFields::For
|
||||
double d_volUpper;
|
||||
double d_weight;
|
||||
};
|
||||
}
|
||||
} // namespace DistGeom
|
||||
|
||||
#endif
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
namespace DistGeom {
|
||||
//! A term to capture the violation of the upper and lower bounds by
|
||||
//! distance between two points
|
||||
class RDKIT_DISTGEOMETRY_EXPORT DistViolationContrib : public ForceFields::ForceFieldContrib {
|
||||
class RDKIT_DISTGEOMETRY_EXPORT DistViolationContrib
|
||||
: public ForceFields::ForceFieldContrib {
|
||||
public:
|
||||
DistViolationContrib()
|
||||
: d_end1Idx(0), d_end2Idx(0), d_ub(1000.0), d_lb(0.0), d_weight(1.0){};
|
||||
@@ -47,6 +48,6 @@ class RDKIT_DISTGEOMETRY_EXPORT DistViolationContrib : public ForceFields::Force
|
||||
double d_lb; //!< lower bound on the distance between d_end1Idx,d_end2Idx
|
||||
double d_weight; //!< used to adjust relative contribution weights
|
||||
};
|
||||
}
|
||||
} // namespace DistGeom
|
||||
|
||||
#endif
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
namespace DistGeom {
|
||||
//! A term used in penalizing chirality violations
|
||||
//!
|
||||
class RDKIT_DISTGEOMETRY_EXPORT FourthDimContrib : public ForceFields::ForceFieldContrib {
|
||||
class RDKIT_DISTGEOMETRY_EXPORT FourthDimContrib
|
||||
: public ForceFields::ForceFieldContrib {
|
||||
public:
|
||||
FourthDimContrib() : d_idx(0), d_weight(0.0){};
|
||||
|
||||
@@ -42,7 +43,7 @@ class RDKIT_DISTGEOMETRY_EXPORT FourthDimContrib : public ForceFields::ForceFiel
|
||||
}
|
||||
|
||||
//! calculate the contribution of this contrib to the gradient at a given
|
||||
//state
|
||||
// state
|
||||
void getGrad(double *pos, double *grad) const {
|
||||
PRECONDITION(dp_forceField, "no owner");
|
||||
PRECONDITION(dp_forceField->dimension() == 4,
|
||||
@@ -59,6 +60,6 @@ class RDKIT_DISTGEOMETRY_EXPORT FourthDimContrib : public ForceFields::ForceFiel
|
||||
unsigned int d_idx;
|
||||
double d_weight;
|
||||
};
|
||||
}
|
||||
} // namespace DistGeom
|
||||
|
||||
#endif
|
||||
|
||||
@@ -26,9 +26,11 @@ namespace DistGeom {
|
||||
\param tol a tolerance (percent) for errors in the smoothing process
|
||||
|
||||
*/
|
||||
RDKIT_DISTGEOMETRY_EXPORT bool triangleSmoothBounds(BoundsMatrix *boundsMat, double tol = 0.);
|
||||
RDKIT_DISTGEOMETRY_EXPORT bool triangleSmoothBounds(BoundsMatrix *boundsMat,
|
||||
double tol = 0.);
|
||||
//! \overload
|
||||
RDKIT_DISTGEOMETRY_EXPORT bool triangleSmoothBounds(BoundsMatPtr boundsMat, double tol = 0.);
|
||||
}
|
||||
RDKIT_DISTGEOMETRY_EXPORT bool triangleSmoothBounds(BoundsMatPtr boundsMat,
|
||||
double tol = 0.);
|
||||
} // namespace DistGeom
|
||||
|
||||
#endif
|
||||
|
||||
@@ -92,5 +92,5 @@ class ImplicitFeature {
|
||||
// FIX: add something correct for directions
|
||||
std::vector<LOCTYPE> d_dirs;
|
||||
};
|
||||
}
|
||||
} // namespace RDFeatures
|
||||
#endif
|
||||
|
||||
@@ -35,6 +35,6 @@ class RDKIT_FORCEFIELD_EXPORT ForceFieldContrib {
|
||||
protected:
|
||||
ForceField *dp_forceField; //!< our owning ForceField
|
||||
};
|
||||
}
|
||||
} // namespace ForceFields
|
||||
|
||||
#endif
|
||||
|
||||
@@ -229,5 +229,5 @@ class RDKIT_FORCEFIELD_EXPORT ForceField {
|
||||
//! initializes our internal distance matrix
|
||||
void initDistanceMatrix();
|
||||
};
|
||||
}
|
||||
} // namespace ForceFields
|
||||
#endif
|
||||
|
||||
@@ -53,18 +53,26 @@ class RDKIT_FORCEFIELD_EXPORT AngleBendContrib : public ForceFieldContrib {
|
||||
};
|
||||
namespace Utils {
|
||||
//! returns the MMFF rest value for an angle
|
||||
RDKIT_FORCEFIELD_EXPORT double calcAngleRestValue(const MMFFAngle *mmffAngleParams);
|
||||
RDKIT_FORCEFIELD_EXPORT double calcAngleRestValue(
|
||||
const MMFFAngle *mmffAngleParams);
|
||||
//! returns the MMFF force constant for an angle
|
||||
RDKIT_FORCEFIELD_EXPORT double calcAngleForceConstant(const MMFFAngle *mmffAngleParams);
|
||||
RDKIT_FORCEFIELD_EXPORT double calcAngleForceConstant(
|
||||
const MMFFAngle *mmffAngleParams);
|
||||
//! calculates and returns the cosine of the angle between points p1, p2, p3
|
||||
RDKIT_FORCEFIELD_EXPORT double calcCosTheta(RDGeom::Point3D p1, RDGeom::Point3D p2, RDGeom::Point3D p3,
|
||||
double dist1, double dist2);
|
||||
RDKIT_FORCEFIELD_EXPORT double calcCosTheta(RDGeom::Point3D p1,
|
||||
RDGeom::Point3D p2,
|
||||
RDGeom::Point3D p3, double dist1,
|
||||
double dist2);
|
||||
//! calculates and returns the angle bending MMFF energy
|
||||
RDKIT_FORCEFIELD_EXPORT double calcAngleBendEnergy(const double theta0, const double ka, bool isLinear,
|
||||
const double cosTheta);
|
||||
RDKIT_FORCEFIELD_EXPORT void calcAngleBendGrad(RDGeom::Point3D *r, double *dist, double **g,
|
||||
double &dE_dTheta, double &cosTheta, double &sinTheta);
|
||||
}
|
||||
}
|
||||
}
|
||||
RDKIT_FORCEFIELD_EXPORT double calcAngleBendEnergy(const double theta0,
|
||||
const double ka,
|
||||
bool isLinear,
|
||||
const double cosTheta);
|
||||
RDKIT_FORCEFIELD_EXPORT void calcAngleBendGrad(RDGeom::Point3D *r, double *dist,
|
||||
double **g, double &dE_dTheta,
|
||||
double &cosTheta,
|
||||
double &sinTheta);
|
||||
} // namespace Utils
|
||||
} // namespace MMFF
|
||||
} // namespace ForceFields
|
||||
#endif
|
||||
|
||||
@@ -19,7 +19,8 @@ namespace ForceFields {
|
||||
namespace MMFF {
|
||||
|
||||
//! An angle range constraint modelled after a AngleBendContrib
|
||||
class RDKIT_FORCEFIELD_EXPORT RDKIT_FORCEFIELD_EXPORT AngleConstraintContrib : public ForceFieldContrib {
|
||||
class RDKIT_FORCEFIELD_EXPORT RDKIT_FORCEFIELD_EXPORT AngleConstraintContrib
|
||||
: public ForceFieldContrib {
|
||||
public:
|
||||
AngleConstraintContrib() : d_at1Idx(-1), d_at2Idx(-1), d_at3Idx(-1){};
|
||||
//! Constructor
|
||||
@@ -56,6 +57,6 @@ class RDKIT_FORCEFIELD_EXPORT RDKIT_FORCEFIELD_EXPORT AngleConstraintContrib : p
|
||||
double d_minAngleDeg, d_maxAngleDeg; //!< rest amplitudes of the angle
|
||||
double d_forceConstant; //!< force constant of the angle constraint
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace MMFF
|
||||
} // namespace ForceFields
|
||||
#endif
|
||||
|
||||
@@ -52,13 +52,16 @@ class RDKIT_FORCEFIELD_EXPORT BondStretchContrib : public ForceFieldContrib {
|
||||
|
||||
namespace Utils {
|
||||
//! returns the MMFF rest length for a bond
|
||||
RDKIT_FORCEFIELD_EXPORT double calcBondRestLength(const MMFFBond *mmffBondParams);
|
||||
RDKIT_FORCEFIELD_EXPORT double calcBondRestLength(
|
||||
const MMFFBond *mmffBondParams);
|
||||
//! returns the MMFF force constant for a bond
|
||||
RDKIT_FORCEFIELD_EXPORT double calcBondForceConstant(const MMFFBond *mmffBondParams);
|
||||
RDKIT_FORCEFIELD_EXPORT double calcBondForceConstant(
|
||||
const MMFFBond *mmffBondParams);
|
||||
//! calculates and returns the bond stretching MMFF energy
|
||||
RDKIT_FORCEFIELD_EXPORT double calcBondStretchEnergy(const double r0, const double kb,
|
||||
const double distance);
|
||||
}
|
||||
}
|
||||
}
|
||||
RDKIT_FORCEFIELD_EXPORT double calcBondStretchEnergy(const double r0,
|
||||
const double kb,
|
||||
const double distance);
|
||||
} // namespace Utils
|
||||
} // namespace MMFF
|
||||
} // namespace ForceFields
|
||||
#endif
|
||||
|
||||
@@ -19,7 +19,8 @@ namespace ForceFields {
|
||||
namespace MMFF {
|
||||
|
||||
//! A distance range constraint modelled after a BondStretchContrib
|
||||
class RDKIT_FORCEFIELD_EXPORT DistanceConstraintContrib : public ForceFieldContrib {
|
||||
class RDKIT_FORCEFIELD_EXPORT DistanceConstraintContrib
|
||||
: public ForceFieldContrib {
|
||||
public:
|
||||
DistanceConstraintContrib() : d_end1Idx(-1), d_end2Idx(-1){};
|
||||
//! Constructor
|
||||
@@ -55,6 +56,6 @@ class RDKIT_FORCEFIELD_EXPORT DistanceConstraintContrib : public ForceFieldContr
|
||||
double d_minLen, d_maxLen; //!< rest length of the bond
|
||||
double d_forceConstant; //!< force constant of the bond
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace MMFF
|
||||
} // namespace ForceFields
|
||||
#endif
|
||||
|
||||
@@ -73,27 +73,32 @@ class RDKIT_FORCEFIELD_EXPORT EleContrib : public ForceFieldContrib {
|
||||
|
||||
namespace Utils {
|
||||
//! calculates and returns the unscaled minimum distance (R*ij) for a MMFF VdW
|
||||
//contact
|
||||
RDKIT_FORCEFIELD_EXPORT double calcUnscaledVdWMinimum(MMFFVdWCollection *mmffVdW,
|
||||
const MMFFVdW *mmffVdWParamsAtom1,
|
||||
const MMFFVdW *mmffVdWParamsAtom2);
|
||||
// contact
|
||||
RDKIT_FORCEFIELD_EXPORT double calcUnscaledVdWMinimum(
|
||||
MMFFVdWCollection *mmffVdW, const MMFFVdW *mmffVdWParamsAtom1,
|
||||
const MMFFVdW *mmffVdWParamsAtom2);
|
||||
//! calculates and returns the unscaled well depth (epsilon) for a MMFF VdW
|
||||
//contact
|
||||
RDKIT_FORCEFIELD_EXPORT double calcUnscaledVdWWellDepth(double R_star_ij,
|
||||
const MMFFVdW *mmffVdWParamsIAtom,
|
||||
const MMFFVdW *mmffVdWParamsJAtom);
|
||||
// contact
|
||||
RDKIT_FORCEFIELD_EXPORT double calcUnscaledVdWWellDepth(
|
||||
double R_star_ij, const MMFFVdW *mmffVdWParamsIAtom,
|
||||
const MMFFVdW *mmffVdWParamsJAtom);
|
||||
//! scales the VdW parameters
|
||||
RDKIT_FORCEFIELD_EXPORT void scaleVdWParams(double &R_star_ij, double &wellDepth,
|
||||
MMFFVdWCollection *mmffVdW,
|
||||
const MMFFVdW *mmffVdWParamsIAtom,
|
||||
const MMFFVdW *mmffVdWParamsJAtom);
|
||||
RDKIT_FORCEFIELD_EXPORT void scaleVdWParams(double &R_star_ij,
|
||||
double &wellDepth,
|
||||
MMFFVdWCollection *mmffVdW,
|
||||
const MMFFVdW *mmffVdWParamsIAtom,
|
||||
const MMFFVdW *mmffVdWParamsJAtom);
|
||||
//! calculates and returns the Van der Waals MMFF energy
|
||||
RDKIT_FORCEFIELD_EXPORT double calcVdWEnergy(const double dist, const double R_star_ij,
|
||||
const double wellDepth);
|
||||
RDKIT_FORCEFIELD_EXPORT double calcVdWEnergy(const double dist,
|
||||
const double R_star_ij,
|
||||
const double wellDepth);
|
||||
//! calculates and returns the electrostatic MMFF energy
|
||||
RDKIT_FORCEFIELD_EXPORT double calcEleEnergy(unsigned int idx1, unsigned int idx2, double dist,
|
||||
double chargeTerm, std::uint8_t dielModel, bool is1_4);
|
||||
}
|
||||
}
|
||||
}
|
||||
RDKIT_FORCEFIELD_EXPORT double calcEleEnergy(unsigned int idx1,
|
||||
unsigned int idx2, double dist,
|
||||
double chargeTerm,
|
||||
std::uint8_t dielModel,
|
||||
bool is1_4);
|
||||
} // namespace Utils
|
||||
} // namespace MMFF
|
||||
} // namespace ForceFields
|
||||
#endif
|
||||
|
||||
@@ -49,13 +49,17 @@ and the angle formed by atom1-atom2-atom3
|
||||
|
||||
namespace Utils {
|
||||
//! calculates and returns the Wilson angle (in degrees)
|
||||
RDKIT_FORCEFIELD_EXPORT double calcOopChi(const RDGeom::Point3D &iPoint, const RDGeom::Point3D &jPoint,
|
||||
const RDGeom::Point3D &kPoint, const RDGeom::Point3D &lPoint);
|
||||
RDKIT_FORCEFIELD_EXPORT double calcOopChi(const RDGeom::Point3D &iPoint,
|
||||
const RDGeom::Point3D &jPoint,
|
||||
const RDGeom::Point3D &kPoint,
|
||||
const RDGeom::Point3D &lPoint);
|
||||
//! returns the out-of-plane force constant koop
|
||||
RDKIT_FORCEFIELD_EXPORT double calcOopBendForceConstant(const MMFFOop *mmffOopParams);
|
||||
RDKIT_FORCEFIELD_EXPORT double calcOopBendForceConstant(
|
||||
const MMFFOop *mmffOopParams);
|
||||
//! calculates and returns the out-of-plane MMFF energy
|
||||
RDKIT_FORCEFIELD_EXPORT double calcOopBendEnergy(const double chi, const double koop);
|
||||
}
|
||||
}
|
||||
}
|
||||
RDKIT_FORCEFIELD_EXPORT double calcOopBendEnergy(const double chi,
|
||||
const double koop);
|
||||
} // namespace Utils
|
||||
} // namespace MMFF
|
||||
} // namespace ForceFields
|
||||
#endif
|
||||
|
||||
@@ -191,8 +191,9 @@ class RDKIT_FORCEFIELD_EXPORT MMFFAromCollection {
|
||||
private:
|
||||
//! to force this to be a singleton, the constructor must be private
|
||||
MMFFAromCollection(const std::uint8_t mmffArom[]);
|
||||
static class std::unique_ptr<MMFFAromCollection> ds_instance; //!< the singleton
|
||||
std::vector<std::uint8_t> d_params; //!< the aromatic type vector
|
||||
static class std::unique_ptr<MMFFAromCollection>
|
||||
ds_instance; //!< the singleton
|
||||
std::vector<std::uint8_t> d_params; //!< the aromatic type vector
|
||||
};
|
||||
|
||||
class RDKIT_FORCEFIELD_EXPORT MMFFDefCollection {
|
||||
@@ -236,7 +237,8 @@ class RDKIT_FORCEFIELD_EXPORT MMFFDefCollection {
|
||||
private:
|
||||
//! to force this to be a singleton, the constructor must be private
|
||||
MMFFDefCollection(std::string mmffDef);
|
||||
static class std::unique_ptr<MMFFDefCollection> ds_instance; //!< the singleton
|
||||
static class std::unique_ptr<MMFFDefCollection>
|
||||
ds_instance; //!< the singleton
|
||||
#ifdef RDKIT_MMFF_PARAMS_USE_STD_MAP
|
||||
std::map<const unsigned int, MMFFDef> d_params; //!< the parameter map
|
||||
#else
|
||||
@@ -276,8 +278,9 @@ class RDKIT_FORCEFIELD_EXPORT MMFFPropCollection {
|
||||
return ((res != d_params.end()) ? &((*res).second) : NULL);
|
||||
#else
|
||||
std::pair<std::vector<std::uint8_t>::const_iterator,
|
||||
std::vector<std::uint8_t>::const_iterator> bounds =
|
||||
std::equal_range(d_iAtomType.begin(), d_iAtomType.end(), atomType);
|
||||
std::vector<std::uint8_t>::const_iterator>
|
||||
bounds =
|
||||
std::equal_range(d_iAtomType.begin(), d_iAtomType.end(), atomType);
|
||||
|
||||
return ((bounds.first != bounds.second)
|
||||
? &d_params[bounds.first - d_iAtomType.begin()]
|
||||
@@ -288,7 +291,8 @@ class RDKIT_FORCEFIELD_EXPORT MMFFPropCollection {
|
||||
private:
|
||||
//! to force this to be a singleton, the constructor must be private
|
||||
MMFFPropCollection(std::string mmffProp);
|
||||
static class std::unique_ptr<MMFFPropCollection> ds_instance; //!< the singleton
|
||||
static class std::unique_ptr<MMFFPropCollection>
|
||||
ds_instance; //!< the singleton
|
||||
#ifdef RDKIT_MMFF_PARAMS_USE_STD_MAP
|
||||
std::map<const unsigned int, MMFFProp> d_params; //!< the parameter map
|
||||
#else
|
||||
@@ -337,7 +341,8 @@ class RDKIT_FORCEFIELD_EXPORT MMFFPBCICollection {
|
||||
private:
|
||||
//! to force this to be a singleton, the constructor must be private
|
||||
MMFFPBCICollection(std::string mmffPBCI);
|
||||
static class std::unique_ptr<MMFFPBCICollection> ds_instance; //!< the singleton
|
||||
static class std::unique_ptr<MMFFPBCICollection>
|
||||
ds_instance; //!< the singleton
|
||||
#ifdef RDKIT_MMFF_PARAMS_USE_STD_MAP
|
||||
std::map<const unsigned int, MMFFPBCI> d_params; //!< the parameter map
|
||||
#else
|
||||
@@ -383,7 +388,7 @@ class RDKIT_FORCEFIELD_EXPORT MMFFChgCollection {
|
||||
}
|
||||
#ifdef RDKIT_MMFF_PARAMS_USE_STD_MAP
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int, MMFFChg> >::const_iterator res1;
|
||||
std::map<const unsigned int, MMFFChg>>::const_iterator res1;
|
||||
std::map<const unsigned int, MMFFChg>::const_iterator res2;
|
||||
res1 = d_params[bondType].find(canIAtomType);
|
||||
if (res1 != d_params[bondType].end()) {
|
||||
@@ -394,7 +399,8 @@ class RDKIT_FORCEFIELD_EXPORT MMFFChgCollection {
|
||||
}
|
||||
#else
|
||||
std::pair<std::vector<std::uint8_t>::const_iterator,
|
||||
std::vector<std::uint8_t>::const_iterator> bounds;
|
||||
std::vector<std::uint8_t>::const_iterator>
|
||||
bounds;
|
||||
|
||||
bounds =
|
||||
std::equal_range(d_iAtomType.begin(), d_iAtomType.end(), canIAtomType);
|
||||
@@ -421,15 +427,15 @@ class RDKIT_FORCEFIELD_EXPORT MMFFChgCollection {
|
||||
private:
|
||||
//! to force this to be a singleton, the constructor must be private
|
||||
MMFFChgCollection(std::string mmffChg);
|
||||
static class std::unique_ptr<MMFFChgCollection> ds_instance; //!< the singleton
|
||||
static class std::unique_ptr<MMFFChgCollection>
|
||||
ds_instance; //!< the singleton
|
||||
//!< the parameter 3D-map
|
||||
#ifdef RDKIT_MMFF_PARAMS_USE_STD_MAP
|
||||
std::map<
|
||||
const unsigned int,
|
||||
std::map<const unsigned int, std::map<const unsigned int, MMFFChg> > >
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int, std::map<const unsigned int, MMFFChg>>>
|
||||
d_params; //!< the parameter 3D-map
|
||||
#else
|
||||
std::vector<MMFFChg> d_params; //! the parameter vector
|
||||
std::vector<MMFFChg> d_params; //! the parameter vector
|
||||
std::vector<std::uint8_t> d_iAtomType; //! atom type vector for atom i
|
||||
std::vector<std::uint8_t> d_jAtomType; //! atom type vector for atom j
|
||||
std::vector<std::uint8_t> d_bondType; //! bond type vector for bond i-j
|
||||
@@ -473,10 +479,10 @@ class RDKIT_FORCEFIELD_EXPORT MMFFBondCollection {
|
||||
#ifdef RDKIT_MMFF_PARAMS_USE_STD_MAP
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int, MMFFBond> > >::const_iterator
|
||||
std::map<const unsigned int, MMFFBond>>>::const_iterator
|
||||
res1;
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int, MMFFBond> >::const_iterator res2;
|
||||
std::map<const unsigned int, MMFFBond>>::const_iterator res2;
|
||||
std::map<const unsigned int, MMFFBond>::const_iterator res3;
|
||||
res1 = d_params.find(bondType);
|
||||
if (res1 != d_params.end()) {
|
||||
@@ -490,7 +496,8 @@ class RDKIT_FORCEFIELD_EXPORT MMFFBondCollection {
|
||||
}
|
||||
#else
|
||||
std::pair<std::vector<std::uint8_t>::const_iterator,
|
||||
std::vector<std::uint8_t>::const_iterator> bounds;
|
||||
std::vector<std::uint8_t>::const_iterator>
|
||||
bounds;
|
||||
bounds =
|
||||
std::equal_range(d_iAtomType.begin(), d_iAtomType.end(), canAtomType);
|
||||
if (bounds.first != bounds.second) {
|
||||
@@ -516,14 +523,14 @@ class RDKIT_FORCEFIELD_EXPORT MMFFBondCollection {
|
||||
private:
|
||||
//! to force this to be a singleton, the constructor must be private
|
||||
MMFFBondCollection(std::string mmffBond);
|
||||
static class std::unique_ptr<MMFFBondCollection> ds_instance; //!< the singleton
|
||||
static class std::unique_ptr<MMFFBondCollection>
|
||||
ds_instance; //!< the singleton
|
||||
#ifdef RDKIT_MMFF_PARAMS_USE_STD_MAP
|
||||
std::map<
|
||||
const unsigned int,
|
||||
std::map<const unsigned int, std::map<const unsigned int, MMFFBond> > >
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int, std::map<const unsigned int, MMFFBond>>>
|
||||
d_params; //!< the parameter 3D-map
|
||||
#else
|
||||
std::vector<MMFFBond> d_params; //!< the parameter vector
|
||||
std::vector<MMFFBond> d_params; //!< the parameter vector
|
||||
std::vector<std::uint8_t> d_iAtomType; //! atom type vector for atom i
|
||||
std::vector<std::uint8_t> d_jAtomType; //! atom type vector for atom j
|
||||
std::vector<std::uint8_t> d_bondType; //! bond type vector for bond i-j
|
||||
@@ -564,7 +571,7 @@ class RDKIT_FORCEFIELD_EXPORT MMFFBndkCollection {
|
||||
}
|
||||
#ifdef RDKIT_MMFF_PARAMS_USE_STD_MAP
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int, MMFFBond> >::const_iterator res1;
|
||||
std::map<const unsigned int, MMFFBond>>::const_iterator res1;
|
||||
std::map<const unsigned int, MMFFBond>::const_iterator res2;
|
||||
res1 = d_params.find(canAtomicNum);
|
||||
if (res1 != d_params.end()) {
|
||||
@@ -575,7 +582,8 @@ class RDKIT_FORCEFIELD_EXPORT MMFFBndkCollection {
|
||||
}
|
||||
#else
|
||||
std::pair<std::vector<std::uint8_t>::const_iterator,
|
||||
std::vector<std::uint8_t>::const_iterator> bounds;
|
||||
std::vector<std::uint8_t>::const_iterator>
|
||||
bounds;
|
||||
bounds = std::equal_range(d_iAtomicNum.begin(), d_iAtomicNum.end(),
|
||||
canAtomicNum);
|
||||
if (bounds.first != bounds.second) {
|
||||
@@ -595,12 +603,13 @@ class RDKIT_FORCEFIELD_EXPORT MMFFBndkCollection {
|
||||
private:
|
||||
//! to force this to be a singleton, the constructor must be private
|
||||
MMFFBndkCollection(std::string mmffBndk);
|
||||
static class std::unique_ptr<MMFFBndkCollection> ds_instance; //!< the singleton
|
||||
static class std::unique_ptr<MMFFBndkCollection>
|
||||
ds_instance; //!< the singleton
|
||||
#ifdef RDKIT_MMFF_PARAMS_USE_STD_MAP
|
||||
std::map<const unsigned int, std::map<const unsigned int, MMFFBond> >
|
||||
std::map<const unsigned int, std::map<const unsigned int, MMFFBond>>
|
||||
d_params; //!< the parameter 2D-map
|
||||
#else
|
||||
std::vector<MMFFBond> d_params; //!< the parameter vector
|
||||
std::vector<MMFFBond> d_params; //!< the parameter vector
|
||||
std::vector<std::uint8_t> d_iAtomicNum; //! atomic number vector for atom i
|
||||
std::vector<std::uint8_t> d_jAtomicNum; //! atomic number vector for atom j
|
||||
#endif
|
||||
@@ -644,8 +653,8 @@ class RDKIT_FORCEFIELD_EXPORT MMFFHerschbachLaurieCollection {
|
||||
}
|
||||
#ifdef RDKIT_MMFF_PARAMS_USE_STD_MAP
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int,
|
||||
MMFFHerschbachLaurie> >::const_iterator res1;
|
||||
std::map<const unsigned int, MMFFHerschbachLaurie>>::const_iterator
|
||||
res1;
|
||||
std::map<const unsigned int, MMFFHerschbachLaurie>::const_iterator res2;
|
||||
res1 = d_params.find(canIRow);
|
||||
if (res1 != d_params.end()) {
|
||||
@@ -656,7 +665,8 @@ class RDKIT_FORCEFIELD_EXPORT MMFFHerschbachLaurieCollection {
|
||||
}
|
||||
#else
|
||||
std::pair<std::vector<std::uint8_t>::const_iterator,
|
||||
std::vector<std::uint8_t>::const_iterator> bounds;
|
||||
std::vector<std::uint8_t>::const_iterator>
|
||||
bounds;
|
||||
bounds = std::equal_range(d_iRow.begin(), d_iRow.end(), canIRow);
|
||||
if (bounds.first != bounds.second) {
|
||||
bounds = std::equal_range(
|
||||
@@ -674,10 +684,11 @@ class RDKIT_FORCEFIELD_EXPORT MMFFHerschbachLaurieCollection {
|
||||
private:
|
||||
//! to force this to be a singleton, the constructor must be private
|
||||
MMFFHerschbachLaurieCollection(std::string mmffHerschbachLaurie);
|
||||
static class std::unique_ptr<MMFFHerschbachLaurieCollection> ds_instance; //!< the singleton
|
||||
static class std::unique_ptr<MMFFHerschbachLaurieCollection>
|
||||
ds_instance; //!< the singleton
|
||||
#ifdef RDKIT_MMFF_PARAMS_USE_STD_MAP
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int, MMFFHerschbachLaurie> >
|
||||
std::map<const unsigned int, MMFFHerschbachLaurie>>
|
||||
d_params; //!< the parameter 2D-map
|
||||
#else
|
||||
std::vector<MMFFHerschbachLaurie> d_params; //!< the parameter vector
|
||||
@@ -722,8 +733,9 @@ class RDKIT_FORCEFIELD_EXPORT MMFFCovRadPauEleCollection {
|
||||
return ((res != d_params.end()) ? &((*res).second) : NULL);
|
||||
#else
|
||||
std::pair<std::vector<std::uint8_t>::const_iterator,
|
||||
std::vector<std::uint8_t>::const_iterator> bounds =
|
||||
std::equal_range(d_atomicNum.begin(), d_atomicNum.end(), atomicNum);
|
||||
std::vector<std::uint8_t>::const_iterator>
|
||||
bounds =
|
||||
std::equal_range(d_atomicNum.begin(), d_atomicNum.end(), atomicNum);
|
||||
|
||||
return ((bounds.first != bounds.second)
|
||||
? &d_params[bounds.first - d_atomicNum.begin()]
|
||||
@@ -734,13 +746,14 @@ class RDKIT_FORCEFIELD_EXPORT MMFFCovRadPauEleCollection {
|
||||
private:
|
||||
//! to force this to be a singleton, the constructor must be private
|
||||
MMFFCovRadPauEleCollection(std::string mmffCovRadPauEle);
|
||||
static class std::unique_ptr<MMFFCovRadPauEleCollection> ds_instance; //!< the singleton
|
||||
static class std::unique_ptr<MMFFCovRadPauEleCollection>
|
||||
ds_instance; //!< the singleton
|
||||
#ifdef RDKIT_MMFF_PARAMS_USE_STD_MAP
|
||||
std::map<const unsigned int, MMFFCovRadPauEle>
|
||||
d_params; //!< the parameter map
|
||||
#else
|
||||
std::vector<MMFFCovRadPauEle> d_params; //!< the parameter vector
|
||||
std::vector<std::uint8_t> d_atomicNum; //!< the atomic number vector
|
||||
std::vector<MMFFCovRadPauEle> d_params; //!< the parameter vector
|
||||
std::vector<std::uint8_t> d_atomicNum; //!< the atomic number vector
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -784,14 +797,14 @@ class RDKIT_FORCEFIELD_EXPORT MMFFAngleCollection {
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int, MMFFAngle> > > >::
|
||||
std::map<const unsigned int, MMFFAngle>>>>::
|
||||
const_iterator res1;
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int, MMFFAngle> > >::
|
||||
const_iterator res2;
|
||||
std::map<const unsigned int, MMFFAngle>>>::const_iterator
|
||||
res2;
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int, MMFFAngle> >::const_iterator res3;
|
||||
std::map<const unsigned int, MMFFAngle>>::const_iterator res3;
|
||||
std::map<const unsigned int, MMFFAngle>::const_iterator res4;
|
||||
while ((iter < 4) && (!mmffAngleParams)) {
|
||||
unsigned int canIAtomType = (*mmffDef)(iAtomType)->eqLevel[iter];
|
||||
@@ -818,10 +831,12 @@ class RDKIT_FORCEFIELD_EXPORT MMFFAngleCollection {
|
||||
}
|
||||
#else
|
||||
std::pair<std::vector<std::uint8_t>::const_iterator,
|
||||
std::vector<std::uint8_t>::const_iterator> jBounds =
|
||||
std::equal_range(d_jAtomType.begin(), d_jAtomType.end(), jAtomType);
|
||||
std::vector<std::uint8_t>::const_iterator>
|
||||
jBounds =
|
||||
std::equal_range(d_jAtomType.begin(), d_jAtomType.end(), jAtomType);
|
||||
std::pair<std::vector<std::uint8_t>::const_iterator,
|
||||
std::vector<std::uint8_t>::const_iterator> bounds;
|
||||
std::vector<std::uint8_t>::const_iterator>
|
||||
bounds;
|
||||
if (jBounds.first != jBounds.second) {
|
||||
while ((iter < 4) && (!mmffAngleParams)) {
|
||||
unsigned int canIAtomType = (*mmffDef)(iAtomType)->eqLevel[iter];
|
||||
@@ -861,20 +876,20 @@ class RDKIT_FORCEFIELD_EXPORT MMFFAngleCollection {
|
||||
private:
|
||||
//! to force this to be a singleton, the constructor must be private
|
||||
MMFFAngleCollection(std::string mmffAngle);
|
||||
static class std::unique_ptr<MMFFAngleCollection> ds_instance; //!< the singleton
|
||||
static class std::unique_ptr<MMFFAngleCollection>
|
||||
ds_instance; //!< the singleton
|
||||
#ifdef RDKIT_MMFF_PARAMS_USE_STD_MAP
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int, MMFFAngle> > > >
|
||||
std::map<const unsigned int, MMFFAngle>>>>
|
||||
d_params; //!< the parameter 4D-map
|
||||
#else
|
||||
std::vector<MMFFAngle> d_params; //!< the parameter vector
|
||||
std::vector<MMFFAngle> d_params; //!< the parameter vector
|
||||
std::vector<std::uint8_t> d_iAtomType; //! atom type vector for atom i
|
||||
std::vector<std::uint8_t> d_jAtomType; //! atom type vector for atom j
|
||||
std::vector<std::uint8_t> d_kAtomType; //! atom type vector for atom k
|
||||
std::vector<std::uint8_t>
|
||||
d_angleType; //! angle type vector for angle i-j-k
|
||||
std::vector<std::uint8_t> d_angleType; //! angle type vector for angle i-j-k
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -922,14 +937,14 @@ class RDKIT_FORCEFIELD_EXPORT MMFFStbnCollection {
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int, MMFFStbn> > > >::
|
||||
std::map<const unsigned int, MMFFStbn>>>>::
|
||||
const_iterator res1;
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int, MMFFStbn> > >::const_iterator
|
||||
std::map<const unsigned int, MMFFStbn>>>::const_iterator
|
||||
res2;
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int, MMFFStbn> >::const_iterator res3;
|
||||
std::map<const unsigned int, MMFFStbn>>::const_iterator res3;
|
||||
std::map<const unsigned int, MMFFStbn>::const_iterator res4;
|
||||
res1 = d_params.find(canStretchBendType);
|
||||
if (res1 != d_params.end()) {
|
||||
@@ -946,10 +961,12 @@ class RDKIT_FORCEFIELD_EXPORT MMFFStbnCollection {
|
||||
}
|
||||
#else
|
||||
std::pair<std::vector<std::uint8_t>::const_iterator,
|
||||
std::vector<std::uint8_t>::const_iterator> jBounds =
|
||||
std::equal_range(d_jAtomType.begin(), d_jAtomType.end(), jAtomType);
|
||||
std::vector<std::uint8_t>::const_iterator>
|
||||
jBounds =
|
||||
std::equal_range(d_jAtomType.begin(), d_jAtomType.end(), jAtomType);
|
||||
std::pair<std::vector<std::uint8_t>::const_iterator,
|
||||
std::vector<std::uint8_t>::const_iterator> bounds;
|
||||
std::vector<std::uint8_t>::const_iterator>
|
||||
bounds;
|
||||
if (jBounds.first != jBounds.second) {
|
||||
bounds = std::equal_range(
|
||||
d_iAtomType.begin() + (jBounds.first - d_jAtomType.begin()),
|
||||
@@ -980,15 +997,16 @@ class RDKIT_FORCEFIELD_EXPORT MMFFStbnCollection {
|
||||
private:
|
||||
//! to force this to be a singleton, the constructor must be private
|
||||
MMFFStbnCollection(std::string mmffStbn);
|
||||
static class std::unique_ptr<MMFFStbnCollection> ds_instance; //!< the singleton
|
||||
static class std::unique_ptr<MMFFStbnCollection>
|
||||
ds_instance; //!< the singleton
|
||||
#ifdef RDKIT_MMFF_PARAMS_USE_STD_MAP
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int, MMFFStbn> > > >
|
||||
std::map<const unsigned int, MMFFStbn>>>>
|
||||
d_params; //!< the parameter 4D-map
|
||||
#else
|
||||
std::vector<MMFFStbn> d_params; //!< the parameter vector
|
||||
std::vector<MMFFStbn> d_params; //!< the parameter vector
|
||||
std::vector<std::uint8_t> d_iAtomType; //! atom type vector for atom i
|
||||
std::vector<std::uint8_t> d_jAtomType; //! atom type vector for atom j
|
||||
std::vector<std::uint8_t> d_kAtomType; //! atom type vector for atom k
|
||||
@@ -1027,10 +1045,10 @@ class RDKIT_FORCEFIELD_EXPORT MMFFDfsbCollection {
|
||||
const unsigned int periodicTableRow3) {
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int, MMFFStbn> > >::const_iterator
|
||||
std::map<const unsigned int, MMFFStbn>>>::const_iterator
|
||||
res1;
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int, MMFFStbn> >::const_iterator res2;
|
||||
std::map<const unsigned int, MMFFStbn>>::const_iterator res2;
|
||||
std::map<const unsigned int, MMFFStbn>::const_iterator res3;
|
||||
const MMFFStbn *mmffDfsbParams = NULL;
|
||||
bool swap = false;
|
||||
@@ -1058,10 +1076,10 @@ class RDKIT_FORCEFIELD_EXPORT MMFFDfsbCollection {
|
||||
private:
|
||||
//! to force this to be a singleton, the constructor must be private
|
||||
MMFFDfsbCollection(std::string mmffDfsb);
|
||||
static class std::unique_ptr<MMFFDfsbCollection> ds_instance; //!< the singleton
|
||||
std::map<
|
||||
const unsigned int,
|
||||
std::map<const unsigned int, std::map<const unsigned int, MMFFStbn> > >
|
||||
static class std::unique_ptr<MMFFDfsbCollection>
|
||||
ds_instance; //!< the singleton
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int, std::map<const unsigned int, MMFFStbn>>>
|
||||
d_params; //!< the parameter 3D-map
|
||||
};
|
||||
|
||||
@@ -1106,14 +1124,14 @@ class RDKIT_FORCEFIELD_EXPORT MMFFOopCollection {
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int, MMFFOop> > > >::
|
||||
std::map<const unsigned int, MMFFOop>>>>::
|
||||
const_iterator res1;
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int, MMFFOop> > >::const_iterator
|
||||
std::map<const unsigned int, MMFFOop>>>::const_iterator
|
||||
res2;
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int, MMFFOop> >::const_iterator res3;
|
||||
std::map<const unsigned int, MMFFOop>>::const_iterator res3;
|
||||
std::map<const unsigned int, MMFFOop>::const_iterator res4;
|
||||
while ((iter < 4) && (!mmffOopParams)) {
|
||||
canIKLAtomType[0] = (*mmffDef)(iAtomType)->eqLevel[iter];
|
||||
@@ -1138,10 +1156,12 @@ class RDKIT_FORCEFIELD_EXPORT MMFFOopCollection {
|
||||
}
|
||||
#else
|
||||
std::pair<std::vector<std::uint8_t>::const_iterator,
|
||||
std::vector<std::uint8_t>::const_iterator> jBounds =
|
||||
std::equal_range(d_jAtomType.begin(), d_jAtomType.end(), jAtomType);
|
||||
std::vector<std::uint8_t>::const_iterator>
|
||||
jBounds =
|
||||
std::equal_range(d_jAtomType.begin(), d_jAtomType.end(), jAtomType);
|
||||
std::pair<std::vector<std::uint8_t>::const_iterator,
|
||||
std::vector<std::uint8_t>::const_iterator> bounds;
|
||||
std::vector<std::uint8_t>::const_iterator>
|
||||
bounds;
|
||||
if (jBounds.first != jBounds.second) {
|
||||
while ((iter < 4) && (!mmffOopParams)) {
|
||||
canIKLAtomType[0] = (*mmffDef)(iAtomType)->eqLevel[iter];
|
||||
@@ -1178,15 +1198,16 @@ class RDKIT_FORCEFIELD_EXPORT MMFFOopCollection {
|
||||
private:
|
||||
//! to force this to be a singleton, the constructor must be private
|
||||
MMFFOopCollection(const bool isMMFFs, std::string mmffOop);
|
||||
static class std::unique_ptr<MMFFOopCollection> ds_instance[2]; //!< the singleton
|
||||
static class std::unique_ptr<MMFFOopCollection>
|
||||
ds_instance[2]; //!< the singleton
|
||||
#ifdef RDKIT_MMFF_PARAMS_USE_STD_MAP
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int, MMFFOop> > > >
|
||||
std::map<const unsigned int, MMFFOop>>>>
|
||||
d_params; //!< the parameter 4D-map
|
||||
#else
|
||||
std::vector<MMFFOop> d_params; //!< the parameter vector
|
||||
std::vector<MMFFOop> d_params; //!< the parameter vector
|
||||
std::vector<std::uint8_t> d_iAtomType; //! atom type vector for atom i
|
||||
std::vector<std::uint8_t> d_jAtomType; //! atom type vector for atom j
|
||||
std::vector<std::uint8_t> d_kAtomType; //! atom type vector for atom k
|
||||
@@ -1237,29 +1258,30 @@ class RDKIT_FORCEFIELD_EXPORT MMFFTorCollection {
|
||||
#ifdef RDKIT_MMFF_PARAMS_USE_STD_MAP
|
||||
std::map<
|
||||
const unsigned int,
|
||||
std::map<
|
||||
const unsigned int,
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int, MMFFTor> > > > >::
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int, MMFFTor>>>>>::
|
||||
const_iterator res1;
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int, MMFFTor> > > >::
|
||||
std::map<const unsigned int, MMFFTor>>>>::
|
||||
const_iterator res2;
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int, MMFFTor> > >::const_iterator
|
||||
std::map<const unsigned int, MMFFTor>>>::const_iterator
|
||||
res3;
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int, MMFFTor> >::const_iterator res4;
|
||||
std::map<const unsigned int, MMFFTor>>::const_iterator res4;
|
||||
std::map<const unsigned int, MMFFTor>::const_iterator res5;
|
||||
#else
|
||||
std::pair<std::vector<std::uint8_t>::const_iterator,
|
||||
std::vector<std::uint8_t>::const_iterator> jBounds;
|
||||
std::vector<std::uint8_t>::const_iterator>
|
||||
jBounds;
|
||||
std::pair<std::vector<std::uint8_t>::const_iterator,
|
||||
std::vector<std::uint8_t>::const_iterator> bounds;
|
||||
std::vector<std::uint8_t>::const_iterator>
|
||||
bounds;
|
||||
#endif
|
||||
|
||||
while (((iter < maxIter) && ((!mmffTorParams) || (maxIter == 4))) ||
|
||||
@@ -1363,17 +1385,19 @@ class RDKIT_FORCEFIELD_EXPORT MMFFTorCollection {
|
||||
private:
|
||||
//! to force this to be a singleton, the constructor must be private
|
||||
MMFFTorCollection(const bool isMMFFs, std::string mmffTor);
|
||||
static class std::unique_ptr<MMFFTorCollection> ds_instance[2]; //!< the singleton
|
||||
static class std::unique_ptr<MMFFTorCollection>
|
||||
ds_instance[2]; //!< the singleton
|
||||
#ifdef RDKIT_MMFF_PARAMS_USE_STD_MAP
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int,
|
||||
MMFFTor> > > > >
|
||||
std::map<
|
||||
const unsigned int,
|
||||
std::map<
|
||||
const unsigned int,
|
||||
std::map<const unsigned int,
|
||||
std::map<const unsigned int, std::map<const unsigned int,
|
||||
MMFFTor>>>>>
|
||||
d_params; //!< the parameter 5D-map
|
||||
#else
|
||||
std::vector<MMFFTor> d_params; //!< the parameter vector
|
||||
std::vector<MMFFTor> d_params; //!< the parameter vector
|
||||
std::vector<std::uint8_t> d_iAtomType; //! atom type vector for atom i
|
||||
std::vector<std::uint8_t> d_jAtomType; //! atom type vector for atom j
|
||||
std::vector<std::uint8_t> d_kAtomType; //! atom type vector for atom k
|
||||
@@ -1420,8 +1444,9 @@ class RDKIT_FORCEFIELD_EXPORT MMFFVdWCollection {
|
||||
return (res != d_params.end() ? &((*res).second) : NULL);
|
||||
#else
|
||||
std::pair<std::vector<std::uint8_t>::const_iterator,
|
||||
std::vector<std::uint8_t>::const_iterator> bounds =
|
||||
std::equal_range(d_atomType.begin(), d_atomType.end(), atomType);
|
||||
std::vector<std::uint8_t>::const_iterator>
|
||||
bounds =
|
||||
std::equal_range(d_atomType.begin(), d_atomType.end(), atomType);
|
||||
|
||||
return ((bounds.first != bounds.second)
|
||||
? &d_params[bounds.first - d_atomType.begin()]
|
||||
@@ -1432,15 +1457,16 @@ class RDKIT_FORCEFIELD_EXPORT MMFFVdWCollection {
|
||||
private:
|
||||
//! to force this to be a singleton, the constructor must be private
|
||||
MMFFVdWCollection(std::string mmffVdW);
|
||||
static class std::unique_ptr<MMFFVdWCollection> ds_instance; //!< the singleton
|
||||
static class std::unique_ptr<MMFFVdWCollection>
|
||||
ds_instance; //!< the singleton
|
||||
#ifdef RDKIT_MMFF_PARAMS_USE_STD_MAP
|
||||
std::map<const unsigned int, MMFFVdW> d_params; //!< the parameter map
|
||||
#else
|
||||
std::vector<MMFFVdW> d_params; //!< the parameter vector
|
||||
std::vector<MMFFVdW> d_params; //!< the parameter vector
|
||||
std::vector<std::uint8_t> d_atomType; //! atom type vector
|
||||
#endif
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace MMFF
|
||||
} // namespace ForceFields
|
||||
|
||||
#endif
|
||||
|
||||
@@ -20,7 +20,8 @@ namespace ForceFields {
|
||||
namespace MMFF {
|
||||
|
||||
//! A position constraint of the type 0.5k * deltaX^2
|
||||
class RDKIT_FORCEFIELD_EXPORT PositionConstraintContrib : public ForceFieldContrib {
|
||||
class RDKIT_FORCEFIELD_EXPORT PositionConstraintContrib
|
||||
: public ForceFieldContrib {
|
||||
public:
|
||||
PositionConstraintContrib() : d_atIdx(-1){};
|
||||
//! Constructor
|
||||
@@ -49,6 +50,6 @@ class RDKIT_FORCEFIELD_EXPORT PositionConstraintContrib : public ForceFieldContr
|
||||
RDGeom::Point3D d_pos0; //!< reference position
|
||||
double d_forceConstant; //!< force constant of the bond
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace MMFF
|
||||
} // namespace ForceFields
|
||||
#endif
|
||||
|
||||
@@ -64,7 +64,7 @@ RDKIT_FORCEFIELD_EXPORT std::pair<double, double> calcStbnForceConstants(
|
||||
RDKIT_FORCEFIELD_EXPORT std::pair<double, double> calcStretchBendEnergy(
|
||||
const double deltaDist1, const double deltaDist2, const double deltaTheta,
|
||||
const std::pair<double, double> forceConstants);
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace Utils
|
||||
} // namespace MMFF
|
||||
} // namespace ForceFields
|
||||
#endif
|
||||
|
||||
@@ -25,7 +25,8 @@ namespace MMFF {
|
||||
class MMFFTor;
|
||||
|
||||
//! the torsion term for MMFF
|
||||
class RDKIT_FORCEFIELD_EXPORT RDKIT_FORCEFIELD_EXPORT TorsionAngleContrib : public ForceFieldContrib {
|
||||
class RDKIT_FORCEFIELD_EXPORT RDKIT_FORCEFIELD_EXPORT TorsionAngleContrib
|
||||
: public ForceFieldContrib {
|
||||
public:
|
||||
TorsionAngleContrib()
|
||||
: d_at1Idx(-1), d_at2Idx(-1), d_at3Idx(-1), d_at4Idx(-1){};
|
||||
@@ -59,18 +60,22 @@ class RDKIT_FORCEFIELD_EXPORT RDKIT_FORCEFIELD_EXPORT TorsionAngleContrib : publ
|
||||
namespace Utils {
|
||||
//! calculates and returns the cosine of a torsion angle
|
||||
RDKIT_FORCEFIELD_EXPORT double calcTorsionCosPhi(const RDGeom::Point3D &iPoint,
|
||||
const RDGeom::Point3D &jPoint,
|
||||
const RDGeom::Point3D &kPoint,
|
||||
const RDGeom::Point3D &lPoint);
|
||||
const RDGeom::Point3D &jPoint,
|
||||
const RDGeom::Point3D &kPoint,
|
||||
const RDGeom::Point3D &lPoint);
|
||||
//! returns the 3-tuple of a torsion angle force constants
|
||||
RDKIT_FORCEFIELD_EXPORT boost::tuple<double, double, double> calcTorsionForceConstant(
|
||||
const MMFFTor *mmffTorParams);
|
||||
RDKIT_FORCEFIELD_EXPORT boost::tuple<double, double, double>
|
||||
calcTorsionForceConstant(const MMFFTor *mmffTorParams);
|
||||
//! calculates and returns the torsional MMFF energy
|
||||
RDKIT_FORCEFIELD_EXPORT double calcTorsionEnergy(const double V1, const double V2, const double V3,
|
||||
const double cosPhi);
|
||||
RDKIT_FORCEFIELD_EXPORT void calcTorsionGrad(RDGeom::Point3D *r, RDGeom::Point3D *t, double *d,
|
||||
double **g, double &sinTerm, double &cosPhi);
|
||||
}
|
||||
}
|
||||
}
|
||||
RDKIT_FORCEFIELD_EXPORT double calcTorsionEnergy(const double V1,
|
||||
const double V2,
|
||||
const double V3,
|
||||
const double cosPhi);
|
||||
RDKIT_FORCEFIELD_EXPORT void calcTorsionGrad(RDGeom::Point3D *r,
|
||||
RDGeom::Point3D *t, double *d,
|
||||
double **g, double &sinTerm,
|
||||
double &cosPhi);
|
||||
} // namespace Utils
|
||||
} // namespace MMFF
|
||||
} // namespace ForceFields
|
||||
#endif
|
||||
|
||||
@@ -19,7 +19,8 @@ namespace ForceFields {
|
||||
namespace MMFF {
|
||||
|
||||
//! A dihedral angle range constraint modelled after a TorsionContrib
|
||||
class RDKIT_FORCEFIELD_EXPORT RDKIT_FORCEFIELD_EXPORT TorsionConstraintContrib : public ForceFieldContrib {
|
||||
class RDKIT_FORCEFIELD_EXPORT RDKIT_FORCEFIELD_EXPORT TorsionConstraintContrib
|
||||
: public ForceFieldContrib {
|
||||
public:
|
||||
TorsionConstraintContrib()
|
||||
: d_at1Idx(-1), d_at2Idx(-1), d_at3Idx(-1), d_at4Idx(-1){};
|
||||
@@ -60,6 +61,6 @@ class RDKIT_FORCEFIELD_EXPORT RDKIT_FORCEFIELD_EXPORT TorsionConstraintContrib :
|
||||
d_maxDihedralDeg; //!< rest amplitudes of the dihedral angle
|
||||
double d_forceConstant; //!< force constant of the angle constraint
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace MMFF
|
||||
} // namespace ForceFields
|
||||
#endif
|
||||
|
||||
@@ -76,13 +76,15 @@ namespace Utils {
|
||||
\param at3Params pointer to the parameters for atom 3
|
||||
|
||||
*/
|
||||
RDKIT_FORCEFIELD_EXPORT double calcAngleForceConstant(double theta0, double bondOrder12,
|
||||
double bondOrder23, const AtomicParams *at1Params,
|
||||
const AtomicParams *at2Params,
|
||||
const AtomicParams *at3Params);
|
||||
RDKIT_FORCEFIELD_EXPORT void calcAngleBendGrad(RDGeom::Point3D *r, double *dist, double **g,
|
||||
double &dE_dTheta, double &cosTheta, double &sinTheta);
|
||||
}
|
||||
}
|
||||
}
|
||||
RDKIT_FORCEFIELD_EXPORT double calcAngleForceConstant(
|
||||
double theta0, double bondOrder12, double bondOrder23,
|
||||
const AtomicParams *at1Params, const AtomicParams *at2Params,
|
||||
const AtomicParams *at3Params);
|
||||
RDKIT_FORCEFIELD_EXPORT void calcAngleBendGrad(RDGeom::Point3D *r, double *dist,
|
||||
double **g, double &dE_dTheta,
|
||||
double &cosTheta,
|
||||
double &sinTheta);
|
||||
} // namespace Utils
|
||||
} // namespace UFF
|
||||
} // namespace ForceFields
|
||||
#endif
|
||||
|
||||
@@ -19,7 +19,8 @@ namespace ForceFields {
|
||||
namespace UFF {
|
||||
|
||||
//! An angle range constraint modelled after a AngleBendContrib
|
||||
class RDKIT_FORCEFIELD_EXPORT AngleConstraintContrib : public ForceFieldContrib {
|
||||
class RDKIT_FORCEFIELD_EXPORT AngleConstraintContrib
|
||||
: public ForceFieldContrib {
|
||||
public:
|
||||
AngleConstraintContrib() : d_at1Idx(-1), d_at2Idx(-1), d_at3Idx(-1){};
|
||||
//! Constructor
|
||||
@@ -55,6 +56,6 @@ class RDKIT_FORCEFIELD_EXPORT AngleConstraintContrib : public ForceFieldContrib
|
||||
double d_minAngleDeg, d_maxAngleDeg; //!< rest amplitudes of the angle
|
||||
double d_forceConstant; //!< force constant of the angle constraint
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace UFF
|
||||
} // namespace ForceFields
|
||||
#endif
|
||||
|
||||
@@ -59,8 +59,9 @@ namespace Utils {
|
||||
\return the rest length
|
||||
|
||||
*/
|
||||
RDKIT_FORCEFIELD_EXPORT double calcBondRestLength(double bondOrder, const AtomicParams *end1Params,
|
||||
const AtomicParams *end2Params);
|
||||
RDKIT_FORCEFIELD_EXPORT double calcBondRestLength(
|
||||
double bondOrder, const AtomicParams *end1Params,
|
||||
const AtomicParams *end2Params);
|
||||
|
||||
//! calculates and returns the UFF force constant for a bond
|
||||
/*!
|
||||
@@ -72,9 +73,10 @@ RDKIT_FORCEFIELD_EXPORT double calcBondRestLength(double bondOrder, const Atomic
|
||||
\return the force constant
|
||||
|
||||
*/
|
||||
RDKIT_FORCEFIELD_EXPORT double calcBondForceConstant(double restLength, const AtomicParams *end1Params,
|
||||
const AtomicParams *end2Params);
|
||||
}
|
||||
}
|
||||
}
|
||||
RDKIT_FORCEFIELD_EXPORT double calcBondForceConstant(
|
||||
double restLength, const AtomicParams *end1Params,
|
||||
const AtomicParams *end2Params);
|
||||
} // namespace Utils
|
||||
} // namespace UFF
|
||||
} // namespace ForceFields
|
||||
#endif
|
||||
|
||||
@@ -19,7 +19,8 @@ namespace ForceFields {
|
||||
namespace UFF {
|
||||
|
||||
//! A distance range constraint modelled after a BondStretchContrib
|
||||
class RDKIT_FORCEFIELD_EXPORT DistanceConstraintContrib : public ForceFieldContrib {
|
||||
class RDKIT_FORCEFIELD_EXPORT DistanceConstraintContrib
|
||||
: public ForceFieldContrib {
|
||||
public:
|
||||
DistanceConstraintContrib() : d_end1Idx(-1), d_end2Idx(-1){};
|
||||
//! Constructor
|
||||
@@ -55,6 +56,6 @@ class RDKIT_FORCEFIELD_EXPORT DistanceConstraintContrib : public ForceFieldContr
|
||||
double d_minLen, d_maxLen; //!< rest length of the bond
|
||||
double d_forceConstant; //!< force constant of the bond
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace UFF
|
||||
} // namespace ForceFields
|
||||
#endif
|
||||
|
||||
@@ -56,9 +56,9 @@ namespace Utils {
|
||||
//! calculates and returns the cosine of the Y angle in an improper torsion
|
||||
//! (see UFF paper, equation 19)
|
||||
RDKIT_FORCEFIELD_EXPORT double calculateCosY(const RDGeom::Point3D &iPoint,
|
||||
const RDGeom::Point3D &jPoint,
|
||||
const RDGeom::Point3D &kPoint,
|
||||
const RDGeom::Point3D &lPoint);
|
||||
const RDGeom::Point3D &jPoint,
|
||||
const RDGeom::Point3D &kPoint,
|
||||
const RDGeom::Point3D &lPoint);
|
||||
|
||||
//! calculates and returns the UFF force constant for an improper torsion
|
||||
/*!
|
||||
@@ -72,7 +72,7 @@ RDKIT_FORCEFIELD_EXPORT double calculateCosY(const RDGeom::Point3D &iPoint,
|
||||
*/
|
||||
RDKIT_FORCEFIELD_EXPORT boost::tuple<double, double, double, double>
|
||||
calcInversionCoefficientsAndForceConstant(int at2AtomicNum, bool isCBoundToO);
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace Utils
|
||||
} // namespace UFF
|
||||
} // namespace ForceFields
|
||||
#endif
|
||||
|
||||
@@ -66,8 +66,8 @@ namespace Utils {
|
||||
\return the position of the minimum
|
||||
|
||||
*/
|
||||
RDKIT_FORCEFIELD_EXPORT double calcNonbondedMinimum(const AtomicParams *at1Params,
|
||||
const AtomicParams *at2Params);
|
||||
RDKIT_FORCEFIELD_EXPORT double calcNonbondedMinimum(
|
||||
const AtomicParams *at1Params, const AtomicParams *at2Params);
|
||||
|
||||
//! calculates and returns the UFF well depth for a vdW contact
|
||||
/*!
|
||||
@@ -78,9 +78,9 @@ RDKIT_FORCEFIELD_EXPORT double calcNonbondedMinimum(const AtomicParams *at1Param
|
||||
\return the depth of the well
|
||||
|
||||
*/
|
||||
RDKIT_FORCEFIELD_EXPORT double calcNonbondedDepth(const AtomicParams *at1Params,
|
||||
const AtomicParams *at2Params);
|
||||
}
|
||||
}
|
||||
}
|
||||
RDKIT_FORCEFIELD_EXPORT double calcNonbondedDepth(
|
||||
const AtomicParams *at1Params, const AtomicParams *at2Params);
|
||||
} // namespace Utils
|
||||
} // namespace UFF
|
||||
} // namespace ForceFields
|
||||
#endif
|
||||
|
||||
@@ -90,7 +90,7 @@ const double lambda = 0.1332; //!< scaling factor for rBO correction
|
||||
const double G = 332.06; //!< bond force constant prefactor
|
||||
const double amideBondOrder =
|
||||
1.41; //!< special case bond order for amide C-N bonds.
|
||||
};
|
||||
}; // namespace Params
|
||||
|
||||
//! singleton class for retrieving UFF AtomParams
|
||||
/*!
|
||||
@@ -146,9 +146,9 @@ class RDKIT_FORCEFIELD_EXPORT ParamCollection {
|
||||
private:
|
||||
//! to force this to be a singleton, the constructor must be private
|
||||
ParamCollection(std::string paramData);
|
||||
static class std::unique_ptr<ParamCollection> ds_instance; //!< the singleton
|
||||
static class std::unique_ptr<ParamCollection> ds_instance; //!< the singleton
|
||||
std::map<std::string, AtomicParams> d_params; //!< the parameter map
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace UFF
|
||||
} // namespace ForceFields
|
||||
#endif
|
||||
|
||||
@@ -20,7 +20,8 @@ namespace ForceFields {
|
||||
namespace UFF {
|
||||
|
||||
//! A position constraint of the type 0.5k * deltaX^2
|
||||
class RDKIT_FORCEFIELD_EXPORT PositionConstraintContrib : public ForceFieldContrib {
|
||||
class RDKIT_FORCEFIELD_EXPORT PositionConstraintContrib
|
||||
: public ForceFieldContrib {
|
||||
public:
|
||||
PositionConstraintContrib() : d_atIdx(-1){};
|
||||
//! Constructor
|
||||
@@ -49,6 +50,6 @@ class RDKIT_FORCEFIELD_EXPORT PositionConstraintContrib : public ForceFieldContr
|
||||
RDGeom::Point3D d_pos0; //!< reference position
|
||||
double d_forceConstant; //!< force constant of the bond
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace UFF
|
||||
} // namespace ForceFields
|
||||
#endif
|
||||
|
||||
@@ -95,15 +95,19 @@ class RDKIT_FORCEFIELD_EXPORT TorsionAngleContrib : public ForceFieldContrib {
|
||||
|
||||
namespace Utils {
|
||||
//! calculates and returns the cosine of a torsion angle
|
||||
RDKIT_FORCEFIELD_EXPORT double calculateCosTorsion(const RDGeom::Point3D &p1, const RDGeom::Point3D &p2,
|
||||
const RDGeom::Point3D &p3,
|
||||
const RDGeom::Point3D &p4);
|
||||
RDKIT_FORCEFIELD_EXPORT void calcTorsionGrad(RDGeom::Point3D *r, RDGeom::Point3D *t, double *d,
|
||||
double **g, double &sinTerm, double &cosPhi);
|
||||
RDKIT_FORCEFIELD_EXPORT double equation17(double bondOrder23, const AtomicParams *at2Params,
|
||||
const AtomicParams *at3Params);
|
||||
RDKIT_FORCEFIELD_EXPORT double calculateCosTorsion(const RDGeom::Point3D &p1,
|
||||
const RDGeom::Point3D &p2,
|
||||
const RDGeom::Point3D &p3,
|
||||
const RDGeom::Point3D &p4);
|
||||
RDKIT_FORCEFIELD_EXPORT void calcTorsionGrad(RDGeom::Point3D *r,
|
||||
RDGeom::Point3D *t, double *d,
|
||||
double **g, double &sinTerm,
|
||||
double &cosPhi);
|
||||
RDKIT_FORCEFIELD_EXPORT double equation17(double bondOrder23,
|
||||
const AtomicParams *at2Params,
|
||||
const AtomicParams *at3Params);
|
||||
RDKIT_FORCEFIELD_EXPORT bool isInGroup6(int num);
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace Utils
|
||||
} // namespace UFF
|
||||
} // namespace ForceFields
|
||||
#endif
|
||||
|
||||
@@ -19,7 +19,8 @@ namespace ForceFields {
|
||||
namespace UFF {
|
||||
|
||||
//! A dihedral angle range constraint modelled after a TorsionContrib
|
||||
class RDKIT_FORCEFIELD_EXPORT TorsionConstraintContrib : public ForceFieldContrib {
|
||||
class RDKIT_FORCEFIELD_EXPORT TorsionConstraintContrib
|
||||
: public ForceFieldContrib {
|
||||
public:
|
||||
TorsionConstraintContrib()
|
||||
: d_at1Idx(-1), d_at2Idx(-1), d_at3Idx(-1), d_at4Idx(-1){};
|
||||
@@ -60,6 +61,6 @@ class RDKIT_FORCEFIELD_EXPORT TorsionConstraintContrib : public ForceFieldContri
|
||||
d_maxDihedralDeg; //!< rest amplitudes of the dihedral angle
|
||||
double d_forceConstant; //!< force constant of the angle constraint
|
||||
};
|
||||
}
|
||||
}
|
||||
} // namespace UFF
|
||||
} // namespace ForceFields
|
||||
#endif
|
||||
|
||||
@@ -49,9 +49,7 @@ class PyForceField {
|
||||
|
||||
double calcEnergyWithPos(const python::object &pos = python::object());
|
||||
|
||||
double calcEnergy() {
|
||||
return calcEnergyWithPos();
|
||||
}
|
||||
double calcEnergy() { return calcEnergyWithPos(); }
|
||||
|
||||
PyObject *calcGradWithPos(const python::object &pos = python::object());
|
||||
|
||||
@@ -62,7 +60,8 @@ class PyForceField {
|
||||
return this->field->minimize(maxIts, forceTol, energyTol);
|
||||
}
|
||||
|
||||
boost::python::tuple minimizeTrajectory(unsigned int snapshotFreq, int maxIts, double forceTol, double energyTol);
|
||||
boost::python::tuple minimizeTrajectory(unsigned int snapshotFreq, int maxIts,
|
||||
double forceTol, double energyTol);
|
||||
|
||||
void initialize() {
|
||||
PRECONDITION(this->field, "no force field");
|
||||
@@ -72,15 +71,15 @@ class PyForceField {
|
||||
unsigned int dimension() {
|
||||
PRECONDITION(this->field, "no force field");
|
||||
return this->field->dimension();
|
||||
}
|
||||
}
|
||||
|
||||
unsigned int numPoints() {
|
||||
PRECONDITION(this->field, "no force field");
|
||||
return this->field->numPoints();
|
||||
}
|
||||
}
|
||||
|
||||
// private:
|
||||
std::vector<boost::shared_ptr<RDGeom::Point3D> > extraPoints;
|
||||
std::vector<boost::shared_ptr<RDGeom::Point3D>> extraPoints;
|
||||
boost::shared_ptr<ForceField> field;
|
||||
};
|
||||
|
||||
@@ -173,4 +172,4 @@ PyObject *getUFFInversionParams(const RDKit::ROMol &mol,
|
||||
const unsigned int idx4);
|
||||
PyObject *getUFFVdWParams(const RDKit::ROMol &mol, const unsigned int idx1,
|
||||
const unsigned int idx2);
|
||||
}
|
||||
} // namespace ForceFields
|
||||
|
||||
@@ -49,6 +49,6 @@ class RDKIT_RDGEOMETRYLIB_EXPORT Grid3D {
|
||||
|
||||
virtual const RDKit::DiscreteValueVect *getOccupancyVect() const = 0;
|
||||
};
|
||||
}
|
||||
} // namespace RDGeom
|
||||
|
||||
#endif
|
||||
|
||||
@@ -20,12 +20,15 @@ class Point3D;
|
||||
//! calculate the tversky index between the shapes encoded on two grids
|
||||
/*!
|
||||
|
||||
tversky(S1,S2) = | S1&S2 | / ( alpha * ( | S1 | - | S1&S2 | ) + beta * ( | S2 | - | S1&S2 | ) + | S1&S2 | )
|
||||
tversky(S1,S2) = | S1&S2 | / ( alpha * ( | S1 | - | S1&S2 | ) + beta * ( |
|
||||
S2 | - | S1&S2 | ) + | S1&S2 | )
|
||||
|
||||
*/
|
||||
|
||||
template <class GRIDTYPE>
|
||||
RDKIT_RDGEOMETRYLIB_EXPORT double tverskyIndex(const GRIDTYPE &grid1, const GRIDTYPE &grid2, double alpha, double beta);
|
||||
RDKIT_RDGEOMETRYLIB_EXPORT double tverskyIndex(const GRIDTYPE &grid1,
|
||||
const GRIDTYPE &grid2,
|
||||
double alpha, double beta);
|
||||
|
||||
//! calculate the tanimoto distance between the shapes encoded on two grids
|
||||
/*!
|
||||
@@ -35,7 +38,8 @@ RDKIT_RDGEOMETRYLIB_EXPORT double tverskyIndex(const GRIDTYPE &grid1, const GRID
|
||||
*/
|
||||
|
||||
template <class GRIDTYPE>
|
||||
RDKIT_RDGEOMETRYLIB_EXPORT double tanimotoDistance(const GRIDTYPE &grid1, const GRIDTYPE &grid2);
|
||||
RDKIT_RDGEOMETRYLIB_EXPORT double tanimotoDistance(const GRIDTYPE &grid1,
|
||||
const GRIDTYPE &grid2);
|
||||
//! calculate the protrude distance between the shapes encoded on two grids
|
||||
/*!
|
||||
|
||||
@@ -43,17 +47,18 @@ RDKIT_RDGEOMETRYLIB_EXPORT double tanimotoDistance(const GRIDTYPE &grid1, const
|
||||
|
||||
*/
|
||||
template <class GRIDTYPE>
|
||||
RDKIT_RDGEOMETRYLIB_EXPORT double protrudeDistance(const GRIDTYPE &grid1, const GRIDTYPE &grid2);
|
||||
RDKIT_RDGEOMETRYLIB_EXPORT double protrudeDistance(const GRIDTYPE &grid1,
|
||||
const GRIDTYPE &grid2);
|
||||
|
||||
//! calculate the grid centroid within a window of a point
|
||||
RDKIT_RDGEOMETRYLIB_EXPORT Point3D computeGridCentroid(const UniformGrid3D &grid, const Point3D &pt,
|
||||
double windowRadius, double &weightSum);
|
||||
RDKIT_RDGEOMETRYLIB_EXPORT Point3D
|
||||
computeGridCentroid(const UniformGrid3D &grid, const Point3D &pt,
|
||||
double windowRadius, double &weightSum);
|
||||
|
||||
//! find terminal points of a shape encoded on a grid
|
||||
//! this is part of the subshape implementation
|
||||
RDKIT_RDGEOMETRYLIB_EXPORT std::vector<Point3D> findGridTerminalPoints(const UniformGrid3D &grid,
|
||||
double windowRadius,
|
||||
double inclusionFraction);
|
||||
}
|
||||
RDKIT_RDGEOMETRYLIB_EXPORT std::vector<Point3D> findGridTerminalPoints(
|
||||
const UniformGrid3D &grid, double windowRadius, double inclusionFraction);
|
||||
} // namespace RDGeom
|
||||
|
||||
#endif
|
||||
|
||||
@@ -18,7 +18,8 @@ namespace RDGeom {
|
||||
class Point2D;
|
||||
const unsigned int DIM_2D = 3;
|
||||
|
||||
class RDKIT_RDGEOMETRYLIB_EXPORT Transform2D : public RDNumeric::SquareMatrix<double> {
|
||||
class RDKIT_RDGEOMETRYLIB_EXPORT Transform2D
|
||||
: public RDNumeric::SquareMatrix<double> {
|
||||
public:
|
||||
//! \brief Constructor
|
||||
/*!
|
||||
@@ -69,7 +70,7 @@ class RDKIT_RDGEOMETRYLIB_EXPORT Transform2D : public RDNumeric::SquareMatrix<do
|
||||
|
||||
private:
|
||||
};
|
||||
}
|
||||
} // namespace RDGeom
|
||||
|
||||
/*! \brief Combine two transforms and return the results as a new transform
|
||||
*
|
||||
@@ -78,7 +79,7 @@ class RDKIT_RDGEOMETRYLIB_EXPORT Transform2D : public RDNumeric::SquareMatrix<do
|
||||
* The resulting transform t3 has the folliwng effect
|
||||
* t3(point) = t1(t2(point))
|
||||
*/
|
||||
RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::Transform2D operator*(const RDGeom::Transform2D &t1,
|
||||
const RDGeom::Transform2D &t2);
|
||||
RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::Transform2D operator*(
|
||||
const RDGeom::Transform2D &t1, const RDGeom::Transform2D &t2);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,7 +19,8 @@ namespace RDGeom {
|
||||
class Point3D;
|
||||
const unsigned int DIM_3D = 4;
|
||||
|
||||
class RDKIT_RDGEOMETRYLIB_EXPORT Transform3D : public RDNumeric::SquareMatrix<double> {
|
||||
class RDKIT_RDGEOMETRYLIB_EXPORT Transform3D
|
||||
: public RDNumeric::SquareMatrix<double> {
|
||||
public:
|
||||
//! Constructor
|
||||
/*!
|
||||
@@ -76,7 +77,7 @@ class RDKIT_RDGEOMETRYLIB_EXPORT Transform3D : public RDNumeric::SquareMatrix<do
|
||||
|
||||
private:
|
||||
};
|
||||
}
|
||||
} // namespace RDGeom
|
||||
|
||||
/*! \brief Combine two transforms and return the results as a new transform
|
||||
*
|
||||
@@ -85,13 +86,13 @@ class RDKIT_RDGEOMETRYLIB_EXPORT Transform3D : public RDNumeric::SquareMatrix<do
|
||||
* The resulting transform t3 has the folliwng effect
|
||||
* t3(point) = t1(t2(point))
|
||||
*/
|
||||
RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::Transform3D operator*(const RDGeom::Transform3D &t1,
|
||||
const RDGeom::Transform3D &t2);
|
||||
RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::Transform3D operator*(
|
||||
const RDGeom::Transform3D &t1, const RDGeom::Transform3D &t2);
|
||||
|
||||
/*! \brief Transform a point:
|
||||
*
|
||||
*/
|
||||
RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::Point3D operator*(const RDGeom::Transform3D &t,
|
||||
const RDGeom::Point3D &pt);
|
||||
RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::Point3D operator*(
|
||||
const RDGeom::Transform3D &t, const RDGeom::Point3D &pt);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -191,8 +191,8 @@ class RDKIT_RDGEOMETRYLIB_EXPORT UniformGrid3D : public Grid3D {
|
||||
d_numZ; //! number of grid points along x, y, z axes
|
||||
double d_spacing; //! grid spacing
|
||||
Point3D d_offSet; //! the grid offset (from the origin)
|
||||
RDKit::DiscreteValueVect *
|
||||
dp_storage; //! storage for values at each grid point
|
||||
RDKit::DiscreteValueVect
|
||||
*dp_storage; //! storage for values at each grid point
|
||||
|
||||
//! \brief construct from a pickle
|
||||
void initFromText(const char *pkl, const unsigned int length);
|
||||
@@ -202,13 +202,15 @@ class RDKIT_RDGEOMETRYLIB_EXPORT UniformGrid3D : public Grid3D {
|
||||
/*
|
||||
The grid is written in GRD format
|
||||
*/
|
||||
RDKIT_RDGEOMETRYLIB_EXPORT void writeGridToStream(const UniformGrid3D &grid, std::ostream &outStrm);
|
||||
RDKIT_RDGEOMETRYLIB_EXPORT void writeGridToStream(const UniformGrid3D &grid,
|
||||
std::ostream &outStrm);
|
||||
|
||||
//! \brief writes the contents of the grid to a named file
|
||||
/*
|
||||
The grid is written in GRD format
|
||||
*/
|
||||
RDKIT_RDGEOMETRYLIB_EXPORT void writeGridToFile(const UniformGrid3D &grid, const std::string &filename);
|
||||
}
|
||||
RDKIT_RDGEOMETRYLIB_EXPORT void writeGridToFile(const UniformGrid3D &grid,
|
||||
const std::string &filename);
|
||||
} // namespace RDGeom
|
||||
|
||||
#endif
|
||||
|
||||
@@ -80,11 +80,11 @@ inline double compute14DistCis(double d1, double d2, double d3, double ang12,
|
||||
}
|
||||
|
||||
/*! \brief Compute the 14 distances give the 12 distance and bond angle
|
||||
* for trans configuration
|
||||
*
|
||||
* This is simply a special case of the above function compute14Dist3D;
|
||||
* with torsion angle set to 180. However, this function should be speedier
|
||||
*/
|
||||
* for trans configuration
|
||||
*
|
||||
* This is simply a special case of the above function compute14Dist3D;
|
||||
* with torsion angle set to 180. However, this function should be speedier
|
||||
*/
|
||||
inline double compute14DistTrans(double d1, double d2, double d3, double ang12,
|
||||
double ang23) {
|
||||
double dx = d2 - d3 * cos(ang23) - d1 * cos(ang12);
|
||||
@@ -92,6 +92,6 @@ inline double compute14DistTrans(double d1, double d2, double d3, double ang12,
|
||||
double res = dx * dx + dy * dy;
|
||||
return sqrt(res);
|
||||
}
|
||||
}
|
||||
} // namespace RDGeom
|
||||
|
||||
#endif
|
||||
|
||||
@@ -242,15 +242,18 @@ class RDKIT_RDGEOMETRYLIB_EXPORT Point3D : public Point {
|
||||
// plane of the first three points (pt1, pt2, pt3) and the plane of the
|
||||
// last three points (pt2, pt3, pt4)
|
||||
// the computed angle is between 0 and PI
|
||||
RDKIT_RDGEOMETRYLIB_EXPORT double computeDihedralAngle(const Point3D &pt1, const Point3D &pt2,
|
||||
const Point3D &pt3, const Point3D &pt4);
|
||||
RDKIT_RDGEOMETRYLIB_EXPORT double computeDihedralAngle(const Point3D &pt1,
|
||||
const Point3D &pt2,
|
||||
const Point3D &pt3,
|
||||
const Point3D &pt4);
|
||||
|
||||
// given a set of four pts in 3D compute the signed dihedral angle between the
|
||||
// plane of the first three points (pt1, pt2, pt3) and the plane of the
|
||||
// last three points (pt2, pt3, pt4)
|
||||
// the computed angle is between -PI and PI
|
||||
RDKIT_RDGEOMETRYLIB_EXPORT double computeSignedDihedralAngle(const Point3D &pt1, const Point3D &pt2,
|
||||
const Point3D &pt3, const Point3D &pt4);
|
||||
RDKIT_RDGEOMETRYLIB_EXPORT double computeSignedDihedralAngle(
|
||||
const Point3D &pt1, const Point3D &pt2, const Point3D &pt3,
|
||||
const Point3D &pt4);
|
||||
|
||||
class RDKIT_RDGEOMETRYLIB_EXPORT Point2D : public Point {
|
||||
public:
|
||||
@@ -382,7 +385,7 @@ class RDKIT_RDGEOMETRYLIB_EXPORT Point2D : public Point {
|
||||
|
||||
class RDKIT_RDGEOMETRYLIB_EXPORT PointND : public Point {
|
||||
public:
|
||||
typedef boost::shared_ptr<RDNumeric::Vector<double> > VECT_SH_PTR;
|
||||
typedef boost::shared_ptr<RDNumeric::Vector<double>> VECT_SH_PTR;
|
||||
|
||||
PointND(unsigned int dim) {
|
||||
RDNumeric::Vector<double> *nvec = new RDNumeric::Vector<double>(dim, 0.0);
|
||||
@@ -513,22 +516,35 @@ typedef std::map<int, Point2D> INT_POINT2D_MAP;
|
||||
typedef INT_POINT2D_MAP::iterator INT_POINT2D_MAP_I;
|
||||
typedef INT_POINT2D_MAP::const_iterator INT_POINT2D_MAP_CI;
|
||||
|
||||
RDKIT_RDGEOMETRYLIB_EXPORT std::ostream &operator<<(std::ostream &target, const RDGeom::Point &pt);
|
||||
RDKIT_RDGEOMETRYLIB_EXPORT std::ostream &operator<<(std::ostream &target,
|
||||
const RDGeom::Point &pt);
|
||||
|
||||
RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::Point3D operator+(const RDGeom::Point3D &p1, const RDGeom::Point3D &p2);
|
||||
RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::Point3D operator-(const RDGeom::Point3D &p1, const RDGeom::Point3D &p2);
|
||||
RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::Point3D operator*(const RDGeom::Point3D &p1, double v);
|
||||
RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::Point3D operator/(const RDGeom::Point3D &p1, double v);
|
||||
RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::Point3D operator+(const RDGeom::Point3D &p1,
|
||||
const RDGeom::Point3D &p2);
|
||||
RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::Point3D operator-(const RDGeom::Point3D &p1,
|
||||
const RDGeom::Point3D &p2);
|
||||
RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::Point3D operator*(const RDGeom::Point3D &p1,
|
||||
double v);
|
||||
RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::Point3D operator/(const RDGeom::Point3D &p1,
|
||||
double v);
|
||||
|
||||
RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::Point2D operator+(const RDGeom::Point2D &p1, const RDGeom::Point2D &p2);
|
||||
RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::Point2D operator-(const RDGeom::Point2D &p1, const RDGeom::Point2D &p2);
|
||||
RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::Point2D operator*(const RDGeom::Point2D &p1, double v);
|
||||
RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::Point2D operator/(const RDGeom::Point2D &p1, double v);
|
||||
RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::Point2D operator+(const RDGeom::Point2D &p1,
|
||||
const RDGeom::Point2D &p2);
|
||||
RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::Point2D operator-(const RDGeom::Point2D &p1,
|
||||
const RDGeom::Point2D &p2);
|
||||
RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::Point2D operator*(const RDGeom::Point2D &p1,
|
||||
double v);
|
||||
RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::Point2D operator/(const RDGeom::Point2D &p1,
|
||||
double v);
|
||||
|
||||
RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::PointND operator+(const RDGeom::PointND &p1, const RDGeom::PointND &p2);
|
||||
RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::PointND operator-(const RDGeom::PointND &p1, const RDGeom::PointND &p2);
|
||||
RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::PointND operator*(const RDGeom::PointND &p1, double v);
|
||||
RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::PointND operator/(const RDGeom::PointND &p1, double v);
|
||||
}
|
||||
RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::PointND operator+(const RDGeom::PointND &p1,
|
||||
const RDGeom::PointND &p2);
|
||||
RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::PointND operator-(const RDGeom::PointND &p1,
|
||||
const RDGeom::PointND &p2);
|
||||
RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::PointND operator*(const RDGeom::PointND &p1,
|
||||
double v);
|
||||
RDKIT_RDGEOMETRYLIB_EXPORT RDGeom::PointND operator/(const RDGeom::PointND &p1,
|
||||
double v);
|
||||
} // namespace RDGeom
|
||||
|
||||
#endif
|
||||
|
||||
@@ -422,10 +422,12 @@ RDKIT_GRAPHMOL_EXPORT std::string getAtomValue(const Atom *atom);
|
||||
|
||||
//! Sets the supplemental label that will follow the atom when writing
|
||||
// smiles strings.
|
||||
RDKIT_GRAPHMOL_EXPORT void setSupplementalSmilesLabel(Atom *atom, const std::string &label);
|
||||
RDKIT_GRAPHMOL_EXPORT void setSupplementalSmilesLabel(Atom *atom,
|
||||
const std::string &label);
|
||||
RDKIT_GRAPHMOL_EXPORT std::string getSupplementalSmilesLabel(const Atom *atom);
|
||||
};
|
||||
}; // namespace RDKit
|
||||
//! allows Atom objects to be dumped to streams
|
||||
RDKIT_GRAPHMOL_EXPORT std::ostream &operator<<(std::ostream &target, const RDKit::Atom &at);
|
||||
RDKIT_GRAPHMOL_EXPORT std::ostream &operator<<(std::ostream &target,
|
||||
const RDKit::Atom &at);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -202,6 +202,6 @@ class RDKIT_GRAPHMOL_EXPORT MatchingAtomIterator_ {
|
||||
int _findPrev(int from);
|
||||
};
|
||||
|
||||
} /* end o namespace */
|
||||
} // namespace RDKit
|
||||
|
||||
#endif
|
||||
|
||||
@@ -42,7 +42,8 @@ struct FeatTreeEdge_t {
|
||||
typedef boost::property<FeatTreeEdge_t, unsigned int> FeatTreeEdge;
|
||||
|
||||
typedef boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS,
|
||||
FeatTreeNode, FeatTreeEdge> FeatTreeGraph;
|
||||
FeatTreeNode, FeatTreeEdge>
|
||||
FeatTreeGraph;
|
||||
typedef boost::shared_ptr<FeatTreeGraph> FeatTreeGraphSPtr;
|
||||
|
||||
typedef boost::property_map<FeatTreeGraph, FeatTreeEdge_t>::type
|
||||
@@ -56,6 +57,6 @@ typedef boost::property_map<FeatTreeGraph, FeatTreeNode_t>::type
|
||||
FeatTreeGraphSPtr molToBaseTree(const ROMol &mol);
|
||||
|
||||
void baseTreeToFeatTree(FeatTreeGraph &baseTree);
|
||||
}
|
||||
}
|
||||
} // namespace FeatTrees
|
||||
} // namespace RDKit
|
||||
#endif
|
||||
|
||||
@@ -34,6 +34,6 @@ void addBondsFromNonringAtoms(const ROMol &mol, FeatTreeGraph &featGraph,
|
||||
std::vector<unsigned int> &atomIndices);
|
||||
void addZeroNodes(FeatTreeGraph &featGraph);
|
||||
void replaceCycles(FeatTreeGraph &featGraph);
|
||||
}
|
||||
}
|
||||
} // namespace FeatTrees
|
||||
} // namespace RDKit
|
||||
#endif
|
||||
|
||||
@@ -339,9 +339,10 @@ class RDKIT_GRAPHMOL_EXPORT Bond : public RDProps {
|
||||
|
||||
void initBond();
|
||||
};
|
||||
};
|
||||
}; // namespace RDKit
|
||||
|
||||
//! allows Bond objects to be dumped to streams
|
||||
RDKIT_GRAPHMOL_EXPORT extern std::ostream &operator<<(std::ostream &target, const RDKit::Bond &b);
|
||||
RDKIT_GRAPHMOL_EXPORT extern std::ostream &operator<<(std::ostream &target,
|
||||
const RDKit::Bond &b);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -70,6 +70,6 @@ class RDKIT_GRAPHMOL_EXPORT ConstBondIterator_ {
|
||||
ROMol::EDGE_ITER _beg, _end, _pos;
|
||||
ROMol const *_mol;
|
||||
};
|
||||
}
|
||||
} // namespace RDKit
|
||||
|
||||
#endif
|
||||
|
||||
@@ -110,14 +110,12 @@ typedef boost::tuple<int, int, Bond *> PossibleType;
|
||||
and the like are changed to fit the canonical traversal order
|
||||
|
||||
*/
|
||||
RDKIT_GRAPHMOL_EXPORT void canonicalizeFragment(ROMol &mol, int atomIdx,
|
||||
std::vector<AtomColors> &colors,
|
||||
const std::vector<unsigned int> &ranks,
|
||||
MolStack &molStack,
|
||||
const boost::dynamic_bitset<> *bondsInPlay = 0,
|
||||
const std::vector<std::string> *bondSymbols = 0,
|
||||
bool doIsomericSmiles = false,
|
||||
bool doRandom = false);
|
||||
RDKIT_GRAPHMOL_EXPORT void canonicalizeFragment(
|
||||
ROMol &mol, int atomIdx, std::vector<AtomColors> &colors,
|
||||
const std::vector<unsigned int> &ranks, MolStack &molStack,
|
||||
const boost::dynamic_bitset<> *bondsInPlay = 0,
|
||||
const std::vector<std::string> *bondSymbols = 0,
|
||||
bool doIsomericSmiles = false, bool doRandom = false);
|
||||
|
||||
} // end of namespace Canon
|
||||
} // end of namespace RDKit
|
||||
|
||||
@@ -67,7 +67,8 @@ namespace RDKit {
|
||||
See EnumerationStrategyBase for more details and usage.
|
||||
*/
|
||||
|
||||
class RDKIT_CHEMREACTIONS_EXPORT CartesianProductStrategy : public EnumerationStrategyBase {
|
||||
class RDKIT_CHEMREACTIONS_EXPORT CartesianProductStrategy
|
||||
: public EnumerationStrategyBase {
|
||||
size_t m_numPermutationsProcessed;
|
||||
|
||||
public:
|
||||
@@ -76,7 +77,8 @@ class RDKIT_CHEMREACTIONS_EXPORT CartesianProductStrategy : public EnumerationSt
|
||||
|
||||
using EnumerationStrategyBase::initialize;
|
||||
|
||||
virtual void initializeStrategy(const ChemicalReaction &, const EnumerationTypes::BBS &) {
|
||||
virtual void initializeStrategy(const ChemicalReaction &,
|
||||
const EnumerationTypes::BBS &) {
|
||||
m_numPermutationsProcessed = 0;
|
||||
}
|
||||
|
||||
@@ -93,7 +95,8 @@ class RDKIT_CHEMREACTIONS_EXPORT CartesianProductStrategy : public EnumerationSt
|
||||
}
|
||||
|
||||
virtual boost::uint64_t getPermutationIdx() const {
|
||||
return m_numPermutationsProcessed; }
|
||||
return m_numPermutationsProcessed;
|
||||
}
|
||||
|
||||
virtual operator bool() const { return hasNext(); }
|
||||
|
||||
@@ -128,18 +131,18 @@ class RDKIT_CHEMREACTIONS_EXPORT CartesianProductStrategy : public EnumerationSt
|
||||
}
|
||||
|
||||
private:
|
||||
#ifdef RDK_USE_BOOST_SERIALIZATION
|
||||
#ifdef RDK_USE_BOOST_SERIALIZATION
|
||||
friend class boost::serialization::access;
|
||||
template <class Archive>
|
||||
void serialize(Archive &ar, const unsigned int /*version*/) {
|
||||
ar &boost::serialization::base_object<EnumerationStrategyBase>(*this);
|
||||
ar &m_numPermutationsProcessed;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
};
|
||||
}
|
||||
} // namespace RDKit
|
||||
|
||||
#ifdef RDK_USE_BOOST_SERIALIZATION
|
||||
#ifdef RDK_USE_BOOST_SERIALIZATION
|
||||
BOOST_CLASS_VERSION(RDKit::CartesianProductStrategy, 1)
|
||||
#endif
|
||||
|
||||
|
||||
@@ -43,7 +43,6 @@ future releases.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
namespace RDKit {
|
||||
|
||||
//! This is a class for providing enumeration options that control
|
||||
@@ -58,29 +57,24 @@ namespace RDKit {
|
||||
pass chemical sanitization. Note that if the product template itself\n\
|
||||
does not pass sanitization, then none of the products will.
|
||||
*/
|
||||
struct RDKIT_CHEMREACTIONS_EXPORT EnumerationParams
|
||||
{
|
||||
struct RDKIT_CHEMREACTIONS_EXPORT EnumerationParams {
|
||||
int reagentMaxMatchCount;
|
||||
bool sanePartialProducts;
|
||||
EnumerationParams() :
|
||||
reagentMaxMatchCount(INT_MAX), sanePartialProducts(false) {
|
||||
}
|
||||
EnumerationParams()
|
||||
: reagentMaxMatchCount(INT_MAX), sanePartialProducts(false) {}
|
||||
|
||||
EnumerationParams(const EnumerationParams &rhs) :
|
||||
reagentMaxMatchCount(rhs.reagentMaxMatchCount),
|
||||
sanePartialProducts(rhs.sanePartialProducts) {
|
||||
}
|
||||
EnumerationParams(const EnumerationParams &rhs)
|
||||
: reagentMaxMatchCount(rhs.reagentMaxMatchCount),
|
||||
sanePartialProducts(rhs.sanePartialProducts) {}
|
||||
};
|
||||
|
||||
|
||||
//! Helper function, remove reagents that are incompatible
|
||||
// with the reaction.
|
||||
// rxn must be sanitized, initialized and preprocessed.
|
||||
// this happens automatically in EnumerateLibrary
|
||||
RDKIT_CHEMREACTIONS_EXPORT EnumerationTypes::BBS removeNonmatchingReagents(
|
||||
const ChemicalReaction &rxn,
|
||||
EnumerationTypes::BBS bbs,
|
||||
const EnumerationParams ¶ms=EnumerationParams());
|
||||
const ChemicalReaction &rxn, EnumerationTypes::BBS bbs,
|
||||
const EnumerationParams ¶ms = EnumerationParams());
|
||||
|
||||
//! This is a class for running reactions on sets of reagents.
|
||||
/*!
|
||||
@@ -115,8 +109,8 @@ RDKIT_CHEMREACTIONS_EXPORT EnumerationTypes::BBS removeNonmatchingReagents(
|
||||
\endverbatim
|
||||
*/
|
||||
|
||||
|
||||
class RDKIT_CHEMREACTIONS_EXPORT EnumerateLibrary : public EnumerateLibraryBase {
|
||||
class RDKIT_CHEMREACTIONS_EXPORT EnumerateLibrary
|
||||
: public EnumerateLibraryBase {
|
||||
EnumerationTypes::BBS m_bbs;
|
||||
|
||||
public:
|
||||
@@ -127,11 +121,11 @@ class RDKIT_CHEMREACTIONS_EXPORT EnumerateLibrary : public EnumerateLibraryBase
|
||||
|
||||
EnumerateLibrary(const ChemicalReaction &rxn,
|
||||
const EnumerationTypes::BBS &reagents,
|
||||
const EnumerationParams & params = EnumerationParams());
|
||||
const EnumerationParams ¶ms = EnumerationParams());
|
||||
EnumerateLibrary(const ChemicalReaction &rxn,
|
||||
const EnumerationTypes::BBS &reagents,
|
||||
const EnumerationStrategyBase &enumerator,
|
||||
const EnumerationParams & params = EnumerationParams());
|
||||
const EnumerationParams ¶ms = EnumerationParams());
|
||||
EnumerateLibrary(const EnumerateLibrary &rhs);
|
||||
|
||||
//! Return the reagents used in the library
|
||||
@@ -190,5 +184,5 @@ class RDKIT_CHEMREACTIONS_EXPORT EnumerateLibrary : public EnumerateLibraryBase
|
||||
|
||||
RDKIT_CHEMREACTIONS_EXPORT bool EnumerateLibraryCanSerialize();
|
||||
|
||||
}
|
||||
} // namespace RDKit
|
||||
#endif
|
||||
|
||||
@@ -120,7 +120,7 @@ class RDKIT_CHEMREACTIONS_EXPORT EnumerateLibraryBase {
|
||||
//! get the next set of products as smiles
|
||||
// This returns a vector of a vector strings.
|
||||
// Each result vector corresponds for a product template.
|
||||
virtual std::vector<std::vector<std::string> > nextSmiles();
|
||||
virtual std::vector<std::vector<std::string>> nextSmiles();
|
||||
|
||||
//! Get the current position into the reagent vectors
|
||||
// Use getState/setState to save/restart the enumeration
|
||||
@@ -196,5 +196,5 @@ class RDKIT_CHEMREACTIONS_EXPORT EnumerateLibraryBase {
|
||||
#ifdef RDK_USE_BOOST_SERIALIZATION
|
||||
BOOST_SERIALIZATION_ASSUME_ABSTRACT(EnumerateLibraryBase)
|
||||
#endif
|
||||
}
|
||||
} // namespace RDKit
|
||||
#endif
|
||||
|
||||
@@ -54,6 +54,6 @@ typedef std::vector<MOL_SPTR_VECT> BBS;
|
||||
//! building_blocks.push_back( BBS[1][groups[1] );
|
||||
//! rxn.runReactants( building_blocks );
|
||||
typedef std::vector<boost::uint64_t> RGROUPS;
|
||||
}
|
||||
}
|
||||
} // namespace EnumerationTypes
|
||||
} // namespace RDKit
|
||||
#endif
|
||||
|
||||
@@ -38,20 +38,23 @@
|
||||
namespace RDKit {
|
||||
namespace EnumerationStrategyPickler {
|
||||
//! pickles a EnumerationStrategy and adds the results to a stream \c ss
|
||||
RDKIT_CHEMREACTIONS_EXPORT void pickle(const boost::shared_ptr<EnumerationStrategyBase> &enumerator,
|
||||
std::ostream &ss);
|
||||
RDKIT_CHEMREACTIONS_EXPORT void pickle(const boost::shared_ptr<EnumerationStrategyBase> &enumerator,
|
||||
std::string &s);
|
||||
RDKIT_CHEMREACTIONS_EXPORT void pickle(
|
||||
const boost::shared_ptr<EnumerationStrategyBase> &enumerator,
|
||||
std::ostream &ss);
|
||||
RDKIT_CHEMREACTIONS_EXPORT void pickle(
|
||||
const boost::shared_ptr<EnumerationStrategyBase> &enumerator,
|
||||
std::string &s);
|
||||
|
||||
//! constructs a EnumerationStrategy from a pickle stored in a string
|
||||
//! Since an EnumerationStrategyBase is polymorphic, this must return
|
||||
//! a shared pointer to the EnumerationStrategyBase
|
||||
RDKIT_CHEMREACTIONS_EXPORT boost::shared_ptr<EnumerationStrategyBase> fromPickle(std::istream &pickle);
|
||||
RDKIT_CHEMREACTIONS_EXPORT boost::shared_ptr<EnumerationStrategyBase>
|
||||
fromPickle(std::istream &pickle);
|
||||
|
||||
//! a pointer to the EnumerationStrategyBase
|
||||
RDKIT_CHEMREACTIONS_EXPORT boost::shared_ptr<EnumerationStrategyBase> fromPickle(
|
||||
const std::string &pickle);
|
||||
}
|
||||
}
|
||||
RDKIT_CHEMREACTIONS_EXPORT boost::shared_ptr<EnumerationStrategyBase>
|
||||
fromPickle(const std::string &pickle);
|
||||
} // namespace EnumerationStrategyPickler
|
||||
} // namespace RDKit
|
||||
|
||||
#endif
|
||||
|
||||
@@ -53,7 +53,8 @@
|
||||
namespace RDKit {
|
||||
|
||||
//! class for flagging enumeration strategy errors
|
||||
class RDKIT_CHEMREACTIONS_EXPORT EnumerationStrategyException : public std::exception {
|
||||
class RDKIT_CHEMREACTIONS_EXPORT EnumerationStrategyException
|
||||
: public std::exception {
|
||||
public:
|
||||
EnumerationStrategyException(const char *msg) : _msg(msg){};
|
||||
EnumerationStrategyException(const std::string &msg) : _msg(msg){};
|
||||
@@ -71,7 +72,7 @@ class RDKIT_CHEMREACTIONS_EXPORT EnumerationStrategyException : public std::exce
|
||||
*/
|
||||
template <class T>
|
||||
EnumerationTypes::RGROUPS getSizesFromBBs(
|
||||
const std::vector<std::vector<T> > &bbs) {
|
||||
const std::vector<std::vector<T>> &bbs) {
|
||||
EnumerationTypes::RGROUPS sizes;
|
||||
for (size_t i = 0; i < bbs.size(); ++i) sizes.push_back(bbs[i].size());
|
||||
return sizes;
|
||||
@@ -88,8 +89,9 @@ RDKIT_CHEMREACTIONS_EXPORT EnumerationTypes::RGROUPS getSizesFromReactants(
|
||||
//! Helper function for enumeration, bbs are stored in a
|
||||
//! std::vector< std::vector<boost:shared_ptr<ROMol> >
|
||||
//
|
||||
RDKIT_CHEMREACTIONS_EXPORT MOL_SPTR_VECT getReactantsFromRGroups(const std::vector<MOL_SPTR_VECT> &bbs,
|
||||
const EnumerationTypes::RGROUPS &rgroups);
|
||||
RDKIT_CHEMREACTIONS_EXPORT MOL_SPTR_VECT
|
||||
getReactantsFromRGroups(const std::vector<MOL_SPTR_VECT> &bbs,
|
||||
const EnumerationTypes::RGROUPS &rgroups);
|
||||
|
||||
//! computeNumProducts
|
||||
//! Returns the number of possible product combination from
|
||||
@@ -98,7 +100,8 @@ RDKIT_CHEMREACTIONS_EXPORT MOL_SPTR_VECT getReactantsFromRGroups(const std::vect
|
||||
//! number will not fit into the machines integer type.
|
||||
//! n.b. An overflow simply means there are a lot of products
|
||||
//! not that they cannot be enumerated
|
||||
RDKIT_CHEMREACTIONS_EXPORT boost::uint64_t computeNumProducts(const EnumerationTypes::RGROUPS &sizes);
|
||||
RDKIT_CHEMREACTIONS_EXPORT boost::uint64_t computeNumProducts(
|
||||
const EnumerationTypes::RGROUPS &sizes);
|
||||
|
||||
//! Base Class for enumeration strageties
|
||||
//! Usage:
|
||||
@@ -204,7 +207,7 @@ class RDKIT_CHEMREACTIONS_EXPORT EnumerationStrategyBase {
|
||||
#ifdef RDK_USE_BOOST_SERIALIZATION
|
||||
BOOST_SERIALIZATION_ASSUME_ABSTRACT(EnumerationStrategyBase)
|
||||
#endif
|
||||
}
|
||||
} // namespace RDKit
|
||||
|
||||
#ifdef RDK_USE_BOOST_SERIALIZATION
|
||||
BOOST_CLASS_VERSION(RDKit::EnumerationStrategyBase, 1)
|
||||
|
||||
@@ -52,13 +52,14 @@ namespace RDKit {
|
||||
See EnumeartionStrategyBase for more details.
|
||||
*/
|
||||
|
||||
class RDKIT_CHEMREACTIONS_EXPORT EvenSamplePairsStrategy : public EnumerationStrategyBase {
|
||||
class RDKIT_CHEMREACTIONS_EXPORT EvenSamplePairsStrategy
|
||||
: public EnumerationStrategyBase {
|
||||
boost::uint64_t m_numPermutationsProcessed;
|
||||
|
||||
std::vector<boost::int64_t> used_count;
|
||||
std::vector<std::vector<boost::uint64_t> > var_used;
|
||||
std::vector<std::vector<boost::uint64_t> > pair_used;
|
||||
std::vector<std::vector<boost::uint64_t> > pair_counts;
|
||||
std::vector<std::vector<boost::uint64_t>> var_used;
|
||||
std::vector<std::vector<boost::uint64_t>> pair_used;
|
||||
std::vector<std::vector<boost::uint64_t>> pair_counts;
|
||||
std::set<boost::uint64_t> selected;
|
||||
|
||||
boost::uint64_t seed; // last seed for permutation (starts at 0)
|
||||
@@ -189,7 +190,7 @@ class RDKIT_CHEMREACTIONS_EXPORT EvenSamplePairsStrategy : public EnumerationStr
|
||||
}
|
||||
#endif
|
||||
};
|
||||
}
|
||||
} // namespace RDKit
|
||||
|
||||
BOOST_CLASS_VERSION(RDKit::EvenSamplePairsStrategy, 1)
|
||||
|
||||
|
||||
@@ -62,10 +62,11 @@ namespace RDKit {
|
||||
|
||||
See EnumerationStrategyBase for more details and usage.
|
||||
*/
|
||||
class RDKIT_CHEMREACTIONS_EXPORT RandomSampleStrategy : public EnumerationStrategyBase {
|
||||
class RDKIT_CHEMREACTIONS_EXPORT RandomSampleStrategy
|
||||
: public EnumerationStrategyBase {
|
||||
boost::uint64_t m_numPermutationsProcessed;
|
||||
boost::minstd_rand m_rng;
|
||||
std::vector<boost::random::uniform_int_distribution<> > m_distributions;
|
||||
std::vector<boost::random::uniform_int_distribution<>> m_distributions;
|
||||
|
||||
public:
|
||||
RandomSampleStrategy()
|
||||
@@ -81,7 +82,8 @@ class RDKIT_CHEMREACTIONS_EXPORT RandomSampleStrategy : public EnumerationStrate
|
||||
|
||||
using EnumerationStrategyBase::initialize;
|
||||
|
||||
virtual void initializeStrategy(const ChemicalReaction &, const EnumerationTypes::BBS &) {
|
||||
virtual void initializeStrategy(const ChemicalReaction &,
|
||||
const EnumerationTypes::BBS &) {
|
||||
m_distributions.clear();
|
||||
for (size_t i = 0; i < m_permutationSizes.size(); ++i) {
|
||||
m_distributions.push_back(boost::random::uniform_int_distribution<>(
|
||||
@@ -105,7 +107,8 @@ class RDKIT_CHEMREACTIONS_EXPORT RandomSampleStrategy : public EnumerationStrate
|
||||
}
|
||||
|
||||
virtual boost::uint64_t getPermutationIdx() const {
|
||||
return m_numPermutationsProcessed; }
|
||||
return m_numPermutationsProcessed;
|
||||
}
|
||||
|
||||
virtual operator bool() const { return true; }
|
||||
|
||||
@@ -114,7 +117,7 @@ class RDKIT_CHEMREACTIONS_EXPORT RandomSampleStrategy : public EnumerationStrate
|
||||
}
|
||||
|
||||
private:
|
||||
#ifdef RDK_USE_BOOST_SERIALIZATION
|
||||
#ifdef RDK_USE_BOOST_SERIALIZATION
|
||||
friend class boost::serialization::access;
|
||||
|
||||
template <class Archive>
|
||||
@@ -152,11 +155,11 @@ class RDKIT_CHEMREACTIONS_EXPORT RandomSampleStrategy : public EnumerationStrate
|
||||
void serialize(Archive &ar, const unsigned int file_version) {
|
||||
boost::serialization::split_member(ar, *this, file_version);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
};
|
||||
}
|
||||
} // namespace RDKit
|
||||
|
||||
#ifdef RDK_USE_BOOST_SERIALIZATION
|
||||
#ifdef RDK_USE_BOOST_SERIALIZATION
|
||||
BOOST_CLASS_VERSION(RDKit::RandomSampleStrategy, 1)
|
||||
#endif
|
||||
|
||||
|
||||
@@ -65,13 +65,14 @@ namespace RDKit {
|
||||
See EnumerationStrategyBase for more details and usage.
|
||||
*/
|
||||
|
||||
class RDKIT_CHEMREACTIONS_EXPORT RandomSampleAllBBsStrategy : public EnumerationStrategyBase {
|
||||
class RDKIT_CHEMREACTIONS_EXPORT RandomSampleAllBBsStrategy
|
||||
: public EnumerationStrategyBase {
|
||||
boost::uint64_t m_numPermutationsProcessed;
|
||||
size_t m_offset;
|
||||
size_t m_maxoffset;
|
||||
|
||||
boost::minstd_rand m_rng;
|
||||
std::vector<boost::random::uniform_int_distribution<> > m_distributions;
|
||||
std::vector<boost::random::uniform_int_distribution<>> m_distributions;
|
||||
|
||||
public:
|
||||
RandomSampleAllBBsStrategy()
|
||||
@@ -88,7 +89,8 @@ class RDKIT_CHEMREACTIONS_EXPORT RandomSampleAllBBsStrategy : public Enumeration
|
||||
}
|
||||
using EnumerationStrategyBase::initialize;
|
||||
|
||||
void initializeStrategy(const ChemicalReaction &, const EnumerationTypes::BBS &) {
|
||||
void initializeStrategy(const ChemicalReaction &,
|
||||
const EnumerationTypes::BBS &) {
|
||||
m_distributions.clear();
|
||||
m_permutation.resize(m_permutationSizes.size());
|
||||
m_permutationSizes = m_permutationSizes;
|
||||
@@ -124,7 +126,8 @@ class RDKIT_CHEMREACTIONS_EXPORT RandomSampleAllBBsStrategy : public Enumeration
|
||||
}
|
||||
|
||||
virtual boost::uint64_t getPermutationIdx() const {
|
||||
return m_numPermutationsProcessed; }
|
||||
return m_numPermutationsProcessed;
|
||||
}
|
||||
|
||||
virtual operator bool() const { return true; }
|
||||
|
||||
@@ -133,7 +136,7 @@ class RDKIT_CHEMREACTIONS_EXPORT RandomSampleAllBBsStrategy : public Enumeration
|
||||
}
|
||||
|
||||
private:
|
||||
#ifdef RDK_USE_BOOST_SERIALIZATION
|
||||
#ifdef RDK_USE_BOOST_SERIALIZATION
|
||||
friend class boost::serialization::access;
|
||||
|
||||
template <class Archive>
|
||||
@@ -178,9 +181,9 @@ class RDKIT_CHEMREACTIONS_EXPORT RandomSampleAllBBsStrategy : public Enumeration
|
||||
}
|
||||
#endif
|
||||
};
|
||||
}
|
||||
} // namespace RDKit
|
||||
|
||||
#ifdef RDK_USE_BOOST_SERIALIZATION
|
||||
#ifdef RDK_USE_BOOST_SERIALIZATION
|
||||
BOOST_CLASS_VERSION(RDKit::RandomSampleAllBBsStrategy, 1)
|
||||
#endif
|
||||
|
||||
|
||||
@@ -39,27 +39,26 @@
|
||||
|
||||
namespace RDKit {
|
||||
|
||||
RDKIT_CHEMREACTIONS_EXPORT bool preprocessReaction(ChemicalReaction &rxn,
|
||||
const std::string &propName=common_properties::molFileValue);
|
||||
RDKIT_CHEMREACTIONS_EXPORT bool preprocessReaction(
|
||||
ChemicalReaction &rxn,
|
||||
const std::string &propName = common_properties::molFileValue);
|
||||
|
||||
RDKIT_CHEMREACTIONS_EXPORT bool preprocessReaction(ChemicalReaction &rxn,
|
||||
unsigned int &numWarnings,
|
||||
unsigned int &numErrors,
|
||||
std::vector<
|
||||
std::vector<std::pair<unsigned int,std::string> > >&reactantLabels,
|
||||
const std::string &propName=common_properties::molFileValue);
|
||||
RDKIT_CHEMREACTIONS_EXPORT bool preprocessReaction(
|
||||
ChemicalReaction &rxn, unsigned int &numWarnings, unsigned int &numErrors,
|
||||
std::vector<std::vector<std::pair<unsigned int, std::string>>>
|
||||
&reactantLabels,
|
||||
const std::string &propName = common_properties::molFileValue);
|
||||
|
||||
RDKIT_CHEMREACTIONS_EXPORT bool preprocessReaction(ChemicalReaction &rxn,
|
||||
const std::map<std::string, ROMOL_SPTR> &queries,
|
||||
const std::string &propName=common_properties::molFileValue);
|
||||
|
||||
RDKIT_CHEMREACTIONS_EXPORT bool preprocessReaction(ChemicalReaction &rxn,
|
||||
unsigned int &numWarnings,
|
||||
unsigned int &numErrors,
|
||||
std::vector<
|
||||
std::vector<std::pair<unsigned int,std::string> > >&reactantLabels,
|
||||
const std::map<std::string, ROMOL_SPTR> &queries,
|
||||
const std::string &propName=common_properties::molFileValue);
|
||||
}
|
||||
RDKIT_CHEMREACTIONS_EXPORT bool preprocessReaction(
|
||||
ChemicalReaction &rxn, const std::map<std::string, ROMOL_SPTR> &queries,
|
||||
const std::string &propName = common_properties::molFileValue);
|
||||
|
||||
RDKIT_CHEMREACTIONS_EXPORT bool preprocessReaction(
|
||||
ChemicalReaction &rxn, unsigned int &numWarnings, unsigned int &numErrors,
|
||||
std::vector<std::vector<std::pair<unsigned int, std::string>>>
|
||||
&reactantLabels,
|
||||
const std::map<std::string, ROMOL_SPTR> &queries,
|
||||
const std::string &propName = common_properties::molFileValue);
|
||||
} // namespace RDKit
|
||||
|
||||
#endif
|
||||
|
||||
@@ -43,7 +43,8 @@ namespace RDKit {
|
||||
class ReactionPickler;
|
||||
|
||||
//! used to indicate an error in the chemical reaction engine
|
||||
class RDKIT_CHEMREACTIONS_EXPORT ChemicalReactionException : public std::exception {
|
||||
class RDKIT_CHEMREACTIONS_EXPORT ChemicalReactionException
|
||||
: public std::exception {
|
||||
public:
|
||||
//! construct with an error message
|
||||
explicit ChemicalReactionException(const char *msg) : _msg(msg){};
|
||||
@@ -218,8 +219,8 @@ class RDKIT_CHEMREACTIONS_EXPORT ChemicalReaction : public RDProps {
|
||||
map multiple times onto its reactant. This leads to multiple possible result
|
||||
sets.
|
||||
*/
|
||||
std::vector<MOL_SPTR_VECT> runReactants(const MOL_SPTR_VECT reactants,
|
||||
unsigned int numProducts=1000) const;
|
||||
std::vector<MOL_SPTR_VECT> runReactants(
|
||||
const MOL_SPTR_VECT reactants, unsigned int numProducts = 1000) const;
|
||||
|
||||
//! Runs a single reactant against a single reactant template
|
||||
/*!
|
||||
@@ -353,31 +354,33 @@ class RDKIT_CHEMREACTIONS_EXPORT ChemicalReaction : public RDProps {
|
||||
//! the \c which argument is used to return which of the reactants
|
||||
//! the molecule matches. If there's no match, it is equal to the number
|
||||
//! of reactants on return
|
||||
RDKIT_CHEMREACTIONS_EXPORT bool isMoleculeReactantOfReaction(const ChemicalReaction &rxn, const ROMol &mol,
|
||||
unsigned int &which);
|
||||
RDKIT_CHEMREACTIONS_EXPORT bool isMoleculeReactantOfReaction(
|
||||
const ChemicalReaction &rxn, const ROMol &mol, unsigned int &which);
|
||||
//! \overload
|
||||
RDKIT_CHEMREACTIONS_EXPORT bool isMoleculeReactantOfReaction(const ChemicalReaction &rxn,
|
||||
const ROMol &mol);
|
||||
RDKIT_CHEMREACTIONS_EXPORT bool isMoleculeReactantOfReaction(
|
||||
const ChemicalReaction &rxn, const ROMol &mol);
|
||||
|
||||
//! tests whether or not the molecule has a substructure match
|
||||
//! to any of the reaction's products
|
||||
//! the \c which argument is used to return which of the products
|
||||
//! the molecule matches. If there's no match, it is equal to the number
|
||||
//! of products on return
|
||||
RDKIT_CHEMREACTIONS_EXPORT bool isMoleculeProductOfReaction(const ChemicalReaction &rxn, const ROMol &mol,
|
||||
unsigned int &which);
|
||||
RDKIT_CHEMREACTIONS_EXPORT bool isMoleculeProductOfReaction(
|
||||
const ChemicalReaction &rxn, const ROMol &mol, unsigned int &which);
|
||||
//! \overload
|
||||
RDKIT_CHEMREACTIONS_EXPORT bool isMoleculeProductOfReaction(const ChemicalReaction &rxn, const ROMol &mol);
|
||||
RDKIT_CHEMREACTIONS_EXPORT bool isMoleculeProductOfReaction(
|
||||
const ChemicalReaction &rxn, const ROMol &mol);
|
||||
|
||||
//! tests whether or not the molecule has a substructure match
|
||||
//! to any of the reaction's agents
|
||||
//! the \c which argument is used to return which of the agents
|
||||
//! the molecule matches. If there's no match, it is equal to the number
|
||||
//! of agents on return
|
||||
RDKIT_CHEMREACTIONS_EXPORT bool isMoleculeAgentOfReaction(const ChemicalReaction &rxn, const ROMol &mol,
|
||||
unsigned int &which);
|
||||
RDKIT_CHEMREACTIONS_EXPORT bool isMoleculeAgentOfReaction(
|
||||
const ChemicalReaction &rxn, const ROMol &mol, unsigned int &which);
|
||||
//! \overload
|
||||
RDKIT_CHEMREACTIONS_EXPORT bool isMoleculeAgentOfReaction(const ChemicalReaction &rxn, const ROMol &mol);
|
||||
RDKIT_CHEMREACTIONS_EXPORT bool isMoleculeAgentOfReaction(
|
||||
const ChemicalReaction &rxn, const ROMol &mol);
|
||||
|
||||
//! returns indices of the atoms in each reactant that are changed
|
||||
//! in the reaction
|
||||
@@ -406,8 +409,8 @@ RDKIT_CHEMREACTIONS_EXPORT bool isMoleculeAgentOfReaction(const ChemicalReaction
|
||||
When coming from RXN: the atomic number of the atom in the rxn file sets
|
||||
the value.
|
||||
*/
|
||||
RDKIT_CHEMREACTIONS_EXPORT VECT_INT_VECT getReactingAtoms(const ChemicalReaction &rxn,
|
||||
bool mappedAtomsOnly = false);
|
||||
RDKIT_CHEMREACTIONS_EXPORT VECT_INT_VECT
|
||||
getReactingAtoms(const ChemicalReaction &rxn, bool mappedAtomsOnly = false);
|
||||
|
||||
//! add the recursive queries to the reactants of a reaction
|
||||
/*!
|
||||
@@ -436,7 +439,7 @@ RDKIT_CHEMREACTIONS_EXPORT void addRecursiveQueriesToReaction(
|
||||
std::vector<std::vector<std::pair<unsigned int, std::string>>>
|
||||
*reactantLabels = NULL);
|
||||
|
||||
} // end of RDKit namespace
|
||||
} // namespace RDKit
|
||||
|
||||
namespace RDDepict {
|
||||
//! \brief Generate 2D coordinates (a depiction) for a reaction
|
||||
@@ -467,13 +470,12 @@ namespace RDDepict {
|
||||
for the other parameters see the documentation for compute2DCoords()
|
||||
|
||||
*/
|
||||
RDKIT_CHEMREACTIONS_EXPORT void compute2DCoordsForReaction(RDKit::ChemicalReaction &rxn,
|
||||
double spacing = 2.0, bool updateProps = true,
|
||||
bool canonOrient = false,
|
||||
unsigned int nFlipsPerSample = 0,
|
||||
unsigned int nSamples = 0, int sampleSeed = 0,
|
||||
bool permuteDeg4Nodes = false);
|
||||
RDKIT_CHEMREACTIONS_EXPORT void compute2DCoordsForReaction(
|
||||
RDKit::ChemicalReaction &rxn, double spacing = 2.0, bool updateProps = true,
|
||||
bool canonOrient = false, unsigned int nFlipsPerSample = 0,
|
||||
unsigned int nSamples = 0, int sampleSeed = 0,
|
||||
bool permuteDeg4Nodes = false);
|
||||
|
||||
} // end of RDDepict namespace
|
||||
} // namespace RDDepict
|
||||
|
||||
#endif
|
||||
|
||||
@@ -99,8 +99,10 @@ struct RDKIT_CHEMREACTIONS_EXPORT ReactionFingerprintParams {
|
||||
FingerprintType fpType;
|
||||
};
|
||||
|
||||
RDKIT_CHEMREACTIONS_EXPORT extern const ReactionFingerprintParams DefaultStructuralFPParams;
|
||||
RDKIT_CHEMREACTIONS_EXPORT extern const ReactionFingerprintParams DefaultDifferenceFPParams;
|
||||
RDKIT_CHEMREACTIONS_EXPORT extern const ReactionFingerprintParams
|
||||
DefaultStructuralFPParams;
|
||||
RDKIT_CHEMREACTIONS_EXPORT extern const ReactionFingerprintParams
|
||||
DefaultDifferenceFPParams;
|
||||
|
||||
//! Generates a structural fingerprint for a reaction
|
||||
//! to use in screening
|
||||
@@ -142,9 +144,10 @@ RDKIT_CHEMREACTIONS_EXPORT ExplicitBitVect *StructuralFingerprintChemReaction(
|
||||
<b>Notes:</b>
|
||||
- the caller is responsible for <tt>delete</tt>ing the result
|
||||
*/
|
||||
RDKIT_CHEMREACTIONS_EXPORT SparseIntVect<std::uint32_t> *DifferenceFingerprintChemReaction(
|
||||
const ChemicalReaction &rxn,
|
||||
const ReactionFingerprintParams ¶ms = DefaultDifferenceFPParams);
|
||||
}
|
||||
RDKIT_CHEMREACTIONS_EXPORT SparseIntVect<std::uint32_t>
|
||||
*DifferenceFingerprintChemReaction(
|
||||
const ChemicalReaction &rxn,
|
||||
const ReactionFingerprintParams ¶ms = DefaultDifferenceFPParams);
|
||||
} // namespace RDKit
|
||||
|
||||
#endif
|
||||
|
||||
@@ -41,7 +41,8 @@ namespace RDKit {
|
||||
class ChemicalReaction;
|
||||
|
||||
//! used to indicate an error in parsing reaction data
|
||||
class RDKIT_CHEMREACTIONS_EXPORT ChemicalReactionParserException : public std::exception {
|
||||
class RDKIT_CHEMREACTIONS_EXPORT ChemicalReactionParserException
|
||||
: public std::exception {
|
||||
public:
|
||||
//! construct with an error message
|
||||
explicit ChemicalReactionParserException(const char *msg) : _msg(msg){};
|
||||
@@ -57,12 +58,14 @@ class RDKIT_CHEMREACTIONS_EXPORT ChemicalReactionParserException : public std::e
|
||||
};
|
||||
|
||||
//! Parse a text block in MDL rxn format into a ChemicalReaction
|
||||
RDKIT_CHEMREACTIONS_EXPORT ChemicalReaction *RxnBlockToChemicalReaction(const std::string &rxnBlock);
|
||||
RDKIT_CHEMREACTIONS_EXPORT ChemicalReaction *RxnBlockToChemicalReaction(
|
||||
const std::string &rxnBlock);
|
||||
//! Parse a file in MDL rxn format into a ChemicalReaction
|
||||
RDKIT_CHEMREACTIONS_EXPORT ChemicalReaction *RxnFileToChemicalReaction(const std::string &fileName);
|
||||
RDKIT_CHEMREACTIONS_EXPORT ChemicalReaction *RxnFileToChemicalReaction(
|
||||
const std::string &fileName);
|
||||
//! Parse a text stream in MDL rxn format into a ChemicalReaction
|
||||
RDKIT_CHEMREACTIONS_EXPORT ChemicalReaction *RxnDataStreamToChemicalReaction(std::istream &rxnStream,
|
||||
unsigned int &line);
|
||||
RDKIT_CHEMREACTIONS_EXPORT ChemicalReaction *RxnDataStreamToChemicalReaction(
|
||||
std::istream &rxnStream, unsigned int &line);
|
||||
|
||||
//! Parse a string containing "Reaction SMARTS" into a ChemicalReaction
|
||||
/*!
|
||||
@@ -91,14 +94,16 @@ RDKIT_CHEMREACTIONS_EXPORT ChemicalReaction *RxnSmartsToChemicalReaction(
|
||||
|
||||
\param mol ROMol with RXN roles set
|
||||
*/
|
||||
RDKIT_CHEMREACTIONS_EXPORT ChemicalReaction *RxnMolToChemicalReaction(const ROMol &mol);
|
||||
RDKIT_CHEMREACTIONS_EXPORT ChemicalReaction *RxnMolToChemicalReaction(
|
||||
const ROMol &mol);
|
||||
|
||||
//! returns the reaction SMARTS for a reaction
|
||||
RDKIT_CHEMREACTIONS_EXPORT std::string ChemicalReactionToRxnSmarts(const ChemicalReaction &rxn);
|
||||
RDKIT_CHEMREACTIONS_EXPORT std::string ChemicalReactionToRxnSmarts(
|
||||
const ChemicalReaction &rxn);
|
||||
|
||||
//! returns the reaction SMILES for a reaction
|
||||
RDKIT_CHEMREACTIONS_EXPORT std::string ChemicalReactionToRxnSmiles(const ChemicalReaction &rxn,
|
||||
bool canonical = true);
|
||||
RDKIT_CHEMREACTIONS_EXPORT std::string ChemicalReactionToRxnSmiles(
|
||||
const ChemicalReaction &rxn, bool canonical = true);
|
||||
|
||||
//! returns an RXN block for a reaction
|
||||
/*!
|
||||
@@ -107,12 +112,13 @@ RDKIT_CHEMREACTIONS_EXPORT std::string ChemicalReactionToRxnSmiles(const Chemica
|
||||
otherwise they were included in the reactants block
|
||||
(default)
|
||||
*/
|
||||
RDKIT_CHEMREACTIONS_EXPORT std::string ChemicalReactionToRxnBlock(const ChemicalReaction &rxn,
|
||||
bool separateAgents = false);
|
||||
RDKIT_CHEMREACTIONS_EXPORT std::string ChemicalReactionToRxnBlock(
|
||||
const ChemicalReaction &rxn, bool separateAgents = false);
|
||||
|
||||
//! returns a ROMol with RXN roles used to describe the reaction
|
||||
RDKIT_CHEMREACTIONS_EXPORT ROMol *ChemicalReactionToRxnMol(const ChemicalReaction &rxn);
|
||||
RDKIT_CHEMREACTIONS_EXPORT ROMol *ChemicalReactionToRxnMol(
|
||||
const ChemicalReaction &rxn);
|
||||
|
||||
}; // end of RDKit namespace
|
||||
}; // namespace RDKit
|
||||
|
||||
#endif
|
||||
|
||||
@@ -25,7 +25,8 @@ namespace RDKit {
|
||||
class ChemicalReaction;
|
||||
|
||||
//! used to indicate exceptions whilst pickling (serializing) reactions
|
||||
class RDKIT_CHEMREACTIONS_EXPORT ReactionPicklerException : public std::exception {
|
||||
class RDKIT_CHEMREACTIONS_EXPORT ReactionPicklerException
|
||||
: public std::exception {
|
||||
public:
|
||||
ReactionPicklerException(const char *msg) : _msg(msg){};
|
||||
ReactionPicklerException(const std::string msg) : _msg(msg){};
|
||||
@@ -39,9 +40,9 @@ class RDKIT_CHEMREACTIONS_EXPORT ReactionPicklerException : public std::exceptio
|
||||
//! handles pickling (serializing) reactions
|
||||
class RDKIT_CHEMREACTIONS_EXPORT ReactionPickler {
|
||||
public:
|
||||
static const std::int32_t versionMajor; //!< mark the pickle version
|
||||
static const std::int32_t versionMinor; //!< mark the pickle version
|
||||
static const std::int32_t versionPatch; //!< mark the pickle version
|
||||
static const std::int32_t versionMajor; //!< mark the pickle version
|
||||
static const std::int32_t versionMinor; //!< mark the pickle version
|
||||
static const std::int32_t versionPatch; //!< mark the pickle version
|
||||
static const std::int32_t endianId; //! mark the endian-ness of the pickle
|
||||
|
||||
//! the pickle format is tagged using these tags:
|
||||
@@ -113,6 +114,6 @@ class RDKIT_CHEMREACTIONS_EXPORT ReactionPickler {
|
||||
//! unpickle standard properties
|
||||
static void _unpickleProperties(std::istream &ss, RDProps &props);
|
||||
};
|
||||
};
|
||||
}; // namespace RDKit
|
||||
|
||||
#endif
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace RDKit {
|
||||
*/
|
||||
RDKIT_CHEMREACTIONS_EXPORT std::vector<MOL_SPTR_VECT> run_Reactants(
|
||||
const ChemicalReaction& rxn, const MOL_SPTR_VECT& reactants,
|
||||
unsigned int maxProducts=1000);
|
||||
unsigned int maxProducts = 1000);
|
||||
|
||||
//! Runs a single reactant against a single reactant template
|
||||
/*!
|
||||
@@ -74,11 +74,11 @@ RDKIT_CHEMREACTIONS_EXPORT std::vector<MOL_SPTR_VECT> run_Reactants(
|
||||
|
||||
*/
|
||||
|
||||
RDKIT_CHEMREACTIONS_EXPORT std::vector<MOL_SPTR_VECT> run_Reactant(const ChemicalReaction& rxn,
|
||||
const ROMOL_SPTR& reactant,
|
||||
unsigned int reactantIdx);
|
||||
RDKIT_CHEMREACTIONS_EXPORT std::vector<MOL_SPTR_VECT> run_Reactant(
|
||||
const ChemicalReaction& rxn, const ROMOL_SPTR& reactant,
|
||||
unsigned int reactantIdx);
|
||||
|
||||
//! Reduce the product generated by run_Reactants or run_Reactant to
|
||||
//! Reduce the product generated by run_Reactants or run_Reactant to
|
||||
// the sidechains that come from the reagents
|
||||
//
|
||||
// n.b. molecules that might be a product of the given reaction
|
||||
@@ -88,22 +88,24 @@ RDKIT_CHEMREACTIONS_EXPORT std::vector<MOL_SPTR_VECT> run_Reactant(const Chemica
|
||||
\param addDummyAtoms If true, add dummy atoms to the sidechains for the
|
||||
non-reagent parts of the sidechain. Dummy atoms are annotated with
|
||||
the atom maps from the reaction.
|
||||
If False, then any sidechain atom where a bond was cleaved is annotated with:
|
||||
_rgroupAtomMaps property which indicates the scaffold atommaps that where bonded
|
||||
_rgroupBonds property which indicates the bondtype for each atommap bonded
|
||||
If False, then any sidechain atom where a bond was cleaved is annotated
|
||||
with: _rgroupAtomMaps property which indicates the scaffold atommaps that
|
||||
where bonded _rgroupBonds property which indicates the bondtype for each
|
||||
atommap bonded
|
||||
*/
|
||||
|
||||
RDKIT_CHEMREACTIONS_EXPORT ROMol* reduceProductToSideChains(const ROMOL_SPTR& product,
|
||||
bool addDummyAtoms = true);
|
||||
RDKIT_CHEMREACTIONS_EXPORT ROMol* reduceProductToSideChains(
|
||||
const ROMOL_SPTR& product, bool addDummyAtoms = true);
|
||||
|
||||
namespace ReactionRunnerUtils {
|
||||
RDKIT_CHEMREACTIONS_EXPORT MOL_SPTR_VECT generateOneProductSet(
|
||||
const ChemicalReaction &rxn, const MOL_SPTR_VECT &reactants,
|
||||
const std::vector<MatchVectType> &reactantsMatch);
|
||||
const ChemicalReaction& rxn, const MOL_SPTR_VECT& reactants,
|
||||
const std::vector<MatchVectType>& reactantsMatch);
|
||||
|
||||
RDKIT_CHEMREACTIONS_EXPORT RWMOL_SPTR convertTemplateToMol(const ROMOL_SPTR prodTemplateSptr);
|
||||
}
|
||||
RDKIT_CHEMREACTIONS_EXPORT RWMOL_SPTR
|
||||
convertTemplateToMol(const ROMOL_SPTR prodTemplateSptr);
|
||||
} // namespace ReactionRunnerUtils
|
||||
|
||||
} // end of RDKit namespace
|
||||
} // namespace RDKit
|
||||
|
||||
#endif
|
||||
|
||||
@@ -40,32 +40,35 @@ namespace RDKit {
|
||||
|
||||
enum ReactionMoleculeType { Reactant, Product, Agent };
|
||||
|
||||
RDKIT_CHEMREACTIONS_EXPORT MOL_SPTR_VECT::const_iterator getStartIterator(const ChemicalReaction &rxn,
|
||||
ReactionMoleculeType t);
|
||||
RDKIT_CHEMREACTIONS_EXPORT MOL_SPTR_VECT::const_iterator getEndIterator(const ChemicalReaction &rxn,
|
||||
ReactionMoleculeType t);
|
||||
RDKIT_CHEMREACTIONS_EXPORT MOL_SPTR_VECT::const_iterator getStartIterator(
|
||||
const ChemicalReaction &rxn, ReactionMoleculeType t);
|
||||
RDKIT_CHEMREACTIONS_EXPORT MOL_SPTR_VECT::const_iterator getEndIterator(
|
||||
const ChemicalReaction &rxn, ReactionMoleculeType t);
|
||||
|
||||
RDKIT_CHEMREACTIONS_EXPORT bool hasReactantTemplateSubstructMatch(const ChemicalReaction &rxn,
|
||||
const ChemicalReaction &query_rxn);
|
||||
RDKIT_CHEMREACTIONS_EXPORT bool hasReactantTemplateSubstructMatch(
|
||||
const ChemicalReaction &rxn, const ChemicalReaction &query_rxn);
|
||||
|
||||
RDKIT_CHEMREACTIONS_EXPORT bool hasProductTemplateSubstructMatch(const ChemicalReaction &rxn,
|
||||
const ChemicalReaction &query_rxn);
|
||||
RDKIT_CHEMREACTIONS_EXPORT bool hasProductTemplateSubstructMatch(
|
||||
const ChemicalReaction &rxn, const ChemicalReaction &query_rxn);
|
||||
|
||||
RDKIT_CHEMREACTIONS_EXPORT bool hasAgentTemplateSubstructMatch(const ChemicalReaction &rxn,
|
||||
const ChemicalReaction &query_rxn);
|
||||
RDKIT_CHEMREACTIONS_EXPORT bool hasAgentTemplateSubstructMatch(
|
||||
const ChemicalReaction &rxn, const ChemicalReaction &query_rxn);
|
||||
|
||||
RDKIT_CHEMREACTIONS_EXPORT bool hasReactionSubstructMatch(const ChemicalReaction &rxn,
|
||||
const ChemicalReaction &query_rxn,
|
||||
bool includeAgents = false);
|
||||
RDKIT_CHEMREACTIONS_EXPORT bool hasReactionSubstructMatch(
|
||||
const ChemicalReaction &rxn, const ChemicalReaction &query_rxn,
|
||||
bool includeAgents = false);
|
||||
|
||||
RDKIT_CHEMREACTIONS_EXPORT bool hasReactionAtomMapping(const ChemicalReaction &rxn);
|
||||
RDKIT_CHEMREACTIONS_EXPORT bool hasReactionAtomMapping(
|
||||
const ChemicalReaction &rxn);
|
||||
|
||||
RDKIT_CHEMREACTIONS_EXPORT bool isReactionTemplateMoleculeAgent(const ROMol &mol, double agentThreshold);
|
||||
RDKIT_CHEMREACTIONS_EXPORT bool isReactionTemplateMoleculeAgent(
|
||||
const ROMol &mol, double agentThreshold);
|
||||
|
||||
RDKIT_CHEMREACTIONS_EXPORT void updateProductsStereochem(ChemicalReaction *rxn);
|
||||
|
||||
RDKIT_CHEMREACTIONS_EXPORT void removeMappingNumbersFromReactions(const ChemicalReaction &rxn);
|
||||
RDKIT_CHEMREACTIONS_EXPORT void removeMappingNumbersFromReactions(
|
||||
const ChemicalReaction &rxn);
|
||||
|
||||
} // end of RDKit namespace
|
||||
} // namespace RDKit
|
||||
|
||||
#endif
|
||||
|
||||
@@ -52,20 +52,20 @@ class RDKIT_CHEMREACTIONS_EXPORT RxnSanitizeException : public std::exception {
|
||||
std::string _msg;
|
||||
};
|
||||
|
||||
|
||||
namespace RxnOps {
|
||||
//! Any dummy atom with a map but no RGroup label, should be an RGroup
|
||||
//! in RDKit's view of a reaction.
|
||||
//! See if these atoms can be salvaged into RGroups.
|
||||
RDKIT_CHEMREACTIONS_EXPORT void fixRGroups(ChemicalReaction &rxn);
|
||||
|
||||
//! If atom maps are not defined on rgroups, attempt to deduce them from the RGroup
|
||||
//! If atom maps are not defined on rgroups, attempt to deduce them from the
|
||||
//! RGroup
|
||||
//! labels, or add new ones if possible.
|
||||
RDKIT_CHEMREACTIONS_EXPORT void fixAtomMaps(ChemicalReaction &rxn);
|
||||
|
||||
|
||||
//! Adjusts the reactant templates to properly match reagents
|
||||
RDKIT_CHEMREACTIONS_EXPORT void adjustTemplates(ChemicalReaction &rxn, const MolOps::AdjustQueryParameters ¶ms);
|
||||
RDKIT_CHEMREACTIONS_EXPORT void adjustTemplates(
|
||||
ChemicalReaction &rxn, const MolOps::AdjustQueryParameters ¶ms);
|
||||
|
||||
//! merge query Hs if appropriate
|
||||
RDKIT_CHEMREACTIONS_EXPORT void fixHs(ChemicalReaction &rxn);
|
||||
@@ -86,8 +86,9 @@ inline const MolOps::AdjustQueryParameters DefaultRxnAdjustParams() {
|
||||
// -- deprecated - renamed MatchOnlyAtRgroupsAdjustParams
|
||||
// -- this doesn't match sciquest style searching
|
||||
inline const MolOps::AdjustQueryParameters ChemDrawRxnAdjustParams() {
|
||||
BOOST_LOG(rdWarningLog) <<
|
||||
" deprecated -- please use MatchOnlyAtRgroupsAdjustParams instead" << std::endl;
|
||||
BOOST_LOG(rdWarningLog)
|
||||
<< " deprecated -- please use MatchOnlyAtRgroupsAdjustParams instead"
|
||||
<< std::endl;
|
||||
MolOps::AdjustQueryParameters params;
|
||||
params.adjustDegree = true;
|
||||
params.adjustDegreeFlags = MolOps::ADJUST_IGNOREDUMMIES;
|
||||
@@ -144,7 +145,7 @@ typedef enum {
|
||||
|
||||
<b>Notes:</b>
|
||||
- This attempts to fix known issues with certain reaction drawers.
|
||||
HOWEVER, if any flag is returned in operationsPerformed,
|
||||
HOWEVER, if any flag is returned in operationsPerformed,
|
||||
the reaction may still be suspect to its validity.
|
||||
- Aromaticity can be tricky when starting with Kekule structures that
|
||||
have query features, aromaticity works well for non-query rings, however
|
||||
@@ -152,15 +153,16 @@ typedef enum {
|
||||
aromatic) may not have enough information.
|
||||
*/
|
||||
|
||||
RDKIT_CHEMREACTIONS_EXPORT void sanitizeRxn(ChemicalReaction &rxn,
|
||||
unsigned int &operationsThatFailed,
|
||||
unsigned int sanitizeOps = SANITIZE_ALL,
|
||||
const MolOps::AdjustQueryParameters ¶ms = DefaultRxnAdjustParams());
|
||||
RDKIT_CHEMREACTIONS_EXPORT void sanitizeRxn(
|
||||
ChemicalReaction &rxn, unsigned int &operationsThatFailed,
|
||||
unsigned int sanitizeOps = SANITIZE_ALL,
|
||||
const MolOps::AdjustQueryParameters ¶ms = DefaultRxnAdjustParams());
|
||||
//! \overload
|
||||
RDKIT_CHEMREACTIONS_EXPORT void sanitizeRxn(ChemicalReaction &rxn,
|
||||
const MolOps::AdjustQueryParameters ¶ms = DefaultRxnAdjustParams());
|
||||
RDKIT_CHEMREACTIONS_EXPORT void sanitizeRxn(
|
||||
ChemicalReaction &rxn,
|
||||
const MolOps::AdjustQueryParameters ¶ms = DefaultRxnAdjustParams());
|
||||
|
||||
}
|
||||
}
|
||||
} // namespace RxnOps
|
||||
} // namespace RDKit
|
||||
|
||||
#endif
|
||||
|
||||
@@ -35,8 +35,10 @@ typedef boost::shared_ptr<ROMol> ROMOL_SPTR;
|
||||
\return a copy of \c mol with the matching atoms and bonds (if any)
|
||||
removed.
|
||||
*/
|
||||
RDKIT_CHEMTRANSFORMS_EXPORT ROMol *deleteSubstructs(const ROMol &mol, const ROMol &query,
|
||||
bool onlyFrags = false, bool useChirality = false);
|
||||
RDKIT_CHEMTRANSFORMS_EXPORT ROMol *deleteSubstructs(const ROMol &mol,
|
||||
const ROMol &query,
|
||||
bool onlyFrags = false,
|
||||
bool useChirality = false);
|
||||
|
||||
//! \brief Returns a list of copies of an ROMol with the atoms and bonds that
|
||||
//! match a pattern replaced with the atoms contained in another molecule.
|
||||
@@ -95,9 +97,9 @@ RDKIT_CHEMTRANSFORMS_EXPORT std::vector<ROMOL_SPTR> replaceSubstructs(
|
||||
removed and dummies at the connection points.
|
||||
*/
|
||||
|
||||
|
||||
RDKIT_CHEMTRANSFORMS_EXPORT ROMol *replaceSidechains(const ROMol &mol, const ROMol &coreQuery,
|
||||
bool useChirality = false);
|
||||
RDKIT_CHEMTRANSFORMS_EXPORT ROMol *replaceSidechains(const ROMol &mol,
|
||||
const ROMol &coreQuery,
|
||||
bool useChirality = false);
|
||||
|
||||
//! \brief Returns a copy of an ROMol with the atoms and bonds that
|
||||
//! are referenced by the MatchVector removed.
|
||||
@@ -115,16 +117,12 @@ RDKIT_CHEMTRANSFORMS_EXPORT ROMol *replaceSidechains(const ROMol &mol, const ROM
|
||||
|
||||
\param mol - the ROMol of interest
|
||||
\param core - the core being matched against
|
||||
\param matchVect - a matchVect of the type returned by Substructure Matching
|
||||
\param replaceDummies - if set, atoms matching dummies in the core will also
|
||||
be replaced
|
||||
\param labelByIndex - if set, the dummy atoms at attachment points are
|
||||
labelled with the
|
||||
index+1 of the corresponding atom in the core
|
||||
\param requireDummyMatch - if set, only side chains that are connected to
|
||||
atoms in
|
||||
the core that have attached dummies will be
|
||||
considered.
|
||||
\param matchVect - a matchVect of the type returned by Substructure
|
||||
Matching \param replaceDummies - if set, atoms matching dummies in the core
|
||||
will also be replaced \param labelByIndex - if set, the dummy atoms at
|
||||
attachment points are labelled with the index+1 of the corresponding atom in
|
||||
the core \param requireDummyMatch - if set, only side chains that are
|
||||
connected to atoms in the core that have attached dummies will be considered.
|
||||
Molecules that have sidechains that are attached
|
||||
at other points will be rejected (NULL returned).
|
||||
\param useChirality - if set, match the coreQuery using chirality
|
||||
@@ -135,11 +133,12 @@ RDKIT_CHEMTRANSFORMS_EXPORT ROMol *replaceSidechains(const ROMol &mol, const ROM
|
||||
for deleting this molecule. If the core query is not matched, NULL
|
||||
is returned.
|
||||
*/
|
||||
RDKIT_CHEMTRANSFORMS_EXPORT ROMol *replaceCore(const ROMol &mol, const ROMol &core,
|
||||
const MatchVectType &matchVect,
|
||||
bool replaceDummies = true,
|
||||
bool labelByIndex = false,
|
||||
bool requireDummyMatch = false);
|
||||
RDKIT_CHEMTRANSFORMS_EXPORT ROMol *replaceCore(const ROMol &mol,
|
||||
const ROMol &core,
|
||||
const MatchVectType &matchVect,
|
||||
bool replaceDummies = true,
|
||||
bool labelByIndex = false,
|
||||
bool requireDummyMatch = false);
|
||||
|
||||
//! \brief Returns a copy of an ROMol with the atoms and bonds that
|
||||
//! do fall within a substructure match removed.
|
||||
@@ -172,9 +171,12 @@ RDKIT_CHEMTRANSFORMS_EXPORT ROMol *replaceCore(const ROMol &mol, const ROMol &co
|
||||
for deleting this molecule. If the core query is not matched, NULL
|
||||
is returned.
|
||||
*/
|
||||
RDKIT_CHEMTRANSFORMS_EXPORT ROMol *replaceCore(const ROMol &mol, const ROMol &coreQuery,
|
||||
bool replaceDummies = true, bool labelByIndex = false,
|
||||
bool requireDummyMatch = false, bool useChirality = false);
|
||||
RDKIT_CHEMTRANSFORMS_EXPORT ROMol *replaceCore(const ROMol &mol,
|
||||
const ROMol &coreQuery,
|
||||
bool replaceDummies = true,
|
||||
bool labelByIndex = false,
|
||||
bool requireDummyMatch = false,
|
||||
bool useChirality = false);
|
||||
|
||||
//! \brief Carries out a Murcko decomposition on the molecule provided
|
||||
//!
|
||||
@@ -200,8 +202,9 @@ RDKIT_CHEMTRANSFORMS_EXPORT ROMol *MurckoDecompose(const ROMol &mol);
|
||||
The new molecule has not been sanitized.
|
||||
The client is responsible for deleting this molecule.
|
||||
*/
|
||||
RDKIT_CHEMTRANSFORMS_EXPORT ROMol *combineMols(const ROMol &mol1, const ROMol &mol2,
|
||||
RDGeom::Point3D offset = RDGeom::Point3D(0, 0, 0));
|
||||
RDKIT_CHEMTRANSFORMS_EXPORT ROMol *combineMols(
|
||||
const ROMol &mol1, const ROMol &mol2,
|
||||
RDGeom::Point3D offset = RDGeom::Point3D(0, 0, 0));
|
||||
|
||||
//! \brief Adds named recursive queries to a molecule's atoms based on atom
|
||||
// labels
|
||||
@@ -227,7 +230,7 @@ RDKIT_CHEMTRANSFORMS_EXPORT ROMol *combineMols(const ROMol &mol1, const ROMol &m
|
||||
RDKIT_CHEMTRANSFORMS_EXPORT void addRecursiveQueries(
|
||||
ROMol &mol, const std::map<std::string, ROMOL_SPTR> &queries,
|
||||
const std::string &propName,
|
||||
std::vector<std::pair<unsigned int, std::string> > *reactantLabels = NULL);
|
||||
std::vector<std::pair<unsigned int, std::string>> *reactantLabels = NULL);
|
||||
|
||||
//! \brief parses a query definition file and sets up a set of definitions
|
||||
//! suitable for use by addRecursiveQueries()
|
||||
@@ -243,30 +246,24 @@ RDKIT_CHEMTRANSFORMS_EXPORT void addRecursiveQueries(
|
||||
\param smartsColumn - column with the SMARTS definitions of the queries
|
||||
|
||||
*/
|
||||
RDKIT_CHEMTRANSFORMS_EXPORT void parseQueryDefFile(const std::string &filename,
|
||||
std::map<std::string, ROMOL_SPTR> &queryDefs,
|
||||
bool standardize = true,
|
||||
const std::string &delimiter = "\t",
|
||||
const std::string &comment = "//",
|
||||
unsigned int nameColumn = 0,
|
||||
unsigned int smartsColumn = 1);
|
||||
RDKIT_CHEMTRANSFORMS_EXPORT void parseQueryDefFile(
|
||||
const std::string &filename, std::map<std::string, ROMOL_SPTR> &queryDefs,
|
||||
bool standardize = true, const std::string &delimiter = "\t",
|
||||
const std::string &comment = "//", unsigned int nameColumn = 0,
|
||||
unsigned int smartsColumn = 1);
|
||||
//! \overload
|
||||
RDKIT_CHEMTRANSFORMS_EXPORT void parseQueryDefFile(std::istream *inStream,
|
||||
std::map<std::string, ROMOL_SPTR> &queryDefs,
|
||||
bool standardize = true,
|
||||
const std::string &delimiter = "\t",
|
||||
const std::string &comment = "//",
|
||||
unsigned int nameColumn = 0,
|
||||
unsigned int smartsColumn = 1);
|
||||
RDKIT_CHEMTRANSFORMS_EXPORT void parseQueryDefFile(
|
||||
std::istream *inStream, std::map<std::string, ROMOL_SPTR> &queryDefs,
|
||||
bool standardize = true, const std::string &delimiter = "\t",
|
||||
const std::string &comment = "//", unsigned int nameColumn = 0,
|
||||
unsigned int smartsColumn = 1);
|
||||
//! \brief equivalent to parseQueryDefFile() but the query definitions are
|
||||
// explicitly passed in
|
||||
RDKIT_CHEMTRANSFORMS_EXPORT void parseQueryDefText(const std::string &queryDefText,
|
||||
std::map<std::string, ROMOL_SPTR> &queryDefs,
|
||||
bool standardize = true,
|
||||
const std::string &delimiter = "\t",
|
||||
const std::string &comment = "//",
|
||||
unsigned int nameColumn = 0,
|
||||
unsigned int smartsColumn = 1);
|
||||
}
|
||||
RDKIT_CHEMTRANSFORMS_EXPORT void parseQueryDefText(
|
||||
const std::string &queryDefText,
|
||||
std::map<std::string, ROMOL_SPTR> &queryDefs, bool standardize = true,
|
||||
const std::string &delimiter = "\t", const std::string &comment = "//",
|
||||
unsigned int nameColumn = 0, unsigned int smartsColumn = 1);
|
||||
} // namespace RDKit
|
||||
|
||||
#endif
|
||||
|
||||
@@ -50,7 +50,7 @@ struct RDKIT_CHEMTRANSFORMS_EXPORT FragmenterBondType {
|
||||
RDKIT_CHEMTRANSFORMS_EXPORT ROMol *fragmentOnBonds(
|
||||
const ROMol &mol, const std::vector<unsigned int> &bondIndices,
|
||||
bool addDummies = true,
|
||||
const std::vector<std::pair<unsigned int, unsigned int> > *dummyLabels = 0,
|
||||
const std::vector<std::pair<unsigned int, unsigned int>> *dummyLabels = 0,
|
||||
const std::vector<Bond::BondType> *bondTypes = 0,
|
||||
std::vector<unsigned int> *nCutsPerAtom = 0);
|
||||
//! \overload
|
||||
@@ -62,9 +62,9 @@ RDKIT_CHEMTRANSFORMS_EXPORT void fragmentOnSomeBonds(
|
||||
const ROMol &mol, const std::vector<unsigned int> &bondIndices,
|
||||
std::vector<ROMOL_SPTR> &resMols, unsigned int maxToCut = 1,
|
||||
bool addDummies = true,
|
||||
const std::vector<std::pair<unsigned int, unsigned int> > *dummyLabels = 0,
|
||||
const std::vector<std::pair<unsigned int, unsigned int>> *dummyLabels = 0,
|
||||
const std::vector<Bond::BondType> *bondTypes = 0,
|
||||
std::vector<std::vector<unsigned int> > *nCutsPerAtom = 0);
|
||||
std::vector<std::vector<unsigned int>> *nCutsPerAtom = 0);
|
||||
|
||||
//! \brief Fragments a molecule by breaking all BRICS bonds
|
||||
/*!
|
||||
@@ -82,8 +82,9 @@ RDKIT_CHEMTRANSFORMS_EXPORT void constructFragmenterAtomTypes(
|
||||
const std::string &str, std::map<unsigned int, std::string> &defs,
|
||||
const std::string &comment = "//", bool validate = true,
|
||||
std::map<unsigned int, ROMOL_SPTR> *environs = 0);
|
||||
RDKIT_CHEMTRANSFORMS_EXPORT void constructBRICSAtomTypes(std::map<unsigned int, std::string> &defs,
|
||||
std::map<unsigned int, ROMOL_SPTR> *environs = 0);
|
||||
RDKIT_CHEMTRANSFORMS_EXPORT void constructBRICSAtomTypes(
|
||||
std::map<unsigned int, std::string> &defs,
|
||||
std::map<unsigned int, ROMOL_SPTR> *environs = 0);
|
||||
RDKIT_CHEMTRANSFORMS_EXPORT void constructFragmenterBondTypes(
|
||||
std::istream *inStream,
|
||||
const std::map<unsigned int, std::string> &atomTypes,
|
||||
@@ -94,7 +95,8 @@ RDKIT_CHEMTRANSFORMS_EXPORT void constructFragmenterBondTypes(
|
||||
const std::map<unsigned int, std::string> &atomTypes,
|
||||
std::vector<FragmenterBondType> &defs, const std::string &comment = "//",
|
||||
bool validate = true, bool labelByConnector = true);
|
||||
RDKIT_CHEMTRANSFORMS_EXPORT void constructBRICSBondTypes(std::vector<FragmenterBondType> &defs);
|
||||
}
|
||||
}
|
||||
RDKIT_CHEMTRANSFORMS_EXPORT void constructBRICSBondTypes(
|
||||
std::vector<FragmenterBondType> &defs);
|
||||
} // namespace MolFragmenter
|
||||
} // namespace RDKit
|
||||
#endif
|
||||
|
||||
@@ -31,8 +31,9 @@ namespace Chirality {
|
||||
CIP ranking.
|
||||
|
||||
*/
|
||||
RDKIT_GRAPHMOL_EXPORT void assignAtomCIPRanks(const ROMol &mol, UINT_VECT &ranks);
|
||||
}
|
||||
}
|
||||
RDKIT_GRAPHMOL_EXPORT void assignAtomCIPRanks(const ROMol &mol,
|
||||
UINT_VECT &ranks);
|
||||
} // namespace Chirality
|
||||
} // namespace RDKit
|
||||
/// @endcond
|
||||
#endif
|
||||
|
||||
@@ -81,17 +81,17 @@ class RDKIT_GRAPHMOL_EXPORT Conformer {
|
||||
//! Get the position of the specified atom
|
||||
const RDGeom::Point3D &getAtomPos(unsigned int atomId) const;
|
||||
//! overload
|
||||
template<class U>
|
||||
template <class U>
|
||||
const RDGeom::Point3D &getAtomPos(U atomId) const {
|
||||
return getAtomPos(rdcast<unsigned int>(atomId));
|
||||
return getAtomPos(rdcast<unsigned int>(atomId));
|
||||
}
|
||||
|
||||
//! Get the position of the specified atom
|
||||
RDGeom::Point3D &getAtomPos(unsigned int atomId);
|
||||
//! overload
|
||||
template<class U>
|
||||
template <class U>
|
||||
RDGeom::Point3D &getAtomPos(U atomId) {
|
||||
return getAtomPos(rdcast<unsigned int>(atomId));
|
||||
return getAtomPos(rdcast<unsigned int>(atomId));
|
||||
}
|
||||
|
||||
//! Set the position of the specified atom
|
||||
@@ -103,9 +103,9 @@ class RDKIT_GRAPHMOL_EXPORT Conformer {
|
||||
d_positions[atomId] = position;
|
||||
}
|
||||
//! overload
|
||||
template<class U>
|
||||
template <class U>
|
||||
void setAtomPos(U atomId, const RDGeom::Point3D &position) {
|
||||
return setAtomPos(rdcast<unsigned int>(atomId), position);
|
||||
return setAtomPos(rdcast<unsigned int>(atomId), position);
|
||||
}
|
||||
//! get the ID of this conformer
|
||||
inline unsigned int getId() const { return d_id; }
|
||||
@@ -114,11 +114,12 @@ class RDKIT_GRAPHMOL_EXPORT Conformer {
|
||||
inline void setId(unsigned int id) { d_id = id; }
|
||||
|
||||
//! Get the number of atoms
|
||||
inline unsigned int getNumAtoms() const { return rdcast<unsigned int>(d_positions.size()); }
|
||||
inline unsigned int getNumAtoms() const {
|
||||
return rdcast<unsigned int>(d_positions.size());
|
||||
}
|
||||
inline bool is3D() const { return df_is3D; }
|
||||
inline void set3D(bool v) { df_is3D = v; }
|
||||
|
||||
|
||||
protected:
|
||||
//! Set owning moelcule
|
||||
void setOwningMol(ROMol *mol);
|
||||
@@ -140,14 +141,12 @@ typedef boost::shared_ptr<Conformer> CONFORMER_SPTR;
|
||||
\param conf Conformer object to analyze
|
||||
*/
|
||||
inline bool hasNonZeroZCoords(const Conformer &conf) {
|
||||
for(auto p: conf.getPositions()) {
|
||||
if (p.z != 0.0)
|
||||
return true;
|
||||
for (auto p : conf.getPositions()) {
|
||||
if (p.z != 0.0) return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
} // namespace RDKit
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,6 +30,6 @@ int Add2DCoordsToMol(ROMol& mol, bool useDLL = true);
|
||||
#else
|
||||
int Add2DCoordsToMol(ROMol &mol, bool useDLL = false);
|
||||
#endif
|
||||
}
|
||||
} // namespace RDKit
|
||||
|
||||
#endif
|
||||
|
||||
@@ -67,10 +67,11 @@ typedef std::list<PAIR_D_I_I> LIST_PAIR_DII;
|
||||
|
||||
where A is the angle between a and b
|
||||
*/
|
||||
RDKIT_DEPICTOR_EXPORT RDGeom::INT_POINT2D_MAP embedRing(const RDKit::INT_VECT &ring);
|
||||
RDKIT_DEPICTOR_EXPORT RDGeom::INT_POINT2D_MAP embedRing(
|
||||
const RDKit::INT_VECT &ring);
|
||||
|
||||
RDKIT_DEPICTOR_EXPORT void transformPoints(RDGeom::INT_POINT2D_MAP &nringCor,
|
||||
const RDGeom::Transform2D &trans);
|
||||
const RDGeom::Transform2D &trans);
|
||||
|
||||
//! Find a point that bisects the angle at rcr
|
||||
/*!
|
||||
@@ -78,9 +79,9 @@ RDKIT_DEPICTOR_EXPORT void transformPoints(RDGeom::INT_POINT2D_MAP &nringCor,
|
||||
angle
|
||||
'ang' at rcr
|
||||
*/
|
||||
RDKIT_DEPICTOR_EXPORT RDGeom::Point2D computeBisectPoint(const RDGeom::Point2D &rcr, double ang,
|
||||
const RDGeom::Point2D &nb1,
|
||||
const RDGeom::Point2D &nb2);
|
||||
RDKIT_DEPICTOR_EXPORT RDGeom::Point2D computeBisectPoint(
|
||||
const RDGeom::Point2D &rcr, double ang, const RDGeom::Point2D &nb1,
|
||||
const RDGeom::Point2D &nb2);
|
||||
|
||||
//! Reflect a set of point through a the line joining two point
|
||||
/*!
|
||||
@@ -93,11 +94,12 @@ RDKIT_DEPICTOR_EXPORT RDGeom::Point2D computeBisectPoint(const RDGeom::Point2D &
|
||||
\param loc2 the second point of the line to be used as a mirror
|
||||
*/
|
||||
RDKIT_DEPICTOR_EXPORT void reflectPoints(RDGeom::INT_POINT2D_MAP &coordMap,
|
||||
const RDGeom::Point2D &loc1, const RDGeom::Point2D &loc2);
|
||||
const RDGeom::Point2D &loc1,
|
||||
const RDGeom::Point2D &loc2);
|
||||
|
||||
RDKIT_DEPICTOR_EXPORT RDGeom::Point2D reflectPoint(const RDGeom::Point2D &point,
|
||||
const RDGeom::Point2D &loc1,
|
||||
const RDGeom::Point2D &loc2);
|
||||
const RDGeom::Point2D &loc1,
|
||||
const RDGeom::Point2D &loc2);
|
||||
|
||||
//! Set the neighbors yet to added to aid such that the atoms with the most subs
|
||||
// fall on opposite sides
|
||||
@@ -132,8 +134,9 @@ RDKIT_DEPICTOR_EXPORT RDGeom::Point2D reflectPoint(const RDGeom::Point2D &point,
|
||||
</pre>
|
||||
And the correct ordering of the neighbors is B,D,C
|
||||
*/
|
||||
RDKIT_DEPICTOR_EXPORT RDKit::INT_VECT setNbrOrder(unsigned int aid, const RDKit::INT_VECT &nbrs,
|
||||
const RDKit::ROMol &mol);
|
||||
RDKIT_DEPICTOR_EXPORT RDKit::INT_VECT setNbrOrder(unsigned int aid,
|
||||
const RDKit::INT_VECT &nbrs,
|
||||
const RDKit::ROMol &mol);
|
||||
|
||||
//! \brief From a given set of rings find the ring the largest common elements
|
||||
// with other rings
|
||||
@@ -152,9 +155,9 @@ RDKIT_DEPICTOR_EXPORT RDKit::INT_VECT setNbrOrder(unsigned int aid, const RDKit:
|
||||
|
||||
\return list of atom ids that are common
|
||||
*/
|
||||
RDKIT_DEPICTOR_EXPORT RDKit::INT_VECT findNextRingToEmbed(const RDKit::INT_VECT &doneRings,
|
||||
const RDKit::VECT_INT_VECT &fusedRings,
|
||||
int &nextId);
|
||||
RDKIT_DEPICTOR_EXPORT RDKit::INT_VECT findNextRingToEmbed(
|
||||
const RDKit::INT_VECT &doneRings, const RDKit::VECT_INT_VECT &fusedRings,
|
||||
int &nextId);
|
||||
|
||||
typedef std::pair<int, int> INT_PAIR;
|
||||
typedef std::vector<INT_PAIR> INT_PAIR_VECT;
|
||||
@@ -169,8 +172,9 @@ typedef std::pair<double, INT_PAIR> DOUBLE_INT_PAIR;
|
||||
\param ascending sort to an ascending order or a descending order
|
||||
*/
|
||||
template <class T>
|
||||
RDKIT_DEPICTOR_EXPORT T rankAtomsByRank(const RDKit::ROMol &mol, const T &commAtms,
|
||||
bool ascending = true);
|
||||
RDKIT_DEPICTOR_EXPORT T rankAtomsByRank(const RDKit::ROMol &mol,
|
||||
const T &commAtms,
|
||||
bool ascending = true);
|
||||
|
||||
//! computes a subangle for an atom of given hybridization and degree
|
||||
/*!
|
||||
@@ -283,8 +287,8 @@ inline double computeAngle(const RDGeom::Point2D ¢er,
|
||||
|
||||
\return the index of the ring with the least number of substitutions
|
||||
*/
|
||||
RDKIT_DEPICTOR_EXPORT int pickFirstRingToEmbed(const RDKit::ROMol &mol,
|
||||
const RDKit::VECT_INT_VECT &fusedRings);
|
||||
RDKIT_DEPICTOR_EXPORT int pickFirstRingToEmbed(
|
||||
const RDKit::ROMol &mol, const RDKit::VECT_INT_VECT &fusedRings);
|
||||
|
||||
//! \brief find the rotatable bonds on the shortest path between two atoms
|
||||
//! we will ignore ring atoms, and double bonds which are marked cis/trans
|
||||
@@ -299,8 +303,9 @@ RDKIT_DEPICTOR_EXPORT int pickFirstRingToEmbed(const RDKit::ROMol &mol,
|
||||
|
||||
\return a set of the indices of the rotatable bonds
|
||||
*/
|
||||
RDKIT_DEPICTOR_EXPORT RDKit::INT_VECT getRotatableBonds(const RDKit::ROMol &mol, unsigned int aid1,
|
||||
unsigned int aid2);
|
||||
RDKIT_DEPICTOR_EXPORT RDKit::INT_VECT getRotatableBonds(const RDKit::ROMol &mol,
|
||||
unsigned int aid1,
|
||||
unsigned int aid2);
|
||||
|
||||
//! \brief find all the rotatable bonds in a molecule
|
||||
//! we will ignore ring atoms, and double bonds which are marked cis/trans
|
||||
@@ -313,11 +318,14 @@ RDKIT_DEPICTOR_EXPORT RDKit::INT_VECT getRotatableBonds(const RDKit::ROMol &mol,
|
||||
|
||||
\return a set of the indices of the rotatable bonds
|
||||
*/
|
||||
RDKIT_DEPICTOR_EXPORT RDKit::INT_VECT getAllRotatableBonds(const RDKit::ROMol &mol);
|
||||
RDKIT_DEPICTOR_EXPORT RDKit::INT_VECT getAllRotatableBonds(
|
||||
const RDKit::ROMol &mol);
|
||||
|
||||
//! Get the ids of the atoms and bonds that are connected to aid
|
||||
RDKIT_DEPICTOR_EXPORT void getNbrAtomAndBondIds(unsigned int aid, const RDKit::ROMol *mol,
|
||||
RDKit::INT_VECT &aids, RDKit::INT_VECT &bids);
|
||||
RDKIT_DEPICTOR_EXPORT void getNbrAtomAndBondIds(unsigned int aid,
|
||||
const RDKit::ROMol *mol,
|
||||
RDKit::INT_VECT &aids,
|
||||
RDKit::INT_VECT &bids);
|
||||
|
||||
//! Find pairs of bonds that can be permuted at a non-ring degree 4 atom
|
||||
/*!
|
||||
@@ -343,9 +351,9 @@ RDKIT_DEPICTOR_EXPORT void getNbrAtomAndBondIds(unsigned int aid, const RDKit::R
|
||||
the neighbors
|
||||
\param nbrLocs - locations of the neighbors
|
||||
*/
|
||||
RDKIT_DEPICTOR_EXPORT INT_PAIR_VECT findBondsPairsToPermuteDeg4(const RDGeom::Point2D ¢er,
|
||||
const RDKit::INT_VECT &nbrBids,
|
||||
const VECT_C_POINT &nbrLocs);
|
||||
RDKIT_DEPICTOR_EXPORT INT_PAIR_VECT findBondsPairsToPermuteDeg4(
|
||||
const RDGeom::Point2D ¢er, const RDKit::INT_VECT &nbrBids,
|
||||
const VECT_C_POINT &nbrLocs);
|
||||
|
||||
//! returns the rank of the atom for determining draw order
|
||||
inline int getAtomDepictRank(const RDKit::Atom *at) {
|
||||
@@ -356,6 +364,6 @@ inline int getAtomDepictRank(const RDKit::Atom *at) {
|
||||
int deg = at->getDegree();
|
||||
return maxDeg * anum + deg;
|
||||
}
|
||||
}
|
||||
} // namespace RDDepict
|
||||
|
||||
#endif
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
namespace RDKit {
|
||||
class ROMol;
|
||||
class Bond;
|
||||
}
|
||||
} // namespace RDKit
|
||||
|
||||
namespace RDDepict {
|
||||
typedef boost::shared_array<double> DOUBLE_SMART_PTR;
|
||||
@@ -553,6 +553,6 @@ class RDKIT_DEPICTOR_EXPORT EmbeddedFrag {
|
||||
// pointer to the owning molecule
|
||||
const RDKit::ROMol *dp_mol;
|
||||
};
|
||||
}
|
||||
} // namespace RDDepict
|
||||
|
||||
#endif
|
||||
|
||||
@@ -70,13 +70,11 @@ class RDKIT_DEPICTOR_EXPORT DepictException : public std::exception {
|
||||
2D coordinates
|
||||
|
||||
*/
|
||||
RDKIT_DEPICTOR_EXPORT unsigned int compute2DCoords(RDKit::ROMol &mol,
|
||||
const RDGeom::INT_POINT2D_MAP *coordMap = 0,
|
||||
bool canonOrient = false, bool clearConfs = true,
|
||||
unsigned int nFlipsPerSample = 0,
|
||||
unsigned int nSamples = 0, int sampleSeed = 0,
|
||||
bool permuteDeg4Nodes = false,
|
||||
bool forceRDKit = false);
|
||||
RDKIT_DEPICTOR_EXPORT unsigned int compute2DCoords(
|
||||
RDKit::ROMol &mol, const RDGeom::INT_POINT2D_MAP *coordMap = 0,
|
||||
bool canonOrient = false, bool clearConfs = true,
|
||||
unsigned int nFlipsPerSample = 0, unsigned int nSamples = 0,
|
||||
int sampleSeed = 0, bool permuteDeg4Nodes = false, bool forceRDKit = false);
|
||||
|
||||
//! \brief Compute the 2D coordinates such the interatom distances
|
||||
// mimic those in a distance matrix
|
||||
@@ -186,12 +184,10 @@ RDKIT_DEPICTOR_EXPORT void generateDepictionMatching2DStructure(
|
||||
for molecules that don't match the reference or the
|
||||
referencePattern; if false, throws a DepictException.
|
||||
*/
|
||||
RDKIT_DEPICTOR_EXPORT void generateDepictionMatching3DStructure(RDKit::ROMol &mol,
|
||||
const RDKit::ROMol &reference,
|
||||
int confId = -1,
|
||||
RDKit::ROMol *referencePattern = 0,
|
||||
bool acceptFailure = false,
|
||||
bool forceRDKit = false);
|
||||
};
|
||||
RDKIT_DEPICTOR_EXPORT void generateDepictionMatching3DStructure(
|
||||
RDKit::ROMol &mol, const RDKit::ROMol &reference, int confId = -1,
|
||||
RDKit::ROMol *referencePattern = 0, bool acceptFailure = false,
|
||||
bool forceRDKit = false);
|
||||
}; // namespace RDDepict
|
||||
|
||||
#endif
|
||||
|
||||
@@ -41,8 +41,9 @@ namespace RDKit {
|
||||
class ROMol;
|
||||
namespace Descriptors {
|
||||
const std::string AUTOCORR2DVersion = "1.0.0";
|
||||
RDKIT_DESCRIPTORS_EXPORT void AUTOCORR2D(const ROMol &, std::vector<double> &res,
|
||||
const std::string &customAtomPropName="");
|
||||
}
|
||||
}
|
||||
RDKIT_DESCRIPTORS_EXPORT void AUTOCORR2D(
|
||||
const ROMol &, std::vector<double> &res,
|
||||
const std::string &customAtomPropName = "");
|
||||
} // namespace Descriptors
|
||||
} // namespace RDKit
|
||||
#endif
|
||||
|
||||
@@ -42,9 +42,10 @@ namespace RDKit {
|
||||
class ROMol;
|
||||
namespace Descriptors {
|
||||
const std::string AUTOCORR3DVersion = "1.0.0";
|
||||
RDKIT_DESCRIPTORS_EXPORT void AUTOCORR3D(const ROMol &, std::vector<double> &res, int confId = -1,
|
||||
const std::string &customAtomPropName="");
|
||||
}
|
||||
}
|
||||
RDKIT_DESCRIPTORS_EXPORT void AUTOCORR3D(
|
||||
const ROMol &, std::vector<double> &res, int confId = -1,
|
||||
const std::string &customAtomPropName = "");
|
||||
} // namespace Descriptors
|
||||
} // namespace RDKit
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -72,7 +72,8 @@ const std::string chi4vVersion = "1.2.0";
|
||||
\param force forces the value to be recalculated instead
|
||||
of pulled from the cache
|
||||
*/
|
||||
RDKIT_DESCRIPTORS_EXPORT double calcChiNv(const ROMol &mol, unsigned int n, bool force = false);
|
||||
RDKIT_DESCRIPTORS_EXPORT double calcChiNv(const ROMol &mol, unsigned int n,
|
||||
bool force = false);
|
||||
const std::string chiNvVersion = "1.2.0";
|
||||
|
||||
//! Similar to Hall Kier ChiXv, but uses nVal instead of valence
|
||||
@@ -128,7 +129,8 @@ const std::string chi4nVersion = "1.2.0";
|
||||
\param force forces the value to be recalculated instead
|
||||
of pulled from the cache
|
||||
*/
|
||||
RDKIT_DESCRIPTORS_EXPORT double calcChiNn(const ROMol &mol, unsigned int n, bool force = false);
|
||||
RDKIT_DESCRIPTORS_EXPORT double calcChiNn(const ROMol &mol, unsigned int n,
|
||||
bool force = false);
|
||||
const std::string chiNnVersion = "1.2.0";
|
||||
|
||||
//! calculate the Hall-Kier alpha value for a molecule
|
||||
@@ -141,8 +143,8 @@ const std::string chiNnVersion = "1.2.0";
|
||||
neccessarily sum to the full value.
|
||||
Note: this can be a time-consuming calculation.
|
||||
*/
|
||||
RDKIT_DESCRIPTORS_EXPORT double calcHallKierAlpha(const ROMol &mol,
|
||||
std::vector<double> *atomContribs = 0);
|
||||
RDKIT_DESCRIPTORS_EXPORT double calcHallKierAlpha(
|
||||
const ROMol &mol, std::vector<double> *atomContribs = 0);
|
||||
const std::string hallKierAlphaVersion = "1.2.0";
|
||||
|
||||
//! calculate the Hall-Kier kappa1 value for a molecule
|
||||
@@ -171,10 +173,11 @@ RDKIT_DESCRIPTORS_EXPORT double calcKappa3(const ROMol &mol);
|
||||
const std::string kappa3Version = "1.1.0";
|
||||
|
||||
namespace detail {
|
||||
RDKIT_DESCRIPTORS_EXPORT void hkDeltas(const ROMol &mol, std::vector<double> &deltas, bool force);
|
||||
RDKIT_DESCRIPTORS_EXPORT void hkDeltas(const ROMol &mol,
|
||||
std::vector<double> &deltas, bool force);
|
||||
}
|
||||
|
||||
} // end of namespace Descriptors
|
||||
}
|
||||
} // namespace RDKit
|
||||
|
||||
#endif
|
||||
|
||||
@@ -47,10 +47,11 @@ const std::string crippenVersion = "1.2.0";
|
||||
number of atoms
|
||||
|
||||
*/
|
||||
RDKIT_DESCRIPTORS_EXPORT void getCrippenAtomContribs(const ROMol &mol, std::vector<double> &logpContribs,
|
||||
std::vector<double> &mrContribs, bool force = false,
|
||||
std::vector<unsigned int> *atomTypes = 0,
|
||||
std::vector<std::string> *atomTypeLabels = 0);
|
||||
RDKIT_DESCRIPTORS_EXPORT void getCrippenAtomContribs(
|
||||
const ROMol &mol, std::vector<double> &logpContribs,
|
||||
std::vector<double> &mrContribs, bool force = false,
|
||||
std::vector<unsigned int> *atomTypes = 0,
|
||||
std::vector<std::string> *atomTypeLabels = 0);
|
||||
|
||||
//! generate Wildman-Crippen LogP and MR estimates for a molecule
|
||||
/*!
|
||||
@@ -68,8 +69,10 @@ RDKIT_DESCRIPTORS_EXPORT void getCrippenAtomContribs(const ROMol &mol, std::vect
|
||||
pulled from the cache
|
||||
|
||||
*/
|
||||
RDKIT_DESCRIPTORS_EXPORT void calcCrippenDescriptors(const ROMol &mol, double &logp, double &mr,
|
||||
bool includeHs = true, bool force = false);
|
||||
RDKIT_DESCRIPTORS_EXPORT void calcCrippenDescriptors(const ROMol &mol,
|
||||
double &logp, double &mr,
|
||||
bool includeHs = true,
|
||||
bool force = false);
|
||||
|
||||
//! a class used to store Crippen parameters
|
||||
class RDKIT_DESCRIPTORS_EXPORT CrippenParams {
|
||||
@@ -99,7 +102,6 @@ const std::string CrippenMRVersion = crippenVersion;
|
||||
*/
|
||||
RDKIT_DESCRIPTORS_EXPORT double calcMR(const ROMol &mol);
|
||||
|
||||
|
||||
//! singleton class for retrieving Crippen parameters
|
||||
/*!
|
||||
Use the singleton like this:
|
||||
@@ -130,6 +132,6 @@ class RDKIT_DESCRIPTORS_EXPORT CrippenParamCollection {
|
||||
ParamsVect d_params; //!< the parameters
|
||||
};
|
||||
} // end of namespace Descriptors
|
||||
}
|
||||
} // namespace RDKit
|
||||
|
||||
#endif
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
#ifndef EEMRDKIT_H_SEPT2017
|
||||
#define EEMRDKIT_H_SEPT2017
|
||||
|
||||
@@ -35,25 +34,26 @@ namespace RDKit {
|
||||
class ROMol;
|
||||
namespace Descriptors {
|
||||
|
||||
namespace {
|
||||
class EEM_arrays {
|
||||
public:
|
||||
unsigned int n;
|
||||
unsigned int *Atomindex;
|
||||
unsigned int *EEMatomtype;
|
||||
namespace {
|
||||
class EEM_arrays {
|
||||
public:
|
||||
unsigned int n;
|
||||
unsigned int *Atomindex;
|
||||
unsigned int *EEMatomtype;
|
||||
|
||||
EEM_arrays() = delete;
|
||||
EEM_arrays(const EEM_arrays&) = delete;
|
||||
void operator=(const EEM_arrays&) = delete;
|
||||
EEM_arrays() = delete;
|
||||
EEM_arrays(const EEM_arrays &) = delete;
|
||||
void operator=(const EEM_arrays &) = delete;
|
||||
|
||||
EEM_arrays(const ROMol &mol, unsigned int n);
|
||||
~EEM_arrays();
|
||||
};
|
||||
}
|
||||
EEM_arrays(const ROMol &mol, unsigned int n);
|
||||
~EEM_arrays();
|
||||
};
|
||||
} // namespace
|
||||
|
||||
const std::string EEMVersion = "1.0.0";
|
||||
void RDKIT_DESCRIPTORS_EXPORT EEM(ROMol &mol, std::vector<double> &res, int confId);
|
||||
}
|
||||
}
|
||||
void RDKIT_DESCRIPTORS_EXPORT EEM(ROMol &mol, std::vector<double> &res,
|
||||
int confId);
|
||||
} // namespace Descriptors
|
||||
} // namespace RDKit
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -42,9 +42,10 @@ namespace RDKit {
|
||||
class ROMol;
|
||||
namespace Descriptors {
|
||||
const std::string GETAWAYVersion = "1.0.0";
|
||||
RDKIT_DESCRIPTORS_EXPORT void GETAWAY(const ROMol&, std::vector<double> &res, int confId=-1, unsigned int precision=2,
|
||||
const std::string &customAtomPropName="");
|
||||
}
|
||||
}
|
||||
RDKIT_DESCRIPTORS_EXPORT void GETAWAY(
|
||||
const ROMol &, std::vector<double> &res, int confId = -1,
|
||||
unsigned int precision = 2, const std::string &customAtomPropName = "");
|
||||
} // namespace Descriptors
|
||||
} // namespace RDKit
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -33,9 +33,9 @@ const std::string lipinskiHBDVersion = "2.0.0";
|
||||
RDKIT_DESCRIPTORS_EXPORT unsigned int calcLipinskiHBD(const ROMol &mol);
|
||||
|
||||
enum NumRotatableBondsOptions {
|
||||
Default = -1,
|
||||
NonStrict = 0,
|
||||
Strict = 1,
|
||||
Default = -1,
|
||||
NonStrict = 0,
|
||||
Strict = 1,
|
||||
StrictLinkages = 2,
|
||||
};
|
||||
|
||||
@@ -49,8 +49,8 @@ RDKIT_DESCRIPTORS_EXPORT extern const std::string NumRotatableBondsVersion;
|
||||
handles rotatable bonds between rings as well.
|
||||
if Default - uses the default choice (normally Strict)
|
||||
*/
|
||||
RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumRotatableBonds(const ROMol &mol,
|
||||
NumRotatableBondsOptions useStrictDefinition=Default);
|
||||
RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumRotatableBonds(
|
||||
const ROMol &mol, NumRotatableBondsOptions useStrictDefinition = Default);
|
||||
|
||||
//! calculates the number of rotatable bonds ( backwards compatibility function,
|
||||
//! deprecated, please use calcNumRotatableBonds(const ROMol&, int)
|
||||
@@ -58,7 +58,8 @@ RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumRotatableBonds(const ROMol &mol,
|
||||
\param mol the molecule of interest
|
||||
\param strict if Strict == true, uses NumRotatableBondsOptions::Strict
|
||||
*/
|
||||
RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumRotatableBonds(const ROMol &mol, bool strict);
|
||||
RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumRotatableBonds(const ROMol &mol,
|
||||
bool strict);
|
||||
|
||||
RDKIT_DESCRIPTORS_EXPORT extern const std::string NumHBDVersion;
|
||||
//! calculates the number of H-bond donors
|
||||
@@ -101,51 +102,64 @@ RDKIT_DESCRIPTORS_EXPORT extern const std::string NumHeterocyclesVersion;
|
||||
//! calculates the number of SSSR heterocycles
|
||||
RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumHeterocycles(const ROMol &mol);
|
||||
|
||||
RDKIT_DESCRIPTORS_EXPORT extern const std::string NumAromaticHeterocyclesVersion;
|
||||
RDKIT_DESCRIPTORS_EXPORT extern const std::string
|
||||
NumAromaticHeterocyclesVersion;
|
||||
//! calculates the number of aromatic SSSR heterocycles
|
||||
RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumAromaticHeterocycles(const ROMol &mol);
|
||||
RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumAromaticHeterocycles(
|
||||
const ROMol &mol);
|
||||
|
||||
RDKIT_DESCRIPTORS_EXPORT extern const std::string NumAromaticCarbocyclesVersion;
|
||||
//! calculates the number of aromatic SSSR carbocycles
|
||||
RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumAromaticCarbocycles(const ROMol &mol);
|
||||
RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumAromaticCarbocycles(
|
||||
const ROMol &mol);
|
||||
|
||||
RDKIT_DESCRIPTORS_EXPORT extern const std::string NumSaturatedHeterocyclesVersion;
|
||||
RDKIT_DESCRIPTORS_EXPORT extern const std::string
|
||||
NumSaturatedHeterocyclesVersion;
|
||||
//! calculates the number of saturated SSSR heterocycles
|
||||
RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumSaturatedHeterocycles(const ROMol &mol);
|
||||
RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumSaturatedHeterocycles(
|
||||
const ROMol &mol);
|
||||
|
||||
RDKIT_DESCRIPTORS_EXPORT extern const std::string NumSaturatedCarbocyclesVersion;
|
||||
RDKIT_DESCRIPTORS_EXPORT extern const std::string
|
||||
NumSaturatedCarbocyclesVersion;
|
||||
//! calculates the number of saturated SSSR carbocycles
|
||||
RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumSaturatedCarbocycles(const ROMol &mol);
|
||||
RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumSaturatedCarbocycles(
|
||||
const ROMol &mol);
|
||||
|
||||
RDKIT_DESCRIPTORS_EXPORT extern const std::string NumAliphaticHeterocyclesVersion;
|
||||
RDKIT_DESCRIPTORS_EXPORT extern const std::string
|
||||
NumAliphaticHeterocyclesVersion;
|
||||
//! calculates the number of aliphatic (at least one non-aromatic bond) SSSR
|
||||
// heterocycles
|
||||
RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumAliphaticHeterocycles(const ROMol &mol);
|
||||
RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumAliphaticHeterocycles(
|
||||
const ROMol &mol);
|
||||
|
||||
RDKIT_DESCRIPTORS_EXPORT extern const std::string NumAliphaticCarbocyclesVersion;
|
||||
RDKIT_DESCRIPTORS_EXPORT extern const std::string
|
||||
NumAliphaticCarbocyclesVersion;
|
||||
//! calculates the number of aliphatic (at least one non-aromatic bond) SSSR
|
||||
// carbocycles
|
||||
RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumAliphaticCarbocycles(const ROMol &mol);
|
||||
RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumAliphaticCarbocycles(
|
||||
const ROMol &mol);
|
||||
|
||||
RDKIT_DESCRIPTORS_EXPORT extern const std::string NumSpiroAtomsVersion;
|
||||
//! calculates the number of spiro atoms (atoms shared between rings that share
|
||||
// exactly one atom)
|
||||
RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumSpiroAtoms(const ROMol &mol,
|
||||
std::vector<unsigned int> *atoms = NULL);
|
||||
RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumSpiroAtoms(
|
||||
const ROMol &mol, std::vector<unsigned int> *atoms = NULL);
|
||||
|
||||
RDKIT_DESCRIPTORS_EXPORT extern const std::string NumBridgeheadAtomsVersion;
|
||||
//! calculates the number of bridgehead atoms (atoms shared between rings that
|
||||
// share at least two bonds)
|
||||
RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumBridgeheadAtoms(const ROMol &mol,
|
||||
std::vector<unsigned int> *atoms = NULL);
|
||||
RDKIT_DESCRIPTORS_EXPORT unsigned int calcNumBridgeheadAtoms(
|
||||
const ROMol &mol, std::vector<unsigned int> *atoms = NULL);
|
||||
|
||||
RDKIT_DESCRIPTORS_EXPORT extern const std::string NumAtomStereoCentersVersion;
|
||||
//! calculates the total number of atom stereo centers
|
||||
RDKIT_DESCRIPTORS_EXPORT unsigned numAtomStereoCenters(const ROMol &mol);
|
||||
|
||||
//! calculates the number of unspecified stereo atom stereo centers
|
||||
RDKIT_DESCRIPTORS_EXPORT extern const std::string NumUnspecifiedAtomStereoCentersVersion;
|
||||
RDKIT_DESCRIPTORS_EXPORT unsigned numUnspecifiedAtomStereoCenters(const ROMol &mol);
|
||||
RDKIT_DESCRIPTORS_EXPORT extern const std::string
|
||||
NumUnspecifiedAtomStereoCentersVersion;
|
||||
RDKIT_DESCRIPTORS_EXPORT unsigned numUnspecifiedAtomStereoCenters(
|
||||
const ROMol &mol);
|
||||
|
||||
//! Helper function to register the descriptors with the descriptor service
|
||||
RDKIT_DESCRIPTORS_EXPORT void registerDescriptors();
|
||||
|
||||
@@ -40,8 +40,9 @@ namespace RDKit {
|
||||
class ROMol;
|
||||
namespace Descriptors {
|
||||
const std::string MORSEVersion = "1.0.0";
|
||||
RDKIT_DESCRIPTORS_EXPORT void MORSE(const ROMol &, std::vector<double> &res, int confId = -1,
|
||||
const std::string &customAtomPropName = "");
|
||||
RDKIT_DESCRIPTORS_EXPORT void MORSE(const ROMol &, std::vector<double> &res,
|
||||
int confId = -1,
|
||||
const std::string &customAtomPropName = "");
|
||||
|
||||
} // namespace Descriptors
|
||||
} // namespace RDKit
|
||||
|
||||
@@ -38,7 +38,8 @@ const std::string MQNVersion = "1.0.0";
|
||||
\return a vector with the MQNs
|
||||
|
||||
*/
|
||||
RDKIT_DESCRIPTORS_EXPORT std::vector<unsigned int> calcMQNs(const ROMol &mol, bool force = false);
|
||||
RDKIT_DESCRIPTORS_EXPORT std::vector<unsigned int> calcMQNs(const ROMol &mol,
|
||||
bool force = false);
|
||||
|
||||
} // end of namespace Descriptors
|
||||
} // end of namespace RDKit
|
||||
|
||||
@@ -45,7 +45,8 @@ class RDKIT_DESCRIPTORS_EXPORT MolData3Ddescriptors {
|
||||
MolData3Ddescriptors();
|
||||
std::vector<double> GetCharges(const RDKit::ROMol& mol);
|
||||
std::vector<double> GetRelativeMW(const RDKit::ROMol& mol);
|
||||
std::vector<double> GetCustomAtomProp(const RDKit::ROMol& mol, const std::string &customAtomPropName);
|
||||
std::vector<double> GetCustomAtomProp(const RDKit::ROMol& mol,
|
||||
const std::string& customAtomPropName);
|
||||
std::vector<double> GetRelativePol(const RDKit::ROMol& mol);
|
||||
std::vector<double> GetRelativeRcov(const RDKit::ROMol& mol);
|
||||
std::vector<double> GetRelativeENeg(const RDKit::ROMol& mol);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user