Changes in src/config.cpp [e359a8:cd7b0f]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/config.cpp
re359a8 rcd7b0f 140 140 void ConfigFileBuffer::MapIonTypesInBuffer(const int NoAtoms) 141 141 { 142 map<const char *, int, IonTypeCompare> LineList;142 map<const char *, int, IonTypeCompare> IonTypeLineMap; 143 143 if (LineMapping == NULL) { 144 144 eLog() << Verbose(0) << "map pointer is NULL: " << LineMapping << endl; … … 149 149 // put all into hashed map 150 150 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)); 152 152 } 153 153 154 154 // fill map 155 155 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) { 157 157 if (CurrentLine+nr < NoLines) 158 158 LineMapping[CurrentLine+(nr++)] = runner->second; … … 1056 1056 1057 1057 // 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 } 1063 1065 } 1064 1066 1065 1067 // 3. parse the molecule in 1066 1068 LoadMolecule(mol, FileBuffer, periode, FastParsing); 1069 mol->SetNameFromFilename(filename); 1067 1070 mol->ActiveFlag = true; 1071 MolList->insert(mol); 1068 1072 1069 1073 // 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 1073 1078 delete(FileBuffer); 1074 1079 };
Note:
See TracChangeset
for help on using the changeset viewer.