RDKit
Open-source cheminformatics and machine learning.
MMPA.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2015 Novartis Institutes for BioMedical Research
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 #include <RDGeneral/export.h>
11 #pragma once
12 #include <vector>
13 #include <string>
14 #include <stdexcept>
15 #include "../RDKitBase.h"
16 
17 namespace RDKit {
18 
19 namespace MMPA {
20 //! fragments a Molecule for processing with the Matched Molecular Pairs
21 //! MMPA algorithm (Hussain et al)
22 /*!
23  \param mol Molecule to fragment
24  \param result Vector of Core and Sidechain results from the various
25  cuts
26  \param maxCuts Maximum number of times to cut the molecule to generate
27  fragments. A max cut of 3 will fragment with 1,2 and 3
28  cuts.
29  \param maxCutBonds Set the bond limit for determining which molecules
30  to analyze. If a molecule has more than
31  this number of cutabble bonds, ignore.
32 
33  \return true if the molecule was fragmented, false otherwise.
34 */
35 
36 RDKIT_MMPA_EXPORT bool fragmentMol(const ROMol& mol,
37  std::vector<std::pair<ROMOL_SPTR, ROMOL_SPTR> >& result,
38  unsigned int maxCuts = 3, unsigned int maxCutBonds = 20,
39  const std::string& pattern = "[#6+0;!$(*=,#[!#6])]!@!=!#[*]");
40 
41 //! fragments a Molecule for processing with the Matched Molecular Pairs
42 //! MMPA algorithm (Hussain et al)
43 /*!
44  \param mol Molecule to fragment
45  \param result Vector of Core and Sidechain results from the various
46  cuts
47  \param minCuts Minimum number of times to cut the molecule to generate
48  fragments.
49  \param maxCuts Maximum number of times to cut the molecule to generate
50  fragments.
51  \param maxCutBonds Set the bond limit for determining which molecules
52  to analyze. If a molecule has more than
53  this number of cutabble bonds, ignore.
54 
55  \return true if the molecule was fragmented, false otherwise.
56 */
57 RDKIT_MMPA_EXPORT bool fragmentMol(const ROMol& mol,
58  std::vector<std::pair<ROMOL_SPTR, ROMOL_SPTR> >& result,
59  unsigned int minCuts,
60  unsigned int maxCuts,
61  unsigned int maxCutBonds,
62  const std::string& pattern = "[#6+0;!$(*=,#[!#6])]!@!=!#[*]");
63 
64 //! fragments a Molecule for processing with the Matched Molecular Pairs
65 //! MMPA algorithm (Hussain et al)
66 /*!
67  \param mol Molecule to fragment
68  \param result Vector of Core and Sidechain results from the various
69  cuts
70  \param bondsToCut Vector of bond indices to use as cut points
71  \param minCuts Minimum number of times to cut the molecule to generate
72  fragments.
73  \param maxCuts Maximum number of times to cut the molecule to generate
74  fragments.
75  \return true if the molecule was fragmented, false otherwise.
76 */
77 RDKIT_MMPA_EXPORT bool fragmentMol(const ROMol& mol,
78  std::vector<std::pair<ROMOL_SPTR, ROMOL_SPTR> >& result,
79  const std::vector<unsigned int>& bondsToCut,
80  unsigned int minCuts = 1,
81  unsigned int maxCuts = 3);
82 
83 }
84 } // namespace RDKit
RDKIT_MMPA_EXPORT bool fragmentMol(const ROMol &mol, std::vector< std::pair< ROMOL_SPTR, ROMOL_SPTR > > &result, unsigned int maxCuts=3, unsigned int maxCutBonds=20, const std::string &pattern="[#6+0;!$(*=,#[!#6])]!@!=!#[*]")
Std stuff.
Definition: Atom.h:30
#define RDKIT_MMPA_EXPORT
Definition: export.h:333