rdkit.DataStructs.cDataStructs module

Module containing an assortment of functionality for basic data structures.

At the moment the data structures defined are:
Bit Vector classes (for storing signatures, fingerprints and the like:
  • ExplicitBitVect: class for relatively small (10s of thousands of bits) or

    dense bit vectors.

  • SparseBitVect: class for large, sparse bit vectors

DiscreteValueVect: class for storing vectors of integers SparseIntVect: class for storing sparse vectors of integers

rdkit.DataStructs.cDataStructs.AllBitSimilarity((SparseBitVect)v1, (SparseBitVect)v2) float :
C++ signature :

double AllBitSimilarity(SparseBitVect,SparseBitVect)

AllBitSimilarity( (ExplicitBitVect)v1, (ExplicitBitVect)v2) -> float :

(B(bv1) - B(bv1^bv2)) / B(bv1)

C++ signature :

double AllBitSimilarity(ExplicitBitVect,ExplicitBitVect)

rdkit.DataStructs.cDataStructs.AllProbeBitsMatch((SparseBitVect)probe, (SparseBitVect)ref) bool :
C++ signature :

bool AllProbeBitsMatch(SparseBitVect,SparseBitVect)

AllProbeBitsMatch( (ExplicitBitVect)probe, (ExplicitBitVect)ref) -> bool :

C++ signature :

bool AllProbeBitsMatch(ExplicitBitVect,ExplicitBitVect)

AllProbeBitsMatch( (SparseBitVect)probe, (str)ref) -> bool :

C++ signature :

bool AllProbeBitsMatch(SparseBitVect,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)

AllProbeBitsMatch( (ExplicitBitVect)probe, (str)ref) -> bool :
Returns True if all bits in the first argument match all bits in the

vector defined by the pickle in the second argument.

C++ signature :

bool AllProbeBitsMatch(ExplicitBitVect,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)

rdkit.DataStructs.cDataStructs.AsymmetricSimilarity((SparseBitVect)bv1, (SparseBitVect)bv2[, (bool)returnDistance=0]) float :
C++ signature :

double AsymmetricSimilarity(SparseBitVect,SparseBitVect [,bool=0])

AsymmetricSimilarity( (ExplicitBitVect)bv1, (ExplicitBitVect)bv2 [, (bool)returnDistance=0]) -> float :

B(bv1&bv2) / min(B(bv1),B(bv2))

C++ signature :

double AsymmetricSimilarity(ExplicitBitVect,ExplicitBitVect [,bool=0])

AsymmetricSimilarity( (SparseBitVect)bv1, (str)pkl [, (bool)returnDistance=0]) -> float :

C++ signature :

double AsymmetricSimilarity(SparseBitVect,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > [,bool=0])

AsymmetricSimilarity( (ExplicitBitVect)bv1, (str)pkl [, (bool)returnDistance=0]) -> float :

B(bv1&bv2) / min(B(bv1),B(bv2))

C++ signature :

double AsymmetricSimilarity(ExplicitBitVect,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > [,bool=0])

rdkit.DataStructs.cDataStructs.AsymmetricSimilarityNeighbors((AtomPairsParameters)bvqueries, (AtomPairsParameters)bvList) list :

B(bv1&bv2) / min(B(bv1),B(bv2))

C++ signature :

boost::python::list AsymmetricSimilarityNeighbors(boost::python::api::object,boost::python::api::object)

rdkit.DataStructs.cDataStructs.AsymmetricSimilarityNeighbors_sparse((AtomPairsParameters)bvqueries, (AtomPairsParameters)bvList) list :

B(bv1&bv2) / min(B(bv1),B(bv2))

C++ signature :

boost::python::list AsymmetricSimilarityNeighbors_sparse(boost::python::api::object,boost::python::api::object)

rdkit.DataStructs.cDataStructs.BitVectToBinaryText((SparseBitVect)bv) object :
C++ signature :

boost::python::api::object BitVectToBinaryText(SparseBitVect)

BitVectToBinaryText( (ExplicitBitVect)bv) -> object :

Returns a binary string (byte array) representing the bit vector.

C++ signature :

boost::python::api::object BitVectToBinaryText(ExplicitBitVect)

rdkit.DataStructs.cDataStructs.BitVectToFPSText((SparseBitVect)bv1) str :
C++ signature :

std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > BitVectToFPSText(SparseBitVect)

BitVectToFPSText( (ExplicitBitVect)bv1) -> str :

Returns an FPS string representing the bit vector.

C++ signature :

std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > BitVectToFPSText(ExplicitBitVect)

rdkit.DataStructs.cDataStructs.BitVectToText((SparseBitVect)bv1) str :
C++ signature :

std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > BitVectToText(SparseBitVect)

BitVectToText( (ExplicitBitVect)bv1) -> str :

Returns a string of zeros and ones representing the bit vector.

C++ signature :

std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > BitVectToText(ExplicitBitVect)

rdkit.DataStructs.cDataStructs.BraunBlanquetSimilarity((SparseBitVect)bv1, (SparseBitVect)bv2[, (bool)returnDistance=0]) float :
C++ signature :

double BraunBlanquetSimilarity(SparseBitVect,SparseBitVect [,bool=0])

BraunBlanquetSimilarity( (ExplicitBitVect)bv1, (ExplicitBitVect)bv2 [, (bool)returnDistance=0]) -> float :

B(bv1&bv2) / max(B(bv1),B(bv2))

C++ signature :

double BraunBlanquetSimilarity(ExplicitBitVect,ExplicitBitVect [,bool=0])

BraunBlanquetSimilarity( (SparseBitVect)bv1, (str)pkl [, (bool)returnDistance=0]) -> float :

C++ signature :

double BraunBlanquetSimilarity(SparseBitVect,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > [,bool=0])

BraunBlanquetSimilarity( (ExplicitBitVect)bv1, (str)pkl [, (bool)returnDistance=0]) -> float :

B(bv1&bv2) / max(B(bv1),B(bv2))

C++ signature :

double BraunBlanquetSimilarity(ExplicitBitVect,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > [,bool=0])

rdkit.DataStructs.cDataStructs.BraunBlanquetSimilarityNeighbors((AtomPairsParameters)bvqueries, (AtomPairsParameters)bvList) list :

B(bv1&bv2) / max(B(bv1),B(bv2))

C++ signature :

boost::python::list BraunBlanquetSimilarityNeighbors(boost::python::api::object,boost::python::api::object)

rdkit.DataStructs.cDataStructs.BraunBlanquetSimilarityNeighbors_sparse((AtomPairsParameters)bvqueries, (AtomPairsParameters)bvList) list :

B(bv1&bv2) / max(B(bv1),B(bv2))

C++ signature :

boost::python::list BraunBlanquetSimilarityNeighbors_sparse(boost::python::api::object,boost::python::api::object)

rdkit.DataStructs.cDataStructs.BulkAllBitSimilarity((ExplicitBitVect)v1, (AtomPairsParameters)v2[, (bool)returnDistance=0]) list :
C++ signature :

boost::python::list BulkAllBitSimilarity(ExplicitBitVect const*,boost::python::api::object [,bool=0])

BulkAllBitSimilarity( (ExplicitBitVect)v1, (AtomPairsParameters)v2 [, (bool)returnDistance=0]) -> list :

(B(bv1) - B(bv1^bv2)) / B(bv1)

C++ signature :

boost::python::list BulkAllBitSimilarity(ExplicitBitVect const*,boost::python::api::object [,bool=0])

rdkit.DataStructs.cDataStructs.BulkAsymmetricSimilarity((SparseBitVect)bv1, (AtomPairsParameters)bvList[, (bool)returnDistance=0]) list :
C++ signature :

boost::python::list BulkAsymmetricSimilarity(SparseBitVect const*,boost::python::api::object [,bool=0])

BulkAsymmetricSimilarity( (ExplicitBitVect)bv1, (AtomPairsParameters)bvList [, (bool)returnDistance=0]) -> list :

B(bv1&bv2) / min(B(bv1),B(bv2))

C++ signature :

boost::python::list BulkAsymmetricSimilarity(ExplicitBitVect const*,boost::python::api::object [,bool=0])

rdkit.DataStructs.cDataStructs.BulkBraunBlanquetSimilarity((SparseBitVect)bv1, (AtomPairsParameters)bvList[, (bool)returnDistance=0]) list :
C++ signature :

boost::python::list BulkBraunBlanquetSimilarity(SparseBitVect const*,boost::python::api::object [,bool=0])

BulkBraunBlanquetSimilarity( (ExplicitBitVect)bv1, (AtomPairsParameters)bvList [, (bool)returnDistance=0]) -> list :

B(bv1&bv2) / max(B(bv1),B(bv2))

C++ signature :

boost::python::list BulkBraunBlanquetSimilarity(ExplicitBitVect const*,boost::python::api::object [,bool=0])

rdkit.DataStructs.cDataStructs.BulkCosineSimilarity((SparseBitVect)bv1, (AtomPairsParameters)bvList[, (bool)returnDistance=0]) list :
C++ signature :

boost::python::list BulkCosineSimilarity(SparseBitVect const*,boost::python::api::object [,bool=0])

BulkCosineSimilarity( (ExplicitBitVect)bv1, (AtomPairsParameters)bvList [, (bool)returnDistance=0]) -> list :

B(bv1&bv2) / sqrt(B(bv1) * B(bv2))

C++ signature :

boost::python::list BulkCosineSimilarity(ExplicitBitVect const*,boost::python::api::object [,bool=0])

rdkit.DataStructs.cDataStructs.BulkDiceSimilarity((SparseBitVect)bv1, (AtomPairsParameters)bvList[, (bool)returnDistance=0]) list :
C++ signature :

boost::python::list BulkDiceSimilarity(SparseBitVect const*,boost::python::api::object [,bool=0])

BulkDiceSimilarity( (ExplicitBitVect)bv1, (AtomPairsParameters)bvList [, (bool)returnDistance=0]) -> list :

2*B(bv1&bv2) / (B(bv1) + B(bv2))

C++ signature :

boost::python::list BulkDiceSimilarity(ExplicitBitVect const*,boost::python::api::object [,bool=0])

BulkDiceSimilarity( (IntSparseIntVect)v1, (list)v2 [, (bool)returnDistance=False]) -> list :

return the Dice similarities between one vector and a sequence of others

C++ signature :

boost::python::list BulkDiceSimilarity(RDKit::SparseIntVect<int>,boost::python::list [,bool=False])

BulkDiceSimilarity( (LongSparseIntVect)v1, (list)v2 [, (bool)returnDistance=False]) -> list :

return the Dice similarities between one vector and a sequence of others

C++ signature :

boost::python::list BulkDiceSimilarity(RDKit::SparseIntVect<long>,boost::python::list [,bool=False])

BulkDiceSimilarity( (UIntSparseIntVect)v1, (list)v2 [, (bool)returnDistance=False]) -> list :

return the Dice similarities between one vector and a sequence of others

C++ signature :

boost::python::list BulkDiceSimilarity(RDKit::SparseIntVect<unsigned int>,boost::python::list [,bool=False])

BulkDiceSimilarity( (ULongSparseIntVect)v1, (list)v2 [, (bool)returnDistance=False]) -> list :

return the Dice similarities between one vector and a sequence of others

C++ signature :

boost::python::list BulkDiceSimilarity(RDKit::SparseIntVect<unsigned long>,boost::python::list [,bool=False])

rdkit.DataStructs.cDataStructs.BulkKulczynskiSimilarity((SparseBitVect)bv1, (AtomPairsParameters)bvList[, (bool)returnDistance=0]) list :
C++ signature :

boost::python::list BulkKulczynskiSimilarity(SparseBitVect const*,boost::python::api::object [,bool=0])

BulkKulczynskiSimilarity( (ExplicitBitVect)bv1, (AtomPairsParameters)bvList [, (bool)returnDistance=0]) -> list :

B(bv1&bv2)*(B(bv1) + B(bv2)) / (2 * B(bv1) * B(bv2))

C++ signature :

boost::python::list BulkKulczynskiSimilarity(ExplicitBitVect const*,boost::python::api::object [,bool=0])

rdkit.DataStructs.cDataStructs.BulkMcConnaugheySimilarity((SparseBitVect)bv1, (AtomPairsParameters)bvList[, (bool)returnDistance=0]) list :
C++ signature :

boost::python::list BulkMcConnaugheySimilarity(SparseBitVect const*,boost::python::api::object [,bool=0])

BulkMcConnaugheySimilarity( (ExplicitBitVect)bv1, (AtomPairsParameters)bvList [, (bool)returnDistance=0]) -> list :

(B(bv1&bv2) * (B(bv1)+B(bv2)) - B(bv1)*B(bv2)) / (B(bv1) * B(bv2))

C++ signature :

boost::python::list BulkMcConnaugheySimilarity(ExplicitBitVect const*,boost::python::api::object [,bool=0])

rdkit.DataStructs.cDataStructs.BulkOnBitSimilarity((ExplicitBitVect)v1, (AtomPairsParameters)v2[, (bool)returnDistance=0]) list :
C++ signature :

boost::python::list BulkOnBitSimilarity(ExplicitBitVect const*,boost::python::api::object [,bool=0])

BulkOnBitSimilarity( (ExplicitBitVect)v1, (AtomPairsParameters)v2 [, (bool)returnDistance=0]) -> list :

B(bv1&bv2) / B(bv1|bv2)

C++ signature :

boost::python::list BulkOnBitSimilarity(ExplicitBitVect const*,boost::python::api::object [,bool=0])

rdkit.DataStructs.cDataStructs.BulkRogotGoldbergSimilarity((SparseBitVect)bv1, (AtomPairsParameters)bvList[, (bool)returnDistance=0]) list :
C++ signature :

boost::python::list BulkRogotGoldbergSimilarity(SparseBitVect const*,boost::python::api::object [,bool=0])

BulkRogotGoldbergSimilarity( (ExplicitBitVect)bv1, (AtomPairsParameters)bvList [, (bool)returnDistance=0]) -> list :

B(bv1&bv2) / B(bv1)

C++ signature :

boost::python::list BulkRogotGoldbergSimilarity(ExplicitBitVect const*,boost::python::api::object [,bool=0])

rdkit.DataStructs.cDataStructs.BulkRusselSimilarity((SparseBitVect)bv1, (AtomPairsParameters)bvList[, (bool)returnDistance=0]) list :
C++ signature :

boost::python::list BulkRusselSimilarity(SparseBitVect const*,boost::python::api::object [,bool=0])

BulkRusselSimilarity( (ExplicitBitVect)bv1, (AtomPairsParameters)bvList [, (bool)returnDistance=0]) -> list :

B(bv1&bv2) / B(bv1)

C++ signature :

boost::python::list BulkRusselSimilarity(ExplicitBitVect const*,boost::python::api::object [,bool=0])

rdkit.DataStructs.cDataStructs.BulkSokalSimilarity((SparseBitVect)bv1, (AtomPairsParameters)bvList[, (bool)returnDistance=0]) list :
C++ signature :

boost::python::list BulkSokalSimilarity(SparseBitVect const*,boost::python::api::object [,bool=0])

BulkSokalSimilarity( (ExplicitBitVect)bv1, (AtomPairsParameters)bvList [, (bool)returnDistance=0]) -> list :

B(bv1&bv2) / (2*B(bv1) + 2*B(bv2) - 3*B(bv1&bv2))

C++ signature :

boost::python::list BulkSokalSimilarity(ExplicitBitVect const*,boost::python::api::object [,bool=0])

rdkit.DataStructs.cDataStructs.BulkTanimotoSimilarity((SparseBitVect)bv1, (AtomPairsParameters)bvList[, (bool)returnDistance=0]) list :
C++ signature :

boost::python::list BulkTanimotoSimilarity(SparseBitVect const*,boost::python::api::object [,bool=0])

BulkTanimotoSimilarity( (ExplicitBitVect)bv1, (AtomPairsParameters)bvList [, (bool)returnDistance=0]) -> list :

B(bv1&bv2) / (B(bv1) + B(bv2) - B(bv1&bv2))

C++ signature :

boost::python::list BulkTanimotoSimilarity(ExplicitBitVect const*,boost::python::api::object [,bool=0])

BulkTanimotoSimilarity( (IntSparseIntVect)v1, (list)v2 [, (bool)returnDistance=False]) -> list :

return the Tanimoto similarities between one vector and a sequence of others

C++ signature :

boost::python::list BulkTanimotoSimilarity(RDKit::SparseIntVect<int>,boost::python::list [,bool=False])

BulkTanimotoSimilarity( (LongSparseIntVect)v1, (list)v2 [, (bool)returnDistance=False]) -> list :

return the Tanimoto similarities between one vector and a sequence of others

C++ signature :

boost::python::list BulkTanimotoSimilarity(RDKit::SparseIntVect<long>,boost::python::list [,bool=False])

BulkTanimotoSimilarity( (UIntSparseIntVect)v1, (list)v2 [, (bool)returnDistance=False]) -> list :

return the Tanimoto similarities between one vector and a sequence of others

C++ signature :

boost::python::list BulkTanimotoSimilarity(RDKit::SparseIntVect<unsigned int>,boost::python::list [,bool=False])

BulkTanimotoSimilarity( (ULongSparseIntVect)v1, (list)v2 [, (bool)returnDistance=False]) -> list :

return the Tanimoto similarities between one vector and a sequence of others

C++ signature :

boost::python::list BulkTanimotoSimilarity(RDKit::SparseIntVect<unsigned long>,boost::python::list [,bool=False])

rdkit.DataStructs.cDataStructs.BulkTverskySimilarity((SparseBitVect)bv1, (AtomPairsParameters)bvList, (float)a, (float)b[, (bool)returnDistance=0]) list :
C++ signature :

boost::python::list BulkTverskySimilarity(SparseBitVect const*,boost::python::api::object,double,double [,bool=0])

BulkTverskySimilarity( (ExplicitBitVect)bv1, (AtomPairsParameters)bvList, (float)a, (float)b [, (bool)returnDistance=0]) -> list :

B(bv1&bv2) / (a*B(bv1)+b*B(bv2)+(1-a-b)*B(bv1&bv2)

C++ signature :

boost::python::list BulkTverskySimilarity(ExplicitBitVect const*,boost::python::api::object,double,double [,bool=0])

BulkTverskySimilarity( (IntSparseIntVect)v1, (list)v2, (float)a, (float)b [, (bool)returnDistance=False]) -> list :

return the Tversky similarities between one vector and a sequence of others

C++ signature :

boost::python::list BulkTverskySimilarity(RDKit::SparseIntVect<int>,boost::python::list,double,double [,bool=False])

BulkTverskySimilarity( (LongSparseIntVect)v1, (list)v2, (float)a, (float)b [, (bool)returnDistance=False]) -> list :

return the Tversky similarities between one vector and a sequence of others

C++ signature :

boost::python::list BulkTverskySimilarity(RDKit::SparseIntVect<long>,boost::python::list,double,double [,bool=False])

BulkTverskySimilarity( (UIntSparseIntVect)v1, (list)v2, (float)a, (float)b [, (bool)returnDistance=False]) -> list :

return the Tversky similarities between one vector and a sequence of others

C++ signature :

boost::python::list BulkTverskySimilarity(RDKit::SparseIntVect<unsigned int>,boost::python::list,double,double [,bool=False])

BulkTverskySimilarity( (ULongSparseIntVect)v1, (list)v2, (float)a, (float)b [, (bool)returnDistance=False]) -> list :

return the Tversky similarities between one vector and a sequence of others

C++ signature :

boost::python::list BulkTverskySimilarity(RDKit::SparseIntVect<unsigned long>,boost::python::list,double,double [,bool=False])

rdkit.DataStructs.cDataStructs.ComputeL1Norm((DiscreteValueVect)v1, (DiscreteValueVect)v2) int :

Compute the distance between two discrete vector values

C++ signature :

unsigned int ComputeL1Norm(RDKit::DiscreteValueVect,RDKit::DiscreteValueVect)

rdkit.DataStructs.cDataStructs.ConvertToExplicit((SparseBitVect)sbv) ExplicitBitVect :

Converts a SparseBitVector to an ExplicitBitVector and returns the ExplicitBitVector

C++ signature :

ExplicitBitVect* ConvertToExplicit(SparseBitVect const*)

rdkit.DataStructs.cDataStructs.ConvertToNumpyArray((ExplicitBitVect)bv, (AtomPairsParameters)destArray) None :
C++ signature :

void ConvertToNumpyArray(ExplicitBitVect,boost::python::api::object)

ConvertToNumpyArray( (DiscreteValueVect)bv, (AtomPairsParameters)destArray) -> None :

C++ signature :

void ConvertToNumpyArray(RDKit::DiscreteValueVect,boost::python::api::object)

ConvertToNumpyArray( (IntSparseIntVect)bv, (AtomPairsParameters)destArray) -> None :

C++ signature :

void ConvertToNumpyArray(RDKit::SparseIntVect<int>,boost::python::api::object)

ConvertToNumpyArray( (LongSparseIntVect)bv, (AtomPairsParameters)destArray) -> None :

C++ signature :

void ConvertToNumpyArray(RDKit::SparseIntVect<long>,boost::python::api::object)

ConvertToNumpyArray( (UIntSparseIntVect)bv, (AtomPairsParameters)destArray) -> None :

C++ signature :

void ConvertToNumpyArray(RDKit::SparseIntVect<unsigned int>,boost::python::api::object)

ConvertToNumpyArray( (ULongSparseIntVect)bv, (AtomPairsParameters)destArray) -> None :

C++ signature :

void ConvertToNumpyArray(RDKit::SparseIntVect<unsigned long>,boost::python::api::object)

rdkit.DataStructs.cDataStructs.CosineSimilarity((SparseBitVect)bv1, (SparseBitVect)bv2[, (bool)returnDistance=0]) float :
C++ signature :

double CosineSimilarity(SparseBitVect,SparseBitVect [,bool=0])

CosineSimilarity( (ExplicitBitVect)bv1, (ExplicitBitVect)bv2 [, (bool)returnDistance=0]) -> float :

B(bv1&bv2) / sqrt(B(bv1) * B(bv2))

C++ signature :

double CosineSimilarity(ExplicitBitVect,ExplicitBitVect [,bool=0])

CosineSimilarity( (SparseBitVect)bv1, (str)pkl [, (bool)returnDistance=0]) -> float :

C++ signature :

double CosineSimilarity(SparseBitVect,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > [,bool=0])

CosineSimilarity( (ExplicitBitVect)bv1, (str)pkl [, (bool)returnDistance=0]) -> float :

B(bv1&bv2) / sqrt(B(bv1) * B(bv2))

C++ signature :

double CosineSimilarity(ExplicitBitVect,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > [,bool=0])

rdkit.DataStructs.cDataStructs.CosineSimilarityNeighbors((AtomPairsParameters)bvqueries, (AtomPairsParameters)bvList) list :

B(bv1&bv2) / sqrt(B(bv1) * B(bv2))

C++ signature :

boost::python::list CosineSimilarityNeighbors(boost::python::api::object,boost::python::api::object)

rdkit.DataStructs.cDataStructs.CosineSimilarityNeighbors_sparse((AtomPairsParameters)bvqueries, (AtomPairsParameters)bvList) list :

B(bv1&bv2) / sqrt(B(bv1) * B(bv2))

C++ signature :

boost::python::list CosineSimilarityNeighbors_sparse(boost::python::api::object,boost::python::api::object)

rdkit.DataStructs.cDataStructs.CreateFromBinaryText((str)fps) ExplicitBitVect :

Creates an ExplicitBitVect from a binary string (byte array).

C++ signature :

ExplicitBitVect* CreateFromBinaryText(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)

rdkit.DataStructs.cDataStructs.CreateFromBitString((str)bits) ExplicitBitVect :

Creates an ExplicitBitVect from a bit string (string of 0s and 1s).

C++ signature :

ExplicitBitVect* CreateFromBitString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)

rdkit.DataStructs.cDataStructs.CreateFromFPSText((str)fps) ExplicitBitVect :

Creates an ExplicitBitVect from an FPS string.

C++ signature :

ExplicitBitVect* CreateFromFPSText(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)

rdkit.DataStructs.cDataStructs.DiceSimilarity((SparseBitVect)bv1, (SparseBitVect)bv2[, (bool)returnDistance=0]) float :
C++ signature :

double DiceSimilarity(SparseBitVect,SparseBitVect [,bool=0])

DiceSimilarity( (ExplicitBitVect)bv1, (ExplicitBitVect)bv2 [, (bool)returnDistance=0]) -> float :

2*B(bv1&bv2) / (B(bv1) + B(bv2))

C++ signature :

double DiceSimilarity(ExplicitBitVect,ExplicitBitVect [,bool=0])

DiceSimilarity( (SparseBitVect)bv1, (str)pkl [, (bool)returnDistance=0]) -> float :

C++ signature :

double DiceSimilarity(SparseBitVect,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > [,bool=0])

DiceSimilarity( (ExplicitBitVect)bv1, (str)pkl [, (bool)returnDistance=0]) -> float :

2*B(bv1&bv2) / (B(bv1) + B(bv2))

C++ signature :

double DiceSimilarity(ExplicitBitVect,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > [,bool=0])

DiceSimilarity( (IntSparseIntVect)siv1, (IntSparseIntVect)siv2 [, (bool)returnDistance=False [, (float)bounds=0.0]]) -> float :

return the Dice similarity between two vectors

C++ signature :

double DiceSimilarity(RDKit::SparseIntVect<int>,RDKit::SparseIntVect<int> [,bool=False [,double=0.0]])

DiceSimilarity( (LongSparseIntVect)siv1, (LongSparseIntVect)siv2 [, (bool)returnDistance=False [, (float)bounds=0.0]]) -> float :

return the Dice similarity between two vectors

C++ signature :

double DiceSimilarity(RDKit::SparseIntVect<long>,RDKit::SparseIntVect<long> [,bool=False [,double=0.0]])

DiceSimilarity( (UIntSparseIntVect)siv1, (UIntSparseIntVect)siv2 [, (bool)returnDistance=False [, (float)bounds=0.0]]) -> float :

return the Dice similarity between two vectors

C++ signature :

double DiceSimilarity(RDKit::SparseIntVect<unsigned int>,RDKit::SparseIntVect<unsigned int> [,bool=False [,double=0.0]])

DiceSimilarity( (ULongSparseIntVect)siv1, (ULongSparseIntVect)siv2 [, (bool)returnDistance=False [, (float)bounds=0.0]]) -> float :

return the Dice similarity between two vectors

C++ signature :

double DiceSimilarity(RDKit::SparseIntVect<unsigned long>,RDKit::SparseIntVect<unsigned long> [,bool=False [,double=0.0]])

rdkit.DataStructs.cDataStructs.DiceSimilarityNeighbors((AtomPairsParameters)bvqueries, (AtomPairsParameters)bvList) list :

2*B(bv1&bv2) / (B(bv1) + B(bv2))

C++ signature :

boost::python::list DiceSimilarityNeighbors(boost::python::api::object,boost::python::api::object)

rdkit.DataStructs.cDataStructs.DiceSimilarityNeighbors_sparse((AtomPairsParameters)bvqueries, (AtomPairsParameters)bvList) list :

2*B(bv1&bv2) / (B(bv1) + B(bv2))

C++ signature :

boost::python::list DiceSimilarityNeighbors_sparse(boost::python::api::object,boost::python::api::object)

class rdkit.DataStructs.cDataStructs.DiscreteValueType

Bases: enum

EIGHTBITVALUE = rdkit.DataStructs.cDataStructs.DiscreteValueType.EIGHTBITVALUE
FOURBITVALUE = rdkit.DataStructs.cDataStructs.DiscreteValueType.FOURBITVALUE
ONEBITVALUE = rdkit.DataStructs.cDataStructs.DiscreteValueType.ONEBITVALUE
SIXTEENBITVALUE = rdkit.DataStructs.cDataStructs.DiscreteValueType.SIXTEENBITVALUE
TWOBITVALUE = rdkit.DataStructs.cDataStructs.DiscreteValueType.TWOBITVALUE
names = {'EIGHTBITVALUE': rdkit.DataStructs.cDataStructs.DiscreteValueType.EIGHTBITVALUE, 'FOURBITVALUE': rdkit.DataStructs.cDataStructs.DiscreteValueType.FOURBITVALUE, 'ONEBITVALUE': rdkit.DataStructs.cDataStructs.DiscreteValueType.ONEBITVALUE, 'SIXTEENBITVALUE': rdkit.DataStructs.cDataStructs.DiscreteValueType.SIXTEENBITVALUE, 'TWOBITVALUE': rdkit.DataStructs.cDataStructs.DiscreteValueType.TWOBITVALUE}
values = {0: rdkit.DataStructs.cDataStructs.DiscreteValueType.ONEBITVALUE, 1: rdkit.DataStructs.cDataStructs.DiscreteValueType.TWOBITVALUE, 2: rdkit.DataStructs.cDataStructs.DiscreteValueType.FOURBITVALUE, 3: rdkit.DataStructs.cDataStructs.DiscreteValueType.EIGHTBITVALUE, 4: rdkit.DataStructs.cDataStructs.DiscreteValueType.SIXTEENBITVALUE}
class rdkit.DataStructs.cDataStructs.DiscreteValueVect((object)self, (DiscreteValueType)valType, (int)length)

Bases: instance

A container class for storing unsigned integer values within a particular range.

The length of the vector and type of its elements (determines the maximum value that can be stored) are both set at construction time.

As you would expect, _DiscreteValueVects_ support a set of binary operations so you can do things like:

dvv3 = dvv1 & dvv2 the result contains the smallest value in each entry dvv3 = dvv1 | dvv2 the result contains the largest value in each entry dvv1 += dvv2 values are truncated when necessary dvv3 = dvv1 + dvv2 values are truncated when necessary dvv1 -= dvv3 would-be negative values are set to zero dvv3 = dvv1 - dvv2 would-be negative values are set to zero

Elements can be set and read using indexing (i.e. bv[i] = 4 or val=bv[i])

Constructor

C++ signature :

void __init__(_object*,RDKit::DiscreteValueVect::DiscreteValueType,unsigned int)

__init__( (object)self, (str)pkl) -> None :

C++ signature :

void __init__(_object*,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)

GetTotalVal((DiscreteValueVect)self) int :

Get the sum of the values in the vector, basically L1 norm

C++ signature :

unsigned int GetTotalVal(RDKit::DiscreteValueVect {lvalue})

GetValueType((DiscreteValueVect)self) DiscreteValueType :

Get the type of value stored in the vector

C++ signature :

RDKit::DiscreteValueVect::DiscreteValueType GetValueType(RDKit::DiscreteValueVect {lvalue})

class rdkit.DataStructs.cDataStructs.ExplicitBitVect((object)self, (int)size)

Bases: instance

A class to store explicit bit vectors.

This class is most useful for situations where the size of the vector is relatively small (tens of thousands or smaller).

For larger vectors, use the _SparseBitVect_ class instead.

As you would expect, _ExplicitBitVects_ support a set of binary operations so you can do things like:

bv3 = bv1 & bv2 (bitwise and) bv3 = bv1 | bv2 (bitwise or) bv3 = bv1 ^ bv2 (bitwise xor) bv3 = ~bv1 (bitwise negation)

Bits can be set and read using either the Set/UnsetBit() and GetBit() methods or by indexing (i.e. bv[i] = 1 or if bv[i]).

C++ signature :

void __init__(_object*,unsigned int)

__init__( (object)self, (str)pkl) -> None :

C++ signature :

void __init__(_object*,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)

__init__( (object)self, (int)size, (bool)bitsSet) -> None :

C++ signature :

void __init__(_object*,unsigned int,bool)

FromBase64((ExplicitBitVect)self, (str)inD) None :

Initializes the vector from a base64 encoded binary string.

C++ signature :

void FromBase64(ExplicitBitVect {lvalue},std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)

GetBit((ExplicitBitVect)self, (int)which) bool :

Returns the value of a bit.

C++ signature :

bool GetBit(ExplicitBitVect {lvalue},unsigned int)

GetNumBits((ExplicitBitVect)self) int :

Returns the number of bits in the vector (the vector’s size).

C++ signature :

unsigned int GetNumBits(ExplicitBitVect {lvalue})

GetNumOffBits((ExplicitBitVect)self) int :

Returns the number of off bits.

C++ signature :

unsigned int GetNumOffBits(ExplicitBitVect {lvalue})

GetNumOnBits((ExplicitBitVect)self) int :

Returns the number of on bits.

C++ signature :

unsigned int GetNumOnBits(ExplicitBitVect {lvalue})

GetOnBits((ExplicitBitVect)self) _vecti :

Returns a tuple containing IDs of the on bits.

C++ signature :

std::vector<int, std::allocator<int> > GetOnBits(ExplicitBitVect)

SetBit((ExplicitBitVect)self, (int)which) bool :

Turns on a particular bit. Returns the original state of the bit.

C++ signature :

bool SetBit(ExplicitBitVect {lvalue},unsigned int)

SetBitsFromList((ExplicitBitVect)self, (AtomPairsParameters)onBitList) None :

Turns on a set of bits. The argument should be a tuple or list of bit ids.

C++ signature :

void SetBitsFromList(ExplicitBitVect*,boost::python::api::object)

ToBase64((ExplicitBitVect)self) str :

Converts the vector to a base64 string (the base64 encoded version of the results of ToString()).

C++ signature :

std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > ToBase64(ExplicitBitVect {lvalue})

ToBinary((ExplicitBitVect)self) object :

Returns an internal binary representation of the vector.

C++ signature :

boost::python::api::object ToBinary(ExplicitBitVect)

ToBitString()

BitVectToText( (SparseBitVect)bv1) -> str :

C++ signature :

std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > BitVectToText(SparseBitVect)

BitVectToText( (ExplicitBitVect)bv1) -> str :

Returns a string of zeros and ones representing the bit vector.

C++ signature :

std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > BitVectToText(ExplicitBitVect)

ToList((ExplicitBitVect)self) list :

Return the Bitvector as a python list (faster than list(vect))

C++ signature :

boost::python::list ToList(ExplicitBitVect)

UnSetBit((ExplicitBitVect)self, (int)which) bool :

Turns off a particular bit. Returns the original state of the bit.

C++ signature :

bool UnSetBit(ExplicitBitVect {lvalue},unsigned int)

UnSetBitsFromList((ExplicitBitVect)self, (AtomPairsParameters)offBitList) None :

Turns off a set of bits. The argument should be a tuple or list of bit ids.

C++ signature :

void UnSetBitsFromList(ExplicitBitVect*,boost::python::api::object)

class rdkit.DataStructs.cDataStructs.FPBReader((object)self, (str)filename[, (bool)lazy=False])

Bases: instance

A class for reading and searching FPB files from Andrew Dalke’s chemfp. Note that this functionality is still experimental and the API may change in future releases.

docstring

C++ signature :

void __init__(_object*,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > [,bool=False])

GetBytes((FPBReader)self, (int)which) object :

returns a particular fingerprint as bytes

C++ signature :

boost::python::api::object GetBytes(RDKit::FPBReader const*,unsigned int)

GetContainingNeighbors((FPBReader)self, (str)bv) tuple :

returns indices of neighbors that contain this fingerprint (where all bits from this fingerprint are also set)

C++ signature :

boost::python::tuple GetContainingNeighbors(RDKit::FPBReader const*,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)

GetFP((FPBReader)self, (int)idx) ExplicitBitVect :

returns a particular fingerprint as an ExplicitBitVect

C++ signature :

boost::shared_ptr<ExplicitBitVect> GetFP(RDKit::FPBReader {lvalue},unsigned int)

GetId((FPBReader)self, (int)idx) str :

returns the id of a particular fingerprint

C++ signature :

std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > GetId(RDKit::FPBReader {lvalue},unsigned int)

GetNumBits((FPBReader)self) int :

returns the number of bits in a fingerprint

C++ signature :

unsigned int GetNumBits(RDKit::FPBReader {lvalue})

GetTanimoto((FPBReader)self, (int)which, (str)bytes) float :

return the tanimoto similarity of a particular fingerprint to the bytes provided

C++ signature :

double GetTanimoto(RDKit::FPBReader const*,unsigned int,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)

GetTanimotoNeighbors((FPBReader)self, (str)bv[, (float)threshold=0.7]) tuple :

returns tanimoto similarities to and indices of all neighbors above the specified threshold

C++ signature :

boost::python::tuple GetTanimotoNeighbors(RDKit::FPBReader const*,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > [,double=0.7])

GetTversky((FPBReader)self, (int)which, (str)bytes, (float)ca, (float)cb) float :

return the Tverksy similarity of a particular fingerprint to the bytes provided

C++ signature :

double GetTversky(RDKit::FPBReader const*,unsigned int,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >,double,double)

GetTverskyNeighbors((FPBReader)self, (str)bv, (float)ca, (float)cb[, (float)threshold=0.7]) tuple :

returns Tversky similarities to and indices of all neighbors above the specified threshold

C++ signature :

boost::python::tuple GetTverskyNeighbors(RDKit::FPBReader const*,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >,double,double [,double=0.7])

Init((FPBReader)self) None :

Read the fingerprints from the file. This can take a while.

C++ signature :

void Init(RDKit::FPBReader {lvalue})

rdkit.DataStructs.cDataStructs.FoldFingerprint((SparseBitVect)bv[, (int)foldFactor=2]) SparseBitVect :
C++ signature :

SparseBitVect* FoldFingerprint(SparseBitVect [,unsigned int=2])

FoldFingerprint( (ExplicitBitVect)bv [, (int)foldFactor=2]) -> ExplicitBitVect :

Folds the fingerprint by the provided amount. The default, foldFactor=2, returns a fingerprint that is half the size of the original.

C++ signature :

ExplicitBitVect* FoldFingerprint(ExplicitBitVect [,unsigned int=2])

rdkit.DataStructs.cDataStructs.InitFromDaylightString((SparseBitVect)sbv, (str)s) None :
C++ signature :

void InitFromDaylightString(SparseBitVect {lvalue},std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)

InitFromDaylightString( (ExplicitBitVect)sbv, (str)s) -> None :

Fill a BitVect using an ASCII (Daylight) encoding of a fingerprint.

Arguments
  • bv: either a _SparseBitVect_ or an _ExplicitBitVect_

  • txt: a string with the Daylight encoding (this is the text that

    the Daylight tools put in the FP field of a TDT)

C++ signature :

void InitFromDaylightString(ExplicitBitVect {lvalue},std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)

class rdkit.DataStructs.cDataStructs.IntSparseIntVect((object)arg1, (int)arg2)

Bases: instance

A container class for storing integer values within a particular range.

The length of the vector is set at construction time.

As you would expect, _SparseIntVects_ support a set of binary operations so you can do things like:

Arithmetic: siv1 += siv2 siv3 = siv1 + siv2 siv1 -= siv3 siv3 = siv1 - siv2 “Fuzzy” binary operations: siv3 = siv1 & siv2 the result contains the smallest value in each entry siv3 = siv1 | siv2 the result contains the largest value in each entry

Elements can be set and read using indexing (i.e. siv[i] = 4 or val=siv[i])

Constructor

C++ signature :

void __init__(_object*,int)

__init__( (object)self, (str)pkl) -> None :

C++ signature :

void __init__(_object*,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)

GetLength((IntSparseIntVect)self) int :

Returns the length of the vector

C++ signature :

int GetLength(RDKit::SparseIntVect<int> {lvalue})

GetNonzeroElements((IntSparseIntVect)self) dict :

returns a dictionary of the nonzero elements

C++ signature :

boost::python::dict GetNonzeroElements(RDKit::SparseIntVect<int> {lvalue})

GetTotalVal((IntSparseIntVect)self[, (bool)useAbs=False]) int :

Get the sum of the values in the vector, basically L1 norm

C++ signature :

int GetTotalVal(RDKit::SparseIntVect<int> {lvalue} [,bool=False])

ToBinary((IntSparseIntVect)self) object :

returns a binary (pickle) representation of the vector

C++ signature :

boost::python::api::object ToBinary(RDKit::SparseIntVect<int>)

ToList((IntSparseIntVect)self) list :

Return the SparseIntVect as a python list

C++ signature :

boost::python::list ToList(RDKit::SparseIntVect<int> {lvalue})

UpdateFromSequence((IntSparseIntVect)self, (AtomPairsParameters)seq) None :

update the vector based on the values in the list or tuple

C++ signature :

void UpdateFromSequence(RDKit::SparseIntVect<int> {lvalue},boost::python::api::object {lvalue})

rdkit.DataStructs.cDataStructs.KulczynskiSimilarity((SparseBitVect)bv1, (SparseBitVect)bv2[, (bool)returnDistance=0]) float :
C++ signature :

double KulczynskiSimilarity(SparseBitVect,SparseBitVect [,bool=0])

KulczynskiSimilarity( (ExplicitBitVect)bv1, (ExplicitBitVect)bv2 [, (bool)returnDistance=0]) -> float :

B(bv1&bv2)*(B(bv1) + B(bv2)) / (2 * B(bv1) * B(bv2))

C++ signature :

double KulczynskiSimilarity(ExplicitBitVect,ExplicitBitVect [,bool=0])

KulczynskiSimilarity( (SparseBitVect)bv1, (str)pkl [, (bool)returnDistance=0]) -> float :

C++ signature :

double KulczynskiSimilarity(SparseBitVect,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > [,bool=0])

KulczynskiSimilarity( (ExplicitBitVect)bv1, (str)pkl [, (bool)returnDistance=0]) -> float :

B(bv1&bv2)*(B(bv1) + B(bv2)) / (2 * B(bv1) * B(bv2))

C++ signature :

double KulczynskiSimilarity(ExplicitBitVect,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > [,bool=0])

rdkit.DataStructs.cDataStructs.KulczynskiSimilarityNeighbors((AtomPairsParameters)bvqueries, (AtomPairsParameters)bvList) list :

B(bv1&bv2)*(B(bv1) + B(bv2)) / (2 * B(bv1) * B(bv2))

C++ signature :

boost::python::list KulczynskiSimilarityNeighbors(boost::python::api::object,boost::python::api::object)

rdkit.DataStructs.cDataStructs.KulczynskiSimilarityNeighbors_sparse((AtomPairsParameters)bvqueries, (AtomPairsParameters)bvList) list :

B(bv1&bv2)*(B(bv1) + B(bv2)) / (2 * B(bv1) * B(bv2))

C++ signature :

boost::python::list KulczynskiSimilarityNeighbors_sparse(boost::python::api::object,boost::python::api::object)

class rdkit.DataStructs.cDataStructs.LongSparseIntVect((object)arg1, (int)arg2)

Bases: instance

A container class for storing integer values within a particular range.

The length of the vector is set at construction time.

As you would expect, _SparseIntVects_ support a set of binary operations so you can do things like:

Arithmetic: siv1 += siv2 siv3 = siv1 + siv2 siv1 -= siv3 siv3 = siv1 - siv2 “Fuzzy” binary operations: siv3 = siv1 & siv2 the result contains the smallest value in each entry siv3 = siv1 | siv2 the result contains the largest value in each entry

Elements can be set and read using indexing (i.e. siv[i] = 4 or val=siv[i])

Constructor

C++ signature :

void __init__(_object*,long)

__init__( (object)self, (str)pkl) -> None :

C++ signature :

void __init__(_object*,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)

GetLength((LongSparseIntVect)self) int :

Returns the length of the vector

C++ signature :

long GetLength(RDKit::SparseIntVect<long> {lvalue})

GetNonzeroElements((LongSparseIntVect)self) dict :

returns a dictionary of the nonzero elements

C++ signature :

boost::python::dict GetNonzeroElements(RDKit::SparseIntVect<long> {lvalue})

GetTotalVal((LongSparseIntVect)self[, (bool)useAbs=False]) int :

Get the sum of the values in the vector, basically L1 norm

C++ signature :

int GetTotalVal(RDKit::SparseIntVect<long> {lvalue} [,bool=False])

ToBinary((LongSparseIntVect)self) object :

returns a binary (pickle) representation of the vector

C++ signature :

boost::python::api::object ToBinary(RDKit::SparseIntVect<long>)

ToList((LongSparseIntVect)self) list :

Return the SparseIntVect as a python list

C++ signature :

boost::python::list ToList(RDKit::SparseIntVect<long> {lvalue})

UpdateFromSequence((LongSparseIntVect)self, (AtomPairsParameters)seq) None :

update the vector based on the values in the list or tuple

C++ signature :

void UpdateFromSequence(RDKit::SparseIntVect<long> {lvalue},boost::python::api::object {lvalue})

rdkit.DataStructs.cDataStructs.McConnaugheySimilarity((SparseBitVect)bv1, (SparseBitVect)bv2[, (bool)returnDistance=0]) float :
C++ signature :

double McConnaugheySimilarity(SparseBitVect,SparseBitVect [,bool=0])

McConnaugheySimilarity( (ExplicitBitVect)bv1, (ExplicitBitVect)bv2 [, (bool)returnDistance=0]) -> float :

(B(bv1&bv2) * (B(bv1)+B(bv2)) - B(bv1)*B(bv2)) / (B(bv1) * B(bv2))

C++ signature :

double McConnaugheySimilarity(ExplicitBitVect,ExplicitBitVect [,bool=0])

McConnaugheySimilarity( (SparseBitVect)bv1, (str)pkl [, (bool)returnDistance=0]) -> float :

C++ signature :

double McConnaugheySimilarity(SparseBitVect,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > [,bool=0])

McConnaugheySimilarity( (ExplicitBitVect)bv1, (str)pkl [, (bool)returnDistance=0]) -> float :

(B(bv1&bv2) * (B(bv1)+B(bv2)) - B(bv1)*B(bv2)) / (B(bv1) * B(bv2))

C++ signature :

double McConnaugheySimilarity(ExplicitBitVect,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > [,bool=0])

rdkit.DataStructs.cDataStructs.McConnaugheySimilarityNeighbors((AtomPairsParameters)bvqueries, (AtomPairsParameters)bvList) list :

(B(bv1&bv2) * (B(bv1)+B(bv2)) - B(bv1)*B(bv2)) / (B(bv1) * B(bv2))

C++ signature :

boost::python::list McConnaugheySimilarityNeighbors(boost::python::api::object,boost::python::api::object)

rdkit.DataStructs.cDataStructs.McConnaugheySimilarityNeighbors_sparse((AtomPairsParameters)bvqueries, (AtomPairsParameters)bvList) list :

(B(bv1&bv2) * (B(bv1)+B(bv2)) - B(bv1)*B(bv2)) / (B(bv1) * B(bv2))

C++ signature :

boost::python::list McConnaugheySimilarityNeighbors_sparse(boost::python::api::object,boost::python::api::object)

class rdkit.DataStructs.cDataStructs.MultiFPBReader((object)self[, (bool)initOnSearch=False])

Bases: instance

A class for reading and searching multiple FPB files from Andrew Dalke’s chemfp. Note that this functionality is still experimental and the API may change in future releases.

docstring

C++ signature :

void __init__(_object* [,bool=False])

AddReader((MultiFPBReader)self, (FPBReader)rdr) int :

adds an FPBReader to our set of readers

C++ signature :

unsigned int AddReader(RDKit::MultiFPBReader {lvalue},RDKit::FPBReader*)

GetContainingNeighbors((MultiFPBReader)self, (str)bv[, (int)numThreads=1]) tuple :

returns indices of neighbors that contain this fingerprint (where all bits from this fingerprint are also set)

C++ signature :

boost::python::tuple GetContainingNeighbors(RDKit::MultiFPBReader const*,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > [,unsigned int=1])

GetNumBits((MultiFPBReader)self) int :

returns the number of bits in a fingerprint

C++ signature :

unsigned int GetNumBits(RDKit::MultiFPBReader {lvalue})

GetReader((MultiFPBReader)self, (int)which) FPBReader :

returns one of our readers

C++ signature :

RDKit::FPBReader* GetReader(RDKit::MultiFPBReader {lvalue},unsigned int)

GetTanimotoNeighbors((MultiFPBReader)self, (str)bv[, (float)threshold=0.7[, (int)numThreads=1]]) tuple :

returns tanimoto similarities to and indices of all neighbors above the specified threshold

C++ signature :

boost::python::tuple GetTanimotoNeighbors(RDKit::MultiFPBReader const*,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > [,double=0.7 [,unsigned int=1]])

GetTverskyNeighbors((MultiFPBReader)self, (str)bv, (float)ca, (float)cb[, (float)threshold=0.7[, (int)numThreads=1]]) tuple :

returns Tversky similarities to and indices of all neighbors above the specified threshold

C++ signature :

boost::python::tuple GetTverskyNeighbors(RDKit::MultiFPBReader const*,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >,double,double [,double=0.7 [,unsigned int=1]])

Init((MultiFPBReader)self) None :

Call Init() on each of our children. This can take a while.

C++ signature :

void Init(RDKit::MultiFPBReader {lvalue})

rdkit.DataStructs.cDataStructs.NumBitsInCommon((SparseBitVect)bv1, (SparseBitVect)bv2) int :
C++ signature :

int NumBitsInCommon(SparseBitVect,SparseBitVect)

NumBitsInCommon( (ExplicitBitVect)bv1, (ExplicitBitVect)bv2) -> int :

Returns the total number of bits in common between the two bit vectors

C++ signature :

int NumBitsInCommon(ExplicitBitVect,ExplicitBitVect)

rdkit.DataStructs.cDataStructs.OffBitProjSimilarity((SparseBitVect)bv1, (SparseBitVect)bv2) _vectd :
C++ signature :

std::vector<double, std::allocator<double> > OffBitProjSimilarity(SparseBitVect,SparseBitVect)

OffBitProjSimilarity( (ExplicitBitVect)bv1, (ExplicitBitVect)bv2) -> _vectd :

C++ signature :

std::vector<double, std::allocator<double> > OffBitProjSimilarity(ExplicitBitVect,ExplicitBitVect)

rdkit.DataStructs.cDataStructs.OffBitsInCommon((SparseBitVect)bv1, (SparseBitVect)bv2) _vecti :
C++ signature :

std::vector<int, std::allocator<int> > OffBitsInCommon(SparseBitVect,SparseBitVect)

OffBitsInCommon( (ExplicitBitVect)bv1, (ExplicitBitVect)bv2) -> _vecti :

Returns the number of off bits in common between the two bit vectors

C++ signature :

std::vector<int, std::allocator<int> > OffBitsInCommon(ExplicitBitVect,ExplicitBitVect)

rdkit.DataStructs.cDataStructs.OnBitProjSimilarity((SparseBitVect)bv1, (SparseBitVect)bv2) _vectd :
C++ signature :

std::vector<double, std::allocator<double> > OnBitProjSimilarity(SparseBitVect,SparseBitVect)

OnBitProjSimilarity( (ExplicitBitVect)bv1, (ExplicitBitVect)bv2) -> _vectd :

Returns a 2-tuple: (B(bv1&bv2) / B(bv1), B(bv1&bv2) / B(bv2))

C++ signature :

std::vector<double, std::allocator<double> > OnBitProjSimilarity(ExplicitBitVect,ExplicitBitVect)

rdkit.DataStructs.cDataStructs.OnBitSimilarity((SparseBitVect)v1, (SparseBitVect)v2) float :
C++ signature :

double OnBitSimilarity(SparseBitVect,SparseBitVect)

OnBitSimilarity( (ExplicitBitVect)v1, (ExplicitBitVect)v2) -> float :

B(bv1&bv2) / B(bv1|bv2)

C++ signature :

double OnBitSimilarity(ExplicitBitVect,ExplicitBitVect)

rdkit.DataStructs.cDataStructs.OnBitsInCommon((SparseBitVect)bv1, (SparseBitVect)bv2) _vecti :
C++ signature :

std::vector<int, std::allocator<int> > OnBitsInCommon(SparseBitVect,SparseBitVect)

OnBitsInCommon( (ExplicitBitVect)bv1, (ExplicitBitVect)bv2) -> _vecti :

Returns the number of on bits in common between the two bit vectors

C++ signature :

std::vector<int, std::allocator<int> > OnBitsInCommon(ExplicitBitVect,ExplicitBitVect)

rdkit.DataStructs.cDataStructs.RogotGoldbergSimilarity((SparseBitVect)bv1, (SparseBitVect)bv2[, (bool)returnDistance=0]) float :
C++ signature :

double RogotGoldbergSimilarity(SparseBitVect,SparseBitVect [,bool=0])

RogotGoldbergSimilarity( (ExplicitBitVect)bv1, (ExplicitBitVect)bv2 [, (bool)returnDistance=0]) -> float :

B(bv1&bv2) / B(bv1)

C++ signature :

double RogotGoldbergSimilarity(ExplicitBitVect,ExplicitBitVect [,bool=0])

RogotGoldbergSimilarity( (SparseBitVect)bv1, (str)pkl [, (bool)returnDistance=0]) -> float :

C++ signature :

double RogotGoldbergSimilarity(SparseBitVect,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > [,bool=0])

RogotGoldbergSimilarity( (ExplicitBitVect)bv1, (str)pkl [, (bool)returnDistance=0]) -> float :

B(bv1&bv2) / B(bv1)

C++ signature :

double RogotGoldbergSimilarity(ExplicitBitVect,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > [,bool=0])

rdkit.DataStructs.cDataStructs.RogotGoldbergSimilarityNeighbors((AtomPairsParameters)bvqueries, (AtomPairsParameters)bvList) list :

B(bv1&bv2) / B(bv1)

C++ signature :

boost::python::list RogotGoldbergSimilarityNeighbors(boost::python::api::object,boost::python::api::object)

rdkit.DataStructs.cDataStructs.RogotGoldbergSimilarityNeighbors_sparse((AtomPairsParameters)bvqueries, (AtomPairsParameters)bvList) list :

B(bv1&bv2) / B(bv1)

C++ signature :

boost::python::list RogotGoldbergSimilarityNeighbors_sparse(boost::python::api::object,boost::python::api::object)

rdkit.DataStructs.cDataStructs.RusselSimilarity((SparseBitVect)bv1, (SparseBitVect)bv2[, (bool)returnDistance=0]) float :
C++ signature :

double RusselSimilarity(SparseBitVect,SparseBitVect [,bool=0])

RusselSimilarity( (ExplicitBitVect)bv1, (ExplicitBitVect)bv2 [, (bool)returnDistance=0]) -> float :

B(bv1&bv2) / B(bv1)

C++ signature :

double RusselSimilarity(ExplicitBitVect,ExplicitBitVect [,bool=0])

RusselSimilarity( (SparseBitVect)bv1, (str)pkl [, (bool)returnDistance=0]) -> float :

C++ signature :

double RusselSimilarity(SparseBitVect,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > [,bool=0])

RusselSimilarity( (ExplicitBitVect)bv1, (str)pkl [, (bool)returnDistance=0]) -> float :

B(bv1&bv2) / B(bv1)

C++ signature :

double RusselSimilarity(ExplicitBitVect,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > [,bool=0])

rdkit.DataStructs.cDataStructs.RusselSimilarityNeighbors((AtomPairsParameters)bvqueries, (AtomPairsParameters)bvList) list :

B(bv1&bv2) / B(bv1)

C++ signature :

boost::python::list RusselSimilarityNeighbors(boost::python::api::object,boost::python::api::object)

rdkit.DataStructs.cDataStructs.RusselSimilarityNeighbors_sparse((AtomPairsParameters)bvqueries, (AtomPairsParameters)bvList) list :

B(bv1&bv2) / B(bv1)

C++ signature :

boost::python::list RusselSimilarityNeighbors_sparse(boost::python::api::object,boost::python::api::object)

rdkit.DataStructs.cDataStructs.SokalSimilarity((SparseBitVect)bv1, (SparseBitVect)bv2[, (bool)returnDistance=0]) float :
C++ signature :

double SokalSimilarity(SparseBitVect,SparseBitVect [,bool=0])

SokalSimilarity( (ExplicitBitVect)bv1, (ExplicitBitVect)bv2 [, (bool)returnDistance=0]) -> float :

B(bv1&bv2) / (2*B(bv1) + 2*B(bv2) - 3*B(bv1&bv2))

C++ signature :

double SokalSimilarity(ExplicitBitVect,ExplicitBitVect [,bool=0])

SokalSimilarity( (SparseBitVect)bv1, (str)pkl [, (bool)returnDistance=0]) -> float :

C++ signature :

double SokalSimilarity(SparseBitVect,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > [,bool=0])

SokalSimilarity( (ExplicitBitVect)bv1, (str)pkl [, (bool)returnDistance=0]) -> float :

B(bv1&bv2) / (2*B(bv1) + 2*B(bv2) - 3*B(bv1&bv2))

C++ signature :

double SokalSimilarity(ExplicitBitVect,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > [,bool=0])

rdkit.DataStructs.cDataStructs.SokalSimilarityNeighbors((AtomPairsParameters)bvqueries, (AtomPairsParameters)bvList) list :

B(bv1&bv2) / (2*B(bv1) + 2*B(bv2) - 3*B(bv1&bv2))

C++ signature :

boost::python::list SokalSimilarityNeighbors(boost::python::api::object,boost::python::api::object)

rdkit.DataStructs.cDataStructs.SokalSimilarityNeighbors_sparse((AtomPairsParameters)bvqueries, (AtomPairsParameters)bvList) list :

B(bv1&bv2) / (2*B(bv1) + 2*B(bv2) - 3*B(bv1&bv2))

C++ signature :

boost::python::list SokalSimilarityNeighbors_sparse(boost::python::api::object,boost::python::api::object)

class rdkit.DataStructs.cDataStructs.SparseBitVect((object)self, (int)size)

Bases: instance

A class to store sparse bit vectors.

This class is most useful for situations where the size of the vector is large and relatively few bits are set

For smaller or denser vectors, the _ExplicitBitVect_ class is much faster.

As you would expect, _SparseBitVects_ support a set of binary operations so you can do things like:

bv3 = bv1 & bv2 (bitwise and) bv3 = bv1 | bv2 (bitwise or) bv3 = bv1 ^ bv2 (bitwise xor) bv3 = ~bv1 (bitwise negation) NOTE: this operation is likely

to be VERY slow and inefficient.

Bits can be set and read using either the Set/UnsetBit() and GetBit() methods or by indexing (i.e. bv[i] = 1 or if bv[i]).

C++ signature :

void __init__(_object*,unsigned int)

__init__( (object)self, (str)pkl) -> None :

C++ signature :

void __init__(_object*,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)

FromBase64((SparseBitVect)self, (str)inD) None :

Initializes the vector from a base64 encoded binary string.

C++ signature :

void FromBase64(SparseBitVect {lvalue},std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)

GetBit((SparseBitVect)self, (int)which) bool :

Returns the value of a bit.

C++ signature :

bool GetBit(SparseBitVect {lvalue},unsigned int)

GetNumBits((SparseBitVect)self) int :

Returns the number of bits in the vector (the vector’s size).

C++ signature :

unsigned int GetNumBits(SparseBitVect {lvalue})

GetNumOffBits((SparseBitVect)self) int :

Returns the number of off bits.

C++ signature :

unsigned int GetNumOffBits(SparseBitVect {lvalue})

GetNumOnBits((SparseBitVect)self) int :

Returns the number of on bits.

C++ signature :

unsigned int GetNumOnBits(SparseBitVect {lvalue})

GetOnBits((SparseBitVect)self) _vecti :

Returns a tuple containing IDs of the on bits.

C++ signature :

std::vector<int, std::allocator<int> > GetOnBits(SparseBitVect)

SetBit((SparseBitVect)self, (int)which) bool :

Turns on a particular bit. Returns the original state of the bit.

C++ signature :

bool SetBit(SparseBitVect {lvalue},unsigned int)

SetBitsFromList((SparseBitVect)self, (AtomPairsParameters)onBitList) None :

Turns on a set of bits. The argument should be a tuple or list of bit ids.

C++ signature :

void SetBitsFromList(SparseBitVect*,boost::python::api::object)

ToBase64((SparseBitVect)self) str :

Converts the vector to a base64 string (the base64 encoded version of the results of ToString()).

C++ signature :

std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > ToBase64(SparseBitVect {lvalue})

ToBinary((SparseBitVect)self) object :

Returns an internal binary representation of the vector.

C++ signature :

boost::python::api::object ToBinary(SparseBitVect)

ToBitString()

BitVectToText( (SparseBitVect)bv1) -> str :

C++ signature :

std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > BitVectToText(SparseBitVect)

BitVectToText( (ExplicitBitVect)bv1) -> str :

Returns a string of zeros and ones representing the bit vector.

C++ signature :

std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > BitVectToText(ExplicitBitVect)

ToList((SparseBitVect)self) list :

Return the BitVector as a python list

C++ signature :

boost::python::list ToList(SparseBitVect)

UnSetBit((SparseBitVect)self, (int)which) bool :

Turns off a particular bit. Returns the original state of the bit.

C++ signature :

bool UnSetBit(SparseBitVect {lvalue},unsigned int)

UnSetBitsFromList((SparseBitVect)self, (AtomPairsParameters)offBitList) None :

Turns off a set of bits. The argument should be a tuple or list of bit ids.

C++ signature :

void UnSetBitsFromList(SparseBitVect*,boost::python::api::object)

rdkit.DataStructs.cDataStructs.TanimotoSimilarity((SparseBitVect)bv1, (SparseBitVect)bv2[, (bool)returnDistance=0]) float :
C++ signature :

double TanimotoSimilarity(SparseBitVect,SparseBitVect [,bool=0])

TanimotoSimilarity( (ExplicitBitVect)bv1, (ExplicitBitVect)bv2 [, (bool)returnDistance=0]) -> float :

B(bv1&bv2) / (B(bv1) + B(bv2) - B(bv1&bv2))

C++ signature :

double TanimotoSimilarity(ExplicitBitVect,ExplicitBitVect [,bool=0])

TanimotoSimilarity( (SparseBitVect)bv1, (str)pkl [, (bool)returnDistance=0]) -> float :

C++ signature :

double TanimotoSimilarity(SparseBitVect,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > [,bool=0])

TanimotoSimilarity( (ExplicitBitVect)bv1, (str)pkl [, (bool)returnDistance=0]) -> float :

B(bv1&bv2) / (B(bv1) + B(bv2) - B(bv1&bv2))

C++ signature :

double TanimotoSimilarity(ExplicitBitVect,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > [,bool=0])

TanimotoSimilarity( (IntSparseIntVect)siv1, (IntSparseIntVect)siv2 [, (bool)returnDistance=False [, (float)bounds=0.0]]) -> float :

return the Tanimoto similarity between two vectors

C++ signature :

double TanimotoSimilarity(RDKit::SparseIntVect<int>,RDKit::SparseIntVect<int> [,bool=False [,double=0.0]])

TanimotoSimilarity( (LongSparseIntVect)siv1, (LongSparseIntVect)siv2 [, (bool)returnDistance=False [, (float)bounds=0.0]]) -> float :

return the Tanimoto similarity between two vectors

C++ signature :

double TanimotoSimilarity(RDKit::SparseIntVect<long>,RDKit::SparseIntVect<long> [,bool=False [,double=0.0]])

TanimotoSimilarity( (UIntSparseIntVect)siv1, (UIntSparseIntVect)siv2 [, (bool)returnDistance=False [, (float)bounds=0.0]]) -> float :

return the Tanimoto similarity between two vectors

C++ signature :

double TanimotoSimilarity(RDKit::SparseIntVect<unsigned int>,RDKit::SparseIntVect<unsigned int> [,bool=False [,double=0.0]])

TanimotoSimilarity( (ULongSparseIntVect)siv1, (ULongSparseIntVect)siv2 [, (bool)returnDistance=False [, (float)bounds=0.0]]) -> float :

return the Tanimoto similarity between two vectors

C++ signature :

double TanimotoSimilarity(RDKit::SparseIntVect<unsigned long>,RDKit::SparseIntVect<unsigned long> [,bool=False [,double=0.0]])

rdkit.DataStructs.cDataStructs.TanimotoSimilarityNeighbors((AtomPairsParameters)bvqueries, (AtomPairsParameters)bvList) list :

B(bv1&bv2) / (B(bv1) + B(bv2) - B(bv1&bv2))

C++ signature :

boost::python::list TanimotoSimilarityNeighbors(boost::python::api::object,boost::python::api::object)

rdkit.DataStructs.cDataStructs.TanimotoSimilarityNeighbors_sparse((AtomPairsParameters)bvqueries, (AtomPairsParameters)bvList) list :

B(bv1&bv2) / (B(bv1) + B(bv2) - B(bv1&bv2))

C++ signature :

boost::python::list TanimotoSimilarityNeighbors_sparse(boost::python::api::object,boost::python::api::object)

rdkit.DataStructs.cDataStructs.TverskySimilarity((SparseBitVect)bv1, (SparseBitVect)bv2, (float)a, (float)b[, (bool)returnDistance=0]) float :
C++ signature :

double TverskySimilarity(SparseBitVect,SparseBitVect,double,double [,bool=0])

TverskySimilarity( (ExplicitBitVect)bv1, (ExplicitBitVect)bv2, (float)a, (float)b [, (bool)returnDistance=0]) -> float :

B(bv1&bv2) / (a*B(bv1)+b*B(bv2)+(1-a-b)*B(bv1&bv2)

C++ signature :

double TverskySimilarity(ExplicitBitVect,ExplicitBitVect,double,double [,bool=0])

TverskySimilarity( (SparseBitVect)bv1, (str)pkl, (float)a, (float)b [, (bool)returnDistance=0]) -> float :

C++ signature :

double TverskySimilarity(SparseBitVect,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >,double,double [,bool=0])

TverskySimilarity( (ExplicitBitVect)bv1, (str)pkl, (float)a, (float)b [, (bool)returnDistance=0]) -> float :

B(bv1&bv2) / (a*B(bv1)+b*B(bv2)+(1-a-b)*B(bv1&bv2)

C++ signature :

double TverskySimilarity(ExplicitBitVect,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >,double,double [,bool=0])

TverskySimilarity( (IntSparseIntVect)siv1, (IntSparseIntVect)siv2, (float)a, (float)b [, (bool)returnDistance=False [, (float)bounds=0.0]]) -> float :

return the Tversky similarity between two vectors

C++ signature :

double TverskySimilarity(RDKit::SparseIntVect<int>,RDKit::SparseIntVect<int>,double,double [,bool=False [,double=0.0]])

TverskySimilarity( (LongSparseIntVect)siv1, (LongSparseIntVect)siv2, (float)a, (float)b [, (bool)returnDistance=False [, (float)bounds=0.0]]) -> float :

return the Tversky similarity between two vectors

C++ signature :

double TverskySimilarity(RDKit::SparseIntVect<long>,RDKit::SparseIntVect<long>,double,double [,bool=False [,double=0.0]])

TverskySimilarity( (UIntSparseIntVect)siv1, (UIntSparseIntVect)siv2, (float)a, (float)b [, (bool)returnDistance=False [, (float)bounds=0.0]]) -> float :

return the Tversky similarity between two vectors

C++ signature :

double TverskySimilarity(RDKit::SparseIntVect<unsigned int>,RDKit::SparseIntVect<unsigned int>,double,double [,bool=False [,double=0.0]])

TverskySimilarity( (ULongSparseIntVect)siv1, (ULongSparseIntVect)siv2, (float)a, (float)b [, (bool)returnDistance=False [, (float)bounds=0.0]]) -> float :

return the Tversky similarity between two vectors

C++ signature :

double TverskySimilarity(RDKit::SparseIntVect<unsigned long>,RDKit::SparseIntVect<unsigned long>,double,double [,bool=False [,double=0.0]])

class rdkit.DataStructs.cDataStructs.UIntSparseIntVect((object)arg1, (int)arg2)

Bases: instance

A container class for storing integer values within a particular range.

The length of the vector is set at construction time.

As you would expect, _SparseIntVects_ support a set of binary operations so you can do things like:

Arithmetic: siv1 += siv2 siv3 = siv1 + siv2 siv1 -= siv3 siv3 = siv1 - siv2 “Fuzzy” binary operations: siv3 = siv1 & siv2 the result contains the smallest value in each entry siv3 = siv1 | siv2 the result contains the largest value in each entry

Elements can be set and read using indexing (i.e. siv[i] = 4 or val=siv[i])

Constructor

C++ signature :

void __init__(_object*,unsigned int)

__init__( (object)self, (str)pkl) -> None :

C++ signature :

void __init__(_object*,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)

GetLength((UIntSparseIntVect)self) int :

Returns the length of the vector

C++ signature :

unsigned int GetLength(RDKit::SparseIntVect<unsigned int> {lvalue})

GetNonzeroElements((UIntSparseIntVect)self) dict :

returns a dictionary of the nonzero elements

C++ signature :

boost::python::dict GetNonzeroElements(RDKit::SparseIntVect<unsigned int> {lvalue})

GetTotalVal((UIntSparseIntVect)self[, (bool)useAbs=False]) int :

Get the sum of the values in the vector, basically L1 norm

C++ signature :

int GetTotalVal(RDKit::SparseIntVect<unsigned int> {lvalue} [,bool=False])

ToBinary((UIntSparseIntVect)self) object :

returns a binary (pickle) representation of the vector

C++ signature :

boost::python::api::object ToBinary(RDKit::SparseIntVect<unsigned int>)

ToList((UIntSparseIntVect)self) list :

Return the SparseIntVect as a python list

C++ signature :

boost::python::list ToList(RDKit::SparseIntVect<unsigned int> {lvalue})

UpdateFromSequence((UIntSparseIntVect)self, (AtomPairsParameters)seq) None :

update the vector based on the values in the list or tuple

C++ signature :

void UpdateFromSequence(RDKit::SparseIntVect<unsigned int> {lvalue},boost::python::api::object {lvalue})

class rdkit.DataStructs.cDataStructs.ULongSparseIntVect((object)arg1, (int)arg2)

Bases: instance

A container class for storing integer values within a particular range.

The length of the vector is set at construction time.

As you would expect, _SparseIntVects_ support a set of binary operations so you can do things like:

Arithmetic: siv1 += siv2 siv3 = siv1 + siv2 siv1 -= siv3 siv3 = siv1 - siv2 “Fuzzy” binary operations: siv3 = siv1 & siv2 the result contains the smallest value in each entry siv3 = siv1 | siv2 the result contains the largest value in each entry

Elements can be set and read using indexing (i.e. siv[i] = 4 or val=siv[i])

Constructor

C++ signature :

void __init__(_object*,unsigned long)

__init__( (object)self, (str)pkl) -> None :

C++ signature :

void __init__(_object*,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)

GetLength((ULongSparseIntVect)self) int :

Returns the length of the vector

C++ signature :

unsigned long GetLength(RDKit::SparseIntVect<unsigned long> {lvalue})

GetNonzeroElements((ULongSparseIntVect)self) dict :

returns a dictionary of the nonzero elements

C++ signature :

boost::python::dict GetNonzeroElements(RDKit::SparseIntVect<unsigned long> {lvalue})

GetTotalVal((ULongSparseIntVect)self[, (bool)useAbs=False]) int :

Get the sum of the values in the vector, basically L1 norm

C++ signature :

int GetTotalVal(RDKit::SparseIntVect<unsigned long> {lvalue} [,bool=False])

ToBinary((ULongSparseIntVect)self) object :

returns a binary (pickle) representation of the vector

C++ signature :

boost::python::api::object ToBinary(RDKit::SparseIntVect<unsigned long>)

ToList((ULongSparseIntVect)self) list :

Return the SparseIntVect as a python list

C++ signature :

boost::python::list ToList(RDKit::SparseIntVect<unsigned long> {lvalue})

UpdateFromSequence((ULongSparseIntVect)self, (AtomPairsParameters)seq) None :

update the vector based on the values in the list or tuple

C++ signature :

void UpdateFromSequence(RDKit::SparseIntVect<unsigned long> {lvalue},boost::python::api::object {lvalue})