Ignore:
Timestamp:
Oct 10, 2008, 1:38:41 PM (17 years ago)
Author:
Frederik Heber <heber@…>
Children:
372c4cd
Parents:
5a78f5
git-author:
Frederik Heber <heber@…> (10/10/08 13:32:33)
git-committer:
Frederik Heber <heber@…> (10/10/08 13:38:41)
Message:

BUGFIX: molecule::CreateAdjacencyList() used CandidateBondNo in output even if no candidate had been found

+ If no Candidate has been found, output message would declare to be unable to correct bond degree for a unspecified bond (CandidateBondNo set to no sensible value)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/molecules.cpp

    r5a78f5 r31ed7d  
    18291829          if ((int)(Walker->type->NoValenceOrbitals) > NoBonds) { // we have a mismatch, check all bonding partners for mismatch
    18301830            Candidate = NULL;
     1831            CandidateBondNo = -1;
    18311832            for(int i=0;i<NumberOfBondsPerAtom[Walker->nr];i++) { // go through each of its bond partners
    18321833              OtherWalker = ListOfBondsPerAtom[Walker->nr][i]->GetOtherAtom(Walker);
     
    18441845                    }
    18451846                  }
    1846             if (Candidate != NULL) {
     1847            if ((Candidate != NULL) && (CandidateBondNo != -1)) {
    18471848              ListOfBondsPerAtom[Walker->nr][CandidateBondNo]->BondDegree++;
    18481849              *out << Verbose(2) << "Increased bond degree for bond " << *ListOfBondsPerAtom[Walker->nr][CandidateBondNo] << "." << endl;
    18491850            } else
    1850               *out << Verbose(2) << "Could not find correct degree for bond " << *ListOfBondsPerAtom[Walker->nr][CandidateBondNo] << "." << endl;
     1851              *out << Verbose(2) << "Could not find correct degree for atom " << *Walker << "." << endl;
    18511852              FalseBondDegree++;
    18521853          }
Note: See TracChangeset for help on using the changeset viewer.