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
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 */
35RDKIT_RASCALMCES_EXPORT std::vector<RascalResult> rascalMCES(
36 const ROMol &mol1, const ROMol &mol2,
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 */
55RDKIT_RASCALMCES_EXPORT std::vector<std::vector<unsigned int>> rascalCluster(
56 const std::vector<std::shared_ptr<ROMol>> &mols,
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 */
67RDKIT_RASCALMCES_EXPORT std::vector<std::vector<unsigned int>>
69 const std::vector<std::shared_ptr<ROMol>> &mols,
71} // namespace RascalMCES
72} // namespace RDKit
73#endif // RDKIT_RASCAL_MCES_H
#define RDKIT_RASCALMCES_EXPORT
Definition export.h:425
RDKIT_RASCALMCES_EXPORT std::vector< RascalResult > rascalMCES(const ROMol &mol1, const ROMol &mol2, const RascalOptions &opts=RascalOptions())
RDKIT_RASCALMCES_EXPORT std::vector< std::vector< unsigned int > > rascalCluster(const std::vector< std::shared_ptr< ROMol > > &mols, const RascalClusterOptions &clusOpts=RascalClusterOptions())
RDKIT_RASCALMCES_EXPORT std::vector< std::vector< unsigned int > > rascalButinaCluster(const std::vector< std::shared_ptr< ROMol > > &mols, const RascalClusterOptions &clusOpts=RascalClusterOptions())
Std stuff.
bool rdvalue_is(const RDValue_cast_t)