MolSys

Data Structures

struct  molSys::Result
 This contains the bond classifier of enum class type bond_type, and the bond correlation factor. More...
 
struct  molSys::Point< T >
 This contains per-particle information. More...
 
struct  molSys::PointCloud< S, T >
 This contains a collection of points; contains information for a particular frame. More...
 

Enumerations

enum class  molSys::bond_type { molSys::staggered , molSys::eclipsed , molSys::out_of_range }
 
enum class  molSys::atom_state_type {
  molSys::cubic , molSys::hexagonal , molSys::water , molSys::interfacial ,
  molSys::clathrate , molSys::interClathrate , molSys::unclassified , molSys::reCubic ,
  molSys::reHex
}
 

Functions

std::unordered_map< int, int > molSys::createIDMolIDmap (molSys::PointCloud< molSys::Point< double >, double > *yCloud)
 
std::unordered_multimap< int, int > molSys::createMolIDAtomIDMultiMap (molSys::PointCloud< molSys::Point< double >, double > *yCloud)
 
std::vector< std::vector< int > > molSys::hAtomMolList (molSys::PointCloud< molSys::Point< double >, double > *hCloud, molSys::PointCloud< molSys::Point< double >, double > *oCloud)
 
int molSys::searchMolList (std::vector< std::vector< int >> molList, int molIDtoFind)
 
molSys::PointCloud< molSys::Point< double >, double > molSys::clearPointCloud (molSys::PointCloud< molSys::Point< double >, double > *yCloud)
 //! Function for clearing vectors in PointCloud after multiple usage More...
 

Variables

bond_type molSys::Result::classifier
 
double molSys::Result::c_value
 Classifier according to CHILL, CHILL+ etc. More...
 
int molSys::Point< T >::type
 
int molSys::Point< T >::molID
 
int molSys::Point< T >::atomID
 
molSys::Point< T >::x
 type ID, molID, atomID More...
 
molSys::Point< T >::y
 
molSys::Point< T >::z
 
std::vector< ResultmolSys::Point< T >::c_ij
 coordinates More...
 
atom_state_type molSys::Point< T >::iceType
 Results (contains bond correlation type) More...
 
bool molSys::Point< T >::inSlice = true
 Type of ice/water etc based on cij. More...
 
std::vector< S > molSys::PointCloud< S, T >::pts
 
int molSys::PointCloud< S, T >::currentFrame
 Collection of points. More...
 
int molSys::PointCloud< S, T >::nop
 Current frame number. More...
 
std::vector< T > molSys::PointCloud< S, T >::box
 Number of atoms. More...
 
std::vector< T > molSys::PointCloud< S, T >::boxLow
 Periodic box lengths. More...
 
std::unordered_map< int, int > molSys::PointCloud< S, T >::idIndexMap
 xlo, ylo, zlo More...
 

Detailed Description

Enumeration Type Documentation

◆ atom_state_type

Enumerator
cubic 

Ic, or particle type signifying Cubic Ice.

hexagonal 

Ih, or particle type signifying Hexagonal Ice.

water 

Liquid/amorphous phase.

interfacial 

Interfacial ice: ice-like molecules which do not fulfill the strict criteria of the Ic or Ih phases.

clathrate 

Clathrate ice phase.

interClathrate 

Interfacial clathrate ice phase.

unclassified 

Not classified into any other category.

reCubic 

Reclassified as cubic ice, according to the \(q_6\) order parameter.

reHex 

Reclassified as hexagonal ice, according to the \(q_6\) order parameter.

Definition at line 113 of file mol_sys.hpp.

113  {
114  cubic,
115  hexagonal,
116  water,
117  interfacial,
118  clathrate,
120  unclassified,
121  reCubic,
122  reHex
123 };
@ 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.

◆ bond_type

enum molSys::bond_type
strong
Enumerator
staggered 

The bond is a staggered bond, according to the \(a(i,j)\) or \(c(i,j)\) value.

eclipsed 

The bond is an eclipsed bond.

out_of_range 

The bond cannot be classified as either staggered or eclipsed.

Definition at line 75 of file mol_sys.hpp.

@ 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.

Function Documentation

◆ clearPointCloud()

molSys::PointCloud< molSys::Point< double >, double > molSys::clearPointCloud ( molSys::PointCloud< molSys::Point< double >, double > *  yCloud)

