Chemical Data Processing Library C++ API - Version 1.2.0
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
Definition of the preprocessor macro CDPL_CONFGEN_API.
#define CDPL_CONFGEN_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
Definition of the type CDPL::ConfGen::ConformerDataArray.
Definition: ConformerData.hpp:45
std::shared_ptr< ConformerData > SharedPointer
Definition: ConformerData.hpp:48
FragmentLibraryEntry.
Definition: FragmentLibraryEntry.hpp:53
const ConformerData & getConformer(std::size_t idx) const
ConformerData & getConformer(std::size_t idx)
const std::string & getSMILES() const
FragmentLibraryEntry()
Constructs an empty FragmentLibraryEntry instance.
void addConformer(const ConformerData::SharedPointer &conf_data)
std::shared_ptr< FragmentLibraryEntry > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated FragmentLibraryEntry instances.
Definition: FragmentLibraryEntry.hpp:59
boost::indirect_iterator< ConformerDataArray::const_iterator, const ConformerData > ConstConformerIterator
Definition: FragmentLibraryEntry.hpp:61
ConstConformerIterator getConformersBegin() const
std::uint64_t getHashCode() const
ConformerIterator getConformersBegin()
void setHashCode(std::uint64_t hash_code)
const ConformerDataArray & getData() const
ConstConformerIterator getConformersEnd() const
ConformerIterator getConformersEnd()
void setSMILES(const std::string &smiles)
ConstConformerIterator begin() const
boost::indirect_iterator< ConformerDataArray::iterator, ConformerData > ConformerIterator
Definition: FragmentLibraryEntry.hpp:62
std::size_t getNumConformers() const
ConstConformerIterator end() const
std::vector< ConformerData::SharedPointer > ConformerDataArray
A data type for the storage of dyn. allocated ConfGen::ConformerData objects.
Definition: ConformerDataArray.hpp:46
The namespace of the Chemical Data Processing Library.