Reaction path diagrams (graphs). More...
#include <ReactionPath.h>
Reaction path diagrams (graphs).
Definition at line 160 of file ReactionPath.h.
Public Member Functions | |
ReactionPathDiagram (shared_ptr< Kinetics > kin, const string &element_) | |
Construct new reaction path diagram. | |
virtual | ~ReactionPathDiagram () |
Destructor. | |
double | maxFlow () |
The largest one-way flow value in any path. | |
double | netFlow (size_t k1, size_t k2) |
The net flow from node k1 to node k2 . | |
double | flow (size_t k1, size_t k2) |
The one-way flow from node k1 to node k2 . | |
bool | hasNode (size_t k) |
True if a node for species k exists. | |
void | writeData (std::ostream &s) |
string | getData () |
Get a (roughly) human-readable representation of the reaction path diagram. | |
void | exportToDot (std::ostream &s) |
Export the reaction path diagram. | |
string | getDot () |
Export string in dot format. | |
void | add (ReactionPathDiagram &d) |
void | add (shared_ptr< ReactionPathDiagram > d) |
Add fluxes from other ReactionPathDiagram to this diagram. | |
SpeciesNode * | node (size_t k) |
Path * | path (size_t k1, size_t k2) |
Path * | path (size_t n) |
size_t | nPaths () |
size_t | nNodes () |
void | addNode (size_t k, const string &nm, double x=0.0) |
void | displayOnly (size_t k=npos) |
Include only species and fluxes that are directly connected to a species. | |
void | linkNodes (size_t k1, size_t k2, size_t rxn, double value, string legend="") |
void | include (const string &aaname) |
void | exclude (const string &aaname) |
void | include (vector< string > &names) |
void | exclude (vector< string > &names) |
vector< string > & | included () |
vector< string > & | excluded () |
vector< size_t > | species () |
vector< int > | reactions () |
void | findMajorPaths (double threshold, size_t lda, double *a) |
Undocumented. | |
void | setFont (const string &font) |
Set name of the font used. | |
const string | flowType () const |
Get the way flows are drawn. Either 'NetFlow' or 'OneWayFlow'. | |
void | setFlowType (const string &fType) |
Get the way flows are drawn. Either 'NetFlow' or 'OneWayFlow'. | |
void | build () |
Build the reaction path diagram. | |
string | getLog () |
Get logging messages generated while building the reaction path diagram. | |
Public Attributes | |
Public Attributes | |
string | title |
Reaction path diagram title. | |
string | bold_color = "blue" |
Color for bold lines. | |
string | normal_color = "steelblue" |
Color for normal-weight lines. | |
string | dashed_color = "gray" |
Color for dashed lines. | |
string | element |
Element used for the construction of a reaction path diagram. | |
string | m_font = "Helvetica" |
Reaction path diagram font. | |
double | threshold = 0.005 |
Threshold for the minimum flux relative value that will be plotted. | |
double | bold_min = 0.2 |
Minimum relative flux for bold lines. | |
double | dashed_max = 0.0 |
Maximum relative flux for dashed lines. | |
double | label_min = 0.0 |
Minimum relative flux for labels. | |
double | x_size = -1.0 |
Maximum size (x-dimension). | |
double | y_size = -1.0 |
Maximum size (y-dimension). | |
string | name = "reaction_paths" |
Name used for dot export. | |
string | dot_options = "center=1;" |
Options for the 'dot' program. | |
flow_t | flow_type = NetFlow |
The way flows are drawn. Either 'NetFlow' or 'OneWayFlow'. | |
double | scale = -1 |
The scaling factor for the fluxes. | |
double | arrow_width = -5.0 |
The arrow width. If < 0, then scale with flux value. | |
bool | show_details = false |
Boolean flag to show details. | |
double | arrow_hue = 0.6666 |
Unused. | |
Protected Attributes | |
double | m_flxmax = 0.0 |
map< size_t, map< size_t, Path * > > | m_paths |
map< size_t, SpeciesNode * > | m_nodes |
map of species index to SpeciesNode | |
vector< Path * > | m_pathlist |
vector< string > | m_include |
vector< string > | m_exclude |
vector< size_t > | m_speciesNumber |
set< size_t > | m_rxns |
Indices of reactions that are included in the diagram. | |
size_t | m_local = npos |
bool | m_isBuilt = false |
Boolean indicating whether diagram is built. | |
shared_ptr< Kinetics > | m_kin |
Kinetics used by ReactionPathBuilder. | |
shared_ptr< ReactionPathBuilder > | m_builder |
Shared pointer to ReactionPathBuilder. | |
std::stringstream | m_log |
Logging stream. | |
ReactionPathDiagram | ( | shared_ptr< Kinetics > | kin, |
const string & | element_ | ||
) |
Construct new reaction path diagram.
The method creates a reaction path diagram for the fluxes of element
according to instantaneous net reaction rates.
kin | Shared pointer to Kinetics object. |
element_ | Element used for the calculation of net reaction rates. |
Definition at line 82 of file ReactionPath.cpp.
|
virtual |
Destructor.
Deletes all nodes and paths in the diagram.
Definition at line 93 of file ReactionPath.cpp.
|
inline |
The largest one-way flow value in any path.
Definition at line 180 of file ReactionPath.h.
|
inline |
The net flow from node k1
to node k2
.
Definition at line 185 of file ReactionPath.h.
|
inline |
The one-way flow from node k1
to node k2
.
Definition at line 190 of file ReactionPath.h.
|
inline |
True if a node for species k exists.
Definition at line 195 of file ReactionPath.h.
void writeData | ( | std::ostream & | s | ) |
Definition at line 219 of file ReactionPath.cpp.
string getData | ( | ) |
Get a (roughly) human-readable representation of the reaction path diagram.
Definition at line 204 of file ReactionPath.cpp.
void exportToDot | ( | std::ostream & | s | ) |
Export the reaction path diagram.
This method writes to stream s
the commands for the 'dot' program in the GraphViz
package from AT&T. (GraphViz may be downloaded from www.graphviz.org.)
To generate a postscript reaction path diagram from the output of this method saved in file paths.dot, for example, give the command:
To generate a GIF image, replace -Tps with -Tgif
Definition at line 239 of file ReactionPath.cpp.
string getDot | ( | ) |
Export string in dot
format.
Return a string containing the reaction path diagram formatted for use by Graphviz's 'dot' program.
Definition at line 194 of file ReactionPath.cpp.
void add | ( | ReactionPathDiagram & | d | ) |
Definition at line 130 of file ReactionPath.cpp.
void add | ( | shared_ptr< ReactionPathDiagram > | d | ) |
Add fluxes from other ReactionPathDiagram to this diagram.
Definition at line 140 of file ReactionPath.cpp.
|
inline |
Definition at line 234 of file ReactionPath.h.
|
inline |
Definition at line 237 of file ReactionPath.h.
|
inline |
Definition at line 240 of file ReactionPath.h.
|
inline |
Definition at line 243 of file ReactionPath.h.
|
inline |
Definition at line 246 of file ReactionPath.h.
void addNode | ( | size_t | k, |
const string & | nm, | ||
double | x = 0.0 |
||
) |
Definition at line 422 of file ReactionPath.cpp.
|
inline |
Include only species and fluxes that are directly connected to a species.
Set to -1 to include all species.
Definition at line 254 of file ReactionPath.h.
void linkNodes | ( | size_t | k1, |
size_t | k2, | ||
size_t | rxn, | ||
double | value, | ||
string | legend = "" |
||
) |
Definition at line 433 of file ReactionPath.cpp.
|
inline |
Definition at line 260 of file ReactionPath.h.
|
inline |
Definition at line 263 of file ReactionPath.h.
|
inline |
Definition at line 266 of file ReactionPath.h.
|
inline |
Definition at line 271 of file ReactionPath.h.
|
inline |
Definition at line 276 of file ReactionPath.h.
|
inline |
Definition at line 279 of file ReactionPath.h.
vector< size_t > species | ( | ) |
Definition at line 447 of file ReactionPath.cpp.
vector< int > reactions | ( | ) |
Definition at line 107 of file ReactionPath.cpp.
void findMajorPaths | ( | double | threshold, |
size_t | lda, | ||
double * | a | ||
) |
|
inline |
Set name of the font used.
Definition at line 292 of file ReactionPath.h.
const string flowType | ( | ) | const |
Get the way flows are drawn. Either 'NetFlow' or 'OneWayFlow'.
Definition at line 168 of file ReactionPath.cpp.
void setFlowType | ( | const string & | fType | ) |
Get the way flows are drawn. Either 'NetFlow' or 'OneWayFlow'.
Definition at line 176 of file ReactionPath.cpp.
void build | ( | ) |
Build the reaction path diagram.
Called automatically by methods which return representations of the diagram, for example writeDot().
Definition at line 188 of file ReactionPath.cpp.
string getLog | ( | ) |
Get logging messages generated while building the reaction path diagram.
Definition at line 214 of file ReactionPath.cpp.
string title |
Reaction path diagram title.
Definition at line 315 of file ReactionPath.h.
string bold_color = "blue" |
Color for bold lines.
Definition at line 316 of file ReactionPath.h.
string normal_color = "steelblue" |
Color for normal-weight lines.
Definition at line 317 of file ReactionPath.h.
string dashed_color = "gray" |
Color for dashed lines.
Definition at line 318 of file ReactionPath.h.
string element |
Element used for the construction of a reaction path diagram.
Definition at line 319 of file ReactionPath.h.
string m_font = "Helvetica" |
Reaction path diagram font.
Definition at line 320 of file ReactionPath.h.
double threshold = 0.005 |
Threshold for the minimum flux relative value that will be plotted.
Definition at line 322 of file ReactionPath.h.
double bold_min = 0.2 |
Minimum relative flux for bold lines.
Definition at line 323 of file ReactionPath.h.
double dashed_max = 0.0 |
Maximum relative flux for dashed lines.
Definition at line 324 of file ReactionPath.h.
double label_min = 0.0 |
Minimum relative flux for labels.
Definition at line 325 of file ReactionPath.h.
double x_size = -1.0 |
Maximum size (x-dimension).
Definition at line 326 of file ReactionPath.h.
double y_size = -1.0 |
Maximum size (y-dimension).
Definition at line 327 of file ReactionPath.h.
string name = "reaction_paths" |
Name used for dot export.
Definition at line 328 of file ReactionPath.h.
string dot_options = "center=1;" |
Options for the 'dot' program.
Definition at line 329 of file ReactionPath.h.
flow_t flow_type = NetFlow |
The way flows are drawn. Either 'NetFlow' or 'OneWayFlow'.
Definition at line 331 of file ReactionPath.h.
double scale = -1 |
The scaling factor for the fluxes.
Set to -1 to normalize by the maximum net flux. Scale to use for normalization.
Definition at line 334 of file ReactionPath.h.
double arrow_width = -5.0 |
The arrow width. If < 0, then scale with flux value.
Definition at line 336 of file ReactionPath.h.
bool show_details = false |
Boolean flag to show details.
Definition at line 337 of file ReactionPath.h.
double arrow_hue = 0.6666 |
Unused.
Definition at line 338 of file ReactionPath.h.
|
protected |
Definition at line 343 of file ReactionPath.h.
|
protected |
Definition at line 344 of file ReactionPath.h.
|
protected |
map of species index to SpeciesNode
Definition at line 347 of file ReactionPath.h.
|
protected |
Definition at line 348 of file ReactionPath.h.
|
protected |
Definition at line 349 of file ReactionPath.h.
|
protected |
Definition at line 350 of file ReactionPath.h.
|
protected |
Definition at line 351 of file ReactionPath.h.
|
protected |
Indices of reactions that are included in the diagram.
Definition at line 354 of file ReactionPath.h.
|
protected |
Definition at line 355 of file ReactionPath.h.
|
protected |
Boolean indicating whether diagram is built.
Definition at line 357 of file ReactionPath.h.
|
protected |
Kinetics used by ReactionPathBuilder.
Definition at line 358 of file ReactionPath.h.
|
protected |
Shared pointer to ReactionPathBuilder.
Definition at line 359 of file ReactionPath.h.
|
protected |
Logging stream.
Definition at line 360 of file ReactionPath.h.