![]() |
RDKitPickDiverseMolecules.py - Pick a diverse subset of molecules
RDKitPickDiverseMolecules.py [--clusteringMethod <Centroid, CLink...>] [--fingerprints <MACCS166Keys, Morgan, PathLength...>] [--infileParams <Name,Value,...>] [--mode <MaxMin or HierarchicalClustering>] [--numMols <number>] [--outfileParams <Name,Value,...>] [--overwrite] [--paramsFingerprints <Name,Value,...>] [--similarityMetric <Dice, Tanimoto...>] [-w <dir>] -i <infile> -o <outfile>
RDKitPickDiverseMolecules.py -h | --help | -e | --examples
Pick a subset of diverse molecules based on a variety of 2D fingerprints using MaxMin [ Ref 135 ] or an available hierarchical clustering methodology and write them to a file.
The default fingerprints types for various fingerprints are shown below:
The Dice and Tanimoto similarity functions available in RDKit are able to handle fingerprints corresponding to both IntVect and BitVect. All other similarity functions, however, expect BitVect fingerprints to calculate pairwise similarity. Consequently, ExplicitBitVect fingerprints are generated for AtomPairs, Morgan, MorganFeatures, and TopologicalTorsions for similarity calculations instead of default IntVect fingerprints.
The supported input file formats are: SD (.sdf, .sd), SMILES (.smi, .csv, .tsv, .txt)
The supported output file formats are: SD (.sdf, .sd), SMILES (.smi)
Clustering method to use for picking a subset of diverse molecules during hierarchical clustering. Supported values: Centroid, CLink, Gower, McQuitty, SLink, UPGMA, Ward. This option is ignored for 'MaxMin' value of '-m, --mode' option. The Clink and SLink corresponding to CompleteLink and SingleLink cluster method.
Fingerprints to use for calculating similarity/distance between molecules. Supported values: AtomPairs, MACCS166Keys, Morgan, MorganFeatures, PathLength, TopologicalTorsions. The PathLength fingerprints are Daylight like fingerprints. The Morgan and MorganFeature fingerprints are circular fingerprints, corresponding Scitegic's Extended Connectivity Fingerprints (ECFP) and Features Connectivity Fingerprints (FCFP). The values of default parameters for generating fingerprints can be modified using '-p, --paramsFingerprints' option.
Print examples.
Print this help message.
Input file name.
A comma delimited list of parameter name and value pairs for reading molecules from files. The supported parameter names for different file formats, along with their default values, are shown below:
Possible values for smilesDelimiter: space, comma or tab.
Pick a diverse subset of molecules using MaxMin or hierarchical clustering methodology.
Number of diverse molecules to pick.
Output file name.
A comma delimited list of parameter name and value pairs for writing molecules to files. The supported parameter names for different file formats, along with their default values, are shown below:
Default value for compute2DCoords: yes for SMILES input file; no for all other file types.
Overwrite existing files.
Parameter values to use for generating fingerprints. The default values are dependent on the value of '-f, --fingerprints' option. In general, it is a comma delimited list of parameter name and value pairs for the name of the fingerprints specified using '-f, --fingerprints' option. The supported parameter names along with their default values for valid fingerprints names are shown below:
Similarity metric to use for calculating similarity/distance between molecules. Possible values: BraunBlanquet, Cosine, Dice, Kulczynski, RogotGoldberg, Russel, Sokal, Tanimoto.
Location of working directory which defaults to the current directory.
To pick 25 diverse molecules using MaxMin methodology, Tanimoto similarity metric corresponding to Morgan fingerprints with radius of 2, and write out a SMILES file, type:
To pick 50 diverse molecules using MaxMin methodology, Dice similarity metric corresponding to PathLength fingerprints with max path length of 6, and write out a SD file, type:
To pick 25 diverse molecules using Centroid hierarchical clustering methodology, Tanimoto similarity metric corresponding to Morgan fingerprints with radius of 2, and write out a SMILES file, type:
To pick 50 diverse molecules using Ward hierarchical methodology methodology, Dice similarity metric corresponding to MorganFeatures fingerprints with radius of 2 along with deploying chirality, and write out a SD file, type:
To pick 25 diverse molecules using MaxMin methodology, Tanimoto similarity metric corresponding to Morgan fingerprints with radius of 2 from a CSV SMIKES file , SMILES strings in column 1, name in olumn 2, and write out a SD file, type:
RDKitClusterMolecules.py, RDKitConvertFileFormat.py, RDKitSearchFunctionalGroups.py, RDKitSearchSMARTS.py
Copyright (C) 2024 Manish Sud. All rights reserved.
The functionality available in this script is implemented using RDKit, an open source toolkit for cheminformatics developed by Greg Landrum.
This file is part of MayaChemTools.
MayaChemTools is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.