Chemical Data Processing Library C++ API - Version 1.1.1
FragmentLibraryEntry.hpp
Go to the documentation of this file.
1 /*
2  * FragmentLibraryEntry.hpp
3  *
4  * This file is part of the ConfGenical 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_CONFGEN_FRAGMENTLIBRARYENTRY_HPP
30 #define CDPL_CONFGEN_FRAGMENTLIBRARYENTRY_HPP
31 
32 #include <string>
33 #include <cstddef>
34 #include <cstdint>
35 #include <memory>
36 
37 #include <boost/iterator/indirect_iterator.hpp>
38 
41 
42 
43 namespace CDPL
44 {
45 
46  namespace ConfGen
47  {
48 
53  {
54 
55  public:
59  typedef std::shared_ptr<FragmentLibraryEntry> SharedPointer;
60 
61  typedef boost::indirect_iterator<ConformerDataArray::const_iterator, const ConformerData> ConstConformerIterator;
62  typedef boost::indirect_iterator<ConformerDataArray::iterator, ConformerData> ConformerIterator;
63 
68 
69  void setHashCode(std::uint64_t hash_code);
70 
71  std::uint64_t getHashCode() const;
72 
73  void setSMILES(const std::string& smiles);
74 
75  const std::string& getSMILES() const;
76 
78 
79  std::size_t getNumAtoms() const;
80 
81  std::size_t getNumConformers() const;
82 
84 
85  const ConformerData& getConformer(std::size_t idx) const;
86 
87  ConformerData& getConformer(std::size_t idx);
88 
90 
92 
94 
96 
98 
100 
102 
104 
105  const ConformerDataArray& getData() const;
106 
107  private:
108  std::uint64_t hashCode;
109  std::string smiles;
110  ConformerDataArray conformers;
111  };
112  } // namespace ConfGen
113 } // namespace CDPL
114 
115 #endif // CDPL_CONFGEN_FRAGMENTLIBRARYENTRY_HPP
CDPL::ConfGen::FragmentLibraryEntry::setSMILES
void setSMILES(const std::string &smiles)
CDPL::ConfGen::FragmentLibraryEntry::clearConformers
void clearConformers()
CDPL::ConfGen::ConformerDataArray
std::vector< ConformerData::SharedPointer > ConformerDataArray
A data type for the storage of dyn. allocated ConfGen::ConformerData objects.
Definition: ConformerDataArray.hpp:46
CDPL::ConfGen::FragmentLibraryEntry::getConformer
ConformerData & getConformer(std::size_t idx)
CDPL::ConfGen::ConformerData
Definition: ConformerData.hpp:45
CDPL::ConfGen::FragmentLibraryEntry::addConformer
void addConformer(const ConformerData::SharedPointer &conf_data)
CDPL::ConfGen::FragmentLibraryEntry::getConformersEnd
ConformerIterator getConformersEnd()
CDPL::ConfGen::FragmentLibraryEntry::ConformerIterator
boost::indirect_iterator< ConformerDataArray::iterator, ConformerData > ConformerIterator
Definition: FragmentLibraryEntry.hpp:62
CDPL::ConfGen::FragmentLibraryEntry::FragmentLibraryEntry
FragmentLibraryEntry()
Constructs an empty FragmentLibraryEntry instance.
CDPL::ConfGen::FragmentLibraryEntry::begin
ConstConformerIterator begin() const
CDPL::ConfGen::FragmentLibraryEntry::getHashCode
std::uint64_t getHashCode() const
CDPL::ConfGen::FragmentLibraryEntry::getConformersBegin
ConformerIterator getConformersBegin()
CDPL::ConfGen::ConformerData::SharedPointer
std::shared_ptr< ConformerData > SharedPointer
Definition: ConformerData.hpp:48
ConformerDataArray.hpp
Definition of the type CDPL::ConfGen::ConformerDataArray.
CDPL::ConfGen::FragmentLibraryEntry
FragmentLibraryEntry.
Definition: FragmentLibraryEntry.hpp:53
CDPL::ConfGen::FragmentLibraryEntry::ConstConformerIterator
boost::indirect_iterator< ConformerDataArray::const_iterator, const ConformerData > ConstConformerIterator
Definition: FragmentLibraryEntry.hpp:61
CDPL::ConfGen::FragmentLibraryEntry::end
ConstConformerIterator end() const
APIPrefix.hpp
Definition of the preprocessor macro CDPL_CONFGEN_API.
CDPL::ConfGen::FragmentLibraryEntry::setHashCode
void setHashCode(std::uint64_t hash_code)
CDPL_CONFGEN_API
#define CDPL_CONFGEN_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
CDPL::ConfGen::FragmentLibraryEntry::SharedPointer
std::shared_ptr< FragmentLibraryEntry > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated FragmentLibraryEntry instances.
Definition: FragmentLibraryEntry.hpp:59
CDPL::ConfGen::FragmentLibraryEntry::begin
ConformerIterator begin()
CDPL
The namespace of the Chemical Data Processing Library.
CDPL::ConfGen::FragmentLibraryEntry::getNumConformers
std::size_t getNumConformers() const
CDPL::ConfGen::FragmentLibraryEntry::getConformersBegin
ConstConformerIterator getConformersBegin() const
CDPL::ConfGen::FragmentLibraryEntry::end
ConformerIterator end()
CDPL::ConfGen::FragmentLibraryEntry::getNumAtoms
std::size_t getNumAtoms() const
CDPL::ConfGen::FragmentLibraryEntry::getConformersEnd
ConstConformerIterator getConformersEnd() const
CDPL::ConfGen::FragmentLibraryEntry::getData
const ConformerDataArray & getData() const
CDPL::ConfGen::FragmentLibraryEntry::getConformer
const ConformerData & getConformer(std::size_t idx) const
CDPL::ConfGen::FragmentLibraryEntry::getSMILES
const std::string & getSMILES() const