Scine::Kinetx  3.0.0
Kinetic models for reaction networks.
 All Classes Files Functions Variables Enumerations Pages
Network.h
Go to the documentation of this file.
1 
7 #ifndef KINETX_NETWORK_H_
8 #define KINETX_NETWORK_H_
9 
10 #include "Kinetx/Network.h"
11 #include <Eigen/Dense>
12 #include <Eigen/Sparse>
13 
14 namespace Scine {
15 namespace Kinetx {
16 
17 class Network {
18  public:
33  Network(Eigen::VectorXd masses, std::tuple<Eigen::SparseMatrix<double>, Eigen::SparseMatrix<double>> rateConstants,
34  std::tuple<Eigen::SparseMatrix<int>, Eigen::SparseMatrix<int>> stoichiometry, std::vector<std::string> labels = {});
35 
36  // void load(std::string path);
37  // void write(std::string path);
38 
40  const unsigned int nCompounds;
42  const unsigned int nReactions;
44  const Eigen::VectorXd masses;
49  const std::tuple<Eigen::MatrixXd, Eigen::MatrixXd> rateConstants;
56  const std::tuple<Eigen::SparseMatrix<int>, Eigen::SparseMatrix<int>> stoichiometry;
57 
58  const std::tuple<Eigen::SparseMatrix<int>, Eigen::SparseMatrix<int>> stoichiometryTransposed;
60  const Eigen::SparseMatrix<int> totalStoichiometry;
62  const Eigen::SparseMatrix<int> addedStoichiometry;
64  const std::vector<std::string> compoundLabels;
65 
66  private:
67 };
68 
69 } /* namespace Kinetx */
70 } /* namespace Scine */
71 
72 #endif // KINETX_NETWORK_H_
const std::vector< std::string > compoundLabels
The label of all compounds in the network.
Definition: Network.h:64
const std::tuple< Eigen::SparseMatrix< int >, Eigen::SparseMatrix< int > > stoichiometry
The stoichiometry of all reactions in the network ({lhs, rhs, lhs - rhs, lhs + rhs}) ...
Definition: Network.h:56
const unsigned int nCompounds
The number of compounds in the network.
Definition: Network.h:40
const unsigned int nReactions
The number of reactions in the network.
Definition: Network.h:42
const Eigen::SparseMatrix< int > addedStoichiometry
The sum of forward and backwards stoichiometry.
Definition: Network.h:62
Definition: Network.h:17
const Eigen::VectorXd masses
The molecular masses of the compounds in the network.
Definition: Network.h:44
const Eigen::SparseMatrix< int > totalStoichiometry
The difference of backwards and forwards stoichiometry.
Definition: Network.h:60
Network(Eigen::VectorXd masses, std::tuple< Eigen::SparseMatrix< double >, Eigen::SparseMatrix< double >> rateConstants, std::tuple< Eigen::SparseMatrix< int >, Eigen::SparseMatrix< int >> stoichiometry, std::vector< std::string > labels={})
Constructor.
Definition: Network.cpp:13
const std::tuple< Eigen::MatrixXd, Eigen::MatrixXd > rateConstants
The rate constants ({forward, backward}) of all reactions and channels (matrix order: (reaction index...
Definition: Network.h:49