namespace sout

Overview

namespace sout {
 
// global functions
 
int makePath(const std::string& path);
int writeRings(const std::vector<std::vector<int>>& rings, std::string filename = rings.dat);
int writePrismNum(std::string path, const std::vector<int>& nPrisms, const std::vector<int>& nDefPrisms, const std::vector<double>& heightPercent, int maxDepth, int currentFrame, int firstFrame);
int writeRingNum(std::string path, int currentFrame, const std::vector<int>& nRings, const std::vector<double>& coverageAreaXY, const std::vector<double>& coverageAreaXZ, const std::vector<double>& coverageAreaYZ, int maxDepth, int firstFrame);
int writeRingNumBulk(std::string path, int currentFrame, const std::vector<int>& nRings, int maxDepth, int firstFrame);
int printRDF(std::string fileName, std::vector<double>& rdfValues, double binwidth, int nbin);
int writeTopoBulkData(std::string path, int currentFrame, int numHC, int numDDC, int mixedRings, int basalRings, int prismaticRings, int firstFrame);
int writePrisms(std::vector<int>& basal1, std::vector<int>& basal2, int prismNum, const molSys::PointCloud<molSys::Point<double>, double>& yCloud);
int writeClusterStats(std::string path, int currentFrame, int largestCluster, int numOfClusters, int smallestCluster, double avgClusterSize, int firstFrame);
int writeMoleculeIDsInSlice(std::string path, const molSys::PointCloud<molSys::Point<double>, double>& yCloud);
int writeMoleculeIDsExpressionSelectOVITO(std::string path, const molSys::PointCloud<molSys::Point<double>, double>& yCloud);
int writeLAMMPSdata(const 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);
int writeLAMMPSdumpINT(const molSys::PointCloud<molSys::Point<double>, double>& yCloud, const std::vector<double>& rmsdPerAtom, const std::vector<int>& atomTypes, int maxDepth, std::string path);
int writeLAMMPSdumpSlice(const molSys::PointCloud<molSys::Point<double>, double>& yCloud, std::string path);
int writeLAMMPSdumpCages(const molSys::PointCloud<molSys::Point<double>, double>& yCloud, const std::vector<double>& rmsdPerAtom, const std::vector<int>& atomTypes, std::string path, int firstFrame);
int writeLAMMPSdataAllPrisms(const molSys::PointCloud<molSys::Point<double>, double>& yCloud, const std::vector<std::vector<int>>& nList, const std::vector<int>& atomTypes, int maxDepth, std::string path, bool doShapeMatching = false);
int writeLAMMPSdataAllRings(const molSys::PointCloud<molSys::Point<double>, double>& yCloud, const std::vector<std::vector<int>>& nList, const std::vector<int>& atomTypes, int maxDepth, std::string path, bool isMonolayer = true);
int writeLAMMPSdataTopoBulk(const molSys::PointCloud<molSys::Point<double>, double>& yCloud, const std::vector<std::vector<int>>& nList, const std::vector<cage::iceType>& atomTypes, std::string path, bool bondsBetweenDummy = false);
int writeLAMMPSdataPrisms(const molSys::PointCloud<molSys::Point<double>, double>& yCloud, const std::vector<std::vector<int>>& rings, bool useBondFile, std::string bondFile, const std::vector<int>& listPrism, const std::vector<std::vector<int>>& nList, std::string filename = system-prisms.data);
int writeLAMMPSdataCages(const molSys::PointCloud<molSys::Point<double>, double>& yCloud, const std::vector<std::vector<int>>& rings, std::vector<cage::Cage>& cageList, cage::cageType type, int numCages, std::string filename = system-cages.data);
int writeAllCages(std::string path, std::vector<cage::Cage>& cageList, const std::vector<std::vector<int>>& rings, const std::vector<std::vector<int>>& nList, const molSys::PointCloud<molSys::Point<double>, double>& yCloud, int currentFrame);
int writeEachCage(const std::vector<int>& currentCage, int cageNum, cage::cageType type, const std::vector<std::vector<int>>& rings, const molSys::PointCloud<molSys::Point<double>, double>& yCloud);
int writeBasalRingsHex(const std::vector<int>& currentCage, int cageNum, const std::vector<std::vector<int>>& nList, const std::vector<std::vector<int>>& rings);
int writeBasalRingsPrism(std::vector<int>& basal1, std::vector<int>& basal2, int prismNum, const std::vector<std::vector<int>>& nList, const molSys::PointCloud<molSys::Point<double>, double>& yCloud, bool isDeformed);
int writeDump(const molSys::PointCloud<molSys::Point<double>, double>& yCloud, std::string path, std::string outFile);
int writeHisto(const molSys::PointCloud<molSys::Point<double>, double>& yCloud, const std::vector<std::vector<int>>& nList, const std::vector<double>& avgQ6);
int writeCluster(const molSys::PointCloud<molSys::Point<double>, double>& yCloud, std::string fileName = cluster.txt, bool isSlice = false, int largestIceCluster = 0);
int writeXYZcluster(std::string path, const molSys::PointCloud<molSys::Point<double>, double>& yCloud, const std::vector<int>& atoms, int clusterID, cage::cageType type);
 
} // namespace sout

