RASPA3 3.0.12
A molecular simulation code for computing adsorption and diffusion in nanoporous materials
Loading...
Searching...
No Matches
Reactions Struct Referenceexport
module reactions

Manages a collection of reactions within the simulation system. More...

Collaboration diagram for Reactions:

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< Reactionlist
 

Friends

Archive< std::ofstream > & operator<< (Archive< std::ofstream > &archive, const Reactions &r)
 
Archive< std::ifstream > & operator>> (Archive< std::ifstream > &archive, Reactions &r)
 

Detailed Description

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.

Member Function Documentation

◆ jsonStatus()

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.

Returns
A JSON object representing the current reactions status.

◆ printStatus()

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.

Returns
A string representation of the current reactions status.

The documentation for this struct was generated from the following file: