55 #include <yaml-cpp/yaml.h>
57 int main(
int argc,
char *argv[]) {
59 auto result =
parse(argc, argv);
60 auto &arguments = result.arguments();
62 YAML::Node config = YAML::LoadFile(result[
"c"].as<std::string>());
70 if (config[
"trajectory"]) {
77 if (config[
"topoTwoDim"][
"use"].as<bool>()) {
79 lua.script_file(vars);
95 auto lscript = lua.get<
std::string>(
"functionScript");
97 lua[
"doBOP"] = config[
"bulk"][
"use"].as<
bool>();
98 lua[
"topoOneDim"] = config[
"topoOneDim"][
"use"].as<
bool>();
99 lua[
"topoTwoDim"] = config[
"topoTwoDim"][
"use"].as<
bool>();
100 lua[
"topoBulk"] = config[
"bulk"][
"use"].as<
bool>();
102 lua[
"nList"] = &nList;
103 lua[
"hbnList"] = &hbnList;
104 lua[
"resCloud"] = &resCloud;
105 lua[
"trajectory"] = tFile;
107 lua[
"ringsAllSizes"] = &rings;
109 lua[
"rdf"] = &rdfValues;
133 lua.script_file(lscript);
139 if (config[
"topoOneDim"][
"use"].as<bool>()) {
141 lua.script_file(vars);
156 auto lscript = lua.get<
std::string>(
"functionScript");
158 lua[
"doBOP"] = config[
"bulk"][
"use"].as<
bool>();
159 lua[
"topoOneDim"] = config[
"topoOneDim"][
"use"].as<
bool>();
160 lua[
"topoTwoDim"] = config[
"topoTwoDim"][
"use"].as<
bool>();
161 lua[
"topoBulk"] = config[
"bulk"][
"use"].as<
bool>();
163 lua[
"nList"] = &nList;
164 lua[
"hbnList"] = &hbnList;
165 lua[
"resCloud"] = &resCloud;
166 lua[
"trajectory"] = tFile;
168 lua[
"ringsAllSizes"] = &rings;
169 lua[
"lowestAtomID"] = &atomID;
189 lua.script_file(lscript);
195 if (config[
"bulk"][
"use"].as<bool>()) {
197 lua.script_file(vars);
218 auto lscript = lua.get<
std::string>(
"functionScript");
220 lua[
"doBOP"] = config[
"bulk"][
"bondOrderParameters"].as<
bool>();
221 lua[
"topoOneDim"] = config[
"topoOneDim"][
"use"].as<
bool>();
222 lua[
"topoTwoDim"] = config[
"topoTwoDim"][
"use"].as<
bool>();
223 lua[
"topoBulk"] = config[
"bulk"][
"topologicalNetworkCriterion"].as<
bool>();
225 lua[
"nList"] = &nList;
226 lua[
"hbnList"] = &hbnList;
227 lua[
"iceNeighbourList"] = &iceList;
228 lua[
"resCloud"] = &resCloud;
229 lua[
"clusterCloud"] = &solCloud;
230 lua[
"avgQ6"] = &avgQ6;
231 lua[
"trajectory"] = tFile;
233 lua[
"ringsAllSizes"] = &rings;
273 lua.script_file(lscript);
280 << fmt::format(
"Welcome to the Black Parade.\nYou ran:-\n")
281 << rang::style::reset
282 << fmt::format(
"\nBulk Ice Analysis: {}",
283 config[
"bulk"][
"use"].as<bool>())
284 << fmt::format(
"\nQuasi-one-dimensional Ice Analysis: {}",
285 config[
"topoOneDim"][
"use"].as<bool>())
286 << fmt::format(
"\nQuasi-two-dimensional Ice Analysis: {}",
287 config[
"topoTwoDim"][
"use"].as<bool>())
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< double > getq6(molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::vector< std::vector< int >> nList, bool isSlice=false)
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 > 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.
molSys::PointCloud< molSys::Point< double >, double > getCorrel(molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::vector< std::vector< int >> nList, bool isSlice=false)
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 > reclassifyWater(molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::vector< double > *q6)
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 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 > > neighListO(double rcutoff, molSys::PointCloud< molSys::Point< double >, double > *yCloud, int typeI)
std::vector< std::vector< int > > neighbourListByIndex(molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::vector< std::vector< int >> nList)
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 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 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)
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)
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)
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 writeDump(molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::string path, std::string outFile)
Generic function for writing out to a dump file.
int writeHisto(molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::vector< std::vector< int >> nList, std::vector< double > avgQ6)
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.
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...