RDKit
Open-source cheminformatics and machine learning.
Metal.h
Go to the documentation of this file.
1//
2// Copyright (C) 2018-2021 Susan H. Leung and other RDKit contributors
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/*! \file Metal.h
11
12 \brief Defines the MetalDisconnector class.
13
14*/
15#include <RDGeneral/export.h>
16#ifndef RD_METAL_H
17#define RD_METAL_H
18
19#include <GraphMol/ROMol.h>
20
21namespace RDKit {
22class RWMol;
23class ROMol;
24
25namespace MolStandardize {
26//! The MetalDisconnector class contains tools for disconnecting metal atoms
27//! that are defined as covalently bonded to non-metals.
28/*!
29
30 <b>Notes:</b>
31 -
32*/
33
35 public:
39
40 ROMol *getMetalNof(); // {return metal_nof;}
41 ROMol *getMetalNon(); // {return metal_non;}
42 void setMetalNof(const ROMol &mol);
43 void setMetalNon(const ROMol &mol);
44
45 //! Break covalent bonds between metals and organic atoms under certain
46 //! conditions.
47 /*!
48 <b>Notes:</b>
49 The algorithm works as follows:
50- Disconnect N, O, F from any metal.
51- Disconnect other non-metals from transition metals + Al (but not Hg, Ga, Ge,
52In, Sn, As, Tl, Pb, Bi, Po).
53 - For every bond broken, adjust the charges of the begin and end atoms
54accordingly.
55 */
56 ROMol *disconnect(const ROMol &mol);
57 //! overload
58 /// modifies the molecule in place
59 void disconnect(RWMol &mol);
60
61 private:
62 struct NonMetal {
63 int cutBonds{0};
64 std::vector<int> boundMetalIndices;
65 };
66 int chargeAdjustment(const Atom *a, int order);
67 ROMOL_SPTR metal_nof;
68 ROMOL_SPTR metal_non;
69
70}; // class Metal
71} // namespace MolStandardize
72} // namespace RDKit
73#endif
Defines the primary molecule class ROMol as well as associated typedefs.
The class for representing atoms.
Definition: Atom.h:68
MetalDisconnector(const MetalDisconnector &other)
ROMol * disconnect(const ROMol &mol)
RWMol is a molecule class that is intended to be edited.
Definition: RWMol.h:32
#define RDKIT_MOLSTANDARDIZE_EXPORT
Definition: export.h:321
Std stuff.
Definition: Abbreviations.h:19
boost::shared_ptr< ROMol > ROMOL_SPTR