Changeset cc9225 for molecuilder/src/moleculelist.cpp
- Timestamp:
- Nov 24, 2009, 3:34:49 PM (16 years ago)
- Children:
- 1a3354
- Parents:
- 7d1ad9
- File:
-
- 1 edited
-
molecuilder/src/moleculelist.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/moleculelist.cpp
r7d1ad9 rcc9225 760 760 // 4a. create array of molecules to fill 761 761 const int MolCount = Subgraphs->next->Count(); 762 char number[MAXSTRINGSIZE]; 762 763 molecule **molecules = Malloc<molecule *>(MolCount, "config::Load() - **molecules"); 763 764 for (int i=0;i<MolCount;i++) { 764 765 molecules[i] = (molecule*) new molecule(mol->elemente); 765 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; 766 773 insert(molecules[i]); 767 774 } … … 800 807 } 801 808 } 802 // 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 803 810 bond *Binder = mol->first; 804 811 while (mol->first->next != mol->last) {
Note:
See TracChangeset
for help on using the changeset viewer.
