Chemical Data Processing Library C++ API - Version 1.1.1
Chem/UtilityFunctions.hpp
Go to the documentation of this file.
1 /*
2  * UtilityFunctions.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_UTILITYFUNCTIONS_HPP
30 #define CDPL_CHEM_UTILITYFUNCTIONS_HPP
31 
32 #include <cstddef>
33 #include <string>
34 
35 #include "CDPL/Chem/APIPrefix.hpp"
36 #include "CDPL/Chem/Molecule.hpp"
38 #include "CDPL/Util/BitSet.hpp"
39 #include "CDPL/Math/Vector.hpp"
40 
41 
42 namespace CDPL
43 {
44 
45  namespace Chem
46  {
47 
48  CDPL_CHEM_API Molecule::SharedPointer parseSMARTS(const std::string& smarts, bool init_qry = true);
49 
50  CDPL_CHEM_API bool parseSMARTS(const std::string& smarts, Molecule& mol, bool init_qry = true);
51 
52 
54 
55  CDPL_CHEM_API bool parseSMILES(const std::string& smiles, Molecule& mol);
56 
57 
58  CDPL_CHEM_API void extendBoundingBox(Math::Vector3D& min, Math::Vector3D& max, const Math::Vector3D& coords, bool reset = false);
59 
60  CDPL_CHEM_API bool insideBoundingBox(const Math::Vector3D& min, const Math::Vector3D& max, const Math::Vector3D& coords);
61 
62 
63  CDPL_CHEM_API bool isAromatic(const Fragment& ring, const MolecularGraph& molgraph, const Util::BitSet& arom_bond_mask);
64 
65  CDPL_CHEM_API bool isNotAromatic(const Fragment& ring, const MolecularGraph& molgraph);
66 
67 
68  CDPL_CHEM_API bool containsFragmentWithBond(const FragmentList& frag_list, const Bond& bond);
69 
70  CDPL_CHEM_API bool containsFragmentWithMinSize(const FragmentList& frag_list, std::size_t min_size);
71 
72 
73  CDPL_CHEM_API bool atomTypesMatch(unsigned int qry_type, unsigned int tgt_type);
74 
75 
76  CDPL_CHEM_API unsigned int sybylToAtomType(unsigned int sybyl_type);
77 
78  CDPL_CHEM_API const std::string& getSybylAtomTypeString(unsigned int sybyl_type);
79 
80  CDPL_CHEM_API const std::string& getSybylBondTypeString(unsigned int sybyl_type);
81  } // namespace Chem
82 } // namespace CDPL
83 
84 #endif // CDPL_CHEM_UTILITYFUNCTIONS_HPP
Molecule.hpp
Definition of the class CDPL::Chem::Molecule.
APIPrefix.hpp
Definition of the preprocessor macro CDPL_CHEM_API.
CDPL_CHEM_API
#define CDPL_CHEM_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
CDPL::Chem::getSybylBondTypeString
CDPL_CHEM_API const std::string & getSybylBondTypeString(unsigned int sybyl_type)
CDPL::Chem::Bond
Bond.
Definition: Bond.hpp:50
CDPL::Math::Vector3D
CVector< double, 3 > Vector3D
A bounded 3 element vector holding floating point values of type double.
Definition: Vector.hpp:1637
CDPL::Util::BitSet
boost::dynamic_bitset BitSet
A dynamic bitset class.
Definition: BitSet.hpp:46
CDPL::Chem::extendBoundingBox
CDPL_CHEM_API void extendBoundingBox(Math::Vector3D &min, Math::Vector3D &max, const Math::Vector3D &coords, bool reset=false)
CDPL::Chem::Fragment
Fragment.
Definition: Fragment.hpp:52
CDPL::Chem::atomTypesMatch
CDPL_CHEM_API bool atomTypesMatch(unsigned int qry_type, unsigned int tgt_type)
CDPL::Chem::Molecule::SharedPointer
std::shared_ptr< Molecule > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated Molecule instances.
Definition: Molecule.hpp:55
CDPL::Chem::MolecularGraph
MolecularGraph.
Definition: MolecularGraph.hpp:52
BitSet.hpp
Definition of the type CDPL::Util::BitSet.
CDPL::Chem::Molecule
Molecule.
Definition: Molecule.hpp:49
CDPL::Chem::containsFragmentWithMinSize
CDPL_CHEM_API bool containsFragmentWithMinSize(const FragmentList &frag_list, std::size_t min_size)
CDPL::Chem::parseSMILES
CDPL_CHEM_API Molecule::SharedPointer parseSMILES(const std::string &smiles)
CDPL::Chem::isNotAromatic
CDPL_CHEM_API bool isNotAromatic(const Fragment &ring, const MolecularGraph &molgraph)
CDPL::Chem::FragmentList
A data type for the storage of Chem::Fragment objects.
Definition: FragmentList.hpp:49
CDPL::Chem::insideBoundingBox
CDPL_CHEM_API bool insideBoundingBox(const AtomContainer &cntnr, const Math::Vector3D &min, const Math::Vector3D &max, const Atom3DCoordinatesFunction &coords_func)
CDPL::Chem::isAromatic
CDPL_CHEM_API bool isAromatic(const Fragment &ring, const MolecularGraph &molgraph, const Util::BitSet &arom_bond_mask)
CDPL
The namespace of the Chemical Data Processing Library.
CDPL::Chem::getSybylAtomTypeString
CDPL_CHEM_API const std::string & getSybylAtomTypeString(unsigned int sybyl_type)
CDPL::Chem::containsFragmentWithBond
CDPL_CHEM_API bool containsFragmentWithBond(const FragmentList &frag_list, const Bond &bond)
CDPL::Chem::sybylToAtomType
CDPL_CHEM_API unsigned int sybylToAtomType(unsigned int sybyl_type)
FragmentList.hpp
Definition of the class CDPL::Chem::FragmentList.
CDPL::Chem::parseSMARTS
CDPL_CHEM_API Molecule::SharedPointer parseSMARTS(const std::string &smarts, bool init_qry=true)
Vector.hpp
Definition of vector data types.