generic.hpp File Reference

File for containing generic or common functions. More...

#include <array>
#include <iostream>
#include <math.h>
#include <mol_sys.hpp>
#include <boost/math/constants/constants.hpp>
#include <eigen3/Eigen/Core>
#include <eigen3/Eigen/Dense>
+ Include dependency graph for generic.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 gen
 Small generic functions that are shared by all namespaces.
 

Functions

double gen::radDeg (double angle)
 
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. More...
 
double gen::getAverageWithoutOutliers (std::vector< double > inpVec)
 Get the average, after excluding the outliers, using quartiles. More...
 
double gen::calcMedian (std::vector< double > *input)
 Inline generic function for calculating the median given a vector of the values. More...
 
double gen::periodicDist (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. More...
 
double gen::unWrappedDistFromPoint (molSys::PointCloud< molSys::Point< double >, double > *yCloud, int iatom, std::vector< double > singlePoint)
 
double gen::distance (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. More...
 
std::array< double, 3 > gen::relDist (molSys::PointCloud< molSys::Point< double >, double > *yCloud, int iatom, int jatom)
 
bool gen::compareByAtomID (const molSys::Point< double > &a, const molSys::Point< double > &b)
 
int gen::prettyPrintYoda (molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::string outFile)
 Generic function for printing all the struct information. More...
 
int gen::unwrappedCoordShift (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) More...
 
double gen::angDistDegQuaternions (std::vector< double > quat1, std::vector< double > quat2)
 
std::vector< std::stringgen::tokenizer (std::string line)
 Function for tokenizing line strings into words (strings) delimited by whitespace. This returns a vector with the words in it. More...
 
std::vector< double > gen::tokenizerDouble (std::string line)
 Function for tokenizing line strings into a vector of doubles. More...
 
std::vector< int > gen::tokenizerInt (std::string line)
 Function for tokenizing line strings into a vector of ints. More...
 
bool gen::file_exists (const std::string &name)
 Function for checking if a file exists or not. More...
 
std::vector< std::complex< double > > gen::avgVector (std::vector< std::complex< double >> v, int l, int neigh)
 

Variables

const double gen::pi = boost::math::constants::pi<double>()
 

Detailed Description

File for containing generic or common functions.

Definition in file generic.hpp.