bop.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 __BOP_H_
16 #define __BOP_H_
17 
18 #include <array>
19 #include <boost/geometry.hpp>
20 #include <boost/math/special_functions/spherical_harmonic.hpp>
21 #include <cmath>
22 #include <complex>
23 #include <generic.hpp>
24 #include <math.h>
25 #include <mol_sys.hpp>
26 #include <neighbours.hpp>
27 #include <seams_output.hpp>
28 
138 namespace chill {
139 
140 // 2*l+1 length complex vector
148 struct YlmAtom {
150 };
151 
152 // Vector of 2*l+1 averaged over 4 nearest neighbours
169 struct QlmAtom {
170  std::vector<YlmAtom> ptq; // Averaged over neighbours
171 };
172 
184  std::vector<std::vector<int>> nList, bool isSlice = false);
185 
195  std::vector<std::vector<int>> nList, bool isSlice = false);
196 
197 // Classifies each atom according to the CHILL algorithm
213  int firstFrame, bool isSlice = false,
214  std::string outputFileName = "chill.txt");
215 
219  std::vector<std::vector<int>> nList, bool isSlice = false);
220 
225  int firstFrame, bool isSlice = false,
226  std::string outputFileName = "chillPlus.txt");
227 
232  std::vector<std::vector<int>> nList, bool isSlice = false);
233 
240  std::vector<double> *q6);
241 
244  std::string path, int firstFrame, bool isSlice = false,
245  std::string outputFileName = "superChill.txt");
246 
250  std::vector<std::vector<int>> nList, int iatom,
251  int num_staggrd, int num_eclipsd);
252 
255  std::vector<std::vector<int>> nList, int jatom);
256 
257 } // namespace chill
258 
270 namespace sph {
271 
272 // 7 is for Q3, orderL=3
273 
276 
278 
282 
285 
289 
292 
293 } // namespace sph
294 
295 #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:189
std::vector< double > getq6(molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::vector< std::vector< int >> nList, bool isSlice=false)
Definition: bop.cpp:868
std::vector< std::complex< double > > lookupTableQ3Vec(std::array< double, 2 > angles)
Lookup table for Q3.
Definition: bop.cpp:107
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:602
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:755
std::vector< std::complex< double > > ylm
Definition: bop.hpp:149
std::vector< YlmAtom > ptq
Definition: bop.hpp:170
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:299
std::array< double, 2 > radialCoord(std::array< double, 3 > cartCoord)
Definition: bop.cpp:81
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:1060
std::complex< double > lookupTableQ6(int m, std::array< double, 2 > angles)
Lookup table for Q6 (m=0 to m=12)
Definition: bop.cpp:215
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:1129
std::vector< std::complex< double > > spheriHarmo(int orderL, std::array< double, 2 > radialCoord)
Definition: bop.cpp:57
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:1201
std::complex< double > lookupTableQ3(int m, std::array< double, 2 > angles)
Lookup table for Q3 (m=0 to m=6)
Definition: bop.cpp:133
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:437
molSys::PointCloud< molSys::Point< double >, double > reclassifyWater(molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::vector< double > *q6)
Definition: bop.cpp:1011
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:505
The main molecular system handler.
CHILL and CHILL+ structure classification. This namespace contains functions that are used in the CHI...
Definition: bop.hpp:138
Functions used for spherical harmonics.
Definition: bop.hpp:270
Header file for neighbour list generation.
This is the local orientational bond order parameter , of length .
Definition: bop.hpp:169
This contains a complex vector of length .
Definition: bop.hpp:148
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