Ignore:
Timestamp:
May 2, 2010, 4:47:18 PM (16 years ago)
Author:
Saskia Metzler <metzler@…>
Children:
0647f4
Parents:
0f7883
Message:

Tremolo format parser

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/atom_bondedparticle.cpp

    r0f7883 rd3513b  
    7474      *BondFile << nr << "\t" << (*Runner)->GetOtherAtom(this)->nr << "\n";
    7575};
     76
     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}
    7692
    7793/** Puts a given bond into atom::ListOfBonds.
Note: See TracChangeset for help on using the changeset viewer.