Loading...
Searching...
No Matches
HelperFunctions.h File Reference
#include "Eigen.h"
#include "GeometryAnalysis.h"
#include "Matter.h"
#include "Parameters.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::optional< std::string > eonc::helpers::enterJobDirectory (std::string_view jobPath)
 Enter jobPath as the working directory.
bool eonc::helpers::stageReturnLog (std::string_view logHome, std::string_view name)
 Copy name from logHome into the current directory when that file is not already this directory's copy.
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)
bool eonc::helpers::applyClientDisplacement (Matter &target, const Matter &initial, const Parameters &params, AtomMatrix *modeOut)
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 four the optimizer-driven searches understand (norm, rms, max_atom, max_component).
void eonc::helpers::requireKnownConvergenceMetric (std::string_view metric, std::string_view context)
 Throws std::invalid_argument naming context when metric is unrecognized.

Variables

constexpr double eonc::helpers::pi = 3.14159265358979323846