Changes in src/moleculelist.cpp [6a7f78c:482373]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/moleculelist.cpp
r6a7f78c r482373 402 402 input.open(line.c_str()); 403 403 if (input == NULL) { 404 eLog() << Verbose(0) << endl << "Unable to open " << line << ", is the directory correct?" << endl; 405 performCriticalExit(); 404 Log() << Verbose(1) << endl << "Unable to open " << line << ", is the directory correct?" << endl; 406 405 return false; 407 406 } … … 760 759 // 4a. create array of molecules to fill 761 760 const int MolCount = Subgraphs->next->Count(); 762 char number[MAXSTRINGSIZE];763 761 molecule **molecules = Malloc<molecule *>(MolCount, "config::Load() - **molecules"); 764 762 for (int i=0;i<MolCount;i++) { 765 763 molecules[i] = (molecule*) new molecule(mol->elemente); 766 764 molecules[i]->ActiveFlag = true; 767 strncpy(molecules[i]->name, mol->name, MAXSTRINGSIZE);768 if (MolCount > 1) {769 sprintf(number, "-%d", i+1);770 strncat(molecules[i]->name, number, MAXSTRINGSIZE - strlen(mol->name) - 1);771 }772 cout << "MolName is " << molecules[i]->name << endl;773 765 insert(molecules[i]); 774 766 } … … 807 799 } 808 800 } 809 // 4d. we don't need to redo bonds, as they are connected subgraphs and still maintain their ListOfBonds, but we have to remove them from first..last list801 // 4d. we don't need to redo bonds, as they are connected subgraphs and still maintained their ListOfBonds, but we have to remove them from first..last list 810 802 bond *Binder = mol->first; 811 803 while (mol->first->next != mol->last) {
Note:
See TracChangeset
for help on using the changeset viewer.