Chemical Data Processing Library C++ API - Version 1.1.1
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 
71 
73 
75 
77 
79 
81 
83 
85 
87 
89 
91 
92  unsigned int setup(const Chem::MolecularGraph& molgraph);
93  unsigned int setup(const Chem::MolecularGraph& molgraph, const Util::BitSet& bond_mask);
94 
96  void clearInputCoordinates(std::size_t frag_idx);
97 
99  void addInputCoordinates(const Math::Vector3DArray& coords, std::size_t frag_idx);
100  void addInputCoordinates(const ConformerData& conf_data, std::size_t frag_idx);
101  void addInputCoordinates(const ConformerData::SharedPointer& conf_data, std::size_t frag_idx);
102 
103  std::size_t getNumFragments() const;
104 
105  const Chem::Fragment& getFragment(std::size_t idx) const;
106 
107  unsigned int generateConformers();
108 
109  std::size_t getNumConformers() const;
110 
111  const ConformerData& getConformer(std::size_t idx) const;
112 
113  ConformerData& getConformer(std::size_t idx);
114 
116 
118 
120 
122 
124 
126 
128 
130 
131  private:
133 
134  TorsionDriver& operator=(const TorsionDriver&);
135 
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
CDPL::ConfGen::TorsionDriver::ConformerIterator
boost::indirect_iterator< ConformerDataArray::const_iterator, ConformerData > ConformerIterator
Definition: TorsionDriver.hpp:66
CDPL::ConfGen::TorsionDriver::getNumFragments
std::size_t getNumFragments() const
CDPL::ConfGen::TorsionDriver::addInputCoordinates
void addInputCoordinates(const Math::Vector3DArray &coords, std::size_t frag_idx)
CDPL::ConfGen::TorsionDriver::getConformersBegin
ConformerIterator getConformersBegin()
CDPL::ConfGen::TorsionDriver::getAbortCallback
const CallbackFunction & getAbortCallback() const
CDPL::ConfGen::ConformerData
Definition: ConformerData.hpp:45
TorsionDriverSettings.hpp
Definition of the class CDPL::ConfGen::TorsionDriverSettings.
CDPL::ConfGen::TorsionDriver::ConstConformerIterator
boost::indirect_iterator< ConformerDataArray::const_iterator, const ConformerData > ConstConformerIterator
Definition: TorsionDriver.hpp:65
CDPL::ConfGen::TorsionDriver::setTimeoutCallback
void setTimeoutCallback(const CallbackFunction &func)
CDPL::ConfGen::TorsionDriver::getTimeoutCallback
const CallbackFunction & getTimeoutCallback() const
CDPL::Util::BitSet
boost::dynamic_bitset BitSet
A dynamic bitset class.
Definition: BitSet.hpp:46
CDPL::ConfGen::TorsionDriver::getSettings
TorsionDriverSettings & getSettings()
CDPL::ConfGen::TorsionDriver::clearInputCoordinates
void clearInputCoordinates(std::size_t frag_idx)
CDPL::Chem::Fragment
Fragment.
Definition: Fragment.hpp:52
CDPL::ConfGen::TorsionDriver::end
ConstConformerIterator end() const
CDPL::ConfGen::ConformerData::SharedPointer
std::shared_ptr< ConformerData > SharedPointer
Definition: ConformerData.hpp:48
ConformerDataArray.hpp
Definition of the type CDPL::ConfGen::ConformerDataArray.
VectorArray< Vector3D >
CDPL::Chem::MolecularGraph
MolecularGraph.
Definition: MolecularGraph.hpp:52
BitSet.hpp
Definition of the type CDPL::Util::BitSet.
CDPL::ConfGen::TorsionDriver::getSettings
const TorsionDriverSettings & getSettings() const
CDPL::ConfGen::TorsionDriver::getNumConformers
std::size_t getNumConformers() const
CDPL::ConfGen::TorsionLibrary::SharedPointer
std::shared_ptr< TorsionLibrary > SharedPointer
Definition: TorsionLibrary.hpp:49
CDPL::ConfGen::TorsionDriver::getConformersBegin
ConstConformerIterator getConformersBegin() const
CDPL::ConfGen::TorsionDriverSettings
Definition: TorsionDriverSettings.hpp:44
CDPL::ConfGen::TorsionDriver::addTorsionLibrary
void addTorsionLibrary(const TorsionLibrary::SharedPointer &lib)
CDPL::ConfGen::TorsionDriver::getFragment
const Chem::Fragment & getFragment(std::size_t idx) const
CDPL::ConfGen::TorsionDriver::setup
unsigned int setup(const Chem::MolecularGraph &molgraph)
CDPL::ConfGen::TorsionDriver::addInputCoordinates
void addInputCoordinates(const ConformerData::SharedPointer &conf_data, std::size_t frag_idx)
CDPL::ConfGen::TorsionDriver::getLogMessageCallback
const LogMessageCallbackFunction & getLogMessageCallback() const
CDPL::ConfGen::TorsionDriver::clearInputCoordinates
void clearInputCoordinates()
APIPrefix.hpp
Definition of the preprocessor macro CDPL_CONFGEN_API.
CDPL::ConfGen::TorsionDriver::addInputCoordinates
void addInputCoordinates(const Math::Vector3DArray &coords)
CDPL::ConfGen::TorsionDriver::getConformersEnd
ConstConformerIterator getConformersEnd() const
CDPL_CONFGEN_API
#define CDPL_CONFGEN_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
CDPL::ConfGen::LogMessageCallbackFunction
std::function< void(const std::string &)> LogMessageCallbackFunction
A generic wrapper class used to store a user-defined callback functions.
Definition: LogMessageCallbackFunction.hpp:45
CDPL::ConfGen::TorsionDriver::setAbortCallback
void setAbortCallback(const CallbackFunction &func)
CDPL::ConfGen::TorsionDriver::getConformer
ConformerData & getConformer(std::size_t idx)
CDPL::ConfGen::TorsionDriver::setup
unsigned int setup(const Chem::MolecularGraph &molgraph, const Util::BitSet &bond_mask)
CDPL
The namespace of the Chemical Data Processing Library.
CDPL::ConfGen::TorsionDriver::clearTorsionLibraries
void clearTorsionLibraries()
CDPL::ConfGen::TorsionDriver::getConformer
const ConformerData & getConformer(std::size_t idx) const
CDPL::ConfGen::TorsionDriver::~TorsionDriver
~TorsionDriver()
CDPL::ConfGen::TorsionDriver::TorsionDriver
TorsionDriver()
CDPL::ConfGen::TorsionDriver::addInputCoordinates
void addInputCoordinates(const ConformerData &conf_data, std::size_t frag_idx)
LogMessageCallbackFunction.hpp
Type definition of a generic wrapper class for storing user-defined log message callback functions.
CDPL::ConfGen::TorsionDriver::setLogMessageCallback
void setLogMessageCallback(const LogMessageCallbackFunction &func)
TorsionLibrary.hpp
Definition of the class CDPL::ConfGen::TorsionLibrary.
CDPL::ConfGen::TorsionDriver
Definition: TorsionDriver.hpp:62
CDPL::ConfGen::CallbackFunction
std::function< bool()> CallbackFunction
A generic wrapper class used to store a user-defined callback functions (see [FUNWRP]).
Definition: CallbackFunction.hpp:44
CDPL::ConfGen::TorsionDriver::getConformersEnd
ConformerIterator getConformersEnd()
CDPL::ConfGen::TorsionDriver::generateConformers
unsigned int generateConformers()
CallbackFunction.hpp
Type definition of a generic wrapper class for storing user-defined callback functions.
CDPL::ConfGen::TorsionDriver::begin
ConstConformerIterator begin() const
CDPL::ConfGen::TorsionDriver::begin
ConformerIterator begin()
CDPL::ConfGen::TorsionDriver::end
ConformerIterator end()