MSpin-JCoupling  2.1
ringperceptor.h
1 /***************************************************************************
2  ringperceptor.h - description
3  -------------------
4  author : Armando Navarro-Vazquez
5  email : armando.deus@gmail.com
6  ***************************************************************************/
7 
8 /***************************************************************************
9  * *
10  * This program is free software; you can redistribute it and/or modify *
11  * it under the terms of the GNU General Public License as published by *
12  * the Free Software Foundation; either version 2 of the License, or *
13  * (at your option) any later version. *
14  * *
15  ***************************************************************************/
16 
17 #ifndef MAGNES_RINGPERCEPTOR_H
18 
19 #include <vector>
20 #include "molecule.h"
21 
22 namespace magnes
23 {
24 
31  {
32  class Edge
33  {
34  public:
35  Edge();
36  std::vector<size_t>& Path() { return _path; }
37  const std::vector<size_t>& Path() const { return _path;}
38  //Edge operator ^ (Edge& b);
39  Edge operator+ ( Edge& b );
40  private:
41  std::vector< size_t > _path;
42  };
43  public:
44  RingPerceptor ( const magnes::Molecule* molecule );
45  RingPerceptor ( const magnes::Frame* frame );
46  ~RingPerceptor();
49  std::vector< std::vector<size_t> >Rings ( size_t size=0 );
50  private:
51  void Convert();
52  void Remove();
53  size_t CommonElements ( const Edge& edg1, const Edge& edg2 );
54  private:
55  const Molecule* m_molecule;
56  const Frame* m_frame;
57  std::vector< size_t > m_vertex;
58  std::vector < Edge > m_edges;
59  std::vector<Edge> m_rings;
60  };
61 }
62 #endif //MAGNES_RINGPERCEPTOR_H
the global magnes namespace
Definition: ccchequation.h:38
Implementation of a ring perception algorithm.
Definition: ringperceptor.h:30
Definition: molecule.h:44
Representation of a conformer.
Definition: frame.h:33
std::vector< std::vector< size_t > > Rings(size_t size=0)