RASPA3 3.0.12
A molecular simulation code for computing adsorption and diffusion in nanoporous materials
|
Manages a collection of reactions within the simulation system. More...
Public Member Functions | |
bool | operator== (Reactions const &) const =default |
A list of Reaction objects managed by this struct. | |
std::string | printStatus () const |
Retrieves the current status of all reactions as a string. | |
nlohmann::json | jsonStatus () const |
Retrieves the current status of all reactions in JSON format. | |
Public Attributes | |
std::uint64_t | versionNumber {1} |
< The version number of the Reactions data structure. | |
std::vector< Reaction > | list |
Friends | |
Archive< std::ofstream > & | operator<< (Archive< std::ofstream > &archive, const Reactions &r) |
Archive< std::ifstream > & | operator>> (Archive< std::ifstream > &archive, Reactions &r) |
Manages a collection of reactions within the simulation system.
The Reactions struct encapsulates a list of Reaction objects and provides methods to retrieve the current status in both string and JSON formats. It also includes serialization operators for reading from and writing to archives.
nlohmann::json Reactions::jsonStatus | ( | ) | const |
Retrieves the current status of all reactions in JSON format.
Constructs a JSON object containing the number of reactions and an array representing each reaction's status.
std::string Reactions::printStatus | ( | ) | const |
Retrieves the current status of all reactions as a string.
Generates a formatted string that includes the number of reactions and the status of each individual reaction in the list.