Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/moleculelist.cpp

    r486aa5 rcc9225  
    311311  Tesselation *TesselStruct = NULL;
    312312  if ((srcmol == NULL) || (mol == NULL)) {
    313     Log() << Verbose(1) << "ERROR: Either fixed or variable molecule is given as NULL." << endl;
     313    eLog() << Verbose(1) << "Either fixed or variable molecule is given as NULL." << endl;
    314314    return false;
    315315  }
     
    319319  FindNonConvexBorder(mol, TesselStruct, (const LinkedCell *&)LCList, 4., NULL);
    320320  if (TesselStruct == NULL) {
    321     Log() << Verbose(1) << "ERROR: Could not tesselate the fixed molecule." << endl;
     321    eLog() << Verbose(1) << "Could not tesselate the fixed molecule." << endl;
    322322    return false;
    323323  }
     
    402402  input.open(line.c_str());
    403403  if (input == NULL) {
    404     eLog() << Verbose(0) << endl << "Unable to open " << line << ", is the directory correct?"
    405         << endl;
     404    eLog() << Verbose(0) << endl << "Unable to open " << line << ", is the directory correct?" << endl;
     405    performCriticalExit();
    406406    return false;
    407407  }
     
    442442    if (input == NULL) {
    443443      eLog() << Verbose(0) << endl << "Unable to open " << line << ", is the directory correct?" << endl;
     444      performCriticalExit();
    444445      return false;
    445446    }
     
    643644    if (path != NULL)
    644645      strcpy(PathBackup, path);
    645     else
     646    else {
    646647      eLog() << Verbose(0) << "OutputConfigForListOfFragments: NULL default path obtained from config!" << endl;
     648      performCriticalExit();
     649    }
    647650
    648651    // correct periodic
     
    757760  // 4a. create array of molecules to fill
    758761  const int MolCount = Subgraphs->next->Count();
     762  char number[MAXSTRINGSIZE];
    759763  molecule **molecules = Malloc<molecule *>(MolCount, "config::Load() - **molecules");
    760764  for (int i=0;i<MolCount;i++) {
    761765    molecules[i] = (molecule*) new molecule(mol->elemente);
    762766    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;
    763773    insert(molecules[i]);
    764774  }
     
    797807    }
    798808  }
    799   // 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
    800810  bond *Binder = mol->first;
    801811  while (mol->first->next != mol->last) {
Note: See TracChangeset for help on using the changeset viewer.