Detailed Documentation

Global Functions

int makePath(const std::string& path)

Inline function for creating the desired directory (and parents).

Uses std::filesystem for portability.

Parameters:

path

The path of the directory

Returns:

0 on success, 1 on failure

int writeRings(const std::vector<std::vector<int>>& rings, std::string filename = rings.dat)

Function for printing out ring info, when there is no volume slice.

int writePrismNum(std::string path, const std::vector<int>& nPrisms, const std::vector<int>& nDefPrisms, const std::vector<double>& heightPercent, int maxDepth, int currentFrame, int firstFrame)

Function for printing out the number of prism blocks, with or without slices.

Be careful when using slices!

int writeRingNum(std::string path, int currentFrame, const std::vector<int>& nRings, const std::vector<double>& coverageAreaXY, const std::vector<double>& coverageAreaXZ, const std::vector<double>& coverageAreaYZ, int maxDepth, int firstFrame)

Function for printing out the coverage area and the number of rings of each type.

int writeRingNumBulk(std::string path, int currentFrame, const std::vector<int>& nRings, int maxDepth, int firstFrame)

Function for printing out the number of rings of each type in a bulk system.

int printRDF(std::string fileName, std::vector<double>& rdfValues, double binwidth, int nbin)

Function for printing out the RDF, given the filename.

int writeTopoBulkData(std::string path, int currentFrame, int numHC, int numDDC, int mixedRings, int basalRings, int prismaticRings, int firstFrame)

Function for printing out the number of DDCs, HCs, mixed rings, basal and prismatic rings.

int writePrisms(std::vector<int>& basal1, std::vector<int>& basal2, int prismNum, const molSys::PointCloud<molSys::Point<double>, double>& yCloud)

Function for writing out each prism.

int writeClusterStats(std::string path, int currentFrame, int largestCluster, int numOfClusters, int smallestCluster, double avgClusterSize, int firstFrame)

Function for writing out cluster statistics.

int writeMoleculeIDsInSlice(std::string path, const molSys::PointCloud<molSys::Point<double>, double>& yCloud)

