RDKit: RascalMCES.h Source File

| RDKit Open-source cheminformatics and machine learning.

Loading...
Searching...
No Matches
RascalMCES.h
Go to the documentation of this file.
1//
2// Copyright (C) David Cosgrove 2023
3//
4// @@ All Rights Reserved @@
5// This file is part of the RDKit.
6// The contents are covered by the terms of the BSD license
7// which is included in the file license.txt, found at the root
8// of the RDKit source tree.
9//
10
11#include <RDGeneral/export.h>
12#ifndef RDKIT_RASCAL_MCES_H
13#define RDKIT_RASCAL_MCES_H
14
15#include <vector>
16
17#include <GraphMol/RascalMCES/RascalClusterOptions.h>
18#include <GraphMol/RascalMCES/RascalOptions.h>
19#include <GraphMol/RascalMCES/RascalResult.h>
20namespace RDKit {
21class ROMol;
22
23namespace RascalMCES {
24
25// Find one or more MCESs between the two molecules. The MCES is the
26// Maximum Common Edge Substructure, and is the largest set of bonds
27// common to the 2 molecules.
28/*!
29 *
30 * @param mol1 : first molecule
31 * @param mol2 : second molecule for MCES determination.
32 * @param opts : (optional) set of options controlling the MCES determination
33 * @return : vector of RascalResult objects.
34 */
35 RDKIT_RASCALMCES_EXPORT std::vector<RascalResult> rascalMCES(
36 const ROMol &mol1, const ROMol &mol2,
37 const RascalOptions &opts = RascalOptions());
38
39// Cluster the molecules using the Johnson similarity from rascalMCES
40// and the algorithm of
41// 'A Line Graph Algorithm for Clustering Chemical Structures Based
42// on Common Substructural Cores', JW Raymond, PW Willett.
43// https://match.pmf.kg.ac.rs/electronic_versions/Match48/match48_197-207.pdf
44// https://eprints.whiterose.ac.uk/77598/
45// This is a fuzzy clustering algorithm, so a molecule may appear in more than
46// one cluster. The final cluster is all the molecules that didn't fit into
47// another cluster (the singletons).
48/*!
49 *
50 * @param mols : molecules to cluster
51 * @param clusOpts : (optional) cluster options
52 * @return clusters as vector of vectors of unsigned ints - indices into the
53 * input mols vector
54 */
55 RDKIT_RASCALMCES_EXPORT std::vector<std::vector<unsigned int>> rascalCluster(
56 const std::vector<std::shared_ptr<ROMol>> &mols,
57 const RascalClusterOptions &clusOpts = RascalClusterOptions());
58// Cluster the molecules using the Johnson similarity from rascalMCES and
59// the Butina algorithm. Butina JCICS 39 747-750 (1999).
60/*!
61 *
62 * @param mols : molecules to cluster
63 * @param clusOpts : (optional) cluster options
64 * @return clusters as vector of vectors of unsigned ints - indices into the
65 * input mols vector
66 */
67 RDKIT_RASCALMCES_EXPORT std::vector<std::vector<unsigned int>>
68rascalButinaCluster(
69 const std::vector<std::shared_ptr<ROMol>> &mols,
70 const RascalClusterOptions &clusOpts = RascalClusterOptions());
71} // namespace RascalMCES
72} // namespace RDKit
73#endif // RDKIT_RASCAL_MCES_H
RascalClusterOptions.h
RascalOptions.h
RascalResult.h
RDKit::ROMol
Definition ROMol.h:199
export.h
RDKIT_RASCALMCES_EXPORT
#define RDKIT_RASCALMCES_EXPORT
Definition export.h:481
RDKit::RascalMCES
Definition PartitionSet.h:23
RDKit::RascalMCES::rascalMCES
RDKIT_RASCALMCES_EXPORT std::vector< RascalResult > rascalMCES(const ROMol &mol1, const ROMol &mol2, const RascalOptions &opts=RascalOptions())
RDKit::RascalMCES::rascalCluster
RDKIT_RASCALMCES_EXPORT std::vector< std::vector< unsigned int > > rascalCluster(const std::vector< std::shared_ptr< ROMol > > &mols, const RascalClusterOptions &clusOpts=RascalClusterOptions())
RDKit::RascalMCES::rascalButinaCluster
RDKIT_RASCALMCES_EXPORT std::vector< std::vector< unsigned int > > rascalButinaCluster(const std::vector< std::shared_ptr< ROMol > > &mols, const RascalClusterOptions &clusOpts=RascalClusterOptions())
RDKit
Std stuff.
Definition Abbreviations.h:19
RDKit::RascalMCES::RascalClusterOptions
Definition RascalClusterOptions.h:25
RDKit::RascalMCES::RascalOptions
Definition RascalOptions.h:20