Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/atom_bondedparticle.cpp

    r952f38 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 * atom_bondedparticle.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"
     
    152164  NoBonds = CountBonds();
    153165  //Log() << Verbose(3) << "Walker " << *this << ": " << (int)this->type->NoValenceOrbitals << " > " << NoBonds << "?" << endl;
    154   if ((int)(type->NoValenceOrbitals) > NoBonds) { // we have a mismatch, check all bonding partners for mismatch
     166  if ((int)(getType()->getNoValenceOrbitals()) > NoBonds) { // we have a mismatch, check all bonding partners for mismatch
    155167    for (BondList::const_iterator Runner = ListOfBonds.begin(); Runner != ListOfBonds.end(); (++Runner)) {
    156168      OtherWalker = (*Runner)->GetOtherAtom(this);
    157169      OtherNoBonds = OtherWalker->CountBonds();
    158170      //Log() << Verbose(3) << "OtherWalker " << *OtherWalker << ": " << (int)OtherWalker->type->NoValenceOrbitals << " > " << OtherNoBonds << "?" << endl;
    159       if ((int)(OtherWalker->type->NoValenceOrbitals) > OtherNoBonds) { // check if possible candidate
     171      if ((int)(OtherWalker->getType()->getNoValenceOrbitals()) > OtherNoBonds) { // check if possible candidate
    160172        if ((CandidateBond == NULL) || (ListOfBonds.size() > OtherWalker->ListOfBonds.size())) { // pick the one with fewer number of bonds first
    161173          CandidateBond = (*Runner);
     
    189201};
    190202
     203std::ostream & BondedParticle::operator << (std::ostream &ost) const
     204{
     205  ParticleInfo::operator<<(ost);
     206  ost << "," << getPosition();
     207  return ost;
     208}
     209
     210std::ostream & operator << (std::ostream &ost, const BondedParticle &a)
     211{
     212  a.ParticleInfo::operator<<(ost);
     213  ost << "," << a.getPosition();
     214  return ost;
     215}
     216
Note: See TracChangeset for help on using the changeset viewer.