Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified src/bondgraph.cpp

    r97b825 r83f176  
     1/*
     2 * Project: MoleCuilder
     3 * Description: creates and alters molecular systems
     4 * Copyright (C)  2010 University of Bonn. All rights reserved.
     5 * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
     6 */
     7
    18/*
    29 * bondgraph.cpp
     
    512 *      Author: heber
    613 */
     14
     15// include config.h
     16#ifdef HAVE_CONFIG_H
     17#include <config.h>
     18#endif
    719
    820#include "Helpers/MemDebug.hpp"
     
    132144
    133145  for (molecule::const_iterator iter = mol->begin(); iter != mol->end(); ++iter) {
    134     if ((*iter)->getType()->CovalentRadius > max_distance)
    135       max_distance = (*iter)->getType()->CovalentRadius;
     146    if ((*iter)->getType()->getCovalentRadius() > max_distance)
     147      max_distance = (*iter)->getType()->getCovalentRadius();
    136148  }
    137149  max_distance *= 2.;
     
    149161void BondGraph::CovalentMinMaxDistance(BondedParticle * const Walker, BondedParticle * const OtherWalker, double &MinDistance, double &MaxDistance, bool IsAngstroem)
    150162{
    151   MinDistance = OtherWalker->getType()->CovalentRadius + Walker->getType()->CovalentRadius;
     163  MinDistance = OtherWalker->getType()->getCovalentRadius() + Walker->getType()->getCovalentRadius();
    152164  MinDistance *= (IsAngstroem) ? 1. : 1. / AtomicLengthToAngstroem;
    153165  MaxDistance = MinDistance + BondThreshold;
     
    170182    CovalentMinMaxDistance(Walker, OtherWalker, MinDistance, MaxDistance, IsAngstroem);
    171183  } else {
    172     MinDistance = GetBondLength(Walker->getType()->Z-1, OtherWalker->getType()->Z-1);
     184    MinDistance = GetBondLength(Walker->getType()->getAtomicNumber()-1, OtherWalker->getType()->getAtomicNumber()-1);
    173185    MinDistance *= (IsAngstroem) ? 1. : 1. / AtomicLengthToAngstroem;
    174186    MaxDistance = MinDistance + BondThreshold;
Note: See TracChangeset for help on using the changeset viewer.