Chemical Data Processing Library C++ API - Version 1.2.0
MMFF94AromaticSSSRSubset.hpp
Go to the documentation of this file.
1 /*
2  * MMFF94AromaticSSSRSubset.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_FORCEFIELD_AROMATICSSSRSUBSET_HPP
30 #define CDPL_FORCEFIELD_AROMATICSSSRSUBSET_HPP
31 
32 #include <vector>
33 #include <memory>
34 
37 #include "CDPL/Chem/Fragment.hpp"
38 #include "CDPL/Util/BitSet.hpp"
39 
40 
41 namespace CDPL
42 {
43 
44  namespace Chem
45  {
46 
47  class MolecularGraph;
48  }
49 
50  namespace ForceField
51  {
52 
58  {
59 
60  public:
64  typedef std::shared_ptr<MMFF94AromaticSSSRSubset> SharedPointer;
65 
70 
77 
79 
81 
86  void extract(const Chem::MolecularGraph& molgraph);
87 
93  void extract(const Chem::MolecularGraph& molgraph, const Chem::FragmentList& sssr);
94 
95  private:
96  void init(const Chem::MolecularGraph& molgraph);
97 
98  void perceiveAromaticRings(const Chem::FragmentList& sssr);
99  void addToAromaticBondMask(const Chem::Fragment& ring);
100 
101  const char* getClassName() const
102  {
103  return "MMFF94AromaticSSSRSubset";
104  }
105 
106  typedef std::vector<Chem::Fragment::SharedPointer> RingList;
107 
108  const Chem::MolecularGraph* molGraph;
109  RingList candidateRings;
110  Util::BitSet aromBondMask;
111  };
112  } // namespace ForceField
113 } // namespace CDPL
114 
115 #endif // CDPL_FORCEFIELD_AROMATICSSSRSUBSET_HPP
Definition of the type CDPL::Util::BitSet.
Definition of the preprocessor macro CDPL_FORCEFIELD_API.
#define CDPL_FORCEFIELD_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
Definition of the class CDPL::Chem::FragmentList.
Definition of the class CDPL::Chem::Fragment.
A data type for the storage of Chem::Fragment objects.
Definition: FragmentList.hpp:49
Fragment.
Definition: Fragment.hpp:52
MolecularGraph.
Definition: MolecularGraph.hpp:52
Implements the extraction of all rings in the SSSR of a molecular graph that are aromatic according t...
Definition: MMFF94AromaticSSSRSubset.hpp:58
void extract(const Chem::MolecularGraph &molgraph)
Replaces the current set of rings by the aromatic rings in the SSSR of the molecular graph molgraph.
void extract(const Chem::MolecularGraph &molgraph, const Chem::FragmentList &sssr)
Replaces the current set of rings by the aromatic rings in the SSSR of the molecular graph molgraph.
std::shared_ptr< MMFF94AromaticSSSRSubset > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated MMFF94AromaticSSSRSubset instance...
Definition: MMFF94AromaticSSSRSubset.hpp:64
MMFF94AromaticSSSRSubset & operator=(const MMFF94AromaticSSSRSubset &)=delete
MMFF94AromaticSSSRSubset(const Chem::MolecularGraph &molgraph)
Construct a MMFF94AromaticSSSRSubset instance that contains all aromatic rings of the SSSR of the mol...
MMFF94AromaticSSSRSubset(const MMFF94AromaticSSSRSubset &)=delete
MMFF94AromaticSSSRSubset()
Constructs an empty MMFF94AromaticSSSRSubset instance.
Definition: MMFF94AromaticSSSRSubset.hpp:69
boost::dynamic_bitset BitSet
A dynamic bitset class.
Definition: BitSet.hpp:46
The namespace of the Chemical Data Processing Library.