chemfp.highlevel.conversion module

This module should not be imported directly.

It contains internal implementation details of the high-level API available from the top-level chemfp module.

This module is included in the documentation because parts of this module are returned to the user, and are part of the public API.

class chemfp.highlevel.conversion.ConversionInfo(description, source_locations, destination_location, output_filename, output_format, times)

Bases: object

Store information about the conversion to FPS or FPB file.

An instance of this object is returned by the rdkit2fps(), oe2fps(), ob2fps(), cdk2fps(), convert2fps(), and sdf2fps() functions.

get_description()

Return a human-readable description of the conversion run

load_output(reorder=True, allow_mmap=True, *, progress=True)

Load the fingerprints which were written to the created output file.

This is the same as calling chemfp.load_fingerprints() using the output filename and format. The reorder, allow_mmap and progress values are passed down as well.

Parameters:
  • reorder (True or False) – Specify if fingerprints should be reordered for better performance
  • allow_mmap (True or False) – Allow chemfp to use mmap on FPB files, instead of reading the file’s contents into memory
  • progress (True, False, or a callable) – Enable or disable progress bars, optionally specifying the progress bar constructor
Returns:

chemfp.arena.FingerprintArena

num_input_records

the number of input records read

num_output_records

the number of output records written

open_output(*, allow_mmap=True)

Open the newly created output fingerprint file for reading.

This is the same as calling chemfp.open using the output filename and format, along with the optional allow_mmap.

Parameters:allow_mmap (boolean) – if True, use mmap to open uncompressed FPB files, otherwise read the contents
Returns:a chemfp.fps_io.FPSReader or chemfp.arena.FingerprintArena