Loading...
Searching...
No Matches
mol_sys.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_MOL_SYS_H_
16#define SEAMS_MOL_SYS_H_
17
18#include <algorithm>
19#include <array>
20#include <concepts>
21#include <fstream>
22#include <iterator>
23#include <sstream>
24#include <string>
25#include <unordered_map>
26#include <vector>
27
31
36
50
51namespace molSys {
52
53// Enum type for bond type
54
70
118
130
137template <typename T>
138concept CoordinateScalar = std::floating_point<T>;
139
152template <CoordinateScalar T> struct Point {
153 int type = 0, molID = 0, atomID = 0;
154 T x = 0, y = 0, z = 0;
155 std::vector<Result> c_ij;
158 bool inSlice = true;
159};
160
161// Struct for a collection of points; contains information for a particular
162// frame
173template <typename S, CoordinateScalar T> struct PointCloud {
174 std::vector<S> pts;
175 int currentFrame = 0;
176 int nop = 0;
177 std::vector<T> box;
178 std::vector<T> boxLow;
179 std::unordered_map<int, int> idIndexMap;
180};
181
184std::unordered_map<int, int>
186
189std::unordered_multimap<int, int>
191
194std::vector<std::vector<int>>
197
200[[nodiscard]] int searchMolList(const std::vector<std::vector<int>> &molList, int molIDtoFind);
201
205} // namespace molSys
206
207#endif // SEAMS_MOL_SYS_H_
atom_state_type
Definition mol_sys.hpp:107
T x
type ID, molID, atomID
Definition mol_sys.hpp:154
int nop
Current frame number.
Definition mol_sys.hpp:176
atom_state_type iceType
Results (contains bond correlation type).
Definition mol_sys.hpp:156
int searchMolList(const std::vector< std::vector< int > > &molList, int molIDtoFind)
std::vector< S > pts
Definition mol_sys.hpp:174
molSys::PointCloud< molSys::Point< double >, double > clearPointCloud(molSys::PointCloud< molSys::Point< double >, double > &yCloud)
//! Function for clearing vectors in PointCloud after multiple usage
bond_type classifier
Definition mol_sys.hpp:127
bool inSlice
Type of ice/water etc based on cij.
Definition mol_sys.hpp:158
std::unordered_map< int, int > idIndexMap
xlo, ylo, zlo
Definition mol_sys.hpp:179
double c_value
Classifier according to CHILL, CHILL+ etc.
Definition mol_sys.hpp:128
std::vector< Result > c_ij
coordinates
Definition mol_sys.hpp:155
std::vector< T > box
Number of atoms.
Definition mol_sys.hpp:177
std::vector< std::vector< int > > hAtomMolList(molSys::PointCloud< molSys::Point< double >, double > &hCloud, molSys::PointCloud< molSys::Point< double >, double > &oCloud)
std::vector< T > boxLow
Periodic box lengths.
Definition mol_sys.hpp:178
std::unordered_map< int, int > createIDMolIDmap(molSys::PointCloud< molSys::Point< double >, double > &yCloud)
std::unordered_multimap< int, int > createMolIDAtomIDMultiMap(molSys::PointCloud< molSys::Point< double >, double > &yCloud)
int currentFrame
Collection of points.
Definition mol_sys.hpp:175
@ hexagonal
Ih, or particle type signifying Hexagonal Ice.
Definition mol_sys.hpp:109
@ reCubic
Reclassified as cubic ice, according to the order parameter.
Definition mol_sys.hpp:115
@ interfacial
Interfacial ice: ice-like molecules which do not fulfill the strict criteria of the Ic or Ih phases.
Definition mol_sys.hpp:111
@ cubic
Ic, or particle type signifying Cubic Ice.
Definition mol_sys.hpp:108
@ interClathrate
Interfacial clathrate ice phase.
Definition mol_sys.hpp:113
@ water
Liquid/amorphous phase.
Definition mol_sys.hpp:110
@ reHex
Reclassified as hexagonal ice, according to the order parameter.
Definition mol_sys.hpp:116
@ clathrate
Clathrate ice phase.
Definition mol_sys.hpp:112
@ unclassified
Not classified into any other category.
Definition mol_sys.hpp:114
@ eclipsed
The bond is an eclipsed bond.
Definition mol_sys.hpp:69
@ out_of_range
The bond cannot be classified as either staggered or eclipsed.
Definition mol_sys.hpp:69
@ staggered
The bond is a staggered bond, according to the or value.
Definition mol_sys.hpp:69
Bare-bones structs used throughout the architecture.
Definition mol_sys.hpp:51
This contains a collection of points; contains information for a particular frame.
Definition mol_sys.hpp:173
This contains per-particle information.
Definition mol_sys.hpp:152
This contains the bond classifier of enum class type bond_type, and the bond correlation factor.
Definition mol_sys.hpp:126