![]() |
Chemical Data Processing Library C++ API - Version 1.3.0
|
Contains classes and functions related to the generation and processing of pharmacophore and molecule descriptors. More...
Functions | |
CDPL_DESCR_API double | calcGeometricalRadius (const Chem::AtomContainer &cntnr, const Chem::Atom3DCoordinatesFunction &coords_func) |
CDPL_DESCR_API double | calcGeometricalDiameter (const Chem::AtomContainer &cntnr, const Chem::Atom3DCoordinatesFunction &coords_func) |
CDPL_DESCR_API double | calcGeometricalRadius (const Chem::Entity3DContainer &cntnr) |
CDPL_DESCR_API double | calcGeometricalDiameter (const Chem::Entity3DContainer &cntnr) |
CDPL_DESCR_API std::size_t | calcTopologicalRadius (const Chem::MolecularGraph &molgraph) |
CDPL_DESCR_API std::size_t | calcTopologicalDiameter (const Chem::MolecularGraph &molgraph) |
CDPL_DESCR_API double | calcRingComplexity (const Chem::MolecularGraph &molgraph) |
CDPL_DESCR_API double | calcMolecularComplexity (const Chem::MolecularGraph &molgraph) |
CDPL_DESCR_API double | calcKierShape1 (const Chem::MolecularGraph &molgraph) |
CDPL_DESCR_API double | calcKierShape2 (const Chem::MolecularGraph &molgraph) |
CDPL_DESCR_API double | calcKierShape3 (const Chem::MolecularGraph &molgraph) |
CDPL_DESCR_API std::size_t | calcWienerIndex (const Chem::MolecularGraph &molgraph) |
CDPL_DESCR_API double | calcRandicIndex (const Chem::MolecularGraph &molgraph) |
CDPL_DESCR_API std::size_t | calcZagrebIndex1 (const Chem::MolecularGraph &molgraph) |
CDPL_DESCR_API std::size_t | calcZagrebIndex2 (const Chem::MolecularGraph &molgraph) |
CDPL_DESCR_API std::size_t | calcTotalWalkCount (const Chem::MolecularGraph &molgraph) |
CDPL_DESCR_API double | calcTanimotoSimilarity (const Util::BitSet &bs1, const Util::BitSet &bs2) |
Calculates the Tanimoto Similarity [CITB] of the bitsets bs1 and bs2. More... | |
template<typename V > | |
double | calcTanimotoSimilarity (const V &v1, const V &v2) |
Calculates the Tanimoto Similarity [CITB] of the vectors v1 and v2. More... | |
CDPL_DESCR_API double | calcCosineSimilarity (const Util::BitSet &bs1, const Util::BitSet &bs2) |
Calculates the Cosine Similarity [WCOS] of the bitsets bs1 and bs2. More... | |
template<typename V > | |
double | calcCosineSimilarity (const V &v1, const V &v2) |
Calculates the Cosine Similarity [WCOS] of the vectors v1 and v2. More... | |
CDPL_DESCR_API double | calcEuclideanSimilarity (const Util::BitSet &bs1, const Util::BitSet &bs2) |
Calculates the Euclidean Similarity [GSIM] of the bitsets bs1 and bs2. More... | |
CDPL_DESCR_API double | calcManhattanSimilarity (const Util::BitSet &bs1, const Util::BitSet &bs2) |
Calculates the Manhattan Similarity [GSIM] of the bitsets bs1 and bs2. More... | |
CDPL_DESCR_API double | calcDiceSimilarity (const Util::BitSet &bs1, const Util::BitSet &bs2) |
Calculates the Dice Similarity [GSIM] of the bitsets bs1 and bs2. More... | |
CDPL_DESCR_API double | calcTverskySimilarity (const Util::BitSet &bs1, const Util::BitSet &bs2, double a, double b) |
Calculates the Tversky Similarity [GSIM] of the bitsets bs1 and bs2. More... | |
CDPL_DESCR_API std::size_t | calcHammingDistance (const Util::BitSet &bs1, const Util::BitSet &bs2) |
Calculates the Hamming Distance [WHAM, CITB] between the bitsets bs1 and bs2. More... | |
template<typename V > | |
double | calcManhattanDistance (const V &v1, const V &v2) |
Calculates the Manhattan Distance [MADI] between the vectors v1 and v2. More... | |
CDPL_DESCR_API double | calcEuclideanDistance (const Util::BitSet &bs1, const Util::BitSet &bs2) |
Calculates the Euclidean Distance [CITB] between the bitsets bs1 and bs2. More... | |
template<typename V > | |
double | calcEuclideanDistance (const V &v1, const V &v2) |
Calculates the Euclidean Distance [CITB] between the vectors v1 and v2. More... | |
Contains classes and functions related to the generation and processing of pharmacophore and molecule descriptors.
CDPL_DESCR_API double CDPL::Descr::calcGeometricalRadius | ( | const Chem::AtomContainer & | cntnr, |
const Chem::Atom3DCoordinatesFunction & | coords_func | ||
) |
CDPL_DESCR_API double CDPL::Descr::calcGeometricalDiameter | ( | const Chem::AtomContainer & | cntnr, |
const Chem::Atom3DCoordinatesFunction & | coords_func | ||
) |
CDPL_DESCR_API double CDPL::Descr::calcGeometricalRadius | ( | const Chem::Entity3DContainer & | cntnr | ) |
CDPL_DESCR_API double CDPL::Descr::calcGeometricalDiameter | ( | const Chem::Entity3DContainer & | cntnr | ) |
CDPL_DESCR_API std::size_t CDPL::Descr::calcTopologicalRadius | ( | const Chem::MolecularGraph & | molgraph | ) |
CDPL_DESCR_API std::size_t CDPL::Descr::calcTopologicalDiameter | ( | const Chem::MolecularGraph & | molgraph | ) |
CDPL_DESCR_API double CDPL::Descr::calcRingComplexity | ( | const Chem::MolecularGraph & | molgraph | ) |
CDPL_DESCR_API double CDPL::Descr::calcMolecularComplexity | ( | const Chem::MolecularGraph & | molgraph | ) |
CDPL_DESCR_API double CDPL::Descr::calcKierShape1 | ( | const Chem::MolecularGraph & | molgraph | ) |
CDPL_DESCR_API double CDPL::Descr::calcKierShape2 | ( | const Chem::MolecularGraph & | molgraph | ) |
CDPL_DESCR_API double CDPL::Descr::calcKierShape3 | ( | const Chem::MolecularGraph & | molgraph | ) |
CDPL_DESCR_API std::size_t CDPL::Descr::calcWienerIndex | ( | const Chem::MolecularGraph & | molgraph | ) |
CDPL_DESCR_API double CDPL::Descr::calcRandicIndex | ( | const Chem::MolecularGraph & | molgraph | ) |
CDPL_DESCR_API std::size_t CDPL::Descr::calcZagrebIndex1 | ( | const Chem::MolecularGraph & | molgraph | ) |
CDPL_DESCR_API std::size_t CDPL::Descr::calcZagrebIndex2 | ( | const Chem::MolecularGraph & | molgraph | ) |
CDPL_DESCR_API std::size_t CDPL::Descr::calcTotalWalkCount | ( | const Chem::MolecularGraph & | molgraph | ) |
CDPL_DESCR_API double CDPL::Descr::calcTanimotoSimilarity | ( | const Util::BitSet & | bs1, |
const Util::BitSet & | bs2 | ||
) |
Calculates the Tanimoto Similarity [CITB] of the bitsets bs1 and bs2.
The Tanimoto Similarity S_{ab} is calculated by:
S_{ab} = \frac{N_{ab}}{N_a + N_b - N_{ab}}
where N_{ab} is the number of bits that are set in both bitsets, N_a is the number of bits that are set in the first bitset and N_b is the number of bits that are set in the second bitset.
If the specified bitsets bs1 and bs2 are of different size, missing bits at the end of the smaller bitset are assumed to be zero.
bs1 | The first bitset. |
bs2 | The second bitset. |
|
inline |
Calculates the Tanimoto Similarity [CITB] of the vectors v1 and v2.
The Tanimoto Similarity S_{12} is calculated by:
S_{12} = \frac{\vec{v}_1 \cdot \vec{v}_2}{{\left \| \vec{v}_1 \right \|}^2 + {\left \| \vec{v}_2 \right \|}^2 - \vec{v}_1 \cdot \vec{v}_2}
v1 | The first vector. |
v2 | The second vector. |
CDPL_DESCR_API double CDPL::Descr::calcCosineSimilarity | ( | const Util::BitSet & | bs1, |
const Util::BitSet & | bs2 | ||
) |
Calculates the Cosine Similarity [WCOS] of the bitsets bs1 and bs2.
The Cosine Similarity S_{ab} is calculated by:
S_{ab} = \frac{N_{ab}}{\sqrt{N_a * N_b}}
where N_{ab} is the number of bits that are set in both bitsets, N_a is the number of bits that are set in the first bitset and N_b is the number of bits that are set in the second bitset.
If the specified bitsets bs1 and bs2 are of different size, missing bits at the end of the smaller bitset are assumed to be zero.
bs1 | The first bitset. |
bs2 | The second bitset. |
|
inline |
Calculates the Cosine Similarity [WCOS] of the vectors v1 and v2.
The Cosine Similarity S_{12} is calculated by:
S_{12} = \frac{\vec{v}_1 \cdot \vec{v}_2}{{\left \| \vec{v}_1 \right \|}{\left \| \vec{v}_2 \right \|}}
v1 | The first vector. |
v2 | The second vector. |
CDPL_DESCR_API double CDPL::Descr::calcEuclideanSimilarity | ( | const Util::BitSet & | bs1, |
const Util::BitSet & | bs2 | ||
) |
Calculates the Euclidean Similarity [GSIM] of the bitsets bs1 and bs2.
The Euclidean Similarity S_{ab} is calculated by:
S_{ab} = \sqrt{\frac{N_{ab} + N_{!ab}}{N_a + N_b + N_{ab} + N_{!ab}}}
where N_{ab} is the number of bits that are set in both bitsets, N_a is the number of bits that are set only in the first bitset, N_b is the number of bits that are set only in the second bitset and N_{!ab} is the number of bits that are not set in both bitsets.
If the specified bitsets bs1 and bs2 are of different size, missing bits at the end of the smaller bitset are assumed to be zero.
bs1 | The first bitset. |
bs2 | The second bitset. |
CDPL_DESCR_API double CDPL::Descr::calcManhattanSimilarity | ( | const Util::BitSet & | bs1, |
const Util::BitSet & | bs2 | ||
) |
Calculates the Manhattan Similarity [GSIM] of the bitsets bs1 and bs2.
The Manhattan Similarity S_{ab} is calculated by:
S_{ab} = \frac{N_a + N_b}{N_a + N_b + N_{ab} + N_{!ab}}
where N_{ab} is the number of bits that are set in both bitsets, N_a is the number of bits that are set only in the first bitset, N_b is the number of bits that are set only in the second bitset and N_{!ab} is the number of bits that are not set in both bitsets.
If the specified bitsets bs1 and bs2 are of different size, missing bits at the end of the smaller bitset are assumed to be zero.
bs1 | The first bitset. |
bs2 | The second bitset. |
CDPL_DESCR_API double CDPL::Descr::calcDiceSimilarity | ( | const Util::BitSet & | bs1, |
const Util::BitSet & | bs2 | ||
) |
Calculates the Dice Similarity [GSIM] of the bitsets bs1 and bs2.
The Dice Similarity S_{ab} is calculated by:
S_{ab} = \frac{2 * N_{ab}}{N_a + N_b + 2 * N_{ab}}
where N_{ab} is the number of bits that are set in both bitsets, N_a is the number of bits that are only set in the first bitset and N_b is the number of bits that are only set in the second bitset.
If the specified bitsets bs1 and bs2 are of different size, missing bits at the end of the smaller bitset are assumed to be zero.
bs1 | The first bitset. |
bs2 | The second bitset. |
CDPL_DESCR_API double CDPL::Descr::calcTverskySimilarity | ( | const Util::BitSet & | bs1, |
const Util::BitSet & | bs2, | ||
double | a, | ||
double | b | ||
) |
Calculates the Tversky Similarity [GSIM] of the bitsets bs1 and bs2.
The Tversky Similarity S_{ab} is calculated by:
S_{ab} = \frac{N_{ab}}{a * N_a + b * N_b + N_{ab}}
where N_{ab} is the number of bits that are set in both bitsets, N_a is the number of bits that are only set in the first bitset and N_b is the number of bits that are only set in the second bitset. a and b are bitset contribution weighting factors.
The Tversky measure is asymmetric. Setting the parameters a = b = 1.0 makes it identical to the Tanimoto measure.
If the specified bitsets bs1 and bs2 are of different size, missing bits at the end of the smaller bitset are assumed to be zero.
bs1 | The first bitset. |
bs2 | The second bitset. |
a | Weights the contribution of the first bitset. |
b | Weights the contribution of the second bitset. |
CDPL_DESCR_API std::size_t CDPL::Descr::calcHammingDistance | ( | const Util::BitSet & | bs1, |
const Util::BitSet & | bs2 | ||
) |
Calculates the Hamming Distance [WHAM, CITB] between the bitsets bs1 and bs2.
The Hamming Distance D_{ab} is calculated by:
D_{ab} = N_a + N_b
where N_a is the number of bits that are set in the first bitset but not in the second bitset and N_b is the number of bits that are set in the second bitset but not in the first one.
If the specified bitsets bs1 and bs2 are of different size, missing bits at the end of the smaller bitset are assumed to be zero.
bs1 | The first bitset. |
bs2 | The second bitset. |
|
inline |
Calculates the Manhattan Distance [MADI] between the vectors v1 and v2.
The Manhattan Distance D_{12} is calculated by:
D_{12} = {\left \| \vec{v}_1 - \vec{v}_2 \right \|}_1
v1 | The first vector. |
v2 | The second vector. |
CDPL_DESCR_API double CDPL::Descr::calcEuclideanDistance | ( | const Util::BitSet & | bs1, |
const Util::BitSet & | bs2 | ||
) |
Calculates the Euclidean Distance [CITB] between the bitsets bs1 and bs2.
The Euclidean Distance D_{ab} is calculated by:
D_{ab} = \sqrt{N_a + N_b}
where N_a is the number of bits that are set in the first bitset but not in the second bitset and N_b is the number of bits that are set in the second bitset but not in the first one.
If the specified bitsets bs1 and bs2 are of different size, missing bits at the end of the smaller bitset are assumed to be zero.
bs1 | The first bitset. |
bs2 | The second bitset. |
|
inline |
Calculates the Euclidean Distance [CITB] between the vectors v1 and v2.
The Euclidean Distance D_{12} is calculated by:
D_{12} = {\left \| \vec{v}_1 - \vec{v}_2 \right \|}
v1 | The first vector. |
v2 | The second vector. |