COPASI API  4.16.103
Public Member Functions | Public Attributes | List of all members
CModelAnalyzer::ReactionResult Class Reference

#include <CModelAnalyzer.h>

Collaboration diagram for CModelAnalyzer::ReactionResult:
Collaboration graph
[legend]

Public Member Functions

 ReactionResult ()
 
bool writeResult (std::ostream &os, bool rt, bool verbose) const
 

Public Attributes

std::vector< std::string > mChemEqMods
 
std::vector< std::string > mChemEqProds
 
std::vector< std::string > mChemEqSubs
 
std::vector< std::string > mFunctionParametersMods
 
std::vector< std::string > mFunctionParametersParams
 
std::vector< std::string > mFunctionParametersProds
 
std::vector< std::string > mFunctionParametersSubs
 
std::vector< std::string > mFunctionParametersTime
 
std::vector< std::string > mFunctionParametersVar
 
std::vector< std::string > mFunctionParametersVol
 
CFunctionAnalyzer::Result mFunctionResult
 
bool mKineticUnspecifiedReversibility
 
std::vector< std::string > mNotMetabolite
 
std::string mReactionName
 
bool mReversibilityMismatch
 

Detailed Description

Definition at line 33 of file CModelAnalyzer.h.

Constructor & Destructor Documentation

CModelAnalyzer::ReactionResult::ReactionResult ( )
inline

Definition at line 36 of file CModelAnalyzer.h.

Member Function Documentation

bool CModelAnalyzer::ReactionResult::writeResult ( std::ostream &  os,
bool  rt,
bool  verbose 
) const

writes a text report about the function to the stream. The return value indicates if a problem was reported.

Definition at line 343 of file CModelAnalyzer.cpp.

References mChemEqMods, mChemEqProds, mChemEqSubs, mFunctionParametersMods, mFunctionParametersParams, mFunctionParametersProds, mFunctionParametersSubs, mFunctionParametersTime, mFunctionParametersVar, mFunctionParametersVol, mFunctionResult, mKineticUnspecifiedReversibility, mNotMetabolite, mReactionName, mReversibilityMismatch, CFunctionAnalyzer::write(), and CFunctionAnalyzer::Result::writeResult().

344 {
345  bool ret = false;
346 
347  //reaction name
348  if (rt) os << "<h2>";
349 
350  os << mReactionName;
351 
352  if (rt) os << "</h2>";
353 
354  os << "\n";
355 
356  //reaction results
358  os << CFunctionAnalyzer::write(1, rt, "The kinetic function has unspecified reversibility.",
359  "This means that checking the kinetic function will be less strict.");
360 
362  os << CFunctionAnalyzer::write(3, rt, "The reversibility of the reaction and the kinetic function doesn't match.", "");
363 
364  size_t i, imax;
365  imax = mChemEqSubs.size();
366 
367  for (i = 0; i < imax; ++i)
368  {
369  os << CFunctionAnalyzer::write(2, rt, "The reaction substrate \""
370  + mChemEqSubs[i]
371  + "\" is not mapped to a corresponding function parameter.", "");
372  }
373 
374  imax = mChemEqProds.size();
375 
376  for (i = 0; i < imax; ++i)
377  {
378  os << CFunctionAnalyzer::write(2, rt, "The reaction product \""
379  + mChemEqProds[i]
380  + "\" is not mapped to a corresponding function parameter.", "");
381  }
382 
383  imax = mChemEqMods.size();
384 
385  for (i = 0; i < imax; ++i)
386  {
387  os << CFunctionAnalyzer::write(1, rt, "The reaction modifier \""
388  + mChemEqMods[i]
389  + "\" is not mapped to a corresponding function parameter.", "");
390  }
391 
392  imax = mNotMetabolite.size();
393 
394  for (i = 0; i < imax; ++i)
395  {
396  os << CFunctionAnalyzer::write(3, rt, "The function parameter \""
397  + mNotMetabolite[i]
398  + "\" which should be mapped to a metabolite is mapped to something else.", "");
399  }
400 
401  imax = mFunctionParametersSubs.size();
402 
403  for (i = 0; i < imax; ++i)
404  {
405  os << CFunctionAnalyzer::write(3, rt, "The function parameter \""
407  + "\" is not mapped to a substrate of the reaction.", "");
408  }
409 
410  imax = mFunctionParametersProds.size();
411 
412  for (i = 0; i < imax; ++i)
413  {
414  os << CFunctionAnalyzer::write(3, rt, "The function parameter \""
416  + "\" is not mapped to a product of the reaction.", "");
417  }
418 
419  imax = mFunctionParametersMods.size();
420 
421  for (i = 0; i < imax; ++i)
422  {
423  os << CFunctionAnalyzer::write(3, rt, "The function parameter \""
425  + "\" is not mapped to a modifier of the reaction.", "");
426  }
427 
428  imax = mFunctionParametersParams.size();
429 
430  for (i = 0; i < imax; ++i)
431  {
432  os << CFunctionAnalyzer::write(3, rt, "The function parameter \""
434  + "\" is not mapped to local parameter or a global value.", "");
435  }
436 
437  imax = mFunctionParametersVol.size();
438 
439  for (i = 0; i < imax; ++i)
440  {
441  os << CFunctionAnalyzer::write(3, rt, "The function parameter \""
443  + "\" is not mapped to a compartment.", "");
444  }
445 
446  imax = mFunctionParametersTime.size();
447 
448  for (i = 0; i < imax; ++i)
449  {
450  os << CFunctionAnalyzer::write(3, rt, "The function parameter \""
452  + "\" is not correctly handled as model time.", "");
453  }
454 
455  imax = mFunctionParametersVar.size();
456 
457  for (i = 0; i < imax; ++i)
458  {
459  os << CFunctionAnalyzer::write(1, rt, "The function parameter \""
461  + "\" is marked as \"variable\". Not sure what this means.", "");
462  }
463 
464  //function results
465  std::ostringstream tmpss;
466  bool eee = mFunctionResult.writeResult(tmpss, rt, verbose);
467 
468  if (eee) ret = true;
469 
470  if (eee || verbose)
471  {
472  os << tmpss.str();
473  }
474 
475  return ret;
476 }
std::vector< std::string > mChemEqProds
CFunctionAnalyzer::Result mFunctionResult
std::vector< std::string > mFunctionParametersProds
std::vector< std::string > mFunctionParametersVol
std::vector< std::string > mFunctionParametersSubs
static std::string write(int level, bool rt, const std::string &text, const std::string &longText)
std::vector< std::string > mFunctionParametersMods
std::vector< std::string > mFunctionParametersTime
std::vector< std::string > mChemEqSubs
std::vector< std::string > mFunctionParametersVar
std::vector< std::string > mNotMetabolite
std::vector< std::string > mFunctionParametersParams
bool writeResult(std::ostream &os, bool rt, bool verbose) const
std::vector< std::string > mChemEqMods

