Changeset d01f4d


Ignore:
Timestamp:
Oct 10, 2008, 1:32:33 PM (17 years ago)
Author:
Frederik Heber <heber@…>
Children:
14178b
Parents:
b86de7
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

    rb86de7 rd01f4d  
    24702470          if ((int)(Walker->type->NoValenceOrbitals) > NoBonds) { // we have a mismatch, check all bonding partners for mismatch
    24712471            Candidate = NULL;
     2472            CandidateBondNo = -1;
    24722473            for(int i=0;i<NumberOfBondsPerAtom[Walker->nr];i++) { // go through each of its bond partners
    24732474              OtherWalker = ListOfBondsPerAtom[Walker->nr][i]->GetOtherAtom(Walker);
     
    24852486                    }
    24862487                  }
    2487             if (Candidate != NULL) {
     2488            if ((Candidate != NULL) && (CandidateBondNo != -1)) {
    24882489              ListOfBondsPerAtom[Walker->nr][CandidateBondNo]->BondDegree++;
    24892490              *out << Verbose(2) << "Increased bond degree for bond " << *ListOfBondsPerAtom[Walker->nr][CandidateBondNo] << "." << endl;
    24902491            } else
    2491               *out << Verbose(2) << "Could not find correct degree for bond " << *ListOfBondsPerAtom[Walker->nr][CandidateBondNo] << "." << endl;
     2492              *out << Verbose(2) << "Could not find correct degree for atom " << *Walker << "." << endl;
    24922493              FalseBondDegree++;
    24932494          }
Note: See TracChangeset for help on using the changeset viewer.