Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Graph/BondGraph.cpp

    rdb7e6d r829761  
    2626#include "Graph/BondGraph.hpp"
    2727#include "Box.hpp"
    28 #include "element.hpp"
     28#include "Element/element.hpp"
    2929#include "CodePatterns/Info.hpp"
    3030#include "CodePatterns/Log.hpp"
     
    3232#include "CodePatterns/Verbose.hpp"
    3333#include "molecule.hpp"
    34 #include "parser.hpp"
    35 #include "periodentafel.hpp"
     34#include "Element/periodentafel.hpp"
     35#include "Fragmentation/MatrixContainer.hpp"
    3636#include "LinearAlgebra/Vector.hpp"
    3737#include "World.hpp"
     
    3939
    4040const double BondGraph::BondThreshold = 0.4;   //!< CSD threshold in bond check which is the width of the interval whose center is the sum of the covalent radii
     41
     42BondGraph::BondGraph() :
     43    BondLengthMatrix(NULL),
     44    IsAngstroem(true)
     45{}
    4146
    4247BondGraph::BondGraph(bool IsA) :
     
    4752BondGraph::~BondGraph()
    4853{
     54  CleanupBondLengthTable();
     55}
     56
     57void BondGraph::CleanupBondLengthTable()
     58{
    4959  if (BondLengthMatrix != NULL) {
    5060    delete(BondLengthMatrix);
     
    6373    LOG(1, "MatrixContainer for Bond length already present, removing.");
    6474    delete(BondLengthMatrix);
     75    BondLengthMatrix = NULL;
    6576  }
    6677  TempContainer = new MatrixContainer;
     
    222233}
    223234
     235bool BondGraph::operator==(const BondGraph &other) const
     236{
     237  if (IsAngstroem != other.IsAngstroem)
     238    return false;
     239  if (((BondLengthMatrix != NULL) && (other.BondLengthMatrix == NULL))
     240      || ((BondLengthMatrix == NULL) && (other.BondLengthMatrix != NULL)))
     241    return false;
     242  if ((BondLengthMatrix != NULL) && (other.BondLengthMatrix != NULL))
     243    if (*BondLengthMatrix != *other.BondLengthMatrix)
     244      return false;
     245  return true;
     246}
Note: See TracChangeset for help on using the changeset viewer.