Loading...
Searching...
No Matches
HelperFunctions.h File Reference
#include "Eigen.h"
#include "GeometryAnalysis.h"
#include "Matter.h"
#include "RandomNumbers.h"
#include <optional>
#include <string>
#include <string_view>
#include <vector>

Go to the source code of this file.

Namespaces

namespace  eonc
 RAII resource manager for the ARTn C library with global synchronization.
namespace  eonc::helpers

Functions

AtomMatrix eonc::helpers::makeOrthogonal (const AtomMatrix v1, const AtomMatrix v2)
bool eonc::helpers::relaxMatter (Matter &matter, const Parameters &params, bool quiet=false, bool writeMovie=false, bool checkpoint=false, std::string prefixMovie=std::string(), std::string prefixCheckpoint=std::string(), std::vector< readcon::ConFrame > *outFrames=nullptr)
void eonc::helpers::getTime (double *real, double *user, double *sys)
bool eonc::helpers::existsFile (std::string filename)
std::string eonc::helpers::getRelevantFile (std::string filename)
VectorXd eonc::helpers::loadMasses (std::string filename, int nAtoms)
AtomMatrix eonc::helpers::loadMode (FILE *modeFile, int nAtoms)
AtomMatrix eonc::helpers::loadMode (std::string filename, int nAtoms)
bool eonc::helpers::loadOrSynthesizeDisplacement (Matter &target, const Matter &initial, const std::string &displacementPath, const std::string &modePath, double scale)
void eonc::helpers::saveMode (FILE *modeFile, std::shared_ptr< Matter > matter, AtomMatrix mode)
 Write a mode; constrained axes are emitted as 0.
void eonc::helpers::saveMode (const std::string &filename, std::shared_ptr< Matter > matter, AtomMatrix mode)
std::vector< int > eonc::helpers::split_string_int (std::string s, std::string delim)
std::optional< std::string_view > eonc::helpers::convergenceMetricLabel (std::string_view metric)
 Display label for a force-convergence metric, or nullopt when the name is none of the three the optimizer-driven searches understand.
void eonc::helpers::requireKnownConvergenceMetric (std::string_view metric, std::string_view context)
 Throws std::invalid_argument naming context when metric is unrecognized.
double eonc::helpers::gaussRandom (double avg, double std)
double eonc::helpers::random (long newSeed=0)
double eonc::helpers::randomDouble ()
long eonc::helpers::randomInt (int lower, int upper)
bool eonc::helpers::identical (const Matter &m1, const Matter &m2, const double distanceDifference)
double eonc::helpers::maxAtomMotion (const AtomMatrix v1)
AtomMatrix eonc::helpers::maxAtomMotionApplied (const AtomMatrix v1, double maxMotion)
VectorXd eonc::helpers::maxAtomMotionAppliedV (const VectorXd v1, double maxMotion)
double eonc::helpers::maxAtomMotionV (const VectorXd v1)
AtomMatrix eonc::helpers::maxMotionApplied (const AtomMatrix v1, double maxMotion)
VectorXd eonc::helpers::maxMotionAppliedV (const VectorXd v1, double maxMotion)
long eonc::helpers::numAtomsMoved (const AtomMatrix v1, double cutoff)
void eonc::helpers::projectOutRotTrans (Eigen::VectorXd &step, const AtomMatrix &positions)
void eonc::helpers::pushApart (std::shared_ptr< Matter > m1, double minDistance)
RotationMatrix eonc::helpers::rotationExtract (const AtomMatrix r1, const AtomMatrix r2)
bool eonc::helpers::rotationMatch (const Matter &m1, const Matter &m2, const double max_diff)
void eonc::helpers::rotationRemove (const AtomMatrix r1, std::shared_ptr< Matter > m2)
bool eonc::helpers::sortedR (const Matter &m1, const Matter &m2, const double distanceDifference)
void eonc::helpers::translationRemove (Matter &m1, const AtomMatrix r1)

Variables

constexpr double eonc::helpers::pi = 3.14159265358979323846