Chemical Data Processing Library C++ API - Version 1.2.0
TorsionDriver.hpp
Go to the documentation of this file.
1 /*
2  * TorsionDriver.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_CONFGEN_TORSIONDRIVER_HPP
30 #define CDPL_CONFGEN_TORSIONDRIVER_HPP
31 
32 #include <cstddef>
33 #include <memory>
34 
35 #include <boost/iterator/indirect_iterator.hpp>
36 
43 #include "CDPL/Util/BitSet.hpp"
44 
45 
46 namespace CDPL
47 {
48 
49  namespace Chem
50  {
51 
52  class MolecularGraph;
53  class Fragment;
54  } // namespace Chem
55 
56  namespace ConfGen
57  {
58 
59  class TorsionDriverImpl;
60 
62  {
63 
64  public:
65  typedef boost::indirect_iterator<ConformerDataArray::const_iterator, const ConformerData> ConstConformerIterator;
66  typedef boost::indirect_iterator<ConformerDataArray::const_iterator, ConformerData> ConformerIterator;
67 
69 
70  TorsionDriver(const TorsionDriver&) = delete;
71 
73 
75 
77 
79 
81 
83 
85 
87 
89 
91 
93 
95 
96  unsigned int setup(const Chem::MolecularGraph& molgraph);
97  unsigned int setup(const Chem::MolecularGraph& molgraph, const Util::BitSet& bond_mask);
98 
100  void clearInputCoordinates(std::size_t frag_idx);
101 
103  void addInputCoordinates(const Math::Vector3DArray& coords, std::size_t frag_idx);
104  void addInputCoordinates(const ConformerData& conf_data, std::size_t frag_idx);
105  void addInputCoordinates(const ConformerData::SharedPointer& conf_data, std::size_t frag_idx);
106 
107  std::size_t getNumFragments() const;
108 
109  const Chem::Fragment& getFragment(std::size_t idx) const;
110 
111  unsigned int generateConformers();
112 
113  std::size_t getNumConformers() const;
114 
115  const ConformerData& getConformer(std::size_t idx) const;
116 
117  ConformerData& getConformer(std::size_t idx);
118 
120 
122 
124 
126 
128 
130 
132 
134 
135  private:
136  typedef std::unique_ptr<TorsionDriverImpl> ImplementationPointer;
137 
138  ImplementationPointer impl;
139  };
140  } // namespace ConfGen
141 } // namespace CDPL
142 
143 #endif // CDPL_CONFGEN_TORSIONDRIVER_HPP
Definition of the type CDPL::Util::BitSet.
Type definition of a generic wrapper class for storing user-defined callback functions.
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.
Type definition of a generic wrapper class for storing user-defined log message callback functions.
Definition of the class CDPL::ConfGen::TorsionDriverSettings.
Definition of the class CDPL::ConfGen::TorsionLibrary.
Fragment.
Definition: Fragment.hpp:52
MolecularGraph.
Definition: MolecularGraph.hpp:52
Definition: ConformerData.hpp:45
std::shared_ptr< ConformerData > SharedPointer
Definition: ConformerData.hpp:48
Definition: TorsionDriverSettings.hpp:44
Definition: TorsionDriver.hpp:62
const LogMessageCallbackFunction & getLogMessageCallback() const
ConformerIterator end()
boost::indirect_iterator< ConformerDataArray::const_iterator, const ConformerData > ConstConformerIterator
Definition: TorsionDriver.hpp:65
ConstConformerIterator begin() const
ConformerIterator begin()
const TorsionDriverSettings & getSettings() const
void addTorsionLibrary(const TorsionLibrary::SharedPointer &lib)
void clearInputCoordinates(std::size_t frag_idx)
void addInputCoordinates(const ConformerData &conf_data, std::size_t frag_idx)
std::size_t getNumFragments() const
unsigned int generateConformers()
const Chem::Fragment & getFragment(std::size_t idx) const
std::size_t getNumConformers() const
ConformerIterator getConformersEnd()
TorsionDriver(const TorsionDriver &)=delete
void setTimeoutCallback(const CallbackFunction &func)
TorsionDriver & operator=(const TorsionDriver &)=delete
const CallbackFunction & getAbortCallback() const
void addInputCoordinates(const ConformerData::SharedPointer &conf_data, std::size_t frag_idx)
void addInputCoordinates(const Math::Vector3DArray &coords)
ConformerData & getConformer(std::size_t idx)
ConstConformerIterator getConformersBegin() const
ConformerIterator getConformersBegin()
void setLogMessageCallback(const LogMessageCallbackFunction &func)
void setAbortCallback(const CallbackFunction &func)
ConstConformerIterator getConformersEnd() const
void addInputCoordinates(const Math::Vector3DArray &coords, std::size_t frag_idx)
TorsionDriverSettings & getSettings()
const ConformerData & getConformer(std::size_t idx) const
unsigned int setup(const Chem::MolecularGraph &molgraph)
const CallbackFunction & getTimeoutCallback() const
boost::indirect_iterator< ConformerDataArray::const_iterator, ConformerData > ConformerIterator
Definition: TorsionDriver.hpp:66
unsigned int setup(const Chem::MolecularGraph &molgraph, const Util::BitSet &bond_mask)
ConstConformerIterator end() const
std::shared_ptr< TorsionLibrary > SharedPointer
Definition: TorsionLibrary.hpp:49
std::function< void(const std::string &)> LogMessageCallbackFunction
A generic wrapper class used to store a user-defined callback functions.
Definition: LogMessageCallbackFunction.hpp:45
std::function< bool()> CallbackFunction
A generic wrapper class used to store a user-defined callback functions (see [FUNWRP]).
Definition: CallbackFunction.hpp:44
VectorArray< Vector3D > Vector3DArray
An array of Math::Vector3D objects.
Definition: VectorArray.hpp:84
boost::dynamic_bitset BitSet
A dynamic bitset class.
Definition: BitSet.hpp:46
The namespace of the Chemical Data Processing Library.