namespace gpr::io¶
Overview¶
namespace io {
// classes
class ErrorManager;
class FileManager;
class LogManager;
// global functions
void loadParametersFromCapnp(const std::string& binary_filename, gpr::InputParameters& parameters);
void initializeAtomsConfiguration(const gpr::Coord& R_init, const gpr::InputParameters& parameters, const std::unordered_map<std::string, gpr::Index_t>& atomtypes, gpr::AtomsConfiguration& atoms_config);
void setCellDimensionsFromLengthsAndAngles(const std::array<double, 3>& cell, const std::array<double, 3>& angles, gpr::InputParameters& parameters);
} // namespace io
Detailed Documentation¶
Global Functions¶
void loadParametersFromCapnp(const std::string& binary_filename, gpr::InputParameters& parameters)
Loads parameters by reading a memory-mapped Cap’n Proto binary file.
This function replaces the manual text parsing of FileManager::readInputFile. It opens the binary file, maps it to memory, and populates the legacy gpr::InputParameters struct.
Parameters:
binary_filename |
The path to the Cap’n Proto binary file (e.g., “capnp_params.bin”). |
parameters |
The legacy C++ parameters struct to be filled. |