51 #include <yaml-cpp/yaml.h>
53 int main (
int argc,
char *argv[]) {
55 auto result =
parse (argc, argv);
56 auto &arguments = result.arguments();
58 YAML::Node config = YAML::LoadFile(result[
"c" ].as<std::string>());
60 std::string script, tFile;
66 if (config[
"trajectory" ]) {
67 tFile = config[
"trajectory" ].as<std::string>();
70 std::string vars = config[
"variables" ].as<std::string>();
73 if (config[
"topoTwoDim" ][
"use" ].as<bool>()) {
75 lua.script_file(vars);
82 std::vector<std::vector<int>> nList, hbnList;
84 std::vector<std::vector<int>> ringsAllSizes;
85 std::vector<std::vector<int>> rings;
87 std::vector<double> rdfValues;
91 auto lscript = lua.get<std::string>(
"functionScript" );
93 lua[
"doBOP" ] = config[
"bulk" ][
"use" ].as<
bool >();
94 lua[
"topoOneDim" ] = config[
"topoOneDim" ][
"use" ].as<
bool >();
95 lua[
"topoTwoDim" ] = config[
"topoTwoDim" ][
"use" ].as<
bool >();
96 lua[
"topoBulk" ] = config[
"bulk" ][
"use" ].as<
bool >();
98 lua[
"nList" ] = &nList;
99 lua[
"hbnList" ] = &hbnList;
100 lua[
"resCloud" ] = &resCloud;
101 lua[
"trajectory" ] = tFile;
103 lua[
"ringsAllSizes" ] = &rings;
105 lua[
"rdf" ] = &rdfValues;
130 lua.script_file(lscript);
136 if (config[
"topoOneDim" ][
"use" ].as<bool>()) {
138 lua.script_file(vars);
147 std::vector<std::vector<int>> nList, hbnList;
149 std::vector<std::vector<int>> ringsAllSizes;
150 std::vector<std::vector<int>> rings;
155 auto lscript = lua.get<std::string>(
"functionScript" );
157 lua[
"doBOP" ] = config[
"bulk" ][
"use" ].as<
bool >();
158 lua[
"topoOneDim" ] = config[
"topoOneDim" ][
"use" ].as<
bool >();
159 lua[
"topoTwoDim" ] = config[
"topoTwoDim" ][
"use" ].as<
bool >();
160 lua[
"topoBulk" ] = config[
"bulk" ][
"use" ].as<
bool >();
162 lua[
"nList" ] = &nList;
163 lua[
"hbnList" ] = &hbnList;
164 lua[
"resCloud" ] = &resCloud;
165 lua[
"oCloud" ] = &oCloud;
166 lua[
"hCloud" ] = &hCloud;
167 lua[
"trajectory" ] = tFile;
169 lua[
"ringsAllSizes" ] = &rings;
170 lua[
"lowestAtomID" ] = &atomID;
191 lua.script_file(lscript);
197 if (config[
"bulk" ][
"use" ].as<bool>()) {
199 lua.script_file(vars);
207 std::vector<std::vector<int>> nList,
210 std::vector<std::vector<int>>
213 std::vector<double> avgQ6;
215 std::vector<std::vector<int>> ringsAllSizes;
216 std::vector<std::vector<int>> rings;
222 auto lscript = lua.get<std::string>(
"functionScript" );
224 lua[
"doBOP" ] = config[
"bulk" ][
"bondOrderParameters" ].as<
bool >();
225 lua[
"topoOneDim" ] = config[
"topoOneDim" ][
"use" ].as<
bool >();
226 lua[
"topoTwoDim" ] = config[
"topoTwoDim" ][
"use" ].as<
bool >();
227 lua[
"topoBulk" ] = config[
"bulk" ][
"topologicalNetworkCriterion" ].as<
bool >();
229 lua[
"nList" ] = &nList;
230 lua[
"hbnList" ] = &hbnList;
231 lua[
"iceNeighbourList" ] = &iceList;
232 lua[
"resCloud" ] = &resCloud;
233 lua[
"oCloud" ] = &oCloud;
234 lua[
"hCloud" ] = &hCloud;
235 lua[
"clusterCloud" ] = &solCloud;
236 lua[
"avgQ6" ] = &avgQ6;
237 lua[
"trajectory" ] = tFile;
239 lua[
"ringsAllSizes" ] = &rings;
290 lua.script_file(lscript);
296 std::cout << rang::style::bold
297 << fmt::format(
"Welcome to the Black Parade.\nYou ran:-\n" )
298 << rang::style::reset
299 << fmt::format(
"\nBulk Ice Analysis: {}" ,
300 config[
"bulk" ][
"use" ].as<bool>())
301 << fmt::format(
"\nQuasi-one-dimensional Ice Analysis: {}" ,
302 config[
"topoOneDim" ][
"use" ].as<bool>())
303 << fmt::format(
"\nQuasi-two-dimensional Ice Analysis: {}" ,
304 config[
"topoTwoDim" ][
"use" ].as<bool>())
53 int main (
int argc,
char *argv[]) {
… }
File for bond-related analyses (hydrogen bonds, bonded atoms for data file write-outs etc....
File for the bond order parameter analysis.
File containing functions used specific to bulk topological unit matching (TUM) criterion.
File for the bond order parameter analysis.
File for generating shortest-path rings according to the Franzblau algorithm.
File for containing generic or common functions.
std::vector< std::vector< int > > populateHbonds(std::string filename, molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::vector< std::vector< int > > nList, int targetFrame, int Htype)
std::vector< std::vector< int > > populateHbondsWithInputClouds(molSys::PointCloud< molSys::Point< double >, double > *yCloud, molSys::PointCloud< molSys::Point< double >, double > *hCloud, std::vector< std::vector< int > > nList)
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.
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.
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.
molSys::PointCloud< molSys::Point< double >, double > getCorrel(molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::vector< std::vector< int > > nList, bool isSlice=false)
molSys::PointCloud< molSys::Point< double >, double > reclassifyWater(molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::vector< double > *q6)
std::vector< double > getq6(molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::vector< std::vector< int > > nList, bool isSlice=false)
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.
int recenterClusterCloud(molSys::PointCloud< molSys::Point< double >, double > *iceCloud, std::vector< std::vector< int > > nList)
Recenters the coordinates of a pointCloud.
int clusterAnalysis(std::string path, molSys::PointCloud< molSys::Point< double >, double > *iceCloud, molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::vector< std::vector< int > > nList, std::vector< std::vector< int > > &iceNeighbourList, double cutoff, int firstFrame, std::string bopAnalysis="q6")
std::vector< std::vector< int > > neighbourListByIndex(molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::vector< std::vector< int > > nList)
std::vector< std::vector< int > > neighListO(double rcutoff, molSys::PointCloud< molSys::Point< double >, double > *yCloud, int typeI)
std::vector< std::vector< int > > ringNetwork(std::vector< std::vector< int > > nList, int maxDepth)
int topoBulkAnalysis(std::string path, std::vector< std::vector< int > > rings, std::vector< std::vector< int > > nList, molSys::PointCloud< molSys::Point< double >, double > *yCloud, int firstFrame, bool onlyTetrahedral=true)
int bulkPolygonRingAnalysis(std::string path, std::vector< std::vector< int > > rings, std::vector< std::vector< int > > nList, molSys::PointCloud< molSys::Point< double >, double > *yCloud, int maxDepth, int firstFrame)
int rdf2Danalysis_AA(std::string path, std::vector< double > *rdfValues, molSys::PointCloud< molSys::Point< double >, double > *yCloud, double cutoff, double binwidth, int firstFrame, int finalFrame)
int topoUnitMatchingBulk(std::string path, std::vector< std::vector< int > > rings, std::vector< std::vector< int > > nList, molSys::PointCloud< molSys::Point< double >, double > *yCloud, int firstFrame, bool printClusters, bool onlyTetrahedral)
molSys::PointCloud< molSys::Point< double >, double > getPointCloudOneAtomType(molSys::PointCloud< molSys::Point< double >, double > *yCloud, molSys::PointCloud< molSys::Point< double >, double > *outCloud, int atomTypeI, bool isSlice=false, std::array< double, 3 > coordLow=std::array< double, 3 >{0, 0, 0}, std::array< double, 3 > coordHigh=std::array< double, 3 >{0, 0, 0})
int polygonRingAnalysis(std::string path, std::vector< std::vector< int > > rings, std::vector< std::vector< int > > nList, molSys::PointCloud< molSys::Point< double >, double > *yCloud, int maxDepth, double sheetArea, int firstFrame)
void getEdgeMoleculesInRings(std::vector< std::vector< int > > rings, molSys::PointCloud< molSys::Point< double >, double > *oCloud, molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::array< double, 3 > coordLow, std::array< double, 3 > coordHigh, bool identicalCloud=false)
int prismAnalysis(std::string path, std::vector< std::vector< int > > rings, std::vector< std::vector< int > > nList, molSys::PointCloud< molSys::Point< double >, double > *yCloud, int maxDepth, int *atomID, int firstFrame, int currentFrame, bool doShapeMatching=false)
void moleculesInSingleSlice(molSys::PointCloud< molSys::Point< double >, double > *yCloud, bool clearPreviousSliceSelection=true, std::array< double, 3 > coordLow=std::array< double, 3 >{0, 0, 0}, std::array< double, 3 > coordHigh=std::array< double, 3 >{0, 0, 0})
void printSliceGetEdgeMoleculesInRings(std::string path, std::vector< std::vector< int > > rings, molSys::PointCloud< molSys::Point< double >, double > *oCloud, molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::array< double, 3 > coordLow, std::array< double, 3 > coordHigh, bool identicalCloud=false)
molSys::PointCloud< molSys::Point< double >, double > readLammpsTrj(std::string filename, int targetFrame, molSys::PointCloud< molSys::Point< double >, double > *yCloud, bool isSlice=false, std::array< double, 3 > coordLow=std::array< double, 3 >{0, 0, 0}, std::array< double, 3 > coordHigh=std::array< double, 3 >{0, 0, 0})
molSys::PointCloud< molSys::Point< double >, double > readLammpsTrjreduced(std::string filename, int targetFrame, molSys::PointCloud< molSys::Point< double >, double > *yCloud, int typeI, bool isSlice=false, std::array< double, 3 > coordLow=std::array< double, 3 >{0, 0, 0}, std::array< double, 3 > coordHigh=std::array< double, 3 >{0, 0, 0})
molSys::PointCloud< molSys::Point< double >, double > readLammpsTrjO(std::string filename, int targetFrame, molSys::PointCloud< molSys::Point< double >, double > *yCloud, int typeO, bool isSlice=false, std::array< double, 3 > coordLow=std::array< double, 3 >{0, 0, 0}, std::array< double, 3 > coordHigh=std::array< double, 3 >{0, 0, 0})
int main(int argc, char *argv[])
The main molecular system handler.
int writeHisto(molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::vector< std::vector< int > > nList, std::vector< double > avgQ6)
int writeDump(molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::string path, std::string outFile)
Generic function for writing out to a dump file.
Header file for neighbour list generation.
cxxopts::ParseResult parse(int argc, char *argv[])
File containing functions used to calculate the in-plane radial distribution functions.
File containing common functions used by bulk and confined topological network critera.
File containing functions used to define 'selections' in a given range, using ring information.
This contains a collection of points; contains information for a particular frame.
File containing functions used specific to bulk topological network critera.
File containing functions used specific to quasi-one-dimensional topological network critera (the pri...
Copy