bop.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 __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
138namespace chill {
139
140// 2*l+1 length complex vector
148struct YlmAtom {
149 std::vector<std::complex<double>> ylm;
150};
151
152// Vector of 2*l+1 averaged over 4 nearest neighbours
169struct 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
212 std::vector<std::vector<int>> nList, std::string path,
213 int firstFrame, bool isSlice = false,
214 std::string outputFileName = "chill.txt");
215
219 std::vector<std::vector<int>> nList, bool isSlice = false);
220
224 std::vector<std::vector<int>> nList, std::string path,
225 int firstFrame, bool isSlice = false,
226 std::string outputFileName = "chillPlus.txt");
227
230std::vector<double>
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
270namespace sph {
271
272// 7 is for Q3, orderL=3
273
274std::vector<std::complex<double>>
275spheriHarmo(int orderL, std::array<double, 2> radialCoord);
276
277std::array<double, 2> radialCoord(std::array<double, 3> cartCoord);
278
280std::vector<std::complex<double>>
281lookupTableQ3Vec(std::array<double, 2> angles);
282
284std::complex<double> lookupTableQ3(int m, std::array<double, 2> angles);
285
287std::vector<std::complex<double>>
288lookupTableQ6Vec(std::array<double, 2> angles);
289
291std::complex<double> lookupTableQ6(int m, std::array<double, 2> angles);
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< std::complex< double > > lookupTableQ3Vec(std::array< double, 2 > angles)
Lookup table for Q3.
Definition bop.cpp:107
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
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::vector< std::complex< double > > ylm
Definition bop.hpp:149
std::vector< YlmAtom > ptq
Definition bop.hpp:170
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
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 > 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
std::vector< std::complex< double > > spheriHarmo(int orderL, std::array< double, 2 > radialCoord)
Definition bop.cpp:57
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::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 > reclassifyWater(molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::vector< double > *q6)
Definition bop.cpp:1011
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< double > getq6(molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::vector< std::vector< int > > nList, bool isSlice=false)
Definition bop.cpp:868
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
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