Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/moleculelist.cpp

    r482373 r6a7f78c  
    402402  input.open(line.c_str());
    403403  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();
    405406    return false;
    406407  }
     
    759760  // 4a. create array of molecules to fill
    760761  const int MolCount = Subgraphs->next->Count();
     762  char number[MAXSTRINGSIZE];
    761763  molecule **molecules = Malloc<molecule *>(MolCount, "config::Load() - **molecules");
    762764  for (int i=0;i<MolCount;i++) {
    763765    molecules[i] = (molecule*) new molecule(mol->elemente);
    764766    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;
    765773    insert(molecules[i]);
    766774  }
     
    799807    }
    800808  }
    801   // 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
     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 list
    802810  bond *Binder = mol->first;
    803811  while (mol->first->next != mol->last) {
Note: See TracChangeset for help on using the changeset viewer.