15#ifndef __SEAMS_OUTPUT_H_
16#define __SEAMS_OUTPUT_H_
31#include "boost/filesystem/operations.hpp"
32#include "boost/filesystem/path.hpp"
33namespace fs = boost::filesystem;
47 if (_stat(path.c_str(), &info) != 0) {
50 return (info.st_mode & _S_IFDIR) != 0;
53 if (stat(path.c_str(), &info) != 0) {
56 return (info.st_mode & S_IFDIR) != 0;
66 int ret = _mkdir(path.c_str());
69 int ret = mkdir(path.c_str(), mode);
78 int pos = path.find_last_of(
'/');
79 if (pos == std::string::npos)
81 pos = path.find_last_of(
'\\');
82 if (pos == std::string::npos)
90 return 0 == _mkdir(path.c_str());
92 return 0 == mkdir(path.c_str(), mode);
109int writeRings(std::vector<std::vector<int>> rings,
110 std::string filename =
"rings.dat");
115 std::vector<int> nDefPrisms,
116 std::vector<double> heightPercent,
int maxDepth,
117 int currentFrame,
int firstFrame);
121int writeRingNum(std::string path,
int currentFrame, std::vector<int> nRings,
122 std::vector<double> coverageAreaXY,
123 std::vector<double> coverageAreaXZ,
124 std::vector<double> coverageAreaYZ,
int maxDepth,
129int writeRingNumBulk(std::string path,
int currentFrame, std::vector<int> nRings,
int maxDepth,
133int printRDF(std::string fileName, std::vector<double> *rdfValues,
134 double binwidth,
int nbin);
139 int mixedRings,
int basalRings,
int prismaticRings,
143int writePrisms(std::vector<int> *basal1, std::vector<int> *basal2,
149 int numOfClusters,
int smallestCluster,
150 double avgClusterSize,
int firstFrame);
162 std::vector<std::vector<int>> rings,
163 std::vector<std::vector<int>> bonds,
164 std::string filename =
"system-rings.data");
169 std::vector<double> rmsdPerAtom, std::vector<int> atomTypes,
int maxDepth,
180 std::vector<double> rmsdPerAtom, std::vector<int> atomTypes,
181 std::string path,
int firstFrame);
186 std::vector<std::vector<int>> nList, std::vector<int> atomTypes,
187 int maxDepth, std::string path,
bool doShapeMatching =
false);
192 std::vector<std::vector<int>> nList, std::vector<int> atomTypes,
193 int maxDepth, std::string path,
bool isMonolayer =
true);
199 std::vector<std::vector<int>> nList, std::vector<cage::iceType> atomTypes,
200 std::string path,
bool bondsBetweenDummy =
false);
205 std::vector<std::vector<int>> rings,
bool useBondFile, std::string bondFile,
206 std::vector<int> listPrism, std::vector<std::vector<int>> nList,
207 std::string filename =
"system-prisms.data");
213 std::vector<std::vector<int>> rings, std::vector<cage::Cage> *cageList,
215 std::string filename =
"system-cages.data");
219int writeAllCages(std::string path, std::vector<cage::Cage> *cageList,
220 std::vector<std::vector<int>> rings,
221 std::vector<std::vector<int>> nList,
232 std::vector<std::vector<int>> nList,
233 std::vector<std::vector<int>> rings);
237 std::vector<int> *basal1, std::vector<int> *basal2,
int prismNum,
238 std::vector<std::vector<int>> nList,
243 std::string path, std::string outFile);
248 std::vector<std::vector<int>> nList, std::vector<double> avgQ6);
252 std::string fileName =
"cluster.txt",
bool isSlice =
false,
253 int largestIceCluster = 0);
File for bond-related analyses (hydrogen bonds, bonded atoms for data file write-outs etc....
File for cage types for topological network criteria.
File for containing generic or common functions.
The main molecular system handler.
int writeBasalRingsPrism(std::vector< int > *basal1, std::vector< int > *basal2, int prismNum, std::vector< std::vector< int > > nList, molSys::PointCloud< molSys::Point< double >, double > *yCloud, bool isDeformed)
Write out the basal rings for a particular prism.
int writeMoleculeIDsInSlice(std::string path, molSys::PointCloud< molSys::Point< double >, double > *yCloud)
int writeHisto(molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::vector< std::vector< int > > nList, std::vector< double > avgQ6)
int writePrismNum(std::string path, std::vector< int > nPrisms, std::vector< int > nDefPrisms, std::vector< double > heightPercent, int maxDepth, int currentFrame, int firstFrame)
int writeRingNumBulk(std::string path, int currentFrame, std::vector< int > nRings, int maxDepth, int firstFrame)
int writeLAMMPSdumpSlice(molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::string path)
int writeRingNum(std::string path, int currentFrame, std::vector< int > nRings, std::vector< double > coverageAreaXY, std::vector< double > coverageAreaXZ, std::vector< double > coverageAreaYZ, int maxDepth, int firstFrame)
bool isDirExist(const std::string &path)
int makePath(const std::string &path)
int writeLAMMPSdataAllPrisms(molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::vector< std::vector< int > > nList, std::vector< int > atomTypes, int maxDepth, std::string path, bool doShapeMatching=false)
Write a data file for prisms of every type.
int writeLAMMPSdataAllRings(molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::vector< std::vector< int > > nList, std::vector< int > atomTypes, int maxDepth, std::string path, bool isMonolayer=true)
Write a data file for rings of every type for a monolayer.
int writeTopoBulkData(std::string path, int currentFrame, int numHC, int numDDC, int mixedRings, int basalRings, int prismaticRings, int firstFrame)
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 writeLAMMPSdumpINT(molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::vector< double > rmsdPerAtom, std::vector< int > atomTypes, int maxDepth, std::string path)
Write out a LAMMPS dump file containing the RMSD per atom.
int writePrisms(std::vector< int > *basal1, std::vector< int > *basal2, int prismNum, molSys::PointCloud< molSys::Point< double >, double > *yCloud)
Function for writing out each prism.
int writeLAMMPSdata(molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::vector< std::vector< int > > rings, std::vector< std::vector< int > > bonds, std::string filename="system-rings.data")
Write a data file for rings.
int printRDF(std::string fileName, std::vector< double > *rdfValues, double binwidth, int nbin)
Function for printing out the RDF, given the filename.
int writeMoleculeIDsExpressionSelectOVITO(std::string path, molSys::PointCloud< molSys::Point< double >, double > *yCloud)
int writeLAMMPSdataCages(molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::vector< std::vector< int > > rings, std::vector< cage::Cage > *cageList, cage::cageType type, int numCages, std::string filename="system-cages.data")
int writeLAMMPSdataTopoBulk(molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::vector< std::vector< int > > nList, std::vector< cage::iceType > atomTypes, std::string path, bool bondsBetweenDummy=false)
int writeBasalRingsHex(std::vector< int > currentCage, int cageNum, std::vector< std::vector< int > > nList, std::vector< std::vector< int > > rings)
Write out the basal rings of a particular Hexagonal cage.
int writeEachCage(std::vector< int > currentCage, int cageNum, cage::cageType type, std::vector< std::vector< int > > rings, molSys::PointCloud< molSys::Point< double >, double > *yCloud)
Write out a particular cage to a file.
int writeRings(std::vector< std::vector< int > > rings, std::string filename="rings.dat")
Function for printing out ring info, when there is no volume slice.
int writeAllCages(std::string path, std::vector< cage::Cage > *cageList, std::vector< std::vector< int > > rings, std::vector< std::vector< int > > nList, molSys::PointCloud< molSys::Point< double >, double > *yCloud, int currentFrame)
int writeLAMMPSdumpCages(molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::vector< double > rmsdPerAtom, std::vector< int > atomTypes, std::string path, int firstFrame)
Write out a LAMMPS dump file containing the RMSD per atom for bulk ice.
int writeXYZcluster(std::string path, molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::vector< int > atoms, int clusterID, cage::cageType type)
Function for writing out the XYZ files for each cluster.
int writeCluster(molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::string fileName="cluster.txt", bool isSlice=false, int largestIceCluster=0)
Function for printing the largest ice cluster.
int writeClusterStats(std::string path, int currentFrame, int largestCluster, int numOfClusters, int smallestCluster, double avgClusterSize, int firstFrame)
Function for writing out cluster statistics.
int writeLAMMPSdataPrisms(molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::vector< std::vector< int > > rings, bool useBondFile, std::string bondFile, std::vector< int > listPrism, std::vector< std::vector< int > > nList, std::string filename="system-prisms.data")
Write a data file for prisms of a single type.
This contains a collection of points; contains information for a particular frame.
This contains per-particle information.