BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
aromaticityProcessor.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 //
5 
6 #ifndef BALL_QSAR_AROMATICITYPROCESSOR_H
7 #define BALL_QSAR_AROMATICITYPROCESSOR_H
8 
9 #ifndef BALL_KERNEL_ATOMCONTAINER_H
11 #endif
12 
13 #ifndef BALL_DATATYPE_OPTIONS_H
14  #include <BALL/DATATYPE/options.h>
15 #endif
16 
17 namespace BALL
18 {
29  : public UnaryProcessor<AtomContainer>
30  {
31  public:
32 
36  struct BALL_EXPORT Option
38  {
41  static const char* OVERWRITE_BOND_ORDERS;
42  };
43 
46  {
47  static const bool OVERWRITE_BOND_ORDERS;
48  };
50 
55 
56  //@{
60 
63  AromaticityProcessor(const AromaticityProcessor& aro);
64 
67  virtual ~AromaticityProcessor();
68 
70 
73 
76  AromaticityProcessor& operator = (const AromaticityProcessor& aro);
78 
82  Options options;
84 
87  void setDefaultOptions();
89 
93 
100  void aromatize(const vector<vector<Atom*> >& sssr, AtomContainer& ac);
101 
109  void aromatizeSimple(vector<vector<Atom*> >& sssr);
110 
112 
115 
117  Processor::Result operator () (AtomContainer& ac);
118 
120  virtual bool start();
122 
123 
124  protected:
125 
129  bool isValid_(const AtomContainer& ac);
131 
132 
133  private:
134 
135  /*_ simple criterion if a ring can be aromatic
136  */
137  bool simpleCanBeAromatic_(const HashSet<Atom*>& ring);
138 
139  /*_ simple criterion if a ring can be aromatic, with weaker condition
140  double bonds not need to be alternating inside the ring
141  */
142  bool simpleCanBeAromaticWeaker_(const HashSet<Atom*>& ring);
143 
144  /*_ Tries to extend an aromatic system. Main method that tries to extend
145  the aromaticity to intersecting rings.
146  @param SSSR ring set as vector<HashSet<Atom*> >, (vector of rings in HashSet<Atom*>)
147  @param ring as HashSet<Atom*>, the ring to extended
148  */
149  void extendAromaticSystem_(vector<HashSet<Atom*> >& sssr, HashSet<Atom*> ring);
150 
151  /*_ Predicate that return true if the ring has conjugated double bonds. The criterion
152  is very weak, beacuse the predicate only considers carbon atoms, no hetero atoms
153  are counted.
154  @param ring as HashSet<Atom*>, to be tested
155  */
156  bool hasConjugatedDoubleBonds_(HashSet<Atom*> ring);
157 
158  /*_ This mthod return the number of pi electrons in the ring (aromatic system)
159  @param ring as HashSet<Atom*>, from which the number of pi electrons to count
160  */
161  Size countPiElectrons_(HashSet<Atom*>& ring);
162 
166  bool overwrite_bond_orders_;
167  };
168 } // namespace BALL
169 
170 #endif // BALL_QSAR_AROMATICITYPROCESSOR_H
#define BALL_CREATE(name)
Definition: create.h:62
Default values for options.
This processor provides methods for detection and assignment of aromaticity.
#define BALL_EXPORT
Definition: COMMON/global.h:50