Loading...
Searching...
No Matches
ring.hpp
Go to the documentation of this file.
1//-----------------------------------------------------------------------------------
2// d-SEAMS - Deferred Structural Elucidation Analysis for Molecular Simulations
3//
4// Copyright (c) 2018--present d-SEAMS core team
5//
6// This program is free software: you can redistribute it and/or modify
7// it under the terms of the MIT License as published by
8// the Open Source Initiative.
9//
10// A copy of the MIT License is included in the LICENSE file of this repository.
11// You should have received a copy of the MIT License along with this program.
12// If not, see <https://opensource.org/licenses/MIT>.
13//-----------------------------------------------------------------------------------
14
15#ifndef SEAMS_RINGS_H_
16#define SEAMS_RINGS_H_
17
18#include <algorithm>
19#include <array>
20#include <fstream>
21#include <iostream>
22#include <iterator>
23#include <cmath>
24#include <memory>
25#include <sstream>
26#include <string>
27#include <vector>
28
29#include <cage.hpp>
30#include <mol_sys.hpp>
31#include <seams_input.hpp>
32#include <seams_output.hpp>
33
38
43
62
63namespace ring {
64
65// General enum class used throughout this program (Prism is for our prism
66// classification) {per-ring classification}
126
128std::vector<std::vector<int>>
129getSingleRingSize(const std::vector<std::vector<int>> &rings, int ringSize);
130
134bool hasCommonElements(std::vector<int> ring1, std::vector<int> ring2);
135
138bool compareRings(std::vector<int> ring1, std::vector<int> ring2);
139
141bool findTripletInRing(const std::vector<int> &ring, const std::vector<int> &triplet);
142
144bool commonElementsInThreeRings(const std::vector<int> &ring1, const std::vector<int> &ring2,
145 const std::vector<int> &ring3);
146
148std::vector<int> findsCommonElements(const std::vector<int> &ring1,
149 const std::vector<int> &ring2);
150
152[[nodiscard]] int clearRingList(std::vector<std::vector<int>> &rings);
153
156[[nodiscard]] int assignPolygonType(const std::vector<std::vector<int>> &rings,
157 std::vector<int> &atomTypes, const std::vector<int> &nRings);
158
159} // namespace ring
160
161#endif // SEAMS_RINGS_H_
File for cage types for topological network criteria.
std::vector< std::vector< int > > getSingleRingSize(const std::vector< std::vector< int > > &rings, int ringSize)
Returns a vector of vectors of rings of a single size.
strucType
Definition ring.hpp:115
bool commonElementsInThreeRings(const std::vector< int > &ring1, const std::vector< int > &ring2, const std::vector< int > &ring3)
Common elements in 3 rings.
std::vector< int > findsCommonElements(const std::vector< int > &ring1, const std::vector< int > &ring2)
Returns the common elements of two rings.
int clearRingList(std::vector< std::vector< int > > &rings)
Erases memory for a vector of vectors for a list of rings.
bool hasCommonElements(std::vector< int > ring1, std::vector< int > ring2)
bool findTripletInRing(const std::vector< int > &ring, const std::vector< int > &triplet)
Searches a particular ring for a triplet.
bool compareRings(std::vector< int > ring1, std::vector< int > ring2)
int assignPolygonType(const std::vector< std::vector< int > > &rings, std::vector< int > &atomTypes, const std::vector< int > &nRings)
@ HCbasal
The ring belongs only to a hexagonal cage (HC).
Definition ring.hpp:118
@ DDC
The ring belongs to a double-diamond cage (DDC).
Definition ring.hpp:117
@ bothPrismatic
The ring belongs to both a DDC and HC and is, thus, a 'mixed' ring.
Definition ring.hpp:121
@ Prism
The ring belongs to a prism block, classified according to the prism identification scheme.
Definition ring.hpp:122
@ bothBasal
The ring belongs to both a DDC and HC.
Definition ring.hpp:120
@ HCprismatic
The ring belongs only to a hexagonal cage (HC); specifically the ring is purely a prismatic ring of a...
Definition ring.hpp:119
@ unclassified
The ring is unclassified, which may be either water or a deformed type which cannot be classified by ...
Definition ring.hpp:116
The main molecular system handler.
Topological network criteria functions.
File for functions that read in files).