Chemical Data Processing Library C++ API - Version 1.1.1
PiElectronSystemList.hpp
Go to the documentation of this file.
1 /*
2  * PiElectronSystemList.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_CHEM_PIELECTRONSYSTEMLIST_HPP
30 #define CDPL_CHEM_PIELECTRONSYSTEMLIST_HPP
31 
32 #include <list>
33 #include <memory>
34 
35 #include "CDPL/Chem/APIPrefix.hpp"
37 
38 
39 namespace CDPL
40 {
41 
42  namespace Chem
43  {
44 
45  class MolecularGraph;
46 
51  {
52 
53  public:
57  typedef std::shared_ptr<PiElectronSystemList> SharedPointer;
58 
63 
69 
74  void perceive(const MolecularGraph& molgraph);
75 
76  private:
77  typedef std::list<ElectronSystem::SharedPointer> WorkingElecSysList;
78 
79  void initStartElecSystems(const MolecularGraph& molgraph);
80 
81  void mergeElecSystems(const MolecularGraph& molgraph);
82 
83  void mergeElecSystemsPass1(const MolecularGraph& molgraph);
84  void mergeElecSystemsPass2(const MolecularGraph& molgraph);
85 
86  bool isCumuleneSubPiSystem(const ElectronSystem& sub_e_sys, const ElectronSystem& parent_e_sys,
87  const MolecularGraph& molgraph) const;
88  bool isLinChainPiSysWith1ElecPerAtom(const ElectronSystem& e_sys,
89  const MolecularGraph& molgraph) const;
90  bool has2NeighborsWith1Elec(const Atom& atom, const ElectronSystem& e_sys,
91  const MolecularGraph& molgraph) const;
92 
93  WorkingElecSysList workingElecSystems;
94  };
95  } // namespace Chem
96 } // namespace CDPL
97 
98 #endif // CDPL_CHEM_PIELECTRONSYSTEMLIST_HPP
APIPrefix.hpp
Definition of the preprocessor macro CDPL_CHEM_API.
CDPL_CHEM_API
#define CDPL_CHEM_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
CDPL::Chem::PiElectronSystemList::PiElectronSystemList
PiElectronSystemList()
Constructs an empty PiElectronSystemList instance.
CDPL::Chem::Atom
Atom.
Definition: Atom.hpp:52
CDPL::Chem::PiElectronSystemList::perceive
void perceive(const MolecularGraph &molgraph)
Perceives all pi electron systems present in the molecular graph molgraph.
CDPL::Chem::MolecularGraph
MolecularGraph.
Definition: MolecularGraph.hpp:52
CDPL::Chem::ElectronSystem
Describes an electron system of a molecule in terms of involved atoms and their electron contribution...
Definition: ElectronSystem.hpp:55
CDPL::Chem::ElectronSystemList
A data type for the storage of Chem::ElectronSystem objects.
Definition: ElectronSystemList.hpp:49
CDPL::Chem::PiElectronSystemList::PiElectronSystemList
PiElectronSystemList(const MolecularGraph &molgraph)
Constructs a PiElectronSystemList instance storing all pi electron systems of the molecular graph mol...
CDPL::Chem::PiElectronSystemList
Implements the perception of all pi electron systems present in a molecule.
Definition: PiElectronSystemList.hpp:51
ElectronSystemList.hpp
Definition of the class CDPL::Chem::ElectronSystemList.
CDPL::Chem::PiElectronSystemList::SharedPointer
std::shared_ptr< PiElectronSystemList > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated PiElectronSystemList instances.
Definition: PiElectronSystemList.hpp:57
CDPL
The namespace of the Chemical Data Processing Library.