Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/bondgraph.cpp

    r717e0c ra67d19  
    99
    1010#include "atom.hpp"
     11#include "bond.hpp"
    1112#include "bondgraph.hpp"
    1213#include "element.hpp"
     14#include "info.hpp"
    1315#include "log.hpp"
    1416#include "molecule.hpp"
     
    3537/** Parses the bond lengths in a given file and puts them int a matrix form.
    3638 * Allocates \a MatrixContainer for BondGraph::BondLengthMatrix, using MatrixContainer::ParseMatrix(),
    37  * but only if parsing is successfull. Otherwise variable is left as NULL.
     39 * but only if parsing is successful. Otherwise variable is left as NULL.
    3840 * \param *out output stream for debugging
    3941 * \param filename file with bond lengths to parse
     
    4244bool BondGraph::LoadBondLengthTable(const string &filename)
    4345{
     46  Info FunctionInfo(__func__);
    4447  bool status = true;
    4548  MatrixContainer *TempContainer = NULL;
     
    4750  // allocate MatrixContainer
    4851  if (BondLengthMatrix != NULL) {
    49     Log() << Verbose(1) << "MatrixContainer for Bond length already present, removing." << endl;
     52    DoLog(1) && (Log() << Verbose(1) << "MatrixContainer for Bond length already present, removing." << endl);
    5053    delete(BondLengthMatrix);
    5154  }
     
    5356
    5457  // parse in matrix
    55   status = TempContainer->ParseMatrix(filename.c_str(), 0, 1, 0);
     58  if ((status = TempContainer->ParseMatrix(filename.c_str(), 0, 1, 0))) {
     59    DoLog(1) && (Log() << Verbose(1) << "Parsing bond length matrix successful." << endl);
     60  } else {
     61    DoeLog(1) && (eLog()<< Verbose(1) << "Parsing bond length matrix failed." << endl);
     62  }
    5663
    5764  // find greatest distance
     
    8087bool BondGraph::ConstructBondGraph(molecule * const mol)
    8188{
    82   bool status = true;
     89  Info FunctionInfo(__func__);
     90bool status = true;
    8391
    8492  if (mol->start->next == mol->end) // only construct if molecule is not empty
     
    113121double BondGraph::SetMaxDistanceToMaxOfCovalentRadii(const molecule * const mol)
    114122{
     123  Info FunctionInfo(__func__);
    115124  max_distance = 0.;
    116125
     
    153162{
    154163  if (BondLengthMatrix == NULL) {// safety measure if no matrix has been parsed yet
    155     eLog() << Verbose(2) << "BondLengthMatrixMinMaxDistance() called without having parsed the bond length matrix yet!" << endl;
     164    DoeLog(2) && (eLog()<< Verbose(2) << "BondLengthMatrixMinMaxDistance() called without having parsed the bond length matrix yet!" << endl);
    156165    CovalentMinMaxDistance(Walker, OtherWalker, MinDistance, MaxDistance, IsAngstroem);
    157166  } else {
     
    162171  }
    163172};
    164 
Note: See TracChangeset for help on using the changeset viewer.