29inline constexpr double pi = 3.14159265358979323846;
35 bool writeMovie =
false,
bool checkpoint =
false,
36 std::string prefixMovie = std::string(),
37 std::string prefixCheckpoint = std::string(),
38 std::vector<readcon::ConFrame> *outFrames =
nullptr);
39void getTime(
double *real,
double *user,
double *sys);
49bool stageReturnLog(std::string_view logHome, std::string_view name);
53VectorXd
loadMasses(std::string filename,
int nAtoms);
62 const std::string &displacementPath,
63 const std::string &modePath,
double scale);
74void saveMode(
const std::string &filename, std::shared_ptr<Matter> matter,
86 std::string_view context);
Eigen::Matrix< double, Eigen::Dynamic, 3, eOnStorageOrder > AtomMatrix
VectorXd loadMasses(std::string filename, int nAtoms)
bool applyClientDisplacement(Matter &target, const Matter &initial, const Parameters ¶ms, AtomMatrix *modeOut)
bool relaxMatter(Matter &matter, const Parameters ¶ms, 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)
std::string getRelevantFile(std::string filename)
bool loadOrSynthesizeDisplacement(Matter &target, const Matter &initial, const std::string &displacementPath, const std::string &modePath, double scale)
AtomMatrix loadMode(FILE *modeFile, int nAtoms)
void saveMode(FILE *modeFile, std::shared_ptr< Matter > matter, AtomMatrix mode)
Write a mode; constrained axes are emitted as 0.
std::optional< std::string_view > convergenceMetricLabel(std::string_view metric)
Display label for a force-convergence metric, or nullopt when the name is none of the four the optimi...
std::vector< int > split_string_int(std::string s, std::string delim)
bool 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...
void requireKnownConvergenceMetric(std::string_view metric, std::string_view context)
Throws std::invalid_argument naming context when metric is unrecognized.
std::optional< std::string > enterJobDirectory(std::string_view jobPath)
Enter jobPath as the working directory.
void getTime(double *real, double *user, double *sys)
AtomMatrix makeOrthogonal(const AtomMatrix v1, const AtomMatrix v2)
bool existsFile(std::string filename)
RAII resource manager for the ARTn C library with global synchronization.