Chemical Data Processing Library C++ API - Version 1.1.1
Chem/BondFunctions.hpp
Go to the documentation of this file.
1 /*
2  * BondFunctions.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_BONDFUNCTIONS_HPP
30 #define CDPL_CHEM_BONDFUNCTIONS_HPP
31 
32 #include <cstddef>
33 #include <string>
34 
35 #include "CDPL/Chem/APIPrefix.hpp"
40 
41 
42 namespace CDPL
43 {
44 
45  namespace Chem
46  {
47 
48  class StereoDescriptor;
49 
50  CDPL_CHEM_API std::size_t getOrder(const Bond& bond);
51 
52  CDPL_CHEM_API void setOrder(Bond& bond, std::size_t order);
53 
55 
56  CDPL_CHEM_API bool hasOrder(const Bond& bond);
57 
58 
59  CDPL_CHEM_API bool getRingFlag(const Bond& bond);
60 
61  CDPL_CHEM_API void setRingFlag(Bond& bond, bool in_ring);
62 
64 
65  CDPL_CHEM_API bool hasRingFlag(const Bond& bond);
66 
67 
68  CDPL_CHEM_API bool isInFragmentOfSize(const Bond& bond, const FragmentList& frag_list, std::size_t size);
69 
70  CDPL_CHEM_API std::size_t getSizeOfSmallestContainingFragment(const Bond& bond, const FragmentList& frag_list);
71 
72  CDPL_CHEM_API std::size_t getSizeOfLargestContainingFragment(const Bond& bond, const FragmentList& frag_list);
73 
74  CDPL_CHEM_API std::size_t getNumContainingFragments(const Bond& bond, const FragmentList& frag_list);
75 
76  CDPL_CHEM_API void getContainingFragments(const Bond& bond, const FragmentList& frag_list, FragmentList& cont_frag_list, bool append = false);
77 
78 
80 
81  CDPL_CHEM_API void setAromaticityFlag(Bond& bond, bool aromatic);
82 
84 
86 
87 
88  CDPL_CHEM_API unsigned int get2DStereoFlag(const Bond& bond);
89 
90  CDPL_CHEM_API void set2DStereoFlag(Bond& bond, unsigned int flag);
91 
93 
94  CDPL_CHEM_API bool has2DStereoFlag(const Bond& bond);
95 
96 
97  CDPL_CHEM_API unsigned int getCIPConfiguration(const Bond& bond);
98 
99  CDPL_CHEM_API void setCIPConfiguration(Bond& bond, unsigned int config);
100 
102 
104 
105 
107 
109 
111 
113 
114  CDPL_CHEM_API StereoDescriptor calcStereoDescriptor(const Bond& bond, const MolecularGraph& molgraph, std::size_t dim = 1);
115 
116  CDPL_CHEM_API unsigned int calcConfiguration(const Bond& bond, const MolecularGraph& molgraph, const StereoDescriptor& descr,
117  const Math::Vector3DArray& coords);
118 
119 
121 
122  CDPL_CHEM_API void setStereoCenterFlag(Bond& bond, bool is_center);
123 
125 
127 
128  CDPL_CHEM_API bool isStereoCenter(const Bond& bond, const MolecularGraph& molgraph, bool check_asym = true,
129  bool check_term_n = true, bool check_order = true, std::size_t min_ring_size = 8);
130 
131 
132  CDPL_CHEM_API unsigned int getDirection(const Bond& bond);
133 
134  CDPL_CHEM_API void setDirection(Bond& bond, unsigned int dir);
135 
137 
138  CDPL_CHEM_API bool hasDirection(const Bond& bond);
139 
140 
141  CDPL_CHEM_API unsigned int getReactionCenterStatus(const Bond& bond);
142 
143  CDPL_CHEM_API void setReactionCenterStatus(Bond& bond, unsigned int status);
144 
146 
148 
149 
151 
153 
155 
157 
158 
160 
162 
164 
166 
168 
169 
170  CDPL_CHEM_API const std::string& getMatchExpressionString(const Bond& bond);
171 
172  CDPL_CHEM_API void setMatchExpressionString(Bond& bond, const std::string& expr_str);
173 
175 
177 
178  CDPL_CHEM_API void generateMatchExpressionString(const Bond& bond, const MolecularGraph& molgraph, std::string& str);
179 
180 
181  CDPL_CHEM_API unsigned int getSybylType(const Bond& bond);
182 
183  CDPL_CHEM_API void setSybylType(Bond& bond, unsigned int type);
184 
186 
187  CDPL_CHEM_API bool hasSybylType(const Bond& bond);
188 
189  CDPL_CHEM_API unsigned int perceiveSybylType(const Bond& bond, const MolecularGraph& molgraph);
190  } // namespace Chem
191 } // namespace CDPL
192 
193 #endif // CDPL_CHEM_BONDFUNCTIONS_HPP
CDPL::Chem::getStereoDescriptor
CDPL_CHEM_API const StereoDescriptor & getStereoDescriptor(const Atom &atom)
CDPL::Chem::getRingFlag
CDPL_CHEM_API bool getRingFlag(const Atom &atom)
CDPL::Chem::clearStereoDescriptor
CDPL_CHEM_API void clearStereoDescriptor(Atom &atom)
CDPL::Chem::isStereoCenter
CDPL_CHEM_API bool isStereoCenter(const Atom &atom, const MolecularGraph &molgraph, bool check_asym=true, bool check_inv_n=true, bool check_quart_n=true, bool check_plan_n=true, bool check_amide_n=true, bool check_res_ctrs=true)
APIPrefix.hpp
Definition of the preprocessor macro CDPL_CHEM_API.
VectorArray.hpp
Definition of the class CDPL::Math::VectorArray.
CDPL::Chem::setReactionCenterStatus
CDPL_CHEM_API void setReactionCenterStatus(Atom &atom, unsigned int status)
CDPL::Chem::set2DStereoFlag
CDPL_CHEM_API void set2DStereoFlag(Bond &bond, unsigned int flag)
CDPL::Chem::clearStereoCenterFlag
CDPL_CHEM_API void clearStereoCenterFlag(Atom &atom)
CDPL_CHEM_API
#define CDPL_CHEM_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
CDPL::Chem::Bond
Bond.
Definition: Bond.hpp:50
CDPL::Chem::setMatchExpression
CDPL_CHEM_API void setMatchExpression(Atom &atom, const MatchExpression< Atom, MolecularGraph >::SharedPointer &expr)
CDPL::Chem::has2DStereoFlag
CDPL_CHEM_API bool has2DStereoFlag(const Bond &bond)
CDPL::Chem::perceiveSybylType
CDPL_CHEM_API unsigned int perceiveSybylType(const Atom &atom, const MolecularGraph &molgraph)
CDPL::Chem::getContainingFragments
CDPL_CHEM_API void getContainingFragments(const Atom &atom, const FragmentList &frag_list, FragmentList &cont_frag_list, bool append=false)
CDPL::Chem::MatchConstraintList::SharedPointer
std::shared_ptr< MatchConstraintList > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated MatchConstraintList instances.
Definition: MatchConstraintList.hpp:197
CDPL::Chem::clearMatchExpression
CDPL_CHEM_API void clearMatchExpression(Atom &atom)
CDPL::Chem::hasStereoCenterFlag
CDPL_CHEM_API bool hasStereoCenterFlag(const Atom &atom)
CDPL::Chem::hasMatchExpression
CDPL_CHEM_API bool hasMatchExpression(const Atom &atom)
CDPL::Chem::hasReactionCenterStatus
CDPL_CHEM_API bool hasReactionCenterStatus(const Atom &atom)
CDPL::Chem::getMatchExpressionString
CDPL_CHEM_API const std::string & getMatchExpressionString(const Atom &atom)
CDPL::Chem::hasDirection
CDPL_CHEM_API bool hasDirection(const Bond &bond)
CDPL::Chem::generateMatchExpression
CDPL_CHEM_API MatchExpression< Atom, MolecularGraph >::SharedPointer generateMatchExpression(const Atom &atom, const MolecularGraph &molgraph)
CDPL::Chem::setSybylType
CDPL_CHEM_API void setSybylType(Atom &atom, unsigned int type)
VectorArray< Vector3D >
CDPL::Chem::MolecularGraph
MolecularGraph.
Definition: MolecularGraph.hpp:52
CDPL::Chem::clearSybylType
CDPL_CHEM_API void clearSybylType(Atom &atom)
CDPL::Chem::setRingFlag
CDPL_CHEM_API void setRingFlag(Atom &atom, bool in_ring)
CDPL::Chem::getOrder
CDPL_CHEM_API std::size_t getOrder(const Bond &bond)
CDPL::Chem::getSybylType
CDPL_CHEM_API unsigned int getSybylType(const Atom &atom)
CDPL::Chem::hasRingFlag
CDPL_CHEM_API bool hasRingFlag(const Atom &atom)
CDPL::Chem::clearMatchExpressionString
CDPL_CHEM_API void clearMatchExpressionString(Atom &atom)
CDPL::Chem::getCIPConfiguration
CDPL_CHEM_API unsigned int getCIPConfiguration(const Atom &atom)
CDPL::Chem::clearDirection
CDPL_CHEM_API void clearDirection(Bond &bond)
CDPL::Chem::hasSybylType
CDPL_CHEM_API bool hasSybylType(const Atom &atom)
CDPL::Chem::hasMatchExpressionString
CDPL_CHEM_API bool hasMatchExpressionString(const Atom &atom)
CDPL::Chem::getStereoCenterFlag
CDPL_CHEM_API bool getStereoCenterFlag(const Atom &atom)
CDPL::Chem::clearMatchConstraints
CDPL_CHEM_API void clearMatchConstraints(Atom &atom)
CDPL::Chem::getDirection
CDPL_CHEM_API unsigned int getDirection(const Bond &bond)
CDPL::Chem::clearReactionCenterStatus
CDPL_CHEM_API void clearReactionCenterStatus(Atom &atom)
CDPL::Chem::clearAromaticityFlag
CDPL_CHEM_API void clearAromaticityFlag(Atom &atom)
CDPL::Chem::setStereoCenterFlag
CDPL_CHEM_API void setStereoCenterFlag(Atom &atom, bool is_center)
CDPL::Chem::FragmentList
A data type for the storage of Chem::Fragment objects.
Definition: FragmentList.hpp:49
CDPL::Chem::getNumContainingFragments
CDPL_CHEM_API std::size_t getNumContainingFragments(const Atom &atom, const FragmentList &frag_list)
CDPL::Chem::hasCIPConfiguration
CDPL_CHEM_API bool hasCIPConfiguration(const Atom &atom)
CDPL::Chem::MatchExpression
A generic boolean expression interface for the implementation of query/target object equivalence test...
Definition: MatchExpression.hpp:75
CDPL::Chem::generateMatchExpressionString
CDPL_CHEM_API void generateMatchExpressionString(const Atom &atom, const MolecularGraph &molgraph, std::string &expr_str)
CDPL::Chem::setMatchExpressionString
CDPL_CHEM_API void setMatchExpressionString(Atom &atom, const std::string &expr_str)
CDPL::Chem::isInFragmentOfSize
CDPL_CHEM_API bool isInFragmentOfSize(const Atom &atom, const FragmentList &frag_list, std::size_t size)
MatchExpression.hpp
Definition of the class CDPL::Chem::MatchExpression.
CDPL
The namespace of the Chemical Data Processing Library.
CDPL::Chem::getAromaticityFlag
CDPL_CHEM_API bool getAromaticityFlag(const Atom &atom)
CDPL::Chem::get2DStereoFlag
CDPL_CHEM_API unsigned int get2DStereoFlag(const Bond &bond)
CDPL::Chem::clear2DStereoFlag
CDPL_CHEM_API void clear2DStereoFlag(Bond &bond)
CDPL::Chem::getMatchExpression
CDPL_CHEM_API const MatchExpression< Atom, MolecularGraph >::SharedPointer & getMatchExpression(const Atom &atom)
CDPL::Chem::hasStereoDescriptor
CDPL_CHEM_API bool hasStereoDescriptor(const Atom &atom)
CDPL::Chem::hasOrder
CDPL_CHEM_API bool hasOrder(const Bond &bond)
CDPL::Chem::setAromaticityFlag
CDPL_CHEM_API void setAromaticityFlag(Atom &atom, bool aromatic)
CDPL::Chem::calcConfiguration
CDPL_CHEM_API unsigned int calcConfiguration(const Atom &atom, const MolecularGraph &molgraph, const StereoDescriptor &descr, const Math::Vector3DArray &coords)
CDPL::Chem::getReactionCenterStatus
CDPL_CHEM_API unsigned int getReactionCenterStatus(const Atom &atom)
CDPL::Chem::hasAromaticityFlag
CDPL_CHEM_API bool hasAromaticityFlag(const Atom &atom)
CDPL::Chem::StereoDescriptor
A data structure for the storage and retrieval of stereochemical information about atoms and bonds.
Definition: StereoDescriptor.hpp:102
CDPL::Chem::clearRingFlag
CDPL_CHEM_API void clearRingFlag(Atom &atom)
CDPL::Chem::clearOrder
CDPL_CHEM_API void clearOrder(Bond &bond)
CDPL::Chem::setMatchConstraints
CDPL_CHEM_API void setMatchConstraints(Atom &atom, const MatchConstraintList::SharedPointer &constr)
CDPL::Chem::setCIPConfiguration
CDPL_CHEM_API void setCIPConfiguration(Atom &atom, unsigned int config)
CDPL::Chem::clearCIPConfiguration
CDPL_CHEM_API void clearCIPConfiguration(Atom &atom)
CDPL::Chem::setStereoDescriptor
CDPL_CHEM_API void setStereoDescriptor(Atom &atom, const StereoDescriptor &descr)
CDPL::Chem::hasMatchConstraints
CDPL_CHEM_API bool hasMatchConstraints(const Atom &atom)
MatchConstraintList.hpp
Definition of the class CDPL::Chem::MatchConstraintList.
FragmentList.hpp
Definition of the class CDPL::Chem::FragmentList.
CDPL::Chem::calcStereoDescriptor
CDPL_CHEM_API StereoDescriptor calcStereoDescriptor(const Atom &atom, const MolecularGraph &molgraph, std::size_t dim=1)
CDPL::Chem::setDirection
CDPL_CHEM_API void setDirection(Bond &bond, unsigned int dir)
CDPL::Chem::setOrder
CDPL_CHEM_API void setOrder(Bond &bond, std::size_t order)
CDPL::Chem::getMatchConstraints
CDPL_CHEM_API const MatchConstraintList::SharedPointer & getMatchConstraints(const Atom &atom)
CDPL::Chem::getSizeOfLargestContainingFragment
CDPL_CHEM_API std::size_t getSizeOfLargestContainingFragment(const Atom &atom, const FragmentList &frag_list)
CDPL::Chem::getSizeOfSmallestContainingFragment
CDPL_CHEM_API std::size_t getSizeOfSmallestContainingFragment(const Atom &atom, const FragmentList &frag_list)