Ignore:
Timestamp:
Jun 16, 2008, 2:09:27 PM (17 years ago)
Author:
Frederik Heber <heber@…>
Children:
b73d28
Parents:
0779a9
Message:

BUGFIX: If other databases could not be loaded, no error was produced, resulting in strange behaviour of the fragmentation routine.

Now an error message is produced, though we still continue. The problem was the switch in handling const char * and a huge mess in LoadPeriodenTafel() with strncat and strncpy.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/molecules.cpp

    r0779a9 r1f9f1b  
    15731573            for(j=0;j<NumberOfBondsPerAtom[Walker->nr];j++)
    15741574              NoBonds += ListOfBondsPerAtom[Walker->nr][j]->BondDegree;
    1575                   //*out << Verbose(3) << "Walker: " << (int)Walker->type->NoValenceOrbitals << " > " << NoBonds << "?" << endl;
     1575                  *out << Verbose(3) << "Walker: " << (int)Walker->type->NoValenceOrbitals << " > " << NoBonds << "?" << endl;
    15761576                  if ((int)(Walker->type->NoValenceOrbitals) > NoBonds) { // we have a mismatch, check NoBonds of other atom
    15771577                    // count valence of second partner
     
    15791579              for(j=0;j<NumberOfBondsPerAtom[OtherWalker->nr];j++)
    15801580                NoBonds += ListOfBondsPerAtom[OtherWalker->nr][j]->BondDegree;
    1581               //*out << Verbose(3) << "OtherWalker: " << (int)OtherWalker->type->NoValenceOrbitals << " > " << NoBonds << "?" << endl;
     1581              *out << Verbose(3) << "OtherWalker: " << (int)OtherWalker->type->NoValenceOrbitals << " > " << NoBonds << "?" << endl;
    15821582                    if ((int)(OtherWalker->type->NoValenceOrbitals) > NoBonds) // increase bond degree by one
    15831583                ListOfBondsPerAtom[Walker->nr][i]->BondDegree++;
     
    15911591          *out << Verbose(1) << "I detected " << BondCount << " bonds in the molecule with distance " << bonddistance << "." << endl;
    15921592               
    1593 //        // output bonds for debugging (if bond chain list was correctly installed)
    1594 //        *out << Verbose(1) << endl << "From contents of bond chain list:";
    1595 //        bond *Binder = first;
    1596 //    while(Binder->next != last) {
    1597 //      Binder = Binder->next;
    1598 //                      *out << *Binder << "\t" << endl;
    1599 //    }
    1600 //    *out << endl;
     1593          // output bonds for debugging (if bond chain list was correctly installed)
     1594          *out << Verbose(1) << endl << "From contents of bond chain list:";
     1595          bond *Binder = first;
     1596    while(Binder->next != last) {
     1597      Binder = Binder->next;
     1598                        *out << *Binder << "\t" << endl;
     1599    }
     1600    *out << endl;
    16011601  } else
    16021602        *out << Verbose(1) << "AtomCount is " << AtomCount << ", thus no bonds, no connections!." << endl;
     
    31313131//          *out << ", who has no son in this fragment molecule." << endl;
    31323132#ifdef ADDHYDROGEN
    3133 //          *out << Verbose(3) << "Adding Hydrogen to " << Runner->Name << " and a bond in between." << endl;
     3133          //*out << Verbose(3) << "Adding Hydrogen to " << Runner->Name << " and a bond in between." << endl;
    31343134          Leaf->AddHydrogenReplacementAtom(out, ListOfBondsPerAtom[FatherOfRunner->nr][i], Runner, FatherOfRunner, OtherFather, ListOfBondsPerAtom[FatherOfRunner->nr],NumberOfBondsPerAtom[FatherOfRunner->nr], IsAngstroem);
    31353135#endif
Note: See TracChangeset for help on using the changeset viewer.