Chemical Data Processing Library C++ API - Version 1.4.0
FeatureContainerFunctions.hpp
Go to the documentation of this file.
1 /*
2  * FeatureContainerFunctions.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_FEATURECONTAINERFUNCTIONS_HPP
30 #define CDPL_PHARM_FEATURECONTAINERFUNCTIONS_HPP
31 
32 #include <cstddef>
33 #include <string>
34 
35 #include "CDPL/Pharm/APIPrefix.hpp"
37 #include "CDPL/Math/Matrix.hpp"
38 
39 
40 namespace CDPL
41 {
42 
43  namespace Chem
44  {
45 
46  class AtomContainer;
47  class Fragment;
48  } // namespace Chem
49 
50  namespace Pharm
51  {
52 
53  class FeatureContainer;
54  class FeatureTypeHistogram;
55  class FeatureSet;
56 
62  CDPL_PHARM_API const std::string& getName(const FeatureContainer& cntnr);
63 
69  CDPL_PHARM_API void setName(FeatureContainer& cntnr, const std::string& name);
70 
76 
83 
84 
90  CDPL_PHARM_API std::size_t getFeatureCount(const FeatureContainer& cntnr);
91 
98  CDPL_PHARM_API std::size_t getFeatureCount(const FeatureContainer& cntnr, unsigned int type);
99 
107 
114  CDPL_PHARM_API void generateFeatureTypeHistogramString(const FeatureContainer& cntnr, std::string& histo_str);
115 
123  CDPL_PHARM_API void clearOrientations(FeatureContainer& cntnr, bool fix_geom = true);
124 
140  CDPL_PHARM_API bool removePositionalDuplicates(const FeatureContainer& cntnr, FeatureSet& tgt_set, double pos_tol = 0.0, bool append = false);
141 
151  CDPL_PHARM_API bool removeFeaturesWithType(const FeatureContainer& cntnr, FeatureSet& tgt_set, unsigned int type, bool append = false);
152 
160 
177  const Chem::Atom3DCoordinatesFunction& coords_func,
178  const Math::Matrix4D& xform, double vdw_factor = 1.0);
179 
189  CDPL_PHARM_API void getFeatureAtoms(const FeatureContainer& cntnr, Chem::Fragment& atoms, bool append = false);
190  } // namespace Pharm
191 } // namespace CDPL
192 
193 #endif // CDPL_PHARM_FEATURECONTAINERFUNCTIONS_HPP
Type declaration of a generic wrapper class for storing user-defined Chem::Atom 3D-coordinates functi...
Definition of matrix data types.
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.
Common interface for data structures that support a random access to stored Chem::Atom instances.
Definition: AtomContainer.hpp:55
Concrete Chem::MolecularGraph implementation that stores references to a selectable subset of atoms a...
Definition: Fragment.hpp:57
Abstract base class for containers holding a sequence of Pharm::Feature objects with associated prope...
Definition: FeatureContainer.hpp:55
Concrete Pharm::FeatureContainer implementation that stores references to existing Pharm::Feature ins...
Definition: FeatureSet.hpp:56
Data type for the storage of feature type histograms of pharmacophores.
Definition: FeatureTypeHistogram.hpp:50
std::function< const Math::Vector3D &(const Chem::Atom &)> Atom3DCoordinatesFunction
Generic wrapper class used to store a user-defined Chem::Atom 3D-coordinates function.
Definition: Atom3DCoordinatesFunction.hpp:43
CDPL_PHARM_API const std::string & getName(const FeatureContainer &cntnr)
Returns the name of the feature container cntnr (stored as Pharm::FeatureContainerProperty::NAME).
CDPL_PHARM_API void generateFeatureTypeHistogram(const FeatureContainer &cntnr, FeatureTypeHistogram &hist, bool append=false)
Computes a per Pharm::FeatureType frequency histogram of the features in cntnr.
CDPL_PHARM_API void generateFeatureTypeHistogramString(const FeatureContainer &cntnr, std::string &histo_str)
Generates a human-readable comma-separated string representation of the feature-type histogram of cnt...
CDPL_PHARM_API std::size_t getFeatureCount(const FeatureContainer &cntnr)
Returns the total number of features stored in the feature container cntnr.
CDPL_PHARM_API void clearOrientations(FeatureContainer &cntnr, bool fix_geom=true)
Clears the orientation property of every feature in cntnr and (optionally) resets each feature's geom...
CDPL_PHARM_API bool removePositionalDuplicates(const FeatureContainer &cntnr, FeatureSet &tgt_set, double pos_tol=0.0, bool append=false)
Copies the features in cntnr into tgt_set, suppressing features that share both type and 3D position ...
CDPL_PHARM_API bool checkForExclusionVolumeClashes(const FeatureContainer &ftr_cntnr, const Chem::AtomContainer &atom_cntnr, const Chem::Atom3DCoordinatesFunction &coords_func, const Math::Matrix4D &xform, double vdw_factor=1.0)
Tests whether the exclusion-volume features in ftr_cntnr remain clash-free with respect to the transf...
CDPL_PHARM_API void clearName(FeatureContainer &cntnr)
Removes the name property from the feature container cntnr.
CDPL_PHARM_API void setName(FeatureContainer &cntnr, const std::string &name)
Sets the name of the feature container cntnr.
CDPL_PHARM_API void getFeatureAtoms(const FeatureContainer &cntnr, Chem::Fragment &atoms, bool append=false)
Collects the atoms of the molecular substructures underlying the features of cntnr into atoms.
CDPL_PHARM_API void transform3DCoordinates(FeatureContainer &cntnr, const Math::Matrix4D &mtx)
Applies the affine transformation mtx to the 3D position (and, if set, the orientation vector) of eve...
CDPL_PHARM_API bool hasName(const FeatureContainer &cntnr)
Tells whether a name has been set for the feature container cntnr.
CDPL_PHARM_API bool removeFeaturesWithType(const FeatureContainer &cntnr, FeatureSet &tgt_set, unsigned int type, bool append=false)
Copies the features in cntnr into tgt_set, skipping every feature whose Pharm::FeatureType matches ty...
The namespace of the Chemical Data Processing Library.