Chemical Data Processing Library C++ API - Version 1.2.0
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 
79 
81 
82  unsigned int process(const Chem::MolecularGraph& frag, const Chem::MolecularGraph& parent);
83 
84  std::size_t getNumGeneratedConformers() const;
85 
86  std::uint64_t getLibraryEntryHashCode() const;
87 
88  private:
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
Definition of the class CDPL::ConfGen::CanonicalFragment.
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 class CDPL::ConfGen::FragmentConformerGenerator.
Definition of the class CDPL::ConfGen::FragmentLibrary.
Definition of the class CDPL::Chem::SMILESMolecularGraphWriter.
MolecularGraph.
Definition: MolecularGraph.hpp:52
A writer for molecular graph data in the Daylight SMILES [SMILES] format.
Definition: SMILESMolecularGraphWriter.hpp:130
CanonicalFragment.
Definition: CanonicalFragment.hpp:54
Definition: FragmentConformerGeneratorSettings.hpp:44
Definition: FragmentConformerGenerator.hpp:58
std::shared_ptr< FragmentLibraryEntry > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated FragmentLibraryEntry instances.
Definition: FragmentLibraryEntry.hpp:59
FragmentLibraryGenerator.
Definition: FragmentLibraryGenerator.hpp:51
unsigned int process(const Chem::MolecularGraph &frag, const Chem::MolecularGraph &parent)
const FragmentLibrary::SharedPointer & getFragmentLibrary() const
const CallbackFunction & getTimeoutCallback() const
const LogMessageCallbackFunction & getLogMessageCallback() const
FragmentLibraryGenerator(const FragmentLibraryGenerator &)=delete
std::uint64_t getLibraryEntryHashCode() const
const FragmentConformerGeneratorSettings & getSettings() const
void setFragmentLibrary(const FragmentLibrary::SharedPointer &lib)
const CallbackFunction & getAbortCallback() const
FragmentConformerGeneratorSettings & getSettings()
FragmentLibraryGenerator & operator=(const FragmentLibraryGenerator &)=delete
std::size_t getNumGeneratedConformers() const
FragmentLibraryGenerator(const FragmentLibrary::SharedPointer &lib)
void setAbortCallback(const CallbackFunction &func)
void setLogMessageCallback(const LogMessageCallbackFunction &func)
void setTimeoutCallback(const CallbackFunction &func)
std::shared_ptr< FragmentLibrary > SharedPointer
Definition: FragmentLibrary.hpp:54
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
The namespace of the Chemical Data Processing Library.