Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/config.cpp

    re359a8 rcd7b0f  
    140140void ConfigFileBuffer::MapIonTypesInBuffer(const int NoAtoms)
    141141{
    142   map<const char *, int, IonTypeCompare> LineList;
     142  map<const char *, int, IonTypeCompare> IonTypeLineMap;
    143143  if (LineMapping == NULL) {
    144144    eLog() << Verbose(0) << "map pointer is NULL: " << LineMapping << endl;
     
    149149  // put all into hashed map
    150150  for (int i=0; i<NoAtoms; ++i) {
    151     LineList.insert(pair<const char *, int> (buffer[CurrentLine+i], CurrentLine+i));
     151    IonTypeLineMap.insert(pair<const char *, int> (buffer[CurrentLine+i], CurrentLine+i));
    152152  }
    153153
    154154  // fill map
    155155  int nr=0;
    156   for (map<const char *, int, IonTypeCompare>::iterator runner = LineList.begin(); runner != LineList.end(); ++runner) {
     156  for (map<const char *, int, IonTypeCompare>::iterator runner = IonTypeLineMap.begin(); runner != IonTypeLineMap.end(); ++runner) {
    157157    if (CurrentLine+nr < NoLines)
    158158      LineMapping[CurrentLine+(nr++)] = runner->second;
     
    10561056
    10571057  // 2. parse the bond graph file if given
    1058   BG = new BondGraph(IsAngstroem);
    1059   if (BG->LoadBondLengthTable(BondGraphFileName)) {
    1060     Log() << Verbose(0) << "Bond length table loaded successfully." << endl;
    1061   } else {
    1062     Log() << Verbose(0) << "Bond length table loading failed." << endl;
     1058  if (BG == NULL) {
     1059    BG = new BondGraph(IsAngstroem);
     1060    if (BG->LoadBondLengthTable(BondGraphFileName)) {
     1061      Log() << Verbose(0) << "Bond length table loaded successfully." << endl;
     1062    } else {
     1063      eLog() << Verbose(1) << "Bond length table loading failed." << endl;
     1064    }
    10631065  }
    10641066
    10651067  // 3. parse the molecule in
    10661068  LoadMolecule(mol, FileBuffer, periode, FastParsing);
     1069  mol->SetNameFromFilename(filename);
    10671070  mol->ActiveFlag = true;
     1071  MolList->insert(mol);
    10681072
    10691073  // 4. dissect the molecule into connected subgraphs
    1070   MolList->DissectMoleculeIntoConnectedSubgraphs(mol,this);
    1071 
    1072   delete(mol);
     1074  // don't do this here ...
     1075  //MolList->DissectMoleculeIntoConnectedSubgraphs(mol,this);
     1076  //delete(mol);
     1077
    10731078  delete(FileBuffer);
    10741079};
Note: See TracChangeset for help on using the changeset viewer.