|
seams-core v2.14.0
libyodaLib, the C++ engine of d-SEAMS
|
Small generic functions that are shared by all namespaces. More...
Namespaces | |
| namespace | mic |
Classes | |
| struct | FracBox |
Functions | |
| double | radDeg (double angle) |
| Inline function for converting radians->degrees. | |
| double | eigenVecAngle (std::vector< double > OO, std::vector< double > OH) |
| Eigen function for getting the angle (in radians) between the O–O and O-H vectors. | |
| double | getAverageWithoutOutliers (std::vector< double > inpVec) |
| Get the average, after excluding the outliers, using quartiles. | |
| double | calcMedian (std::vector< double > *input) |
| Inline generic function for calculating the median given a vector of the values. | |
| FracBox | makeFracBox (const molSys::PointCloud< molSys::Point< double >, double > &yCloud) |
| std::array< double, 3 > | fracDelta (const FracBox &b, double xi, double yi, double zi, double xj, double yj, double zj) |
| double | fracDistSq (const FracBox &b, double xi, double yi, double zi, double xj, double yj, double zj) |
| bool | smithInside (const FracBox &b, double r2) |
| std::array< double, 3 > | triclinicMinImage (const molSys::PointCloud< molSys::Point< double >, double > &yCloud, double xi, double yi, double zi, double xj, double yj, double zj) |
| double | periodicDistSq (const FracBox &b, const molSys::PointCloud< molSys::Point< double >, double > &yCloud, int iatom, int jatom) |
| Inline generic function for obtaining the unwrapped periodic distance between two particles, whose indices (not IDs) have been given. | |
| double | periodicDistSq (const molSys::PointCloud< molSys::Point< double >, double > &yCloud, int iatom, int jatom) |
| double | periodicDist (const molSys::PointCloud< molSys::Point< double >, double > &yCloud, int iatom, int jatom) |
| Inline generic function for obtaining the unwrapped periodic distance between two particles, whose indices (not IDs) have been given. | |
| void | batchPeriodicDistSq (const molSys::PointCloud< molSys::Point< double >, double > &yCloud, int iatom, const int *jatom, std::size_t n, double *distSq) |
| std::string | formatDumpBox (const std::vector< double > &box) |
| void | writeDumpBoxBounds (std::ostream &os, const molSys::PointCloud< molSys::Point< double >, double > &yCloud) |
| std::array< double, 3 > | relDistFromPoint (const FracBox &b, const molSys::PointCloud< molSys::Point< double >, double > &yCloud, int iatom, double xj, double yj, double zj) |
| Inline generic function for obtaining the unwrapped periodic distance between one particle and another point, whose index has been given. | |
| std::array< double, 3 > | relDistFromPoint (const molSys::PointCloud< molSys::Point< double >, double > &yCloud, int iatom, double xj, double yj, double zj) |
| double | unWrappedDistFromPoint (const molSys::PointCloud< molSys::Point< double >, double > &yCloud, int iatom, const std::vector< double > &singlePoint) |
| double | distance (const molSys::PointCloud< molSys::Point< double >, double > &yCloud, int iatom, int jatom) |
| Inline generic function for obtaining the wrapped distance between two particles WITHOUT applying PBCs, whose indices (not IDs) have been given. | |
| std::array< double, 3 > | relDist (const molSys::PointCloud< molSys::Point< double >, double > &yCloud, int iatom, int jatom) |
| Inline generic function for getting the relative unwrapped distance between two particles for each dimension. | |
| std::array< double, 3 > | unwrappedXYZ (const molSys::PointCloud< molSys::Point< double >, double > &yCloud, int origin, int atom) |
| bool | compareByAtomID (const molSys::Point< double > &a, const molSys::Point< double > &b) |
| Inline generic function for sorting or comparing two particles, according to the atom ID when the entire Point objects have been passed. | |
| int | prettyPrintYoda (const molSys::PointCloud< molSys::Point< double >, double > &yCloud, std::string outFile) |
| Generic function for printing all the struct information. | |
| int | unwrappedCoordShift (const molSys::PointCloud< molSys::Point< double >, double > &yCloud, int iatomIndex, int jatomIndex, double *x_i, double *y_i, double *z_i, double *x_j, double *y_j, double *z_j) |
| Shift particles (unwrapped coordinates). | |
| double | angDistDegQuaternions (std::vector< double > quat1, std::vector< double > quat2) |
| std::vector< std::string > | tokenizer (std::string line) |
| Function for tokenizing line strings into words (strings) delimited by whitespace. | |
| std::vector< double > | tokenizerDouble (std::string line) |
| Function for tokenizing line strings into a vector of doubles. | |
| std::vector< int > | tokenizerInt (std::string line) |
| Function for tokenizing line strings into a vector of ints. | |
| bool | file_exists (const std::string &name) |
| Function for checking if a file exists or not. | |
| std::vector< std::complex< double > > | avgVector (std::vector< std::complex< double > > v, int l, int neigh) |
| Calculates the complex vector, normalized by the number of nearest neighbours, of length \(2l+1\). | |
| 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}) |
| 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 | atomsInSingleSlice (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 | setAtomsWithSameMolID (molSys::PointCloud< molSys::Point< double >, double > &yCloud, const std::unordered_multimap< int, int > &molIDAtomIDmap, int molID, bool inSliceValue=true) |
Variables | |
| constexpr double | pi = std::numbers::pi |
| Uses Boost to get the value of pi. | |
Small generic functions that are shared by all namespaces.
These are general functions (eg. for finding the periodic distance) which are required by several namespaces.
| double gen::angDistDegQuaternions | ( | std::vector< double > | quat1, |
| std::vector< double > | quat2 ) |
Function for getting the angular distance between two quaternions. Returns the result in degrees
| void gen::atomsInSingleSlice | ( | 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} ) |
Given a pointCloud set the inSlice bool for every atom, if the atoms are inside the specified (single) region. Does not handle atoms in molecules straddling the boundary
|
inline |
Calculates the complex vector, normalized by the number of nearest neighbours, of length \(2l+1\).
| [in] | v | The complex vector to be normalized, of length \(2l+1\) |
| [in] | l | A free integer parameter |
| [in] | neigh | The number of nearest neighbours |
Definition at line 720 of file generic.hpp.
|
inline |
Definition at line 435 of file generic.hpp.
|
inline |
Inline generic function for calculating the median given a vector of the values.
| [in] | yCloud | The input PointCloud, which contains the particle coordinates, simulation box lengths etc. |
| [in] | input | The input vector with the values |
Definition at line 89 of file generic.hpp.
|
inline |
Inline generic function for sorting or comparing two particles, according to the atom ID when the entire Point objects have been passed.
| [in] | a | The input Point for A. |
| [in] | b | The input Point for B. |
Definition at line 643 of file generic.hpp.
|
inline |
Inline generic function for obtaining the wrapped distance between two particles WITHOUT applying PBCs, whose indices (not IDs) have been given.
| [in] | yCloud | The input PointCloud, which contains the particle coordinates, simulation box lengths etc. |
| [in] | iatom | The index of the \( i^{th} \) atom. |
| [in] | jatom | The index of the \( j^{th} \) atom. |
Definition at line 587 of file generic.hpp.
| double gen::eigenVecAngle | ( | std::vector< double > | OO, |
| std::vector< double > | OH ) |
Eigen function for getting the angle (in radians) between the O–O and O-H vectors.
|
inline |
Function for checking if a file exists or not.
| [in] | name | The name of the file |
Definition at line 707 of file generic.hpp.
|
inline |
Definition at line 474 of file generic.hpp.
|
inline |
Definition at line 205 of file generic.hpp.
|
inline |
Definition at line 233 of file generic.hpp.
| double gen::getAverageWithoutOutliers | ( | std::vector< double > | inpVec | ) |
Get the average, after excluding the outliers, using quartiles.
| molSys::PointCloud< molSys::Point< double >, double > gen::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} ) |
Given a pointCloud containing certain atom types, this returns a pointCloud containing atoms of only the desired type
|
inline |
Definition at line 156 of file generic.hpp.
| void gen::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} ) |
Given a pointCloud set the inSlice bool for every atom, if the molecules are inside the specified (single) region. If even one atom of a molecule is inside the region, then all atoms of that molecule will be inside the region (irrespective of type)
|
inline |
Inline generic function for obtaining the unwrapped periodic distance between two particles, whose indices (not IDs) have been given.
| [in] | yCloud | The input PointCloud, which contains the particle coordinates, simulation box lengths etc. |
| [in] | iatom | The index of the \( i^{th} \) atom. |
| [in] | jatom | The index of the \( j^{th} \) atom. |
Definition at line 426 of file generic.hpp.
|
inline |
Inline generic function for obtaining the unwrapped periodic distance between two particles, whose indices (not IDs) have been given.
| [in] | yCloud | The input PointCloud, which contains the particle coordinates, simulation box lengths etc. |
| [in] | iatom | The index of the \( i^{th} \) atom. |
| [in] | jatom | The index of the \( j^{th} \) atom. |
Definition at line 365 of file generic.hpp.
|
inline |
Definition at line 411 of file generic.hpp.
|
nodiscard |
Generic function for printing all the struct information.
|
inline |
Inline function for converting radians->degrees.
| [in] | angle | The input angle, in radians |
Definition at line 73 of file generic.hpp.
|
inline |
Inline generic function for getting the relative unwrapped distance between two particles for each dimension.
The indices (not IDs) of the particles have been given.
| [in] | yCloud | The input PointCloud, which contains the particle coordinates, simulation box lengths etc. |
| [in] | iatom | The index of the \( i^{th} \) atom. |
| [in] | jatom | The index of the \( j^{th} \) atom. |
Definition at line 617 of file generic.hpp.
|
inline |
Inline generic function for obtaining the unwrapped periodic distance between one particle and another point, whose index has been given.
| [in] | b | The box of yCloud, from makeFracBox. |
| [in] | yCloud | The input PointCloud, which contains the particle coordinates, simulation box lengths etc. |
| [in] | iatom | The index of the \( i^{th} \) atom. |
| [in] | xj,yj,zj | The other point. |
Definition at line 521 of file generic.hpp.
|
inline |
Definition at line 561 of file generic.hpp.
| void gen::setAtomsWithSameMolID | ( | molSys::PointCloud< molSys::Point< double >, double > & | yCloud, |
| const std::unordered_multimap< int, int > & | molIDAtomIDmap, | ||
| int | molID, | ||
| bool | inSliceValue = true ) |
Given a particular molecule ID and a pointCloud set the inSlice bool for all atoms, with that molecule ID
|
inline |
Definition at line 243 of file generic.hpp.
|
inline |
Function for tokenizing line strings into words (strings) delimited by whitespace.
This returns a vector with the words in it.
| [in] | line | The string containing the line to be tokenized |
Definition at line 668 of file generic.hpp.
|
inline |
Function for tokenizing line strings into a vector of doubles.
| [in] | line | The string containing the line to be tokenized |
Definition at line 679 of file generic.hpp.
|
inline |
Function for tokenizing line strings into a vector of ints.
| [in] | line | The string containing the line to be tokenized |
Definition at line 693 of file generic.hpp.
|
inline |
Definition at line 300 of file generic.hpp.
|
nodiscard |
Shift particles (unwrapped coordinates).
|
inline |
Definition at line 567 of file generic.hpp.
|
inline |
Definition at line 626 of file generic.hpp.
|
inline |
Definition at line 486 of file generic.hpp.
|
constexpr |
Uses Boost to get the value of pi.
Definition at line 66 of file generic.hpp.