Changeset 4959f1


Ignore:
Timestamp:
Oct 10, 2008, 1:39:54 PM (17 years ago)
Author:
Frederik Heber <heber@…>
Children:
2bfaf8
Parents:
1bd619
git-author:
Frederik Heber <heber@…> (10/10/08 13:32:33)
git-committer:
Frederik Heber <heber@…> (10/10/08 13:39:54)
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

    r1bd619 r4959f1  
    23072307          if ((int)(Walker->type->NoValenceOrbitals) > NoBonds) { // we have a mismatch, check all bonding partners for mismatch
    23082308            Candidate = NULL;
     2309            CandidateBondNo = -1;
    23092310            for(int i=0;i<NumberOfBondsPerAtom[Walker->nr];i++) { // go through each of its bond partners
    23102311              OtherWalker = ListOfBondsPerAtom[Walker->nr][i]->GetOtherAtom(Walker);
     
    23222323                    }
    23232324                  }
    2324             if (Candidate != NULL) {
     2325            if ((Candidate != NULL) && (CandidateBondNo != -1)) {
    23252326              ListOfBondsPerAtom[Walker->nr][CandidateBondNo]->BondDegree++;
    23262327              *out << Verbose(2) << "Increased bond degree for bond " << *ListOfBondsPerAtom[Walker->nr][CandidateBondNo] << "." << endl;
    23272328            } else
    2328               *out << Verbose(2) << "Could not find correct degree for bond " << *ListOfBondsPerAtom[Walker->nr][CandidateBondNo] << "." << endl;
     2329              *out << Verbose(2) << "Could not find correct degree for atom " << *Walker << "." << endl;
    23292330              FalseBondDegree++;
    23302331          }
Note: See TracChangeset for help on using the changeset viewer.