seams-core v2.6.0
libyodaLib, the C++ engine of d-SEAMS
☾
Toggle main menu visibility
Loading...
Searching...
No Matches
cage.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_CAGE_H_
16
#define SEAMS_CAGE_H_
17
#include <map>
18
#include <string>
19
#include <string_view>
20
#include <vector>
21
26
31
45
46
// Namespace for cages
47
namespace
cage
{
48
49
// Type of a cage (a group of rings)
60
enum class
cageType
{
HexC
,
DoubleDiaC
};
61
71
struct
Signature
{
72
enum class
Kind
{
Census
,
HexC
,
DoubleDiaC
};
73
74
std::map<int, int>
counts
;
75
Kind
kind
=
Kind::Census
;
76
77
static
Signature
parse
(std::string_view spec);
78
std::string
str
()
const
;
79
int
faceCount
()
const
;
80
int
maxRingSize
()
const
;
81
bool
containsSize
(
int
size)
const
;
82
bool
operator==
(
const
Signature
&other)
const
{
83
return
kind
== other.kind &&
counts
== other.counts;
84
}
85
bool
operator!=
(
const
Signature
&other)
const
{
return
!(*
this
== other); }
86
};
87
88
// Type of ice for a particular atom. Dummy means that the atom is unclassified
89
// and is most probably water
107
enum class
iceType
{
dummy
,
hc
,
ddc
,
mixed
,
pnc
,
mixed2
};
108
109
// Each DDC has one equatorial ring and 6 peripheral rings
110
// Each HC has two basal planes and 3 prismatic planes
118
struct
Cage
{
119
cageType
type
;
120
std::vector<int>
rings
;
121
};
122
123
}
// namespace cage
124
125
#endif
// SEAMS_CAGE_H_
cage::Signature::operator!=
bool operator!=(const Signature &other) const
Definition
cage.hpp:85
cage::Signature::containsSize
bool containsSize(int size) const
cage::cageType
cageType
Definition
cage.hpp:60
cage::Cage::rings
std::vector< int > rings
type of the cage : can be DDC or HC
Definition
cage.hpp:120
cage::Signature::parse
static Signature parse(std::string_view spec)
cage::Signature::faceCount
int faceCount() const
cage::iceType
iceType
Definition
cage.hpp:107
cage::Cage::type
cageType type
Definition
cage.hpp:119
cage::Signature::str
std::string str() const
cage::Signature::operator==
bool operator==(const Signature &other) const
Definition
cage.hpp:82
cage::Signature::counts
std::map< int, int > counts
Definition
cage.hpp:74
cage::Signature::maxRingSize
int maxRingSize() const
cage::Signature::kind
Kind kind
Definition
cage.hpp:75
cage::Signature::Kind
Kind
Definition
cage.hpp:72
cage::cageType::HexC
@ HexC
The type for a hexagonal cage.
Definition
cage.hpp:60
cage::cageType::DoubleDiaC
@ DoubleDiaC
The type for a double-diamond cage.
Definition
cage.hpp:60
cage::iceType::mixed
@ mixed
Type for an atom which is part of a mixed ring, shared by both a DDC and an HC.
Definition
cage.hpp:107
cage::iceType::dummy
@ dummy
Type for an atom which does not belong to any kind of cage.
Definition
cage.hpp:107
cage::iceType::mixed2
@ mixed2
Definition
cage.hpp:107
cage::iceType::hc
@ hc
Type for an atom which belongs to an HC.
Definition
cage.hpp:107
cage::iceType::pnc
@ pnc
Definition
cage.hpp:107
cage::iceType::ddc
@ ddc
Type for an atom which belongs to a DDC.
Definition
cage.hpp:107
cage::Signature::Kind::HexC
@ HexC
Definition
cage.hpp:72
cage::Signature::Kind::Census
@ Census
Definition
cage.hpp:72
cage::Signature::Kind::DoubleDiaC
@ DoubleDiaC
Definition
cage.hpp:72
cage
Functions for topological network criteria cage types.
Definition
cage.hpp:47
cage::Cage
This contains a cage, with the constituent rings.
Definition
cage.hpp:118
cage::Signature
Ring-size census of a polyhedral cage: size -> number of faces.
Definition
cage.hpp:71
src
include
internal
cage.hpp
Generated by
1.17.0
Generated by
Doxygen 1.17.0
Analytics by
Antics
provided by
TurtleTech ehf