Scine::Swoose  2.1.0
This is the SCINE module Swoose.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
TopologyUtils.h
Go to the documentation of this file.
1 
8 #ifndef SWOOSEUTILITIES_TOPOLOGYUTILS_H
9 #define SWOOSEUTILITIES_TOPOLOGYUTILS_H
10 
11 #include <Utils/Typenames.h>
12 #include <list>
13 #include <vector>
14 
15 namespace Scine {
16 
17 namespace Utils {
18 class BondOrderCollection;
19 class Atom;
20 class AtomCollection;
21 } // namespace Utils
22 
23 namespace SwooseUtilities {
24 
26  public:
30  static std::vector<std::list<int>>
32  double minimalBondOrderToConsider);
36  static Utils::BondOrderCollection generateBondOrderMatrixFromListsOfNeighbors(const std::vector<std::list<int>>& listsOfNeighbors);
43  static std::vector<int> divideStructureAtBond(int a1, int a2, const Utils::BondOrderCollection& bondOrderMatrix, bool& ok);
47  static int countNeighborsOfElementType(int atomType, const std::vector<std::list<int>>& listsOfNeighbors,
48  Utils::ElementType elementType,
49  const Utils::ElementTypeCollection& elementTypeCollection);
57  static void calculateNumberOfNeighbors(int nAtoms, std::vector<std::list<int>> listsOfNeighbors, std::vector<int>& nNeighbors);
58 };
59 
60 } // namespace SwooseUtilities
61 } // namespace Scine
62 
63 #endif // SWOOSEUTILITIES_TOPOLOGYUTILS_H
static std::vector< int > divideStructureAtBond(int a1, int a2, const Utils::BondOrderCollection &bondOrderMatrix, bool &ok)
Divides the atoms into two groups according to which side of the bond given by atoms a1 and a2 are...
Definition: TopologyUtils.cpp:46
static void calculateNumberOfNeighbors(int nAtoms, std::vector< std::list< int >> listsOfNeighbors, std::vector< int > &nNeighbors)
Definition: TopologyUtils.cpp:108
static std::vector< std::list< int > > generateListsOfNeighborsFromBondOrderMatrix(int nAtoms, const Utils::BondOrderCollection &bondOrderMatrix, double minimalBondOrderToConsider)
This function generates an array of nAtoms lists of neighbors from a lower-triangular bond-order matr...
Definition: TopologyUtils.cpp:17
static Utils::BondOrderCollection generateBondOrderMatrixFromListsOfNeighbors(const std::vector< std::list< int >> &listsOfNeighbors)
This function generates a bond order matrix from a given lists of neighbors.
Definition: TopologyUtils.cpp:37
Definition: TopologyUtils.h:25
static int countNeighborsOfElementType(int atomType, const std::vector< std::list< int >> &listsOfNeighbors, Utils::ElementType elementType, const Utils::ElementTypeCollection &elementTypeCollection)
Counts and returns the number of neighbors for atom with index &#39;atomIndex&#39; that has the given element...
Definition: TopologyUtils.cpp:95