ring.hpp
Go to the documentation of this file.
Code
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 __RINGS_H_
16#define __RINGS_H_
17
18#include <algorithm>
19#include <array>
20#include <fstream>
21#include <iostream>
22#include <iterator>
23#include <math.h>
24#include <memory>
25#include <sstream>
26#include <string>
27#include <sys/stat.h>
28#include <vector>
29
30#include <cage.hpp>
31#include <mol_sys.hpp>
32#include <seams_input.hpp>
33#include <seams_output.hpp>
34
64namespace ring {
65
66// General enum class used throughout this program (Prism is for our prism
67// classification) {per-ring classification}
116enum class strucType {
118 DDC,
119 HCbasal,
121 bothBasal,
123 Prism,
126};
127
129std::vector<std::vector<int>>
130getSingleRingSize(std::vector<std::vector<int>> rings, int ringSize);
131
135bool hasCommonElements(std::vector<int> ring1, std::vector<int> ring2);
136
139bool compareRings(std::vector<int> ring1, std::vector<int> ring2);
140
142bool findTripletInRing(std::vector<int> ring, std::vector<int> triplet);
143
145bool commonElementsInThreeRings(std::vector<int> ring1, std::vector<int> ring2,
146 std::vector<int> ring3);
147
149std::vector<int> findsCommonElements(std::vector<int> ring1,
150 std::vector<int> ring2);
151
153int clearRingList(std::vector<std::vector<int>> &rings);
154
157int assignPolygonType(std::vector<std::vector<int>> rings,
158 std::vector<int> *atomTypes, std::vector<int> nRings);
159
160} // namespace ring
161
162#endif // __RINGS_H_
File for cage types for topological network criteria.
bool commonElementsInThreeRings(std::vector< int > ring1, std::vector< int > ring2, std::vector< int > ring3)
Common elements in 3 rings.
Definition ring.cpp:114
strucType
Definition ring.hpp:116
bool findTripletInRing(std::vector< int > ring, std::vector< int > triplet)
Searches a particular ring for a triplet.
Definition ring.cpp:148
int assignPolygonType(std::vector< std::vector< int > > rings, std::vector< int > *atomTypes, std::vector< int > nRings)
Definition ring.cpp:40
int clearRingList(std::vector< std::vector< int > > &rings)
Erases memory for a vector of vectors for a list of rings.
Definition ring.cpp:22
bool hasCommonElements(std::vector< int > ring1, std::vector< int > ring2)
Definition ring.cpp:226
std::vector< std::vector< int > > getSingleRingSize(std::vector< std::vector< int > > rings, int ringSize)
Returns a vector of vectors of rings of a single size.
Definition ring.cpp:200
std::vector< int > findsCommonElements(std::vector< int > ring1, std::vector< int > ring2)
Returns the common elements of two rings.
Definition ring.cpp:85
bool compareRings(std::vector< int > ring1, std::vector< int > ring2)
Definition ring.cpp:258
@ HCbasal
The ring belongs only to a hexagonal cage (HC). Specifically, the ring is purely a basal ring of an H...
@ DDC
The ring belongs to a double-diamond cage (DDC).
@ bothPrismatic
The ring belongs to both a DDC and HC and is, thus, a 'mixed' ring. The ring is also one of the prism...
@ Prism
The ring belongs to a prism block, classified according to the prism identification scheme.
@ bothBasal
The ring belongs to both a DDC and HC. It is a 'mixed' ring. The ring is also one of the basal rings ...
@ HCprismatic
The ring belongs only to a hexagonal cage (HC); specifically the ring is purely a prismatic ring of a...
@ unclassified
The ring is unclassified, which may be either water or a deformed type which cannot be classified by ...
The main molecular system handler.
Topological network criteria functions.
Definition ring.hpp:64
File for functions that read in files).