Chemical Data Processing Library C++ API - Version 1.1.1
FragmentLibraryGenerator.hpp
Go to the documentation of this file.
1 /*
2  * FragmentLibraryGenerator.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_FRAGMENTLIBRARYGENERATOR_HPP
30 #define CDPL_CONFGEN_FRAGMENTLIBRARYGENERATOR_HPP
31 
32 #include <sstream>
33 
39 
40 
41 namespace CDPL
42 {
43 
44  namespace ConfGen
45  {
46 
51  {
52 
53  public:
55 
57 
59 
61 
63 
65 
67 
69 
71 
73 
75 
77 
78  unsigned int process(const Chem::MolecularGraph& frag, const Chem::MolecularGraph& parent);
79 
80  std::size_t getNumGeneratedConformers() const;
81 
82  std::uint64_t getLibraryEntryHashCode() const;
83 
84  private:
86 
88 
89  FragmentLibraryEntry::SharedPointer addNewLibraryEntry(const Chem::MolecularGraph& frag, const Chem::MolecularGraph& parent);
90 
91  void removeNewLibraryEntry() const;
92 
93  void init();
94 
96  CanonicalFragment canonFrag;
97  FragmentConformerGenerator fragConfGen;
98  std::ostringstream smilesStream;
100  std::size_t numGenConfs;
101  };
102  } // namespace ConfGen
103 } // namespace CDPL
104 
105 #endif // CDPL_CONFGEN_FRAGMENTLIBRARYGENERATOR_HPP
CDPL::ConfGen::FragmentLibraryGenerator::process
unsigned int process(const Chem::MolecularGraph &frag, const Chem::MolecularGraph &parent)
CDPL::ConfGen::FragmentLibraryGenerator::getSettings
const FragmentConformerGeneratorSettings & getSettings() const
CDPL::ConfGen::FragmentLibraryGenerator::FragmentLibraryGenerator
FragmentLibraryGenerator(const FragmentLibrary::SharedPointer &lib)
CDPL::ConfGen::FragmentConformerGenerator
Definition: FragmentConformerGenerator.hpp:58
CDPL::ConfGen::FragmentLibraryGenerator::setLogMessageCallback
void setLogMessageCallback(const LogMessageCallbackFunction &func)
CDPL::ConfGen::FragmentLibraryGenerator::getLogMessageCallback
const LogMessageCallbackFunction & getLogMessageCallback() const
CDPL::ConfGen::FragmentLibrary::SharedPointer
std::shared_ptr< FragmentLibrary > SharedPointer
Definition: FragmentLibrary.hpp:54
CDPL::Chem::MolecularGraph
MolecularGraph.
Definition: MolecularGraph.hpp:52
CDPL::ConfGen::FragmentLibraryGenerator::getSettings
FragmentConformerGeneratorSettings & getSettings()
CDPL::ConfGen::FragmentLibraryGenerator::getAbortCallback
const CallbackFunction & getAbortCallback() const
CDPL::ConfGen::CanonicalFragment
CanonicalFragment.
Definition: CanonicalFragment.hpp:54
APIPrefix.hpp
Definition of the preprocessor macro CDPL_CONFGEN_API.
CDPL::ConfGen::FragmentLibraryGenerator::FragmentLibraryGenerator
FragmentLibraryGenerator()
CDPL::ConfGen::FragmentLibraryGenerator::setFragmentLibrary
void setFragmentLibrary(const FragmentLibrary::SharedPointer &lib)
CDPL::ConfGen::FragmentLibraryGenerator::getFragmentLibrary
const FragmentLibrary::SharedPointer & getFragmentLibrary() 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::FragmentLibraryEntry::SharedPointer
std::shared_ptr< FragmentLibraryEntry > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated FragmentLibraryEntry instances.
Definition: FragmentLibraryEntry.hpp:59
CanonicalFragment.hpp
Definition of the class CDPL::ConfGen::CanonicalFragment.
CDPL::ConfGen::FragmentLibraryGenerator::setTimeoutCallback
void setTimeoutCallback(const CallbackFunction &func)
CDPL::Chem::SMILESMolecularGraphWriter
A writer for molecular graph data in the Daylight SMILES [SMILES] format.
Definition: SMILESMolecularGraphWriter.hpp:130
CDPL
The namespace of the Chemical Data Processing Library.
FragmentConformerGenerator.hpp
Definition of the class CDPL::ConfGen::FragmentConformerGenerator.
CDPL::ConfGen::FragmentLibraryGenerator::getLibraryEntryHashCode
std::uint64_t getLibraryEntryHashCode() const
CDPL::ConfGen::FragmentLibraryGenerator::setAbortCallback
void setAbortCallback(const CallbackFunction &func)
SMILESMolecularGraphWriter.hpp
Definition of the class CDPL::Chem::SMILESMolecularGraphWriter.
CDPL::ConfGen::FragmentLibraryGenerator::getTimeoutCallback
const CallbackFunction & getTimeoutCallback() const
FragmentLibrary.hpp
Definition of the class CDPL::ConfGen::FragmentLibrary.
CDPL::ConfGen::FragmentLibraryGenerator::getNumGeneratedConformers
std::size_t getNumGeneratedConformers() const
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::FragmentConformerGeneratorSettings
Definition: FragmentConformerGeneratorSettings.hpp:44
CDPL::ConfGen::FragmentLibraryGenerator
FragmentLibraryGenerator.
Definition: FragmentLibraryGenerator.hpp:51