Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/atom_bondedparticle.cpp

    ra67d19 rb8d4a3  
    4444void BondedParticle::OutputBondOfAtom() const
    4545{
    46   DoLog(4) && (Log() << Verbose(4) << "Atom " << Name << "/" << nr << " with " << ListOfBonds.size() << " bonds: " << endl);
     46  Log() << Verbose(4) << "Atom " << Name << "/" << nr << " with " << ListOfBonds.size() << " bonds: " << endl;
    4747  int TotalDegree = 0;
    4848  for (BondList::const_iterator Runner = ListOfBonds.begin(); Runner != ListOfBonds.end(); ++Runner) {
    49     DoLog(4) && (Log() << Verbose(4) << **Runner << endl);
     49    Log() << Verbose(4) << **Runner << endl;
    5050    TotalDegree += (*Runner)->BondDegree;
    5151  }
    52   DoLog(4) && (Log() << Verbose(4) << " -- TotalDegree: " << TotalDegree << endl);
     52  Log() << Verbose(4) << " -- TotalDegree: " << TotalDegree << endl;
    5353};
    5454
     
    7575};
    7676
     77/**
     78 * Adds a bond between this bonded particle and another. Does nothing if this
     79 * bond already exists.
     80 *
     81 * \param bonding partner
     82 */
     83void BondedParticle::addBond(BondedParticle* Partner) {
     84  if (IsBondedTo(Partner)) {
     85    return;
     86  }
     87
     88  bond* newBond = new bond((atom*) this, (atom*) Partner, 1, 0);
     89  RegisterBond(newBond);
     90  Partner->RegisterBond(newBond);
     91}
     92
    7793/** Puts a given bond into atom::ListOfBonds.
    7894 * \param *Binder bond to insert
     
    86102      status = true;
    87103    } else {
    88       DoeLog(1) && (eLog()<< Verbose(1) << *Binder << " does not contain " << *this << "." << endl);
     104      eLog() << Verbose(1) << *Binder << " does not contain " << *this << "." << endl;
    89105    }
    90106  } else {
    91     DoeLog(1) && (eLog()<< Verbose(1) << "Binder is " << Binder << "." << endl);
     107    eLog() << Verbose(1) << "Binder is " << Binder << "." << endl;
    92108  }
    93109  return status;
     
    105121      status = true;
    106122    } else {
    107       DoeLog(1) && (eLog()<< Verbose(1) << *Binder << " does not contain " << *this << "." << endl);
     123      eLog() << Verbose(1) << *Binder << " does not contain " << *this << "." << endl;
    108124    }
    109125  } else {
    110     DoeLog(1) && (eLog()<< Verbose(1) << "Binder is " << Binder << "." << endl);
     126    eLog() << Verbose(1) << "Binder is " << Binder << "." << endl;
    111127  }
    112128  return status;
     
    150166      //Log() << Verbose(2) << "Increased bond degree for bond " << *CandidateBond << "." << endl;
    151167    } else {
    152       DoeLog(2) && (eLog()<< Verbose(2) << "Could not find correct degree for atom " << *this << "." << endl);
     168      eLog() << Verbose(2) << "Could not find correct degree for atom " << *this << "." << endl;
    153169      FalseBondDegree++;
    154170    }
Note: See TracChangeset for help on using the changeset viewer.