//! Function for clearing vectors in PointCloud after multiple usage

Function for clearing PointCloud if it is already filled. This should be called before every frame is read in.

Parameters
[out]yCloudThe cleared PointCloud

Definition at line 24 of file mol_sys.cpp.

25  {
26  //
28  std::vector<double> tempBox;
29  //
30  std::vector<double> tempBox1;
31 
32  tempPts.swap(yCloud->pts);
33  tempBox.swap(yCloud->box);
34  tempBox1.swap(yCloud->boxLow);
35  yCloud->idIndexMap.clear();
36 
37  return *yCloud;
38 }
T clear(T... args)
std::vector< S > pts
Definition: mol_sys.hpp:171
std::unordered_map< int, int > idIndexMap
xlo, ylo, zlo
Definition: mol_sys.hpp:176
std::vector< T > box
Number of atoms.
Definition: mol_sys.hpp:174
std::vector< T > boxLow
Periodic box lengths.
Definition: mol_sys.hpp:175
T swap(T... args)

◆ createIDMolIDmap()

std::unordered_map< int, int > molSys::createIDMolIDmap ( molSys::PointCloud< molSys::Point< double >, double > *  yCloud)

Creates an unordered map, with the atomIDs as keys and molecular IDs as the values

Function for creating an unordered map with the atomIDs in the pointCloud as the keys and the molecular IDs as the values

Definition at line 44 of file mol_sys.cpp.

45  {
47  idMolIDmap; // atom IDs as keys and mol IDs as values
48  int iatomMolID; // molID of the current iatom
49  int iatomID; // atom ID of the current iatom
50 
51  // Loop through the atoms in yCloud
52  for (int iatom = 0; iatom < yCloud->nop; iatom++) {
53  iatomID = yCloud->pts[iatom].atomID; // atom ID
54  iatomMolID = yCloud->pts[iatom].molID; // molecular ID
55  // Update the unordered map
56  idMolIDmap[iatomID] = iatomMolID;
57  } // end of loop through every iatom in pointCloud
58 
59  return idMolIDmap;
60 }
int nop
Current frame number.
Definition: mol_sys.hpp:173

◆ createMolIDAtomIDMultiMap()

std::unordered_multimap< int, int > molSys::createMolIDAtomIDMultiMap ( molSys::PointCloud< molSys::Point< double >, double > *  yCloud)

Creates an multimap with molecule IDs of the atoms as the keys and the atom IDs as the values. More than one atom can have the same molecule ID

Function for creating an unordered map with the atomIDs in the pointCloud as the keys and the molecular IDs as the values. More than one atom can have the same molecule ID.

Definition at line 67 of file mol_sys.cpp.

68  {
70  molIDAtomIDmap; // atom IDs as keys and mol IDs as values
71  int iatomMolID; // molID of the current iatom
72  int iatomID; // atom ID of the current iatom
73 
74  // Loop through the atoms in yCloud
75  for (int iatom = 0; iatom < yCloud->nop; iatom++) {
76  iatomID = yCloud->pts[iatom].atomID; // atom ID
77  iatomMolID = yCloud->pts[iatom].molID; // molecular ID
78  // Update the unordered multimap
79  molIDAtomIDmap.emplace(iatomMolID,iatomID);
80  } // end of loop through every iatom in pointCloud
81 
82  return molIDAtomIDmap;
83 }

◆ hAtomMolList()

std::vector< std::vector< int > > molSys::hAtomMolList ( molSys::PointCloud< molSys::Point< double >, double > *  hCloud,
molSys::PointCloud< molSys::Point< double >, double > *  oCloud 
)

Returns a vector of vectors, which contains the molIDs in the first column, and the hydrogen atom indices (not atom IDs) in the row

Function that returns a vector of vectors, which contains the hydrogen atoms for each molID in the oxygen atom pointCloud

Definition at line 89 of file mol_sys.cpp.

