Chemical Data Processing Library C++ API - Version 1.3.0
FunctionalGroupList.hpp
Go to the documentation of this file.
1 /*
2  * FunctionalGroupList.hpp
3  *
4  * This file is part of the Chemical Data Processing Toolkit
5  *
6  * Copyright (C) 2003 Thomas Seidel <thomas.seidel@univie.ac.at>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License
19  * along with this library; see the file COPYING. If not, write to
20  * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21  * Boston, MA 02111-1307, USA.
22  */
23 
29 #ifndef CDPL_MOLPROP_FUNCTIONALGROUPLIST_HPP
30 #define CDPL_MOLPROP_FUNCTIONALGROUPLIST_HPP
31 
32 #include <memory>
33 #include <sstream>
34 
40 #include "CDPL/Util/BitSet.hpp"
41 
42 
43 namespace CDPL
44 {
45 
46  namespace MolProp
47  {
48 
54  {
55 
56  public:
57  typedef std::shared_ptr<FunctionalGroupList> SharedPointer;
58 
60 
62 
64 
66 
67  void extract(const Chem::MolecularGraph& molgraph);
68 
69  private:
70  void init();
71 
72  void markAtoms(const Chem::MolecularGraph& molgraph);
73 
74  void combineMarkedAtoms(const Chem::MolecularGraph& molgraph);
75  void combineMarkedAtoms(const Chem::Atom& atom, bool aromatic, const Chem::MolecularGraph& molgraph,
76  Chem::Fragment& func_grp);
77 
78  void generateAndSetName(Chem::Fragment& func_grp, const Chem::MolecularGraph& molgraph);
79 
80  std::size_t getEnvironmentCarbons(const Chem::Atom& atom, const Chem::Fragment& func_grp,
81  const Chem::MolecularGraph& molgraph);
82 
83  void createEnvironmentBonds(std::size_t atom_idx, std::size_t num_bonds, unsigned int atom_type,
84  bool aromatic);
85 
86  const char* getClassName() const
87  {
88  return "FunctionalGroupList";
89  }
90 
91  typedef std::vector<const Chem::Atom*> AtomList;
92 
93  Util::BitSet markedAtoms;
94  std::ostringstream strStream;
96  Chem::ProtonationStateStandardizer chargeStandardizer;
97  Chem::BasicMolecule funcGroupMol;
98  Chem::FragmentList::SharedPointer funcGroupMolComps;
99  AtomList envCarbons;
100  };
101  } // namespace MolProp
102 } // namespace CDPL
103 
104 #endif // CDPL_MOLPROP_FUNCTIONALGROUPLIST_HPP
Definition of the class CDPL::Chem::BasicMolecule.
Definition of the type CDPL::Util::BitSet.
Definition of the class CDPL::Chem::FragmentList.
Definition of the preprocessor macro CDPL_MOLPROP_API.
#define CDPL_MOLPROP_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
Definition of the class CDPL::Chem::ProtonationStateStandardizer.
Definition of the class CDPL::Chem::SMILESMolecularGraphWriter.
Atom.
Definition: Atom.hpp:52
BasicMolecule.
Definition: BasicMolecule.hpp:54
A data type for the storage of Chem::Fragment objects.
Definition: FragmentList.hpp:49
std::shared_ptr< FragmentList > SharedPointer
Definition: FragmentList.hpp:52
Fragment.
Definition: Fragment.hpp:52
MolecularGraph.
Definition: MolecularGraph.hpp:52
Sets the protation state of molecules according to desired objectives.
Definition: ProtonationStateStandardizer.hpp:57
A writer for molecular graph data in the Daylight SMILES [SMILES] format.
Definition: SMILESMolecularGraphWriter.hpp:130
Implementation of Ertl's algorithm [FGPE] for the identification of functional groups in organic mole...
Definition: FunctionalGroupList.hpp:54
FunctionalGroupList(const FunctionalGroupList &fg_list)
std::shared_ptr< FunctionalGroupList > SharedPointer
Definition: FunctionalGroupList.hpp:57
void extract(const Chem::MolecularGraph &molgraph)
FunctionalGroupList(const Chem::MolecularGraph &molgraph)
FunctionalGroupList & operator=(FunctionalGroupList &fg_list)
boost::dynamic_bitset BitSet
A dynamic bitset class.
Definition: BitSet.hpp:46
The namespace of the Chemical Data Processing Library.