Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/atom_bondedparticle.cpp

    r791138 r1f1b23  
    5656 * \param *AdjacencyFile output stream
    5757 */
    58 void BondedParticle::OutputAdjacency(ofstream *AdjacencyFile) const
     58void BondedParticle::OutputAdjacency(ofstream * const AdjacencyFile) const
    5959{
    6060  *AdjacencyFile << nr << "\t";
     
    6262    *AdjacencyFile << (*Runner)->GetOtherAtom(this)->nr << "\t";
    6363  *AdjacencyFile << endl;
     64};
     65
     66/** Output of atom::nr along each bond partner per line.
     67 * Only bonds are printed where atom::nr is smaller than the one of the bond partner.
     68 * \param *AdjacencyFile output stream
     69 */
     70void BondedParticle::OutputBonds(ofstream * const BondFile) const
     71{
     72  for (BondList::const_iterator Runner = ListOfBonds.begin(); Runner != ListOfBonds.end(); (++Runner))
     73    if (nr < (*Runner)->GetOtherAtom(this)->nr)
     74      *BondFile << nr << "\t" << (*Runner)->GetOtherAtom(this)->nr << "\n";
    6475};
    6576
Note: See TracChangeset for help on using the changeset viewer.