Member Data Documentation

std::vector<std::string> CModelAnalyzer::ReactionResult::mChemEqMods

Definition at line 46 of file CModelAnalyzer.h.

Referenced by CModelAnalyzer::checkReaction(), and writeResult().

std::vector<std::string> CModelAnalyzer::ReactionResult::mChemEqProds

Definition at line 45 of file CModelAnalyzer.h.

Referenced by CModelAnalyzer::checkReaction(), and writeResult().

std::vector<std::string> CModelAnalyzer::ReactionResult::mChemEqSubs

Definition at line 44 of file CModelAnalyzer.h.

Referenced by CModelAnalyzer::checkReaction(), and writeResult().

std::vector<std::string> CModelAnalyzer::ReactionResult::mFunctionParametersMods

Definition at line 51 of file CModelAnalyzer.h.

Referenced by CModelAnalyzer::checkReaction(), and writeResult().

std::vector<std::string> CModelAnalyzer::ReactionResult::mFunctionParametersParams

Definition at line 52 of file CModelAnalyzer.h.

Referenced by CModelAnalyzer::checkReaction(), and writeResult().

std::vector<std::string> CModelAnalyzer::ReactionResult::mFunctionParametersProds

Definition at line 50 of file CModelAnalyzer.h.

Referenced by CModelAnalyzer::checkReaction(), and writeResult().

std::vector<std::string> CModelAnalyzer::ReactionResult::mFunctionParametersSubs

Definition at line 49 of file CModelAnalyzer.h.

Referenced by CModelAnalyzer::checkReaction(), and writeResult().

std::vector<std::string> CModelAnalyzer::ReactionResult::mFunctionParametersTime

Definition at line 54 of file CModelAnalyzer.h.

Referenced by CModelAnalyzer::checkReaction(), and writeResult().

std::vector<std::string> CModelAnalyzer::ReactionResult::mFunctionParametersVar

Definition at line 55 of file CModelAnalyzer.h.

Referenced by CModelAnalyzer::checkReaction(), and writeResult().

std::vector<std::string> CModelAnalyzer::ReactionResult::mFunctionParametersVol

Definition at line 53 of file CModelAnalyzer.h.

Referenced by CModelAnalyzer::checkReaction(), and writeResult().

CFunctionAnalyzer::Result CModelAnalyzer::ReactionResult::mFunctionResult

Definition at line 57 of file CModelAnalyzer.h.

Referenced by CModelAnalyzer::checkReaction(), and writeResult().

bool CModelAnalyzer::ReactionResult::mKineticUnspecifiedReversibility

Definition at line 42 of file CModelAnalyzer.h.

Referenced by CModelAnalyzer::checkReaction(), and writeResult().

std::vector<std::string> CModelAnalyzer::ReactionResult::mNotMetabolite

Definition at line 48 of file CModelAnalyzer.h.

Referenced by CModelAnalyzer::checkReaction(), and writeResult().

std::string CModelAnalyzer::ReactionResult::mReactionName

Definition at line 41 of file CModelAnalyzer.h.

Referenced by CModelAnalyzer::checkReaction(), and writeResult().

bool CModelAnalyzer::ReactionResult::mReversibilityMismatch

Definition at line 43 of file CModelAnalyzer.h.

Referenced by CModelAnalyzer::checkReaction(), and writeResult().


The documentation for this class was generated from the following files: