Chemical Data Processing Library C++ API - Version 1.4.0
FileScreeningHitCollector.hpp
Go to the documentation of this file.
1 /*
2  * FileScreeningHitCollector.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_FILESCREENINGHITCOLLECTOR_HPP
30 #define CDPL_PHARM_FILESCREENINGHITCOLLECTOR_HPP
31 
32 #include "CDPL/Pharm/APIPrefix.hpp"
36 
37 
38 namespace CDPL
39 {
40 
41  namespace Base
42  {
43 
44  template <typename T>
45  class DataWriter;
46  }
47 
48  namespace Pharm
49  {
50 
56  {
57 
58  public:
61 
67 
73 
79 
84  void alignHitMolecule(bool align);
85 
90  bool alignHitMolecule() const;
91 
96  void outputScoreProperty(bool output);
97 
102  bool outputScoreProperty() const;
103 
108  void outputDBNameProperty(bool output);
109 
114  bool outputDBNameProperty() const;
115 
120  void outputDBMoleculeIndexProperty(bool output);
121 
127 
133 
139 
144  void outputZeroBasedIndices(bool zero_based);
145 
151 
158  bool operator()(const ScreeningProcessor::SearchHit& hit, double score);
159 
160  private:
161  MolecularGraphWriter* dataWriter;
162  bool alignMolecule;
163  bool optScore;
164  bool optDBName;
165  bool optMolIndex;
166  bool optConfIndex;
167  bool optZeroBasedInds;
168  Math::Vector3DArray alignedCoords;
169  Chem::BasicMolecule molecule;
170  };
171  } // namespace Pharm
172 } // namespace CDPL
173 
174 #endif // CDPL_PHARM_FILESCREENINGHITCOLLECTOR_HPP
Definition of class CDPL::Chem::BasicMolecule.
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 class CDPL::Pharm::ScreeningProcessor.
Definition of class CDPL::Math::VectorArray.
Concrete Chem::Molecule implementation that owns Chem::BasicAtom and Chem::BasicBond instances.
Definition: BasicMolecule.hpp:60
Hit-callback functor for use with Pharm::ScreeningProcessor that writes each accepted hit molecule (o...
Definition: FileScreeningHitCollector.hpp:56
void alignHitMolecule(bool align)
Specifies whether the hit molecule's coordinates shall be transformed by the alignment matrix before ...
bool outputZeroBasedIndices() const
Tells whether emitted molecule and conformer indices are zero-based.
bool outputMoleculeConfIndexProperty() const
Tells whether the conformer index within the source molecule is written as a molecule property.
bool outputDBNameProperty() const
Tells whether the source-database name is written as a molecule property.
void setDataWriter(MolecularGraphWriter &writer)
Specifies the molecular graph writer used to output hit molecules.
void outputZeroBasedIndices(bool zero_based)
Specifies whether emitted molecule and conformer indices are zero-based (rather than one-based).
bool outputScoreProperty() const
Tells whether the alignment score is written as a molecule property.
FileScreeningHitCollector(MolecularGraphWriter &writer)
Constructs the FileScreeningHitCollector instance.
bool alignHitMolecule() const
Tells whether the hit molecule is aligned before writing.
bool operator()(const ScreeningProcessor::SearchHit &hit, double score)
Writes the search hit hit and its alignment score score to the configured data writer.
void outputMoleculeConfIndexProperty(bool output)
Specifies whether the conformer index within the source molecule shall be written as a molecule prope...
Base::DataWriter< Chem::MolecularGraph > MolecularGraphWriter
Type of the underlying molecular graph data writer.
Definition: FileScreeningHitCollector.hpp:60
void outputDBMoleculeIndexProperty(bool output)
Specifies whether the source-database molecule index shall be written as a molecule property.
void outputDBNameProperty(bool output)
Specifies whether the source-database name shall be written as a molecule property.
bool outputDBMoleculeIndexProperty() const
Tells whether the source-database molecule index is written as a molecule property.
void outputScoreProperty(bool output)
Specifies whether the alignment score shall be written as a molecule property.
MolecularGraphWriter & getDataWriter() const
Returns the currently configured molecular graph writer.
Data structure representing a single alignment hit produced by the screening processor,...
Definition: Pharm/ScreeningProcessor.hpp:83
VectorArray< Vector3D > Vector3DArray
Array storing vectors of type Math::Vector3D.
Definition: VectorArray.hpp:85
The namespace of the Chemical Data Processing Library.