rdkit.Chem.rdMHFPFingerprint module — The RDKit 2025.09.6 documentation

# rdkit.Chem.rdMHFPFingerprint module

class rdkit.Chem.rdMHFPFingerprint.MHFPEncoder((object)self[, (int)n_permutations[, (int)seed]]) → None :

  Bases: `instance`

  C++ signature :

    void __init__(_object* [,unsigned int [,unsigned int]])

  CreateShinglingFromMol((MHFPEncoder)self, (rdkit.Chem.rdchem.Mol)mol[, (int)radius=3[, (bool)rings=True[, (bool)isomeric=False[, (bool)kekulize=False[, (int)min_radius=1]]]]]) → rdkit.rdBase._vectNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE :

    Creates a shingling (a list of circular n-grams / substructures) from a RDKit Mol instance.

    C++ signature :

      std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > CreateShinglingFromMol(RDKit::MHFPFingerprints::MHFPEncoder*,RDKit::ROMol [,unsigned char=3 [,bool=True [,bool=False [,bool=False [,unsigned char=1]]]]])

  CreateShinglingFromSmiles((MHFPEncoder)self, (str)smiles[, (int)radius=3[, (bool)rings=True[, (bool)isomeric=False[, (bool)kekulize=False[, (int)min_radius=1]]]]]) → rdkit.rdBase._vectNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE :

    Creates a shingling (a list of circular n-grams / substructures) from a SMILES string.

    C++ signature :

      std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > CreateShinglingFromSmiles(RDKit::MHFPFingerprints::MHFPEncoder*,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > [,unsigned char=3 [,bool=True [,bool=False [,bool=False [,unsigned char=1]]]]])

  static Distance((rdkit.rdBase._vectj)a, (rdkit.rdBase._vectj)b) → float :
    C++ signature :

      double Distance(std::vector<unsigned int, std::allocator<unsigned int> >,std::vector<unsigned int, std::allocator<unsigned int> >)

  EncodeMol((MHFPEncoder)self, (rdkit.Chem.rdchem.Mol)mol[, (int)radius=3[, (bool)rings=True[, (bool)isomeric=False[, (bool)kekulize=False[, (int)min_radius=1]]]]]) → rdkit.rdBase._vectj :

    Creates a MHFP vector from an RDKit Mol instance.

    C++ signature :

      std::vector<unsigned int, std::allocator<unsigned int> > EncodeMol(RDKit::MHFPFingerprints::MHFPEncoder*,RDKit::ROMol [,unsigned char=3 [,bool=True [,bool=False [,bool=False [,unsigned char=1]]]]])

  EncodeMolsBulk((MHFPEncoder)self, (list)mols[, (int)radius=3[, (bool)rings=True[, (bool)isomeric=False[, (bool)kekulize=False[, (int)min_radius=1]]]]]) → object :

    Creates a MHFP vector from a list of RDKit Mol instances.

    C++ signature :

      boost::python::api::object EncodeMolsBulk(RDKit::MHFPFingerprints::MHFPEncoder*,boost::python::list {lvalue} [,unsigned char=3 [,bool=True [,bool=False [,bool=False [,unsigned char=1]]]]])

  EncodeSECFPMol((MHFPEncoder)self, (rdkit.Chem.rdchem.Mol)smiles[, (int)radius=3[, (bool)rings=True[, (bool)isomeric=False[, (bool)kekulize=False[, (int)min_radius=1[, (int)length=2048]]]]]]) → rdkit.DataStructs.cDataStructs.ExplicitBitVect :

    Creates a SECFP binary vector from an RDKit Mol instance.

    C++ signature :

      ExplicitBitVect EncodeSECFPMol(RDKit::MHFPFingerprints::MHFPEncoder*,RDKit::ROMol [,unsigned char=3 [,bool=True [,bool=False [,bool=False [,unsigned char=1 [,unsigned long=2048]]]]]])

  EncodeSECFPMolsBulk((MHFPEncoder)self, (list)smiles[, (int)radius=3[, (bool)rings=True[, (bool)isomeric=False[, (bool)kekulize=False[, (int)min_radius=1[, (int)length=2048]]]]]]) → object :

    Creates a SECFP binary vector from a list of RDKit Mol instances.

    C++ signature :

      boost::python::api::object EncodeSECFPMolsBulk(RDKit::MHFPFingerprints::MHFPEncoder*,boost::python::list {lvalue} [,unsigned char=3 [,bool=True [,bool=False [,bool=False [,unsigned char=1 [,unsigned long=2048]]]]]])

  EncodeSECFPSmiles((MHFPEncoder)self, (str)smiles[, (int)radius=3[, (bool)rings=True[, (bool)isomeric=False[, (bool)kekulize=False[, (int)min_radius=1[, (int)length=2048]]]]]]) → rdkit.DataStructs.cDataStructs.ExplicitBitVect :

    Creates a SECFP binary vector from a SMILES string.

    C++ signature :

      ExplicitBitVect EncodeSECFPSmiles(RDKit::MHFPFingerprints::MHFPEncoder*,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > [,unsigned char=3 [,bool=True [,bool=False [,bool=False [,unsigned char=1 [,unsigned long=2048]]]]]])

  EncodeSECFPSmilesBulk((MHFPEncoder)self, (list)smiles[, (int)radius=3[, (bool)rings=True[, (bool)isomeric=False[, (bool)kekulize=False[, (int)min_radius=1[, (int)length=2048]]]]]]) → object :

    Creates a SECFP binary vector from a list of SMILES strings.

    C++ signature :

      boost::python::api::object EncodeSECFPSmilesBulk(RDKit::MHFPFingerprints::MHFPEncoder*,boost::python::list {lvalue} [,unsigned char=3 [,bool=True [,bool=False [,bool=False [,unsigned char=1 [,unsigned long=2048]]]]]])

  EncodeSmiles((MHFPEncoder)self, (str)smiles[, (int)radius=3[, (bool)rings=True[, (bool)isomeric=False[, (bool)kekulize=False[, (int)min_radius=1]]]]]) → rdkit.rdBase._vectj :

    Creates a MHFP vector from a SMILES string.

    C++ signature :

      std::vector<unsigned int, std::allocator<unsigned int> > EncodeSmiles(RDKit::MHFPFingerprints::MHFPEncoder*,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > [,unsigned char=3 [,bool=True [,bool=False [,bool=False [,unsigned char=1]]]]])

  EncodeSmilesBulk((MHFPEncoder)self, (list)smiles[, (int)radius=3[, (bool)rings=True[, (bool)isomeric=False[, (bool)kekulize=False[, (int)min_radius=1]]]]]) → object :

    Creates a MHFP vector from a list of SMILES strings.

    C++ signature :

      boost::python::api::object EncodeSmilesBulk(RDKit::MHFPFingerprints::MHFPEncoder*,boost::python::list {lvalue} [,unsigned char=3 [,bool=True [,bool=False [,bool=False [,unsigned char=1]]]]])

  FromArray((MHFPEncoder)self, (list)vec) → rdkit.rdBase._vectj :

    Creates a MHFP vector from a list of unsigned integers.

    C++ signature :

      std::vector<unsigned int, std::allocator<unsigned int> > FromArray(RDKit::MHFPFingerprints::MHFPEncoder*,boost::python::list {lvalue})

  FromStringArray((MHFPEncoder)self, (list)vec) → rdkit.rdBase._vectj :

    Creates a MHFP vector from a list of arbitrary strings.

    C++ signature :

      std::vector<unsigned int, std::allocator<unsigned int> > FromStringArray(RDKit::MHFPFingerprints::MHFPEncoder*,boost::python::list {lvalue})