Index: src/Actions/MapOfActions.cpp
===================================================================
--- src/Actions/MapOfActions.cpp	(revision 54b95350c635ef205ff520b17801e884164b717f)
+++ src/Actions/MapOfActions.cpp	(revision 77de817d0562d36c9416af818dbfc17a59a68a99)
@@ -261,6 +261,6 @@
   generic.insert("repeat-box");
   generic.insert("rotate-to-pas");
-//	generic.insert("save-adjacency");
-//  generic.insert("save-bonds");
+	generic.insert("save-adjacency");
+  generic.insert("save-bonds");
 //  generic.insert("save-temperature");
   generic.insert("scale-box");
Index: src/builder.cpp
===================================================================
--- src/builder.cpp	(revision 54b95350c635ef205ff520b17801e884164b717f)
+++ src/builder.cpp	(revision 77de817d0562d36c9416af818dbfc17a59a68a99)
@@ -1851,27 +1851,29 @@
             case 'J':
               if (ExitFlag == 0) ExitFlag = 1;
+              if ((argptr+2 >= argc) || (argv[argptr][0] == '-')) {
+                ExitFlag =255;
+                DoeLog(0) && (eLog()<< Verbose(0) << "Missing path of adjacency file: -J <path> --molecule-by-id <molecule_id>" << endl);
+                performCriticalExit();
+              } else {
+                ArgcList.insert(argptr-1);
+                ArgcList.insert(argptr);
+                ArgcList.insert(argptr+1);
+                ArgcList.insert(argptr+2);
+                argptr+=3;
+              }
+              break;
+
+            case 'j':
+              if (ExitFlag == 0) ExitFlag = 1;
               if ((argptr >= argc) || (argv[argptr][0] == '-')) {
                 ExitFlag =255;
-                DoeLog(0) && (eLog()<< Verbose(0) << "Missing path of adjacency file: -j <path>" << endl);
+                DoeLog(0) && (eLog()<< Verbose(0) << "Missing path of bonds file: -j <path> --molecule-by-id <molecule_id>" << endl);
                 performCriticalExit();
               } else {
-                DoLog(0) && (Log() << Verbose(0) << "Storing adjacency to path " << argv[argptr] << "." << endl);
-                configuration.BG->ConstructBondGraph(mol);
-                mol->StoreAdjacencyToFile(NULL, argv[argptr]);
-                argptr+=1;
-              }
-              break;
-
-            case 'j':
-              if (ExitFlag == 0) ExitFlag = 1;
-              if ((argptr >= argc) || (argv[argptr][0] == '-')) {
-                ExitFlag =255;
-                DoeLog(0) && (eLog()<< Verbose(0) << "Missing path of bonds file: -j <path>" << endl);
-                performCriticalExit();
-              } else {
-                DoLog(0) && (Log() << Verbose(0) << "Storing bonds to path " << argv[argptr] << "." << endl);
-                configuration.BG->ConstructBondGraph(mol);
-                mol->StoreBondsToFile(NULL, argv[argptr]);
-                argptr+=1;
+                ArgcList.insert(argptr-1);
+                ArgcList.insert(argptr);
+                ArgcList.insert(argptr+1);
+                ArgcList.insert(argptr+2);
+                argptr+=3;
               }
               break;
Index: tests/regression/testsuite-molecules.at
===================================================================
--- tests/regression/testsuite-molecules.at	(revision 54b95350c635ef205ff520b17801e884164b717f)
+++ tests/regression/testsuite-molecules.at	(revision 77de817d0562d36c9416af818dbfc17a59a68a99)
@@ -12,7 +12,7 @@
 AT_KEYWORDS([Molecules])
 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/2/pre/test.conf .], 0)
-AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -v 1 -j test.dbond], 0, [stdout], [stderr])
+AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -v 1 -j test.dbond --molecule-by-id 0], 0, [stdout], [stderr])
 AT_CHECK([file=test.dbond; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/2/post/$file], 0, [ignore], [ignore])
-AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -v 1 -J test.adj], 0, [stdout], [stderr])
+AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -v 1 -J test.adj --molecule-by-id 0], 0, [stdout], [stderr])
 AT_CHECK([file=test.adj; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/2/post/$file], 0, [ignore], [ignore])
 AT_CLEANUP
