bop.hpp
Go to the documentation of this file.
1 //-----------------------------------------------------------------------------------
2 // d-SEAMS is free software: you can redistribute it and/or modify
3 // it under the terms of the GNU General Public License as published by
4 // the Free Software Foundation, either version 3 of the License, or
5 // (at your option) any later version.
6 //
7 // A copy of the GNU General Public License is available at
8 // http://www.gnu.org/licenses/
9 //-----------------------------------------------------------------------------------
10 
11 #ifndef __BOP_H_
12 #define __BOP_H_
13 
14 #include <array>
15 #include <boost/geometry.hpp>
16 #include <boost/math/special_functions/spherical_harmonic.hpp>
17 #include <cmath>
18 #include <complex>
19 #include <generic.hpp>
20 #include <math.h>
21 #include <mol_sys.hpp>
22 #include <neighbours.hpp>
23 #include <seams_output.hpp>
24 
134 namespace chill {
135 
136 // 2*l+1 length complex vector
144 struct YlmAtom {
146 };
147 
148 // Vector of 2*l+1 averaged over 4 nearest neighbours
165 struct QlmAtom {
166  std::vector<YlmAtom> ptq; // Averaged over neighbours
167 };
168 
180  std::vector<std::vector<int>> nList, bool isSlice = false);
181 
191  std::vector<std::vector<int>> nList, bool isSlice = false);
192 
193 // Classifies each atom according to the CHILL algorithm
209  int firstFrame, bool isSlice = false,
210  std::string outputFileName = "chill.txt");
211 
215  std::vector<std::vector<int>> nList, bool isSlice = false);
216 
221  int firstFrame, bool isSlice = false,
222  std::string outputFileName = "chillPlus.txt");
223 
228  std::vector<std::vector<int>> nList, bool isSlice = false);
229 
236  std::vector<double> *q6);
237 
240  std::string path, int firstFrame, bool isSlice = false,
241  std::string outputFileName = "superChill.txt");
242 
246  std::vector<std::vector<int>> nList, int iatom,
247  int num_staggrd, int num_eclipsd);
248 
251  std::vector<std::vector<int>> nList, int jatom);
252 
253 } // namespace chill
254 
266 namespace sph {
267 
268 // 7 is for Q3, orderL=3
269 
272 
274 
278 
281 
285 
288 
289 } // namespace sph
290 
291 #endif // __BOP_H_
File for containing generic or common functions.
std::vector< std::complex< double > > lookupTableQ6Vec(std::array< double, 2 > angles)
Lookup table for Q6.
Definition: bop.cpp:185
std::vector< double > getq6(molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::vector< std::vector< int >> nList, bool isSlice=false)
Definition: bop.cpp:864
std::vector< std::complex< double > > lookupTableQ3Vec(std::array< double, 2 > angles)
Lookup table for Q3.
Definition: bop.cpp:103
molSys::PointCloud< molSys::Point< double >, double > getCorrelPlus(molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::vector< std::vector< int >> nList, bool isSlice=false)
Gets c_ij and then classifies bond types according to the CHILL+ algorithm.
Definition: bop.cpp:598
molSys::PointCloud< molSys::Point< double >, double > getIceTypePlus(molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::vector< std::vector< int >> nList, std::string path, int firstFrame, bool isSlice=false, std::string outputFileName="chillPlus.txt")
Classifies each atom according to the CHILL+ algorithm.
Definition: bop.cpp:751
std::vector< std::complex< double > > ylm
Definition: bop.hpp:145
std::vector< YlmAtom > ptq
Definition: bop.hpp:166
molSys::PointCloud< molSys::Point< double >, double > getCorrel(molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::vector< std::vector< int >> nList, bool isSlice=false)
Definition: bop.cpp:295
std::array< double, 2 > radialCoord(std::array< double, 3 > cartCoord)
Definition: bop.cpp:77
int printIceType(molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::string path, int firstFrame, bool isSlice=false, std::string outputFileName="superChill.txt")
Prints out the iceType for a particular frame onto the terminal.
Definition: bop.cpp:1056
std::complex< double > lookupTableQ6(int m, std::array< double, 2 > angles)
Lookup table for Q6 (m=0 to m=12)
Definition: bop.cpp:211
bool isInterfacial(molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::vector< std::vector< int >> nList, int iatom, int num_staggrd, int num_eclipsd)
Definition: bop.cpp:1125
std::vector< std::complex< double > > spheriHarmo(int orderL, std::array< double, 2 > radialCoord)
Definition: bop.cpp:53
int numStaggered(molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::vector< std::vector< int >> nList, int jatom)
Finds the number of staggered bonds for a given atom of index jatom.
Definition: bop.cpp:1197
std::complex< double > lookupTableQ3(int m, std::array< double, 2 > angles)
Lookup table for Q3 (m=0 to m=6)
Definition: bop.cpp:129
molSys::PointCloud< molSys::Point< double >, double > getIceTypeNoPrint(molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::vector< std::vector< int >> nList, bool isSlice=false)
Classifies each atom according to the CHILL algorithm without printing.
Definition: bop.cpp:433
molSys::PointCloud< molSys::Point< double >, double > reclassifyWater(molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::vector< double > *q6)
Definition: bop.cpp:1007
molSys::PointCloud< molSys::Point< double >, double > getIceType(molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::vector< std::vector< int >> nList, std::string path, int firstFrame, bool isSlice=false, std::string outputFileName="chill.txt")
Classifies each atom according to the CHILL algorithm.
Definition: bop.cpp:501
The main molecular system handler.
CHILL and CHILL+ structure classification. This namespace contains functions that are used in the CHI...
Definition: bop.hpp:134
Functions used for spherical harmonics.
Definition: bop.hpp:266
Header file for neighbour list generation.
This is the local orientational bond order parameter , of length .
Definition: bop.hpp:165
This contains a complex vector of length .
Definition: bop.hpp:144
This contains a collection of points; contains information for a particular frame.
Definition: mol_sys.hpp:166
This contains per-particle information.
Definition: mol_sys.hpp:145