Namespaces | |
| namespace | create |
| namespace | eigen |
| namespace | neb_paths |
| namespace | surrogate |
Functions | |
| std::string | get_value_from_env_or_param (const char *env_variable, const std::string ¶m_value, const std::string &default_value, const std::string &warning_message, const bool is_mandatory) |
| std::unique_ptr< Job > | makeJob (std::unique_ptr< Parameters > params, Runtime &runtime) |
| Borrow: caller keeps Runtime alive. | |
| std::unique_ptr< Job > | makeJob (std::unique_ptr< Parameters > params, std::unique_ptr< Runtime > runtime) |
| Own the unique_ptr Runtime. | |
| std::unique_ptr< Job > | makeJob (std::unique_ptr< Parameters > params, Runtime &&runtime) |
| Own the rvalue Runtime. | |
| std::unique_ptr< Job > | makeJob (std::unique_ptr< Parameters > params) |
| One-shot: Job owns a default Runtime. | |
| std::shared_ptr< Potential > | makePotential (const Parameters ¶ms) |
| std::shared_ptr< Potential > | makePotential (PotType ptype, const Parameters ¶ms, Runtime &runtime) |
| std::shared_ptr< Potential > | makePotential (PotType ptype, const Parameters ¶ms) |
| template<typename T> | |
| std::vector< T > | get_val_from_string (std::string_view line, std::optional< size_t > nelements=std::nullopt) |
| Parse a string into values. | |
| template std::vector< size_t > | get_val_from_string (std::string_view, std::optional< size_t >) |
| std::vector< std::string > | get_split_strings (std::string_view line) |
| Split a string into constituent strings. | |
| bool | isNumber (std::string_view token) |
| Figure out if a string has a number in it. | |
| gpr::InputParameters | eon_parameters_to_gpr (const Parameters ¶meters) |
| Create a parameters object for gpr_dimer. | |
| gpr::AtomsConfiguration | eon_matter_to_atmconf (Matter *matter) |
| Create a configuration of atoms for gpr_dimer. | |
| gpr::Observation | eon_matter_to_init_obs (Matter *matter) |
| Create an initial Observation object for gpr_dimer. | |
| AtomMatrix | makeOrthogonal (const AtomMatrix v1, const AtomMatrix v2) |
| 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) |
| void | getTime (double *real, double *user, double *sys) |
| bool | existsFile (std::string filename) |
| std::optional< std::string > | enterJobDirectory (std::string_view jobPath) |
| Enter jobPath as the working directory. | |
| 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. | |
| std::string | getRelevantFile (std::string filename) |
| VectorXd | loadMasses (std::string filename, int nAtoms) |
| AtomMatrix | loadMode (FILE *modeFile, int nAtoms) |
| AtomMatrix | loadMode (std::string filename, int nAtoms) |
| bool | loadOrSynthesizeDisplacement (Matter &target, const Matter &initial, const std::string &displacementPath, const std::string &modePath, double scale) |
| bool | applyClientDisplacement (Matter &target, const Matter &initial, const Parameters ¶ms, AtomMatrix *modeOut) |
| void | saveMode (FILE *modeFile, std::shared_ptr< Matter > matter, AtomMatrix mode) |
| Write a mode; constrained axes are emitted as 0. | |
| void | saveMode (const std::string &filename, std::shared_ptr< Matter > matter, AtomMatrix mode) |
| std::vector< int > | split_string_int (std::string s, std::string delim) |
| 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 optimizer-driven searches understand (norm, rms, max_atom, max_component). | |
| void | requireKnownConvergenceMetric (std::string_view metric, std::string_view context) |
| Throws std::invalid_argument naming context when metric is unrecognized. | |
| template<typename T> | |
| bool | eigenEquality (const Eigen::MatrixBase< T > &lhs, const Eigen::MatrixBase< T > &rhs, const double threshold=1e-4) |
| Check two eigen objects for equality. | |
Variables | |
| constexpr double | pi = 3.14159265358979323846 |
| bool eonc::helpers::applyClientDisplacement | ( | Matter & | target, |
| const Matter & | initial, | ||
| const Parameters & | params, | ||
| AtomMatrix * | modeOut ) |
Definition at line 246 of file HelperFunctions.cpp.
| 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).
Single source of the accepted spellings.
Definition at line 355 of file HelperFunctions.cpp.
| bool eonc::helpers::eigenEquality | ( | const Eigen::MatrixBase< T > & | lhs, |
| const Eigen::MatrixBase< T > & | rhs, | ||
| const double | threshold = 1e-4 ) |
Check two eigen objects for equality.
| Eigen::MatrixBase | the underlying base class |
Definition at line 26 of file MatrixHelpers.hpp.
| std::optional< std::string > eonc::helpers::enterJobDirectory | ( | std::string_view | jobPath | ) |
Enter jobPath as the working directory.
Returns nullopt on success. On failure the working directory is unchanged and the string is the filesystem error, so the caller must not run the job or report the path as finished.
Definition at line 80 of file HelperFunctions.cpp.
| gpr::AtomsConfiguration eonc::helpers::eon_matter_to_atmconf | ( | Matter * | matter | ) |
Create a configuration of atoms for gpr_dimer.
| *Matter | An eOn Matter object |
Remember that the atom type in eOn is the real atomic number, while in GPR Dimer it is a set of values from 0 to n-1 so this is eOn
False "atomtype" for GPR Dimer
Is a fixed atom Use eOn's atomtype as a key for the GPR's fake atomtype
Is moving
Special case when there's only one atom type, we can now just use the set function of the Field. Essentially now we only have one atom type
End case where we have both nonzero moving and nonzero frozen atoms
Now we will consider the case when everything is moving Everything is almost exactly the same, only we don't have frozen atoms
Special case when there's only one atom type, we can now just use the set function of the Field. Essentially now we only have one atom type
Definition at line 112 of file GPRHelpers.cpp.
| gpr::Observation eonc::helpers::eon_matter_to_init_obs | ( | Matter * | matter | ) |
Create an initial Observation object for gpr_dimer.
Note that this is essentially only for the setup, and it does not actually append or handle the Observation structure other than for initialization of atomic gp dimer
| *Matter | An eOn Matter object |
| gpr::InputParameters eonc::helpers::eon_parameters_to_gpr | ( | const Parameters & | parameters | ) |
Create a parameters object for gpr_dimer.
TODO: Get the cell size from a Matter object
| *parameters | An eOn parameters object |
Definition at line 26 of file GPRHelpers.cpp.
| bool eonc::helpers::existsFile | ( | std::string | filename | ) |
Definition at line 75 of file HelperFunctions.cpp.
| std::vector< std::string > eonc::helpers::get_split_strings | ( | std::string_view | line | ) |
Split a string into constituent strings.
Based on https://www.fluentcpp.com/2017/04/21/how-to-split-a-string-in-c/
| line | A thing to be parsed |
Definition at line 46 of file StringHelpers.cc.
| std::vector< T > eonc::helpers::get_val_from_string | ( | std::string_view | line, |
| std::optional< size_t > | nelements = std::nullopt ) |
Parse a string into values.
| line | A thing to be parsed |
Definition at line 9 of file StringHelpers.cc.
| template std::vector< size_t > eonc::helpers::get_val_from_string | ( | std::string_view | , |
| std::optional< size_t > | ) |
|
nodiscard |
Definition at line 7 of file EnvHelpers.cc.
| std::string eonc::helpers::getRelevantFile | ( | std::string | filename | ) |
Definition at line 122 of file HelperFunctions.cpp.
| void eonc::helpers::getTime | ( | double * | real, |
| double * | user, | ||
| double * | sys ) |
Definition at line 47 of file HelperFunctions.cpp.
| bool eonc::helpers::isNumber | ( | std::string_view | token | ) |
Figure out if a string has a number in it.
Based on
Definition at line 53 of file StringHelpers.cc.
| VectorXd eonc::helpers::loadMasses | ( | std::string | filename, |
| int | nAtoms ) |
Definition at line 139 of file HelperFunctions.cpp.
| AtomMatrix eonc::helpers::loadMode | ( | FILE * | modeFile, |
| int | nAtoms ) |
Definition at line 162 of file HelperFunctions.cpp.
| AtomMatrix eonc::helpers::loadMode | ( | std::string | filename, |
| int | nAtoms ) |
Definition at line 177 of file HelperFunctions.cpp.
| bool eonc::helpers::loadOrSynthesizeDisplacement | ( | Matter & | target, |
| const Matter & | initial, | ||
| const std::string & | displacementPath, | ||
| const std::string & | modePath, | ||
| double | scale ) |
Definition at line 192 of file HelperFunctions.cpp.
| std::unique_ptr< Job > eonc::helpers::makeJob | ( | std::unique_ptr< Parameters > | params | ) |
One-shot: Job owns a default Runtime.
Definition at line 65 of file JobRegistry.cpp.
| std::unique_ptr< Job > eonc::helpers::makeJob | ( | std::unique_ptr< Parameters > | params, |
| Runtime && | runtime ) |
Own the rvalue Runtime.
Definition at line 59 of file JobRegistry.cpp.
| std::unique_ptr< Job > eonc::helpers::makeJob | ( | std::unique_ptr< Parameters > | params, |
| Runtime & | runtime ) |
Borrow: caller keeps Runtime alive.
Definition at line 43 of file JobRegistry.cpp.
| std::unique_ptr< Job > eonc::helpers::makeJob | ( | std::unique_ptr< Parameters > | params, |
| std::unique_ptr< Runtime > | runtime ) |
Own the unique_ptr Runtime.
Definition at line 48 of file JobRegistry.cpp.
| AtomMatrix eonc::helpers::makeOrthogonal | ( | const AtomMatrix | v1, |
| const AtomMatrix | v2 ) |
Definition at line 42 of file HelperFunctions.cpp.
| std::shared_ptr< Potential > eonc::helpers::makePotential | ( | const Parameters & | params | ) |
Definition at line 246 of file Potential.cpp.
| std::shared_ptr< Potential > eonc::helpers::makePotential | ( | PotType | ptype, |
| const Parameters & | params ) |
Definition at line 255 of file Potential.cpp.
| std::shared_ptr< Potential > eonc::helpers::makePotential | ( | PotType | ptype, |
| const Parameters & | params, | ||
| Runtime & | runtime ) |
Definition at line 250 of file Potential.cpp.
| 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 ) |
Definition at line 447 of file HelperFunctions.cpp.
| void eonc::helpers::requireKnownConvergenceMetric | ( | std::string_view | metric, |
| std::string_view | context ) |
Throws std::invalid_argument naming context when metric is unrecognized.
Call at construction: the metric is compared once per optimizer step, and a typo should not surface on iteration 4000.
Definition at line 371 of file HelperFunctions.cpp.
| void eonc::helpers::saveMode | ( | const std::string & | filename, |
| std::shared_ptr< Matter > | matter, | ||
| AtomMatrix | mode ) |
Definition at line 316 of file HelperFunctions.cpp.
| void eonc::helpers::saveMode | ( | FILE * | modeFile, |
| std::shared_ptr< Matter > | matter, | ||
| AtomMatrix | mode ) |
Write a mode; constrained axes are emitted as 0.
Definition at line 305 of file HelperFunctions.cpp.
| std::vector< int > eonc::helpers::split_string_int | ( | std::string | s, |
| std::string | delim ) |
Definition at line 329 of file HelperFunctions.cpp.
| 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.
True only when a regular file of that name is then present.
Definition at line 89 of file HelperFunctions.cpp.
|
inlineconstexpr |
Definition at line 29 of file HelperFunctions.h.