Index: src/moleculelist.cpp
===================================================================
--- src/moleculelist.cpp	(revision 2746be91f71f00d142e33c5f26e2666094ed13f2)
+++ src/moleculelist.cpp	(revision ce5ac38e73b73390de3143a6985456a9e35495f9)
@@ -378,7 +378,9 @@
  * \param *configuration standard configuration to attach atoms in fragment molecule to.
  * \param *SortIndex Index to map from the BFS labeling to the sequence how of Ion_Type in the config
+ * \param DoPeriodic true - call ScanForPeriodicCorrection, false - don't
+ * \param DoCentering true - call molecule::CenterEdge(), false - don't
  * \return true - success (each file was written), false - something went wrong.
  */
-bool MoleculeListClass::OutputConfigForListOfFragments(ofstream *out, config *configuration, int *SortIndex)
+bool MoleculeListClass::OutputConfigForListOfFragments(ofstream *out, const char *fragmentprefix, config *configuration, int *SortIndex, bool DoPeriodic, bool DoCentering)
 {
   ofstream outputFragment;
@@ -405,11 +407,12 @@
 
     // correct periodic
-    //ListOfMolecules[i]->ScanForPeriodicCorrection(out);
+    if (DoPeriodic)
+      ListOfMolecules[i]->ScanForPeriodicCorrection(out);
 
     // output xyz file
     FragmentNumber = FixedDigitNumber(NumberOfMolecules, FragmentCounter++);
-    sprintf(FragmentName, "%s/%s%s.conf.xyz", configuration->configpath, FRAGMENTPREFIX, FragmentNumber);
+    sprintf(FragmentName, "%s/%s%s.conf.xyz", configuration->configpath, fragmentprefix, FragmentNumber);
     outputFragment.open(FragmentName, ios::out);
-    *out << Verbose(2) << "Saving bond fragment No. " << FragmentNumber << "/" << FragmentCounter-1 << " as XYZ ...";
+    *out << Verbose(2) << "Saving " << fragmentprefix << " No. " << FragmentNumber << "/" << FragmentCounter-1 << " as XYZ ...";
     if ((intermediateResult = ListOfMolecules[i]->OutputXYZ(&outputFragment)))
       *out << " done." << endl;
@@ -430,13 +433,15 @@
     
     // center on edge
-    ListOfMolecules[i]->CenterEdge(out, &BoxDimension);
-    ListOfMolecules[i]->SetBoxDimension(&BoxDimension);  // update Box of atoms by boundary
-    int j = -1;
-    for (int k=0;k<NDIM;k++) {
-      j += k+1;
-      BoxDimension.x[k] = 2.5* (configuration->GetIsAngstroem() ? 1. : 1./AtomicLengthToAngstroem);
-      ListOfMolecules[i]->cell_size[j] += BoxDimension.x[k]*2.;
-    }
-    ListOfMolecules[i]->Translate(&BoxDimension);
+    if (DoCentering) {
+      ListOfMolecules[i]->CenterEdge(out, &BoxDimension);
+      ListOfMolecules[i]->SetBoxDimension(&BoxDimension);  // update Box of atoms by boundary
+      int j = -1;
+      for (int k=0;k<NDIM;k++) {
+        j += k+1;
+        BoxDimension.x[k] = 2.5* (configuration->GetIsAngstroem() ? 1. : 1./AtomicLengthToAngstroem);
+        ListOfMolecules[i]->cell_size[j] += BoxDimension.x[k]*2.;
+      }
+      ListOfMolecules[i]->Translate(&BoxDimension);
+    }
 
     // also calculate necessary orbitals
@@ -446,10 +451,10 @@
     // change path in config
     //strcpy(PathBackup, configuration->configpath);
-    sprintf(FragmentName, "%s/%s%s/", PathBackup, FRAGMENTPREFIX, FragmentNumber);
+    sprintf(FragmentName, "%s/%s%s/", PathBackup, fragmentprefix, FragmentNumber);
     configuration->SetDefaultPath(FragmentName);
     
     // and save as config
-    sprintf(FragmentName, "%s/%s%s.conf", configuration->configpath, FRAGMENTPREFIX, FragmentNumber);
-    *out << Verbose(2) << "Saving bond fragment No. " << FragmentNumber << "/" << FragmentCounter-1 << " as config ...";
+    sprintf(FragmentName, "%s/%s%s.conf", configuration->configpath, fragmentprefix, FragmentNumber);
+    *out << Verbose(2) << "Saving " << fragmentprefix << " No. " << FragmentNumber << "/" << FragmentCounter-1 << " as config ...";
     if ((intermediateResult = configuration->Save(FragmentName, ListOfMolecules[i]->elemente, ListOfMolecules[i])))
       *out << " done." << endl;
@@ -463,6 +468,6 @@
 
     // and save as mpqc input file
-    sprintf(FragmentName, "%s/%s%s.conf", configuration->configpath, FRAGMENTPREFIX, FragmentNumber);
-    *out << Verbose(2) << "Saving bond fragment No. " << FragmentNumber << "/" << FragmentCounter-1 << " as mpqc input ...";
+    sprintf(FragmentName, "%s/%s%s.in", configuration->configpath, fragmentprefix, FragmentNumber);
+    *out << Verbose(2) << "Saving " << fragmentprefix << " No. " << FragmentNumber << "/" << FragmentCounter-1 << " as mpqc input ...";
     if ((intermediateResult = configuration->SaveMPQC(FragmentName, ListOfMolecules[i])))
       *out << " done." << endl;
