Chemical Data Processing Library C++ API - Version 1.4.0
Chem/Entity3DContainerFunctions.hpp
Go to the documentation of this file.
1 /*
2  * Entity3DContainerFunctions.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_ENTITY3DCONTAINERFUNCTIONS_HPP
30 #define CDPL_CHEM_ENTITY3DCONTAINERFUNCTIONS_HPP
31 
32 #include "CDPL/Chem/APIPrefix.hpp"
34 #include "CDPL/Math/Matrix.hpp"
35 
36 
37 namespace CDPL
38 {
39 
40  namespace Chem
41  {
42 
43  class Entity3DContainer;
44 
45 
52 
53 
60  CDPL_CHEM_API void get3DCoordinates(const Entity3DContainer& cntnr, Math::Vector3DArray& coords, bool append = false);
61 
68 
75 
85  CDPL_CHEM_API bool align3DCoordinates(Entity3DContainer& cntnr, const Entity3DContainer& ref_entities, const Math::Vector3DArray& ref_coords);
86 
87 
95 
103  CDPL_CHEM_API void calcBoundingBox(const Entity3DContainer& cntnr, Math::Vector3D& min, Math::Vector3D& max, bool reset = true);
104 
113 
122  } // namespace Chem
123 } // namespace CDPL
124 
125 #endif // CDPL_CHEM_ENTITY3DCONTAINERFUNCTIONS_HPP
Definition of the preprocessor macro CDPL_CHEM_API.
#define CDPL_CHEM_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
Definition of matrix data types.
Definition of class CDPL::Math::VectorArray.
Common interface for data structures that support a random access to stored Chem::Entity3D instances.
Definition: Entity3DContainer.hpp:53
CDPL_CHEM_API bool align3DCoordinates(Entity3DContainer &cntnr, const Entity3DContainer &ref_entities, const Math::Vector3DArray &ref_coords)
Rigid-body aligns the 3D coordinates of cntnr to the reference geometry defined by the entity-coordin...
CDPL_CHEM_API bool insideBoundingBox(const AtomContainer &cntnr, const Math::Vector3D &min, const Math::Vector3D &max, const Atom3DCoordinatesFunction &coords_func)
Tells whether every atom of cntnr lies inside the axis-aligned bounding box defined by min and max.
CDPL_CHEM_API void calcBoundingBox(const AtomContainer &cntnr, Math::Vector3D &min, Math::Vector3D &max, const Atom3DCoordinatesFunction &coords_func, bool reset=true)
Computes the axis-aligned bounding box enclosing the atoms of cntnr.
CDPL_CHEM_API void transform3DCoordinates(Entity3DContainer &cntnr, const Math::Matrix4D &mtx)
Transforms the 3D coordinates of the entities of cntnr by the affine matrix mtx.
CDPL_CHEM_API void set3DCoordinates(Entity3DContainer &cntnr, const Math::Vector3DArray &coords)
Sets the 3D coordinates of the entities of cntnr from coords.
CDPL_CHEM_API void calcGeometricalDistanceMatrix(const Entity3DContainer &cntnr, Math::DMatrix &mtx)
Calculates the inter-entity geometric distance matrix for the entities of cntnr.
CDPL_CHEM_API bool intersectsBoundingBox(const AtomContainer &cntnr, const Math::Vector3D &min, const Math::Vector3D &max, const Atom3DCoordinatesFunction &coords_func)
Tells whether at least one atom of cntnr lies inside the axis-aligned bounding box defined by min and...
CDPL_CHEM_API void get3DCoordinates(const AtomContainer &cntnr, Math::Vector3DArray &coords, const Atom3DCoordinatesFunction &coords_func, bool append=false)
Extracts the 3D coordinates of all atoms in cntnr into coords using the per-atom coordinate lookup fu...
CDPL_CHEM_API bool calcCentroid(const AtomContainer &cntnr, const Atom3DCoordinatesFunction &coords_func, Math::Vector3D &ctr)
Computes the unweighted centroid (arithmetic mean of atom coordinates) of cntnr.
VectorArray< Vector3D > Vector3DArray
Array storing vectors of type Math::Vector3D.
Definition: VectorArray.hpp:85
CVector< double, 3 > Vector3D
Bounded 3 element vector holding floating point values of type double.
Definition: Vector.hpp:2937
The namespace of the Chemical Data Processing Library.