Chemical Data Processing Library C++ API - Version 1.1.1
MMFF94AromaticAtomTypeDefinitionTable.hpp
Go to the documentation of this file.
1 /*
2  * MMFF94AromaticAtomTypeDefinitionTable.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_MMFF94AROMATICATOMTYPEDEFINITIONTABLE_HPP
30 #define CDPL_FORCEFIELD_MMFF94AROMATICATOMTYPEDEFINITIONTABLE_HPP
31 
32 #include <cstddef>
33 #include <vector>
34 #include <string>
35 #include <iosfwd>
36 #include <memory>
37 
39 
40 
41 namespace CDPL
42 {
43 
44  namespace ForceField
45  {
46 
48  {
49 
50  public:
51  class Entry;
52 
53  private:
54  typedef std::vector<Entry> DataStorage;
55 
56  public:
57  typedef std::shared_ptr<MMFF94AromaticAtomTypeDefinitionTable> SharedPointer;
58 
59  typedef DataStorage::const_iterator ConstEntryIterator;
60  typedef DataStorage::iterator EntryIterator;
61 
63  {
64 
65  public:
66  Entry(const std::string& old_type, const std::string& aro_type, unsigned int atomic_no,
67  std::size_t ring_size, std::size_t het_atom_dist, bool im_cation, bool n5_anion);
68 
69  const std::string& getOldAtomType() const;
70 
71  const std::string& getAromAtomType() const;
72 
73  unsigned int getAtomicNumber() const;
74 
75  std::size_t getRingSize() const;
76 
77  std::size_t getHeteroAtomDistance() const;
78 
79  bool isImidazoliumCation() const;
80 
81  bool isN5RingAnion() const;
82 
83  private:
84  std::string oldType;
85  std::string aroType;
86  unsigned int atomicNumber;
87  std::size_t ringSize;
88  std::size_t hetAtomDist;
89  bool imCation;
90  bool n5Anion;
91  };
92 
94 
95  std::size_t getNumEntries() const;
96 
97  void addEntry(const std::string& old_type, const std::string& aro_type, unsigned int atomic_no,
98  std::size_t ring_size, std::size_t het_atom_dist, bool im_cation, bool n5_anion);
99 
100  const Entry& getEntry(std::size_t idx) const;
101 
102  void clear();
103 
104  void removeEntry(std::size_t idx);
105 
107 
109 
111 
113 
115 
117 
119 
121 
123 
124  void load(std::istream& is);
125 
126  void loadDefaults();
127 
128  static void set(const SharedPointer& table);
129 
130  static const SharedPointer& get();
131 
132  private:
133  static SharedPointer defaultTable;
134  DataStorage entries;
135  };
136  } // namespace ForceField
137 } // namespace CDPL
138 
139 #endif // CDPL_FORCEFIELD_MMFF94AROMATICATOMTYPEDEFINITIONTABLE_HPP
CDPL::ForceField::MMFF94AromaticAtomTypeDefinitionTable::end
ConstEntryIterator end() const
APIPrefix.hpp
Definition of the preprocessor macro CDPL_FORCEFIELD_API.
CDPL::ForceField::MMFF94AromaticAtomTypeDefinitionTable::Entry::getOldAtomType
const std::string & getOldAtomType() const
CDPL::ForceField::MMFF94AromaticAtomTypeDefinitionTable::Entry
Definition: MMFF94AromaticAtomTypeDefinitionTable.hpp:63
CDPL::ForceField::MMFF94AromaticAtomTypeDefinitionTable::ConstEntryIterator
DataStorage::const_iterator ConstEntryIterator
Definition: MMFF94AromaticAtomTypeDefinitionTable.hpp:59
CDPL::ForceField::MMFF94AromaticAtomTypeDefinitionTable::getNumEntries
std::size_t getNumEntries() const
CDPL::ForceField::MMFF94AromaticAtomTypeDefinitionTable::SharedPointer
std::shared_ptr< MMFF94AromaticAtomTypeDefinitionTable > SharedPointer
Definition: MMFF94AromaticAtomTypeDefinitionTable.hpp:57
CDPL::ForceField::MMFF94AromaticAtomTypeDefinitionTable::loadDefaults
void loadDefaults()
CDPL::ForceField::MMFF94AromaticAtomTypeDefinitionTable::MMFF94AromaticAtomTypeDefinitionTable
MMFF94AromaticAtomTypeDefinitionTable()
CDPL::ForceField::MMFF94AromaticAtomTypeDefinitionTable::Entry::getRingSize
std::size_t getRingSize() const
CDPL::ForceField::MMFF94AromaticAtomTypeDefinitionTable::removeEntry
EntryIterator removeEntry(const EntryIterator &it)
CDPL::ForceField::MMFF94AromaticAtomTypeDefinitionTable::begin
EntryIterator begin()
CDPL::ForceField::MMFF94AromaticAtomTypeDefinitionTable::Entry::getAtomicNumber
unsigned int getAtomicNumber() const
CDPL::ForceField::MMFF94AromaticAtomTypeDefinitionTable::clear
void clear()
CDPL::ForceField::MMFF94AromaticAtomTypeDefinitionTable::getEntriesBegin
EntryIterator getEntriesBegin()
CDPL::ForceField::MMFF94AromaticAtomTypeDefinitionTable::EntryIterator
DataStorage::iterator EntryIterator
Definition: MMFF94AromaticAtomTypeDefinitionTable.hpp:60
CDPL::ForceField::MMFF94AromaticAtomTypeDefinitionTable::begin
ConstEntryIterator begin() const
CDPL::ForceField::MMFF94AromaticAtomTypeDefinitionTable::getEntriesBegin
ConstEntryIterator getEntriesBegin() const
CDPL::ForceField::MMFF94AromaticAtomTypeDefinitionTable::removeEntry
void removeEntry(std::size_t idx)
CDPL::ForceField::MMFF94AromaticAtomTypeDefinitionTable::end
EntryIterator end()
CDPL::ForceField::MMFF94AromaticAtomTypeDefinitionTable::set
static void set(const SharedPointer &table)
CDPL::ForceField::MMFF94AromaticAtomTypeDefinitionTable::Entry::Entry
Entry(const std::string &old_type, const std::string &aro_type, unsigned int atomic_no, std::size_t ring_size, std::size_t het_atom_dist, bool im_cation, bool n5_anion)
CDPL::ForceField::MMFF94AromaticAtomTypeDefinitionTable::load
void load(std::istream &is)
CDPL
The namespace of the Chemical Data Processing Library.
CDPL::ForceField::MMFF94AromaticAtomTypeDefinitionTable::Entry::getHeteroAtomDistance
std::size_t getHeteroAtomDistance() const
CDPL::ForceField::MMFF94AromaticAtomTypeDefinitionTable::Entry::getAromAtomType
const std::string & getAromAtomType() const
CDPL::ForceField::MMFF94AromaticAtomTypeDefinitionTable::addEntry
void addEntry(const std::string &old_type, const std::string &aro_type, unsigned int atomic_no, std::size_t ring_size, std::size_t het_atom_dist, bool im_cation, bool n5_anion)
CDPL::ForceField::MMFF94AromaticAtomTypeDefinitionTable
Definition: MMFF94AromaticAtomTypeDefinitionTable.hpp:48
CDPL::ForceField::MMFF94AromaticAtomTypeDefinitionTable::get
static const SharedPointer & get()
CDPL::ForceField::MMFF94AromaticAtomTypeDefinitionTable::getEntry
const Entry & getEntry(std::size_t idx) const
CDPL_FORCEFIELD_API
#define CDPL_FORCEFIELD_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
CDPL::ForceField::MMFF94AromaticAtomTypeDefinitionTable::Entry::isImidazoliumCation
bool isImidazoliumCation() const
CDPL::ForceField::MMFF94AromaticAtomTypeDefinitionTable::getEntriesEnd
EntryIterator getEntriesEnd()
CDPL::ForceField::MMFF94AromaticAtomTypeDefinitionTable::getEntriesEnd
ConstEntryIterator getEntriesEnd() const
CDPL::ForceField::MMFF94AromaticAtomTypeDefinitionTable::Entry::isN5RingAnion
bool isN5RingAnion() const