Chemical Data Processing Library C++ API - Version 1.1.1
Chem/AtomContainerFunctions.hpp
Go to the documentation of this file.
1 /*
2  * AtomContainerFunctions.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_CHEM_ATOMCONTAINERFUNCTIONS_HPP
30 #define CDPL_CHEM_ATOMCONTAINERFUNCTIONS_HPP
31 
32 #include <cstddef>
33 
34 #include "CDPL/Chem/APIPrefix.hpp"
37 #include "CDPL/Math/Matrix.hpp"
39 #include "CDPL/Util/BitSet.hpp"
40 
41 
42 namespace CDPL
43 {
44 
45  namespace Chem
46  {
47 
48  class AtomContainer;
49  class Fragment;
50  class Molecule;
51 
52 
53  CDPL_CHEM_API bool hasCoordinates(const AtomContainer& cntnr, std::size_t dim);
54 
55 
56  CDPL_CHEM_API void get2DCoordinates(const AtomContainer& cntnr, Math::Vector2DArray& coords, bool append = false);
57 
59 
61 
62 
63  CDPL_CHEM_API void get3DCoordinates(const AtomContainer& cntnr, Math::Vector3DArray& coords, const Atom3DCoordinatesFunction& coords_func, bool append = false);
64 
65 
67 
68  CDPL_CHEM_API std::size_t getNumConformations(const AtomContainer& cntnr);
69 
70  CDPL_CHEM_API void applyConformation(AtomContainer& cntnr, std::size_t conf_idx);
71 
72  CDPL_CHEM_API void getConformation(const AtomContainer& cntnr, std::size_t conf_idx, Math::Vector3DArray& coords, bool append = false);
73 
74  CDPL_CHEM_API void setConformation(AtomContainer& cntnr, std::size_t conf_idx, const Math::Vector3DArray& coords);
75 
77 
78  CDPL_CHEM_API void transformConformation(AtomContainer& cntnr, std::size_t conf_idx, const Math::Matrix4D& mtx);
79 
81 
82  /*
83  * \since 1.1
84  */
85  CDPL_CHEM_API bool alignConformations(AtomContainer& cntnr, const Util::BitSet& ref_atoms, const Math::Vector3DArray& ref_coords);
86 
87  /*
88  * \since 1.1
89  */
90  CDPL_CHEM_API bool alignConformations(AtomContainer& cntnr, const AtomContainer& ref_atoms, const Math::Vector3DArray& ref_coords);
91 
92  /*
93  * \since 1.1
94  */
96 
97  /*
98  * \since 1.1
99  */
101 
102 
104 
106 
107 
108  CDPL_CHEM_API std::size_t createAtomTypeMask(const AtomContainer& cntnr, Util::BitSet& mask, unsigned int type, bool reset = true, bool strict = true);
109 
110 
111  CDPL_CHEM_API void copyAtomsIf(const AtomContainer& cntnr, Molecule& mol, const AtomPredicate& pred, bool append = false);
112 
113  CDPL_CHEM_API void copyAtomsIf(const AtomContainer& cntnr, Fragment& frag, const AtomPredicate& pred, bool append = false);
114 
115  CDPL_CHEM_API void copyAtomsIfNot(const AtomContainer& cntnr, Molecule& mol, const AtomPredicate& pred, bool append = false);
116 
117  CDPL_CHEM_API void copyAtomsIfNot(const AtomContainer& cntnr, Fragment& frag, const AtomPredicate& pred, bool append = false);
118 
119 
121 
123 
124  CDPL_CHEM_API void calcBoundingBox(const AtomContainer& cntnr, Math::Vector3D& min, Math::Vector3D& max, const Atom3DCoordinatesFunction& coords_func, bool reset = true);
125 
126  CDPL_CHEM_API bool insideBoundingBox(const AtomContainer& cntnr, const Math::Vector3D& min, const Math::Vector3D& max, const Atom3DCoordinatesFunction& coords_func);
127 
128  CDPL_CHEM_API bool intersectsBoundingBox(const AtomContainer& cntnr, const Math::Vector3D& min, const Math::Vector3D& max, const Atom3DCoordinatesFunction& coords_func);
129  } // namespace Chem
130 } // namespace CDPL
131 
132 #endif // CDPL_CHEM_ATOMCONTAINERFUNCTIONS_HPP
APIPrefix.hpp
Definition of the preprocessor macro CDPL_CHEM_API.
CDPL::Chem::calcCenterOfMass
CDPL_CHEM_API bool calcCenterOfMass(const AtomContainer &cntnr, const Atom3DCoordinatesFunction &coords_func, Math::Vector3D &ctr)
CMatrix< double, 4, 4 >
VectorArray.hpp
Definition of the class CDPL::Math::VectorArray.
CDPL::Chem::getConformation
CDPL_CHEM_API void getConformation(const AtomContainer &cntnr, std::size_t conf_idx, Math::Vector3DArray &coords, bool append=false)
CDPL::Chem::getNumConformations
CDPL_CHEM_API std::size_t getNumConformations(const AtomContainer &cntnr)
CDPL_CHEM_API
#define CDPL_CHEM_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
CDPL::Math::Vector3D
CVector< double, 3 > Vector3D
A bounded 3 element vector holding floating point values of type double.
Definition: Vector.hpp:1637
CDPL::Chem::get2DCoordinates
CDPL_CHEM_API void get2DCoordinates(const AtomContainer &cntnr, Math::Vector2DArray &coords, bool append=false)
CDPL::Chem::getMaxComponentGroupID
CDPL_CHEM_API std::size_t getMaxComponentGroupID(const AtomContainer &cntnr)
CDPL::Chem::copyAtomsIfNot
CDPL_CHEM_API void copyAtomsIfNot(const AtomContainer &cntnr, Molecule &mol, const AtomPredicate &pred, bool append=false)
CDPL::Chem::hasCoordinates
CDPL_CHEM_API bool hasCoordinates(const AtomContainer &cntnr, std::size_t dim)
CDPL::Chem::calcCentroid
CDPL_CHEM_API bool calcCentroid(const AtomContainer &cntnr, const Atom3DCoordinatesFunction &coords_func, Math::Vector3D &ctr)
CDPL::Util::BitSet
boost::dynamic_bitset BitSet
A dynamic bitset class.
Definition: BitSet.hpp:46
CDPL::Chem::transform2DCoordinates
CDPL_CHEM_API void transform2DCoordinates(AtomContainer &cntnr, const Math::Matrix3D &mtx)
CDPL::Chem::Fragment
Fragment.
Definition: Fragment.hpp:52
CDPL::Chem::addConformation
CDPL_CHEM_API void addConformation(AtomContainer &cntnr, const Math::Vector3DArray &coords)
VectorArray< Vector3D >
BitSet.hpp
Definition of the type CDPL::Util::BitSet.
Atom3DCoordinatesFunction.hpp
Type definition of a generic wrapper class for storing user-defined Chem::Atom 3D-coordinates functio...
CDPL::Chem::Molecule
Molecule.
Definition: Molecule.hpp:49
CDPL::Chem::AtomPredicate
std::function< bool(const Chem::Atom &)> AtomPredicate
A generic wrapper class used to store a user-defined atom predicate.
Definition: AtomPredicate.hpp:41
CDPL::Chem::AtomContainer
A common interface for data-structures that support a random access to stored Chem::Atom instances.
Definition: AtomContainer.hpp:55
CDPL::Chem::applyConformation
CDPL_CHEM_API void applyConformation(AtomContainer &cntnr, std::size_t conf_idx)
CDPL::Chem::setConformation
CDPL_CHEM_API void setConformation(AtomContainer &cntnr, std::size_t conf_idx, const Math::Vector3DArray &coords)
AtomPredicate.hpp
Type definition of a generic wrapper class for storing user-defined Chem::Atom predicates.
CDPL::Chem::copyAtomsIf
CDPL_CHEM_API void copyAtomsIf(const AtomContainer &cntnr, Molecule &mol, const AtomPredicate &pred, bool append=false)
CDPL::Chem::clearConformations
CDPL_CHEM_API void clearConformations(AtomContainer &cntnr)
CDPL::Chem::getMaxAtomMappingID
CDPL_CHEM_API std::size_t getMaxAtomMappingID(const AtomContainer &cntnr)
CDPL::Chem::Atom3DCoordinatesFunction
std::function< const Math::Vector3D &(const Chem::Atom &)> Atom3DCoordinatesFunction
A generic wrapper class used to store a user-defined Chem::Atom 3D-coordinates function.
Definition: Atom3DCoordinatesFunction.hpp:43
CDPL::Math::Matrix3D
CMatrix< double, 3, 3 > Matrix3D
A bounded 3x3 matrix holding floating point values of type double.
Definition: Matrix.hpp:1849
CDPL::Chem::insideBoundingBox
CDPL_CHEM_API bool insideBoundingBox(const AtomContainer &cntnr, const Math::Vector3D &min, const Math::Vector3D &max, const Atom3DCoordinatesFunction &coords_func)
CDPL
The namespace of the Chemical Data Processing Library.
CDPL::Chem::alignConformations
CDPL_CHEM_API bool alignConformations(AtomContainer &cntnr, const Util::BitSet &ref_atoms, const Math::Vector3DArray &ref_coords)
CDPL::Chem::intersectsBoundingBox
CDPL_CHEM_API bool intersectsBoundingBox(const AtomContainer &cntnr, const Math::Vector3D &min, const Math::Vector3D &max, const Atom3DCoordinatesFunction &coords_func)
CDPL::Chem::createAtomTypeMask
CDPL_CHEM_API std::size_t createAtomTypeMask(const AtomContainer &cntnr, Util::BitSet &mask, unsigned int type, bool reset=true, bool strict=true)
Matrix.hpp
Definition of matrix data types.
CDPL::Math::Vector2DArray
VectorArray< Vector2D > Vector2DArray
An array of Math::Vector2D objects.
Definition: VectorArray.hpp:79
CDPL::Chem::calcBoundingBox
CDPL_CHEM_API void calcBoundingBox(const AtomContainer &cntnr, Math::Vector3D &min, Math::Vector3D &max, const Atom3DCoordinatesFunction &coords_func, bool reset=true)
CDPL::Chem::transformConformations
CDPL_CHEM_API void transformConformations(AtomContainer &cntnr, const Math::Matrix4D &mtx)
CDPL::Chem::transformConformation
CDPL_CHEM_API void transformConformation(AtomContainer &cntnr, std::size_t conf_idx, const Math::Matrix4D &mtx)
CDPL::Chem::get3DCoordinates
CDPL_CHEM_API void get3DCoordinates(const AtomContainer &cntnr, Math::Vector3DArray &coords, const Atom3DCoordinatesFunction &coords_func, bool append=false)
CDPL::Chem::set2DCoordinates
CDPL_CHEM_API void set2DCoordinates(AtomContainer &cntnr, const Math::Vector2DArray &coords)