Function for printing out the molecule IDs present in the slice (compatible with the LAMMPS group command.

int writeMoleculeIDsExpressionSelectOVITO(std::string path, const molSys::PointCloud<molSys::Point<double>, double>& yCloud)

Function for printing out the molecule IDs present in the slice (compatible with the OVITO Expression Select command.

int writeLAMMPSdata(const 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 writeLAMMPSdumpINT(const molSys::PointCloud<molSys::Point<double>, double>& yCloud, const std::vector<double>& rmsdPerAtom, const std::vector<int>& atomTypes, int maxDepth, std::string path)

Write out a LAMMPS dump file containing the RMSD per atom.

int writeLAMMPSdumpSlice(const molSys::PointCloud<molSys::Point<double>, double>& yCloud, std::string path)

Write out a LAMMPS dump file containing the inSlice value for each atom for a user-defined slice.

int writeLAMMPSdumpCages(const molSys::PointCloud<molSys::Point<double>, double>& yCloud, const std::vector<double>& rmsdPerAtom, const std::vector<int>& atomTypes, std::string path, int firstFrame)

Write out a LAMMPS dump file containing the RMSD per atom for bulk ice.

int writeLAMMPSdataAllPrisms(const molSys::PointCloud<molSys::Point<double>, double>& yCloud, const std::vector<std::vector<int>>& nList, const std::vector<int>& atomTypes, int maxDepth, std::string path, bool doShapeMatching = false)

Write a data file for prisms of every type.

int writeLAMMPSdataAllRings(const molSys::PointCloud<molSys::Point<double>, double>& yCloud, const std::vector<std::vector<int>>& nList, const 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 writeLAMMPSdataTopoBulk(const molSys::PointCloud<molSys::Point<double>, double>& yCloud, const std::vector<std::vector<int>>& nList, const std::vector<cage::iceType>& atomTypes, std::string path, bool bondsBetweenDummy = false)

Write a data file for a particular frame, writing out topological bulk ice structures (DDCs/HCs)

int writeLAMMPSdataPrisms(const molSys::PointCloud<molSys::Point<double>, double>& yCloud, const std::vector<std::vector<int>>& rings, bool useBondFile, std::string bondFile, const std::vector<int>& listPrism, const std::vector<std::vector<int>>& nList, std::string filename = system-prisms.data)

Write a data file for prisms of a single type.

int writeLAMMPSdataCages(const molSys::PointCloud<molSys::Point<double>, double>& yCloud, const std::vector<std::vector<int>>& rings, std::vector<cage::Cage>& cageList, cage::cageType type, int numCages, std::string filename = system-cages.data)

Write out a lammps data file for DDCs or HCs, assuming that there is no slice.

int writeAllCages(std::string path, std::vector<cage::Cage>& cageList, const std::vector<std::vector<int>>& rings, const std::vector<std::vector<int>>& nList, const molSys::PointCloud<molSys::Point<double>, double>& yCloud, int currentFrame)

Write out all cages of all types into a folder called cages inside the output directory.

int writeEachCage(const std::vector<int>& currentCage, int cageNum, cage::cageType type, const std::vector<std::vector<int>>& rings, const molSys::PointCloud<molSys::Point<double>, double>& yCloud)

Write out a particular cage to a file.

int writeBasalRingsHex(const std::vector<int>& currentCage, int cageNum, const std::vector<std::vector<int>>& nList, const std::vector<std::vector<int>>& rings)

Write out the basal rings of a particular Hexagonal cage.

int writeBasalRingsPrism(std::vector<int>& basal1, std::vector<int>& basal2, int prismNum, const std::vector<std::vector<int>>& nList, const molSys::PointCloud<molSys::Point<double>, double>& yCloud, bool isDeformed)

Write out the basal rings for a particular prism.

int writeDump(const molSys::PointCloud<molSys::Point<double>, double>& yCloud, std::string path, std::string outFile)

Generic function for writing out to a dump file.

int writeHisto(const molSys::PointCloud<molSys::Point<double>, double>& yCloud, const std::vector<std::vector<int>>& nList, const std::vector<double>& avgQ6)

Function for printing out Q6, Cij and averaged Q3 values as single columns to text files The file names are cij, q6, q3.

int writeCluster(const 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 writeXYZcluster(std::string path, const molSys::PointCloud<molSys::Point<double>, double>& yCloud, const std::vector<int>& atoms, int clusterID, cage::cageType type)

Function for writing out the XYZ files for each cluster.