schrodinger.utils.multifpfile module¶
SQLite3 DB to hold several kinds of fingerprints associated with the same structures.
-
schrodinger.utils.multifpfile.make_fp_generator(fp_type)¶ Repeats code from
createFpGenerators()(see phase_database.cpp).Parameters: fp_type ( phase.PhpFpTypeorstr) – Fingerprint type.Returns: Fingerprint generator. Return type: canvas.ChmFPOut32
-
schrodinger.utils.multifpfile.bitset_to_list(bitset)¶ Parameters: bitset (like schrodinger.infra.canvas.ChmSparseBitset32) – Canvas bitset.
-
schrodinger.utils.multifpfile.get_fingerprint_types(filename)¶ Determines whether
filenameis a valid multi-fp file, and if it is, returns stored fingerprint types.Parameters: filename ( str) – File name.Returns: List of available fingerprint types or None.Return type: list(str)orNone
-
class
schrodinger.utils.multifpfile.MultiFPFileWriter(filename, fpnames)¶ Bases:
object-
__init__(filename, fpnames)¶ Parameters: fpnames ( list(str)) – Fingerprint type names.
-
close()¶
-
append(chmol, molid=None)¶ Computes and stores fingerprints for Canvas molecule.
Parameters: - chmol (
schrodinger.canvas.ChmMol) – Canvas molecule. - molid (
int) – Molecule ID to use (must be unique). If not provided, next available value will be used.
Returns: Molecule ID for the just added set of fingerprints.
Return type: int- chmol (
-
-
class
schrodinger.utils.multifpfile.MultiFPFile(filename)¶ Bases:
objectMulti-fingerprint file (read-only, random access).
-
__init__(filename)¶ Parameters: filename ( str) – File name.
-
close()¶
-
get_typenames()¶
-
get_mol_ids()¶ Returns: List of molecule IDs. Return type: list(int)
-
get_fingerprints(mol_id)¶ Returns: List of lists of the “on” bits for all types of fingerprints stored in the associated DB (ordered as the names returned by get_typenames()).Return type: list(list(int))
-
iter_fingerprints(typenames=None, molids=None)¶ Generator to iterate over the fingerprints of the desired types.
Parameters: - typenames (list(str)) – List of desired fingerprint types.
- molids (containment checkable for int) – IDs of desired entries (or
Nonefor all).
-