Chemical Data Processing Library C++ API - Version 1.2.0
PSDScreeningDBCreator.hpp
Go to the documentation of this file.
1 /*
2  * PSDScreeningDBCreator.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_PHARM_PSDSCREENINGDBCREATOR_HPP
30 #define CDPL_PHARM_PSDSCREENINGDBCREATOR_HPP
31 
32 #include <memory>
33 
34 #include "CDPL/Pharm/APIPrefix.hpp"
36 
37 
38 namespace CDPL
39 {
40 
41  namespace Pharm
42  {
43 
44  class PSDScreeningDBCreatorImpl;
45 
50  {
51 
52  public:
53  typedef std::shared_ptr<PSDScreeningDBCreator> SharedPointer;
54 
56 
65  PSDScreeningDBCreator(const std::string& name, Mode mode = CREATE, bool allow_dup_entries = true);
66 
68 
73 
75 
76  void open(const std::string& name, Mode mode = CREATE, bool allow_dup_entries = true);
77 
78  void close();
79 
80  Mode getMode() const;
81 
82  bool allowDuplicateEntries() const;
83 
84  bool process(const Chem::MolecularGraph& molgraph);
85 
86  bool merge(const ScreeningDBAccessor& db_acc, const ProgressCallbackFunction& func);
87 
88  const std::string& getDatabaseName() const;
89 
90  std::size_t getNumProcessed() const;
91 
92  std::size_t getNumRejected() const;
93 
94  std::size_t getNumDeleted() const;
95 
96  std::size_t getNumInserted() const;
97 
98  private:
99  typedef std::unique_ptr<PSDScreeningDBCreatorImpl> ImplementationPointer;
100 
101  ImplementationPointer impl;
102  };
103  } // namespace Pharm
104 } // namespace CDPL
105 
106 #endif // CDPL_PHARM_PSDSCREENINGDBCREATOR_HPP
Definition of the preprocessor macro CDPL_PHARM_API.
#define CDPL_PHARM_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
Definition of the class CDPL::Pharm::ScreeningDBCreator.
MolecularGraph.
Definition: MolecularGraph.hpp:52
A class for the creation of optimized pharmacophore screening databases.
Definition: PSDScreeningDBCreator.hpp:50
const std::string & getDatabaseName() const
std::size_t getNumDeleted() const
bool merge(const ScreeningDBAccessor &db_acc, const ProgressCallbackFunction &func)
std::size_t getNumProcessed() const
void open(const std::string &name, Mode mode=CREATE, bool allow_dup_entries=true)
bool process(const Chem::MolecularGraph &molgraph)
PSDScreeningDBCreator & operator=(const PSDScreeningDBCreator &)=delete
std::size_t getNumRejected() const
std::shared_ptr< PSDScreeningDBCreator > SharedPointer
Definition: PSDScreeningDBCreator.hpp:53
PSDScreeningDBCreator(const std::string &name, Mode mode=CREATE, bool allow_dup_entries=true)
Constructs a PSDScreeningDBCreator instance that will write data to the database-file specified by na...
std::size_t getNumInserted() const
PSDScreeningDBCreator(const PSDScreeningDBCreator &)=delete
A class for accessing the data stored in pharmacophore screening databases.
Definition: ScreeningDBAccessor.hpp:58
A class for the creation of optimized pharmacophore screening databases.
Definition: ScreeningDBCreator.hpp:58
Mode
Definition: ScreeningDBCreator.hpp:66
std::function< bool(double)> ProgressCallbackFunction
Definition: ScreeningDBCreator.hpp:63
The namespace of the Chemical Data Processing Library.