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) |
| std::shared_ptr< Potential > | makePotential (const Parameters ¶ms) |
| 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::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) |
| 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 three the optimizer-driven searches understand. | |
| 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. | |
| double | gaussRandom (double avg, double std) |
| double | random (long newSeed=0) |
| double | randomDouble () |
| long | randomInt (int lower, int upper) |
| bool | identical (const Matter &m1, const Matter &m2, const double distanceDifference) |
| double | maxAtomMotion (const AtomMatrix v1) |
| AtomMatrix | maxAtomMotionApplied (const AtomMatrix v1, double maxMotion) |
| VectorXd | maxAtomMotionAppliedV (const VectorXd v1, double maxMotion) |
| double | maxAtomMotionV (const VectorXd v1) |
| AtomMatrix | maxMotionApplied (const AtomMatrix v1, double maxMotion) |
| VectorXd | maxMotionAppliedV (const VectorXd v1, double maxMotion) |
| long | numAtomsMoved (const AtomMatrix v1, double cutoff) |
| void | projectOutRotTrans (Eigen::VectorXd &step, const AtomMatrix &positions) |
| void | pushApart (std::shared_ptr< Matter > m1, double minDistance) |
| RotationMatrix | rotationExtract (const AtomMatrix r1, const AtomMatrix r2) |
| bool | rotationMatch (const Matter &m1, const Matter &m2, const double max_diff) |
| void | rotationRemove (const AtomMatrix r1, std::shared_ptr< Matter > m2) |
| bool | sortedR (const Matter &m1, const Matter &m2, const double distanceDifference) |
| void | translationRemove (Matter &m1, const AtomMatrix r1) |
Variables | |
| constexpr double | pi = 3.14159265358979323846 |
| 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.
Single source of the accepted spellings, shared by the INI loader and every search that dispatches on the string.
Definition at line 250 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.
| 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
Does a horrible to ensure that this is filled correctly. Essentially we use the Map of <eOn atomtype, GPR faketype> to generate the fully filled vectors for moving and frozen_inactive FIXME: We should really just use the eOn atomtype everywhere
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
Sometimes, nothing happens
Now we will consider the case when everything is moving Everything is almost exactly the same, only we don't have frozen atoms
FIXME: Same caveats as documented above
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 100 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 |
Definition at line 235 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 | An eOn parameters object |
Definition at line 23 of file GPRHelpers.cpp.
| bool eonc::helpers::existsFile | ( | std::string | filename | ) |
Definition at line 72 of file HelperFunctions.cpp.
| double eonc::rng::gaussRandom | ( | double | avg, |
| double | std ) |
Definition at line 41 of file RandomNumbers.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 48 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 11 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.
| string eonc::helpers::getRelevantFile | ( | std::string | filename | ) |
Definition at line 76 of file HelperFunctions.cpp.
| void eonc::helpers::getTime | ( | double * | real, |
| double * | user, | ||
| double * | sys ) |
Definition at line 45 of file HelperFunctions.cpp.
| bool eonc::geometry::identical | ( | const Matter & | m1, |
| const Matter & | m2, | ||
| const double | distanceDifference ) |
Definition at line 37 of file GeometryAnalysis.cpp.
| bool eonc::helpers::isNumber | ( | std::string_view | token | ) |
Figure out if a string has a number in it.
Based on
Definition at line 55 of file StringHelpers.cc.
| VectorXd eonc::helpers::loadMasses | ( | std::string | filename, |
| int | nAtoms ) |
Definition at line 98 of file HelperFunctions.cpp.
| AtomMatrix eonc::helpers::loadMode | ( | FILE * | modeFile, |
| int | nAtoms ) |
Definition at line 121 of file HelperFunctions.cpp.
| AtomMatrix eonc::helpers::loadMode | ( | std::string | filename, |
| int | nAtoms ) |
Definition at line 136 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 151 of file HelperFunctions.cpp.
| std::unique_ptr< Job > eonc::helpers::makeJob | ( | std::unique_ptr< Parameters > | params | ) |
Definition at line 39 of file Job.cpp.
| AtomMatrix eonc::helpers::makeOrthogonal | ( | const AtomMatrix | v1, |
| const AtomMatrix | v2 ) |
Definition at line 40 of file HelperFunctions.cpp.
| std::shared_ptr< Potential > eonc::helpers::makePotential | ( | const Parameters & | params | ) |
Definition at line 118 of file Potential.cpp.
| std::shared_ptr< Potential > eonc::helpers::makePotential | ( | PotType | ptype, |
| const Parameters & | params ) |
Definition at line 124 of file Potential.cpp.
| double eonc::geometry::maxAtomMotion | ( | const AtomMatrix | v1 | ) |
Definition at line 29 of file GeometryAnalysis.cpp.
| AtomMatrix eonc::geometry::maxAtomMotionApplied | ( | const AtomMatrix | v1, |
| double | maxMotion ) |
Definition at line 32 of file GeometryAnalysis.cpp.
| VectorXd eonc::geometry::maxAtomMotionAppliedV | ( | const VectorXd | v1, |
| double | maxMotion ) |
Definition at line 33 of file GeometryAnalysis.cpp.
| double eonc::geometry::maxAtomMotionV | ( | const VectorXd | v1 | ) |
Definition at line 30 of file GeometryAnalysis.cpp.
| AtomMatrix eonc::geometry::maxMotionApplied | ( | const AtomMatrix | v1, |
| double | maxMotion ) |
Definition at line 34 of file GeometryAnalysis.cpp.
| VectorXd eonc::geometry::maxMotionAppliedV | ( | const VectorXd | v1, |
| double | maxMotion ) |
Definition at line 35 of file GeometryAnalysis.cpp.
| long eonc::geometry::numAtomsMoved | ( | const AtomMatrix | v1, |
| double | cutoff ) |
Definition at line 31 of file GeometryAnalysis.cpp.
| void eonc::geometry::projectOutRotTrans | ( | Eigen::VectorXd & | step, |
| const AtomMatrix & | positions ) |
Definition at line 23 of file GeometryAnalysis.cpp.
| void eonc::geometry::pushApart | ( | std::shared_ptr< Matter > | m1, |
| double | minDistance ) |
Definition at line 41 of file GeometryAnalysis.cpp.
| double eonc::rng::random | ( | long | newSeed = 0 | ) |
Definition at line 35 of file RandomNumbers.cpp.
| double eonc::rng::randomDouble | ( | ) |
Definition at line 36 of file RandomNumbers.cpp.
| long eonc::rng::randomInt | ( | int | lower, |
| int | upper ) |
Definition at line 40 of file RandomNumbers.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 314 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 263 of file HelperFunctions.cpp.
| RotationMatrix eonc::geometry::rotationExtract | ( | const AtomMatrix | r1, |
| const AtomMatrix | r2 ) |
Definition at line 21 of file GeometryAnalysis.cpp.
| bool eonc::geometry::rotationMatch | ( | const Matter & | m1, |
| const Matter & | m2, | ||
| const double | max_diff ) |
Definition at line 22 of file GeometryAnalysis.cpp.
| void eonc::geometry::rotationRemove | ( | const AtomMatrix | r1, |
| std::shared_ptr< Matter > | m2 ) |
Definition at line 24 of file GeometryAnalysis.cpp.
| void eonc::helpers::saveMode | ( | const std::string & | filename, |
| std::shared_ptr< Matter > | matter, | ||
| AtomMatrix | mode ) |
Definition at line 211 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 200 of file HelperFunctions.cpp.
| bool eonc::geometry::sortedR | ( | const Matter & | m1, |
| const Matter & | m2, | ||
| const double | distanceDifference ) |
Definition at line 39 of file GeometryAnalysis.cpp.
| std::vector< int > eonc::helpers::split_string_int | ( | std::string | s, |
| std::string | delim ) |
Definition at line 224 of file HelperFunctions.cpp.
| void eonc::geometry::translationRemove | ( | Matter & | m1, |
| const AtomMatrix | r1 ) |
Definition at line 27 of file GeometryAnalysis.cpp.
|
inlineconstexpr |
Definition at line 28 of file HelperFunctions.h.