mol_sys.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 __MOL_SYS_H_
16#define __MOL_SYS_H_
17
18#include "boost/multi_array.hpp"
19#include <algorithm>
20#include <array>
21#include <fstream>
22#include <iterator>
23#include <sstream>
24#include <string>
25#include <sys/stat.h>
26#include <vector>
27#include<unordered_map>
28
29// For debugging, instantiate the unordered map [consider removal for
30// production]
31template class std::unordered_map<int, int>;
32template class std::vector<std::vector<int>>;
33
57namespace molSys {
58
59// Enum type for bond type
60
76
113enum class atom_state_type {
114 cubic,
115 hexagonal,
116 water,
118 clathrate,
121 reCubic,
122 reHex
123};
124
136
149template <typename T> struct Point {
151 T x, y, z;
152 std::vector<Result> c_ij;
155 bool inSlice = true;
156};
157
158// Struct for a collection of points; contains information for a particular
159// frame
170template <typename S, typename T> struct PointCloud {
171 std::vector<S> pts;
173 int nop;
174 std::vector<T> box;
175 std::vector<T> boxLow;
176 std::unordered_map<int, int> idIndexMap;
177};
178
181std::unordered_map<int, int>
183
186std::unordered_multimap<int, int>
188
191std::vector<std::vector<int>>
194
197int searchMolList(std::vector<std::vector<int>> molList, int molIDtoFind);
198
202} // namespace molSys
203
204#endif // __MOL_SYS_H_
atom_state_type
Definition mol_sys.hpp:113
T x
type ID, molID, atomID
Definition mol_sys.hpp:151
int nop
Current frame number.
Definition mol_sys.hpp:173
std::vector< std::vector< int > > hAtomMolList(molSys::PointCloud< molSys::Point< double >, double > *hCloud, molSys::PointCloud< molSys::Point< double >, double > *oCloud)
Definition mol_sys.cpp:89
atom_state_type iceType
Results (contains bond correlation type)
Definition mol_sys.hpp:153
std::unordered_map< int, int > createIDMolIDmap(molSys::PointCloud< molSys::Point< double >, double > *yCloud)
Definition mol_sys.cpp:44
std::unordered_multimap< int, int > createMolIDAtomIDMultiMap(molSys::PointCloud< molSys::Point< double >, double > *yCloud)
Definition mol_sys.cpp:67
std::vector< S > pts
Definition mol_sys.hpp:171
bond_type classifier
Definition mol_sys.hpp:133
int searchMolList(std::vector< std::vector< int > > molList, int molIDtoFind)
Definition mol_sys.cpp:131
bool inSlice
Type of ice/water etc based on cij.
Definition mol_sys.hpp:155
std::unordered_map< int, int > idIndexMap
xlo, ylo, zlo
Definition mol_sys.hpp:176
double c_value
Classifier according to CHILL, CHILL+ etc.
Definition mol_sys.hpp:134
std::vector< Result > c_ij
coordinates
Definition mol_sys.hpp:152
std::vector< T > box
Number of atoms.
Definition mol_sys.hpp:174
std::vector< T > boxLow
Periodic box lengths.
Definition mol_sys.hpp:175
molSys::PointCloud< molSys::Point< double >, double > clearPointCloud(molSys::PointCloud< molSys::Point< double >, double > *yCloud)
//! Function for clearing vectors in PointCloud after multiple usage
Definition mol_sys.cpp:24
int currentFrame
Collection of points.
Definition mol_sys.hpp:172
@ hexagonal
Ih, or particle type signifying Hexagonal Ice.
@ reCubic
Reclassified as cubic ice, according to the order parameter.
@ interfacial
Interfacial ice: ice-like molecules which do not fulfill the strict criteria of the Ic or Ih phases.
@ cubic
Ic, or particle type signifying Cubic Ice.
@ interClathrate
Interfacial clathrate ice phase.
@ water
Liquid/amorphous phase.
@ reHex
Reclassified as hexagonal ice, according to the order parameter.
@ clathrate
Clathrate ice phase.
@ unclassified
Not classified into any other category.
@ eclipsed
The bond is an eclipsed bond.
@ out_of_range
The bond cannot be classified as either staggered or eclipsed.
@ staggered
The bond is a staggered bond, according to the or value.
Bare-bones structs used throughout the architecture. @detials This namespace defines Point and PointC...
Definition mol_sys.hpp:57
This contains a collection of points; contains information for a particular frame.
Definition mol_sys.hpp:170
This contains per-particle information.
Definition mol_sys.hpp:149
This contains the bond classifier of enum class type bond_type, and the bond correlation factor.
Definition mol_sys.hpp:132