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::unique_ptr< Potential > | makePotential (const Parameters ¶ms) |
| Exclusive ownership. | |
| std::shared_ptr< Potential > | makeImagePotential (const Potential &pot, const Parameters ¶ms) |
| A separate instance of pot for one image of a band, dimer or pair of minimizations: a clone when the backend can clone, else a new instance built from params. | |
| std::unique_ptr< Potential > | makePotential (PotType ptype, const Parameters ¶ms, Runtime &runtime) |
| std::unique_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. | |
| template<typename Writer> | |
| bool | atomicWriteFile (const std::string &path, Writer writer) |
| 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. | |
| std::shared_ptr< Potential > | sharePotential (std::unique_ptr< Potential > pot) |
| Multi-owner boundary: one instance observed by several Matters, images, or a binding. | |
Variables | |
| constexpr double | pi = 3.14159265358979323846 |
| bool eonc::helpers::applyClientDisplacement | ( | Matter & | target, |
| const Matter & | initial, | ||
| const Parameters & | params, | ||
| AtomMatrix * | modeOut ) |
Definition at line 247 of file HelperFunctions.cpp.
| bool eonc::helpers::atomicWriteFile | ( | const std::string & | path, |
| Writer | writer ) |
Definition at line 26 of file AtomicFile.h.
| 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 356 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.
| lhs | left-hand matrix |
| rhs | right-hand matrix |
| threshold | absolute tolerance passed to Eigen isApprox |
Definition at line 28 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 81 of file HelperFunctions.cpp.
| gpr::AtomsConfiguration eonc::helpers::eon_matter_to_atmconf | ( | Matter * | matter | ) |
Create a configuration of atoms for gpr_dimer.
| matter | 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 | eOn Matter object |
Definition at line 242 of file GPRHelpers.cpp.
| 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 | eOn parameters |
Definition at line 26 of file GPRHelpers.cpp.
| bool eonc::helpers::existsFile | ( | std::string | filename | ) |
Definition at line 76 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 | text to parse |
| nelements | expected count, when set |
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 123 of file HelperFunctions.cpp.
| void eonc::helpers::getTime | ( | double * | real, |
| double * | user, | ||
| double * | sys ) |
Definition at line 48 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 140 of file HelperFunctions.cpp.
| AtomMatrix eonc::helpers::loadMode | ( | FILE * | modeFile, |
| int | nAtoms ) |
Definition at line 163 of file HelperFunctions.cpp.
| AtomMatrix eonc::helpers::loadMode | ( | std::string | filename, |
| int | nAtoms ) |
Definition at line 178 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 193 of file HelperFunctions.cpp.
|
nodiscard |
A separate instance of pot for one image of a band, dimer or pair of minimizations: a clone when the backend can clone, else a new instance built from params.
It charges its force calls to the registry that counts pot's, so a job's force-call total includes every image.
Definition at line 271 of file Potential.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 43 of file HelperFunctions.cpp.
|
nodiscard |
Exclusive ownership.
Share only at a multi-owner boundary via sharePotential().
Definition at line 268 of file Potential.cpp.
|
nodiscard |
Definition at line 285 of file Potential.cpp.
|
nodiscard |
Definition at line 280 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 449 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 372 of file HelperFunctions.cpp.
| void eonc::helpers::saveMode | ( | const std::string & | filename, |
| std::shared_ptr< Matter > | matter, | ||
| AtomMatrix | mode ) |
Definition at line 317 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 306 of file HelperFunctions.cpp.
|
inlinenodiscard |
Multi-owner boundary: one instance observed by several Matters, images, or a binding.
Definition at line 292 of file Potential.h.
| std::vector< int > eonc::helpers::split_string_int | ( | std::string | s, |
| std::string | delim ) |
Definition at line 330 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 90 of file HelperFunctions.cpp.
|
inlineconstexpr |
Definition at line 29 of file HelperFunctions.h.