Chemical Data Processing Library C++ API - Version 1.4.0
MolProp/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_MOLPROP_ATOMCONTAINERFUNCTIONS_HPP
30 #define CDPL_MOLPROP_ATOMCONTAINERFUNCTIONS_HPP
31 
32 #include <string>
33 
38 
39 
40 namespace CDPL
41 {
42 
43  namespace Chem
44  {
45 
46  class AtomContainer;
47  }
48 
49  namespace MolProp
50  {
51 
58 
65 
72 
78  CDPL_MOLPROP_API void generateExplicitMolecularFormula(const Chem::AtomContainer& cntnr, std::string& formula);
79 
87 
88 
95 
103  CDPL_MOLPROP_API std::size_t getExplicitAtomCount(const Chem::AtomContainer& cntnr, unsigned int type, bool strict = true);
104 
111 
118 
125 
132 
133 
140 
141 
150 
158  } // namespace MolProp
159 } // namespace CDPL
160 
161 #endif // CDPL_MOLPROP_ATOMCONTAINERFUNCTIONS_HPP
Type declaration of a generic wrapper class for storing user-defined Chem::Atom 3D-coordinates functi...
Definition of the type CDPL::MolProp::ElementHistogram.
Definition of the type CDPL::MolProp::MassComposition.
Definition of the preprocessor macro CDPL_MOLPROP_API.
#define CDPL_MOLPROP_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
Data type for the storage of element histograms of chemical compounds.
Definition: ElementHistogram.hpp:50
Data type for the storage of mass percent compositions of chemical compounds.
Definition: MassComposition.hpp:51
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
CVector< double, 3 > Vector3D
Bounded 3 element vector holding floating point values of type double.
Definition: Vector.hpp:2937
CDPL_MOLPROP_API std::size_t getAromaticAtomCount(const Chem::AtomContainer &cntnr)
Returns the number of aromatic atoms in cntnr.
CDPL_MOLPROP_API std::size_t getHeavyAtomCount(const Chem::AtomContainer &cntnr)
Returns the number of heavy (non-hydrogen) atoms in cntnr.
CDPL_MOLPROP_API std::size_t getExplicitChainAtomCount(const Chem::AtomContainer &cntnr)
Returns the number of explicit chain (non-ring) atoms in cntnr.
CDPL_MOLPROP_API void generateExplicitMolecularFormula(const Chem::AtomContainer &cntnr, std::string &formula)
Generates the molecular formula of the explicit atoms in cntnr.
CDPL_MOLPROP_API void generateExplicitElementHistogram(const Chem::AtomContainer &cntnr, ElementHistogram &hist, bool append=false)
Generates the element histogram of the explicit atoms in cntnr.
CDPL_MOLPROP_API bool calcDipoleMoment(const Chem::AtomContainer &cntnr, const Chem::Atom3DCoordinatesFunction &coords_func, Math::Vector3D &moment)
Calculates the dipole moment of cntnr using the supplied atom 3D-coordinates function.
CDPL_MOLPROP_API long getNetFormalCharge(const Chem::AtomContainer &cntnr)
Returns the net formal charge of cntnr (sum of per-atom formal charges).
CDPL_MOLPROP_API void calcExplicitMassComposition(const Chem::AtomContainer &cntnr, MassComposition &mass_comp)
Calculates the per-element mass composition of the explicit atoms in cntnr.
CDPL_MOLPROP_API std::size_t getExplicitAtomCount(const Chem::AtomContainer &cntnr)
Returns the total number of explicit atoms in cntnr.
CDPL_MOLPROP_API std::size_t getRingAtomCount(const Chem::AtomContainer &cntnr)
Returns the number of ring atoms in cntnr.
CDPL_MOLPROP_API double calcExplicitMass(const Chem::AtomContainer &cntnr)
Calculates the total mass of the explicit atoms in cntnr.
CDPL_MOLPROP_API void generateExplicitMassCompositionString(const Chem::AtomContainer &cntnr, std::string &comp_str)
Generates a string representation of the per-element mass composition of the explicit atoms in cntnr.
The namespace of the Chemical Data Processing Library.