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