chemfp types
The “chemfp types” command lists information about chemfp fingerprint types or families.
The default, --types, lists all available types for all available
toolkits. Use --all to also include unavailable types for those
toolkit.
Use --families to list the registered fingerprint families instead
of the types. This option does not require the toolkit to be
available.
The default output format contains header lines (each starting with a “#”) followed by a tab-seperated table. The –out options of “csv” and “tsv” write the table in comma-separated and tab-separated format.
The “json” option outputs far more details about the families and types, including information about each type argument.
Use chemfp type for a human-readable description of a specified fingerprint type.
chemfp types command-line options
The following comes from chemfp types --help:
Usage: chemfp types [OPTIONS]
List the available fingerprint types.
Options:
-T, --toolkit NAME,... Filter using a comma-separated list of
toolkit names, or 'all' for all toolkits
(default: 'all')
--feature-type, --ftype NAME,...
Filter using a comma-seperated list of
feature types, or 'all' for all feature
types (default: 'all')
-p, --pattern REGEX Filter family names based on a case-
insensitive regular expression
-a, --all Include information about known but
unavailable types.
-h, --humanized / --int The default '--humanized' reports the number
of bits as a "human-readable" string. Use '
--int' to display the integer value.
--families / --types The default '--types' output fingerprint
types. Use '--families' to output families.
--out TEXT The output format ('txt', 'csv', 'tsv',
'json') with optional compression (like
'txt.gz')
-o, --output TEXT The output filename. If unspecified use
stdout.
--help Show this message and exit.
By default, list the available fingerprint types for toolkits and feature
types to stdout. The output starts with a metadata header followed by a tab-
seperated table, as in the following (the "toolkit-cdk" output here is
folded for clarity. The original original is all on one line):
% chemfp types | head -8
#chemfp-types/1 include-unavailable=0
#toolkit-cdk=* (Cannot start the JVM using jpype: [Errno 2] JVM DLL
not found: /usr/local/Cellar/openjdk@21/21.0.5/libexec/openjdk.jdk/
Contents/MacOS/libjli.dylib)
#toolkit-openbabel=OpenBabel/3.1.0 families=12 (binary=12 count=0)
#toolkit-openeye=OEChem/20251120 families=11 (binary=11 count=0) licensed=1
#toolkit-rdkit=RDKit/2025.03.3 families=19 (binary=12 count=7)
toolkit features size name and default parameters
openbabel binary 881 ChemFP-Substruct-OpenBabel/1
openbabel binary 4096 OpenBabel-ECFP0/1 nBits=4096
The first line describes the output format, including parameters which
affect how to process the output. The "#toolkit-" metadata lines summarize
the toolkits, either with a version number and a summary of the available
fingerprint families, along with a breakdown by feature types and, for
OEChem, licensing status.
If the toolkit isn't available then the version is "*", followed by the
reason why the toolkit isn't available.
The output table starts with a line of tab-separated column headers,
followed by lines of tab-separated values, with one line per type. These are
"toolkit" (the toolkit name), "features" (the feature type, either 'binary'
or 'count'), "size" (the number of bits or counts), and "name and default
parameters" (the canonical type string for the type with default
parameters).
Most large fingerprint sizes are exactly or almost a power of 2. By default
the "size" field for large sizes is "humanized", so sizes like
"18446744073709551615" are replaced with the easier-to-understand "2**64-1".
Use `--int` to use the full integer:
% chemfp types -T rdkit | grep RDKit-MorganCount
rdkit count 2**64-1 RDKit-MorganCount/2 radius=3 useFeatures=0
% chemfp types -T rdkit --int | grep RDKit-MorganCount
rdkit count 18446744073709551615 RDKit-MorganCount/2 radius=3 useFeatures=0
If the `--out` format is "tsv" or "csv" then the metadata lines are not
included and the fields are respectively tab- or comma-separated fields,
formatted for Excel. Use `--output` or `-o` to save the output to the named
file rather than stdout. If `--out` is not specified then use the filename
extension. See below for "json" output format.
= Filtering =
The `--toolkit`/`-T` parameter specifies the toolkits to process, as a
comma-separated list of toolkit names. The default is
"cdk,openbabel,openeye,rdkit". The toolkits are processed in order.
Duplicate names are ignored.
The `--feature-types`/`--ftype` parameter specifies the feature types to
include, as a comma-separated list of feature types. The default is
"binary,count". The feature types are processed in order for each toolkit.
Duplicate names are ignored.
The `--pattern`/`-p` pattern defines a case-insensitive regular expression
pattern which match the fingerprint type name (including the version). The
current implementation uses Python's 're.search' with the 're.IGNORECASE'
flag.
= Unavailable types =
Use `--all`/`-a` to also include the fingerprint types which are known but
not available. For example, version "1" of a given fingerprint type might
only be available from older toolkit implementations, while newer
implementation support version "2".
This option adds two columns to the end of the output table. The "available"
column is either "yes" (if the type is available) or "no" (if it is not),
and the "reason" column is either "*" (if the type is available) or a short
description of why the type is not available.
If the type is not available then the "size" column may be "*".
= Families =
The `--family` output reports the registered fingerprint families, rather
than the default `--types`, which reports the fingerprint types. This option
is faster than a types report because it only uses the fingerprint registery
and does not try to load the toolkits or types. This also means it cannot
report which toolkits or types are available.
The output columns are "toolkit" (the toolkit name), "features" (the feature
type, either 'binary' or 'count'), and "family" (the base name for the
family).
= JSON output =
The JSON output format generates a detailed structured JSON document rather
than the simple table of the other formats. For the `--types` report the
top-level is a dictionary with the following fields:
"format": the string "chemfp-types/1"
"software": a string with the chemfp version information
"options": dictionary mapping configuration name to a value
"toolkits": dictionary mapping toolkit name to a toolkit entry
The "options" dictionary contains a single term, "include_unavailable",
which is true if the unavailable types were included, else false.
Each toolkit entry dictionary contains:
"name": the toolkit name
"available": true if the toolkit is available, else false
"unavailable_reason": null if the toolkit is available,
else an error message
If the toolkit is available then the following fields are also present:
"software": string with the toolkit version information
"licensed": true if the toolkit is licensed, else false
"families": dictionary mapping feature type to list of family base names
"available_types": dictionary mapping feature type to a list
of available types
"unavailable_types": dictionary mapping feature type to a list
of unavailable types.
An available type dictionary contains:
"name": the full name for the fingerprint type, including the version
"help": the Python docstring for the fingerprint type class
"size": an integer for the number of bits or features
"humanized_size": the humanized string for the size
"type": the canonical type string for the default type parameters
"complete_type": the complete canonical type string for the
default type parameters
"arguments": a list of fingerprint type arguments
A fingerprint type argument dictionary contains:
"name": the parameter name
"metavar": a placeholder label for the parameter value
"default": a string respesentation of the default value
"help": a string description of the parameter
An unavailable type dictionary (only available with `--all`) contains:
"name": the full type name, including version
"size": the fingerprint size as an integer, if known, else null
"humanized_size": the humanized size if known, else "*"
= Examples =
* Get the RDKit count types:
% chemfp types -T rdkit --ftype count
* Get all families containing "maccs" (case-insensitive), in csv format:
% chemfp types --families -p maccs
* Generate a complete report in structured JSON, saved to "types.json":
% chemfp types -o types.json
For human-readable details about a specific type use "chemfp type TYPE_STR".