Changes in src/bondgraph.cpp [717e0c:a67d19]
- File:
-
- 1 edited
-
src/bondgraph.cpp (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/bondgraph.cpp
r717e0c ra67d19 9 9 10 10 #include "atom.hpp" 11 #include "bond.hpp" 11 12 #include "bondgraph.hpp" 12 13 #include "element.hpp" 14 #include "info.hpp" 13 15 #include "log.hpp" 14 16 #include "molecule.hpp" … … 35 37 /** Parses the bond lengths in a given file and puts them int a matrix form. 36 38 * Allocates \a MatrixContainer for BondGraph::BondLengthMatrix, using MatrixContainer::ParseMatrix(), 37 * but only if parsing is successful l. Otherwise variable is left as NULL.39 * but only if parsing is successful. Otherwise variable is left as NULL. 38 40 * \param *out output stream for debugging 39 41 * \param filename file with bond lengths to parse … … 42 44 bool BondGraph::LoadBondLengthTable(const string &filename) 43 45 { 46 Info FunctionInfo(__func__); 44 47 bool status = true; 45 48 MatrixContainer *TempContainer = NULL; … … 47 50 // allocate MatrixContainer 48 51 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); 50 53 delete(BondLengthMatrix); 51 54 } … … 53 56 54 57 // 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 } 56 63 57 64 // find greatest distance … … 80 87 bool BondGraph::ConstructBondGraph(molecule * const mol) 81 88 { 82 bool status = true; 89 Info FunctionInfo(__func__); 90 bool status = true; 83 91 84 92 if (mol->start->next == mol->end) // only construct if molecule is not empty … … 113 121 double BondGraph::SetMaxDistanceToMaxOfCovalentRadii(const molecule * const mol) 114 122 { 123 Info FunctionInfo(__func__); 115 124 max_distance = 0.; 116 125 … … 153 162 { 154 163 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); 156 165 CovalentMinMaxDistance(Walker, OtherWalker, MinDistance, MaxDistance, IsAngstroem); 157 166 } else { … … 162 171 } 163 172 }; 164
Note:
See TracChangeset
for help on using the changeset viewer.