91  {
93  hMolList; // the first column contains the molecular IDs, and the next
94  // two elements in the row are the hydrogen bond atoms in the
95  // molecule
96  int iMolID; // Current molecular ID
97  int nHatoms; // No. of h atoms found for a particular molID.
98 
99  for (int iatom = 0; iatom < oCloud->nop; iatom++) {
100  // Get the molID
101  iMolID = oCloud->pts[iatom].molID;
102 
103  hMolList.push_back(std::vector<int>()); // Empty vector for the index iatom
104  // Fill the first element with the molecular ID
105  hMolList[iatom].push_back(iMolID);
106 
107  nHatoms = 0; // init (no. of h atoms for the particular molID)
108 
109  // Now search through the hydrogen atom pointCloud for this particular molID
110  for (int jatom = 0; jatom < hCloud->nop; jatom++) {
111  if (hCloud->pts[jatom].molID == iMolID) {
112  hMolList[iatom].push_back(jatom); // fill the hatom index
113  nHatoms++;
114  // If the two hydrogens have been found, break out of the loop
115  if (nHatoms == 2) {
116  break;
117  } // end of break
118  } // end of check to see if jatom is part of iMolID
119  } // end of loop through the hydrogen atom pointCloud
120  } // end of looping through every oxygen atom
121 
122  return hMolList;
123 } // end of function
T push_back(T... args)

◆ searchMolList()

int molSys::searchMolList ( std::vector< std::vector< int >>  molList,
int  molIDtoFind 
)

This function searches a vector of vectors molList, for a particular molecular ID, and returns the index in molList

Function for searching a vector of vectors for a particular molecular ID, and

Returns
the index found in molList
-1 if not found

Definition at line 131 of file mol_sys.cpp.

132  {
133  int index = -1; // init invalid index
134 
135  for (int iatom = 0; iatom < molList.size(); iatom++) {
136  // If the molecular ID is equal, return the index in the array
137  if (molList[iatom][0] == molIDtoFind) {
138  index = iatom;
139  return index;
140  } // end of check
141  } // end of looping through iatom
142 
143  return index;
144 }
T size(T... args)

Variable Documentation

◆ atomID

template<typename T >
int molSys::Point< T >::atomID

Definition at line 150 of file mol_sys.hpp.

◆ box

template<typename S , typename T >
std::vector<T> molSys::PointCloud< S, T >::box

Number of atoms.

Definition at line 174 of file mol_sys.hpp.

◆ boxLow

template<typename S , typename T >
std::vector<T> molSys::PointCloud< S, T >::boxLow

Periodic box lengths.

Definition at line 175 of file mol_sys.hpp.

◆ c_ij

template<typename T >
std::vector<Result> molSys::Point< T >::c_ij

coordinates

Definition at line 152 of file mol_sys.hpp.

◆ c_value

double molSys::Result::c_value

Classifier according to CHILL, CHILL+ etc.

Definition at line 134 of file mol_sys.hpp.

◆ classifier

bond_type molSys::Result::classifier

Definition at line 133 of file mol_sys.hpp.

◆ currentFrame

template<typename S , typename T >
int molSys::PointCloud< S, T >::currentFrame

Collection of points.

Definition at line 172 of file mol_sys.hpp.

◆ iceType

template<typename T >
atom_state_type molSys::Point< T >::iceType
Initial value:

Results (contains bond correlation type)

Definition at line 153 of file mol_sys.hpp.

◆ idIndexMap

template<typename S , typename T >
std::unordered_map<int, int> molSys::PointCloud< S, T >::idIndexMap

xlo, ylo, zlo

Definition at line 176 of file mol_sys.hpp.

◆ inSlice

template<typename T >
bool molSys::Point< T >::inSlice = true

Type of ice/water etc based on cij.

Definition at line 155 of file mol_sys.hpp.

◆ molID

template<typename T >
int molSys::Point< T >::molID

Definition at line 150 of file mol_sys.hpp.

◆ nop

template<typename S , typename T >
int molSys::PointCloud< S, T >::nop

Current frame number.

Definition at line 173 of file mol_sys.hpp.

◆ pts

template<typename S , typename T >
std::vector<S> molSys::PointCloud< S, T >::pts

Definition at line 171 of file mol_sys.hpp.

◆ type

template<typename T >
int molSys::Point< T >::type

Definition at line 150 of file mol_sys.hpp.

◆ x

template<typename T >
T molSys::Point< T >::x

type ID, molID, atomID

Definition at line 151 of file mol_sys.hpp.

◆ y

template<typename T >
T molSys::Point< T >::y

Definition at line 151 of file mol_sys.hpp.

◆ z

template<typename T >
T molSys::Point< T >::z

Definition at line 151 of file mol_sys.hpp.