From 74df27dadf7ef89e4089bd9423f1053ed2658362 Mon Sep 17 00:00:00 2001
From: Manoj Rajagopalan <manoj@nanorex.com>
Date: Fri, 4 Apr 2008 03:08:00 +0000
Subject: Testing mmp files moved to $NV1_HOME/Testing/MMP_TestFiles/ and tests
 updated to contain relative paths New graphics test named
 Testing/Plugins/MMPOpenGLRendererTest for MMP import/export Added an extra
 CppUnit file-import test (benzene) and added atom- and bond-level diagnostics
 This test confirms that there is a bug in scenegraph construction - spurious
 bonds are visible in MMPOpenGLRendererTest as well as in
 NXOpenGLRenderingEngineTest - all atoms that should be connected by bonds are
 not connected.

---
 .../NanorexMMPImportExport.pro                     |    6 +-
 .../src/KDevelop/Testing/CppUnit/CppUnit.pro       |   14 +-
 .../MMPOpenGLRendererTest.pro                      |   35 +
 .../src/KDevelop/Testing/Plugins/Plugins.pro       |    3 +-
 .../NXOpenGLRenderingEngineTest.pro                |   13 +-
 cad/plugins/NanoVision-1/src/KDevelop/nv1/nv1.pro  |   10 +-
 .../MMPOpenGLRendererTest.cpp                      |   52 +
 .../NanorexMMPImportExport.cpp                     |   60 +-
 .../NanorexMMPImportExport.rl                      |   56 +-
 .../NanorexMMPImportExportRagelTest.cpp            |   10 +-
 .../NanorexMMPImportExportRagelTest.rl             | 1291 +++++++++++++++++++
 .../NanorexMMPImportExportTest.cpp                 |   86 +-
 .../NanorexMMPImportExportTest.h                   |   16 +-
 .../NanorexMMPImportExportTest.rl                  | 1289 -------------------
 .../RenderingEngines/OpenGL/NXOpenGLCamera_sm.h    |    2 +-
 .../OpenGL/NXOpenGLRenderingEngine.cpp             |   13 +-
 .../Renderers/NXBallAndStickOpenGLRenderer.cpp     |    4 +-
 .../src/Testing/MMP_TestFiles/CH4-mol-section.mmp  |   12 +
 .../NanoVision-1/src/Testing/MMP_TestFiles/H.mmp   |   16 +
 .../NanoVision-1/src/Testing/MMP_TestFiles/H2O.mmp |   21 +
 .../src/Testing/MMP_TestFiles/benzene.mmp          |   45 +
 .../src/Testing/MMP_TestFiles/chlorophyll.mmp      |  281 +++++
 .../Testing/MMP_TestFiles/hydrogen_peroxide.mmp    |   23 +
 .../src/Testing/MMP_TestFiles/nanocar.mmp          | 1325 ++++++++++++++++++++
 24 files changed, 3295 insertions(+), 1388 deletions(-)
 create mode 100644 cad/plugins/NanoVision-1/src/KDevelop/Testing/Plugins/MMPOpenGLRendererTest/MMPOpenGLRendererTest.pro
 create mode 100644 cad/plugins/NanoVision-1/src/Plugins/NanorexMMPImportExport/MMPOpenGLRendererTest.cpp
 create mode 100644 cad/plugins/NanoVision-1/src/Plugins/NanorexMMPImportExport/NanorexMMPImportExportRagelTest.rl
 delete mode 100644 cad/plugins/NanoVision-1/src/Plugins/NanorexMMPImportExport/NanorexMMPImportExportTest.rl
 create mode 100644 cad/plugins/NanoVision-1/src/Testing/MMP_TestFiles/CH4-mol-section.mmp
 create mode 100755 cad/plugins/NanoVision-1/src/Testing/MMP_TestFiles/H.mmp
 create mode 100755 cad/plugins/NanoVision-1/src/Testing/MMP_TestFiles/H2O.mmp
 create mode 100755 cad/plugins/NanoVision-1/src/Testing/MMP_TestFiles/benzene.mmp
 create mode 100755 cad/plugins/NanoVision-1/src/Testing/MMP_TestFiles/chlorophyll.mmp
 create mode 100755 cad/plugins/NanoVision-1/src/Testing/MMP_TestFiles/hydrogen_peroxide.mmp
 create mode 100755 cad/plugins/NanoVision-1/src/Testing/MMP_TestFiles/nanocar.mmp

diff --git a/cad/plugins/NanoVision-1/src/KDevelop/Plugins/NanorexMMPImportExport/NanorexMMPImportExport.pro b/cad/plugins/NanoVision-1/src/KDevelop/Plugins/NanorexMMPImportExport/NanorexMMPImportExport.pro
index 094dd7a70..6471d896a 100644
--- a/cad/plugins/NanoVision-1/src/KDevelop/Plugins/NanorexMMPImportExport/NanorexMMPImportExport.pro
+++ b/cad/plugins/NanoVision-1/src/KDevelop/Plugins/NanorexMMPImportExport/NanorexMMPImportExport.pro
@@ -3,7 +3,8 @@ TEMPLATE = lib
 CONFIG += dll \
 plugin \
 stl \
- debug_and_release
+ debug_and_release \
+ rtti
 
 
 SOURCES += ../../../Plugins/NanorexMMPImportExport/NanorexMMPImportExport.cpp
@@ -34,9 +35,10 @@ QMAKE_CXXFLAGS_DEBUG += -DNX_DEBUG \
  -O0 \
  -fno-inline
 
+
 LIBS += -L../../../../lib \
-  -lNanorexUtility \
   -lNanorexInterface \
+  -lNanorexUtility \
   -L$(OPENBABEL_LIBPATH) \
   -lopenbabel
 
diff --git a/cad/plugins/NanoVision-1/src/KDevelop/Testing/CppUnit/CppUnit.pro b/cad/plugins/NanoVision-1/src/KDevelop/Testing/CppUnit/CppUnit.pro
index 0c30510c0..46c24875e 100644
--- a/cad/plugins/NanoVision-1/src/KDevelop/Testing/CppUnit/CppUnit.pro
+++ b/cad/plugins/NanoVision-1/src/KDevelop/Testing/CppUnit/CppUnit.pro
@@ -41,11 +41,11 @@ win32 : TARGETDEPS ~= s/.so/.a/g
 
 DESTDIR = ../../../../bin
 
-CONFIG += debug_and_release \
-stl
+CONFIG += stl \
+ debug_and_release
 
 # This tell qmake to not create a Mac bundle for this application.
-CONFIG -= app_bundle
+CONFIG -= app_bundle 
 
 QMAKE_CXXFLAGS_DEBUG += -DNX_DEBUG \
  -g \
@@ -59,8 +59,7 @@ TARGETDEPS += ../../../../lib/libNanorexInterface.so \
 QT -= gui
 
 
-DISTFILES += ../../../Plugins/NanorexMMPImportExport/NanorexMMPImportExportTest.rl \
- ../../../Plugins/NanorexMMPImportExport/molecule.rl \
+DISTFILES += ../../../Plugins/NanorexMMPImportExport/molecule.rl \
  ../../../Plugins/NanorexMMPImportExport/atom.rl \
  ../../../Plugins/NanorexMMPImportExport/utilities.rl \
  ../../../Plugins/NanorexMMPImportExport/group.rl \
@@ -68,10 +67,11 @@ DISTFILES += ../../../Plugins/NanorexMMPImportExport/NanorexMMPImportExportTest.
 
 
 
+
 LIBS += -L../../../../lib \
-  -lNanorexMMPImportExport \
-  -lNanorexUtility \
   -lNanorexInterface \
+  -lNanorexUtility \
+  -lNanorexMMPImportExport \
   -L$(OPENBABEL_LIBPATH) \
   -L$(HDF5_SIMRESULTS_INCPATH) \
   -lcppunit \
diff --git a/cad/plugins/NanoVision-1/src/KDevelop/Testing/Plugins/MMPOpenGLRendererTest/MMPOpenGLRendererTest.pro b/cad/plugins/NanoVision-1/src/KDevelop/Testing/Plugins/MMPOpenGLRendererTest/MMPOpenGLRendererTest.pro
new file mode 100644
index 000000000..a850d81d0
--- /dev/null
+++ b/cad/plugins/NanoVision-1/src/KDevelop/Testing/Plugins/MMPOpenGLRendererTest/MMPOpenGLRendererTest.pro
@@ -0,0 +1,35 @@
+SOURCES += ../../../../Plugins/NanorexMMPImportExport/MMPOpenGLRendererTest.cpp
+
+TEMPLATE = app
+
+CONFIG -= release
+
+CONFIG += debug \
+stl \
+rtti \
+opengl
+QT += opengl
+
+DESTDIR = ../../../../../bin/
+
+QMAKE_CXXFLAGS_DEBUG += -DNX_DEBUG \
+  -g \
+  -O0 \
+  -fno-inline
+
+INCLUDEPATH += ../../../../../src/Plugins/RenderingEngines/OpenGL \
+  ../../../../../src/Plugins/RenderingEngines/OpenGL/GLT \
+  $(OPENBABEL_INCPATH) \
+  ../../../../../src \
+  ../../../../../include
+
+LIBS += -L../../../../../lib \
+  -lNXBallAndStickOpenGLRenderer \
+  -lNXOpenGLRenderingEngine \
+  -lNanorexMMPImportExport \
+  -lNanorexInterface \
+  -lNanorexUtility \
+  -lopenbabel
+
+TARGETDEPS += ../../../../../lib/libNXBallAndStickOpenGLRenderer.so
+
diff --git a/cad/plugins/NanoVision-1/src/KDevelop/Testing/Plugins/Plugins.pro b/cad/plugins/NanoVision-1/src/KDevelop/Testing/Plugins/Plugins.pro
index 319e1df43..d662c94f6 100644
--- a/cad/plugins/NanoVision-1/src/KDevelop/Testing/Plugins/Plugins.pro
+++ b/cad/plugins/NanoVision-1/src/KDevelop/Testing/Plugins/Plugins.pro
@@ -2,5 +2,6 @@ TEMPLATE = subdirs
 
 CONFIG += ordered
 
-SUBDIRS += RenderingEngines
+SUBDIRS += RenderingEngines \
+ MMPOpenGLRendererTest
 
diff --git a/cad/plugins/NanoVision-1/src/KDevelop/Testing/Plugins/RenderingEngines/OpenGL/NXOpenGLRenderingEngineTest/NXOpenGLRenderingEngineTest.pro b/cad/plugins/NanoVision-1/src/KDevelop/Testing/Plugins/RenderingEngines/OpenGL/NXOpenGLRenderingEngineTest/NXOpenGLRenderingEngineTest.pro
index 0f9329253..3d3540efd 100644
--- a/cad/plugins/NanoVision-1/src/KDevelop/Testing/Plugins/RenderingEngines/OpenGL/NXOpenGLRenderingEngineTest/NXOpenGLRenderingEngineTest.pro
+++ b/cad/plugins/NanoVision-1/src/KDevelop/Testing/Plugins/RenderingEngines/OpenGL/NXOpenGLRenderingEngineTest/NXOpenGLRenderingEngineTest.pro
@@ -1,7 +1,5 @@
 TEMPLATE = app
 
-CONFIG -= release
-
 CONFIG += stl \
 opengl \
  debug_and_release \
@@ -31,12 +29,13 @@ TARGETDEPS += ../../../../../../../lib/libNXBallAndStickOpenGLRenderer.so \
 
 
 
+
 LIBS += -L../../../../../../../lib \
-  -lNanorexUtility \
-  -lNanorexInterface \
-  -lNXOpenGLRenderingEngine \
   -lNXBallAndStickOpenGLRenderer \
-  -lopenbabel \
+  -lNXOpenGLRenderingEngine \
+  -lNanorexInterface \
+  -lNanorexUtility \
   -lNXOpenGLSceneGraph \
-  -lGLT
+  -lGLT \
+  -lopenbabel
 
diff --git a/cad/plugins/NanoVision-1/src/KDevelop/nv1/nv1.pro b/cad/plugins/NanoVision-1/src/KDevelop/nv1/nv1.pro
index 2690bfed6..15c2d2f42 100644
--- a/cad/plugins/NanoVision-1/src/KDevelop/nv1/nv1.pro
+++ b/cad/plugins/NanoVision-1/src/KDevelop/nv1/nv1.pro
@@ -2,7 +2,8 @@ TEMPLATE = app
 
 CONFIG += stl \
 opengl \
- debug_and_release
+ debug_and_release \
+ rtti
 
 QT += opengl
 
@@ -92,13 +93,14 @@ TARGETDEPS += ../../../lib/libNXOpenGLSceneGraph.a \
 #  ../../../lib/libNXBallAndStickOpenGLRenderer.so
 #  ../../../lib/libNXOpenGLRenderingEngine.so 
 
+# -lNXOpenGLRenderingEngine 
+# -lNXBallAndStickOpenGLRenderer 
+
 LIBS += -L../../../lib \
-  -lNanorexInterface \
   -lNanorexUtility \
+  -lNanorexInterface \
   -L$(OPENBABEL_LIBPATH) \
   -lNXOpenGLSceneGraph \
   -lGLT \
   -lopenbabel
-# -lNXOpenGLRenderingEngine 
-# -lNXBallAndStickOpenGLRenderer 
 
diff --git a/cad/plugins/NanoVision-1/src/Plugins/NanorexMMPImportExport/MMPOpenGLRendererTest.cpp b/cad/plugins/NanoVision-1/src/Plugins/NanorexMMPImportExport/MMPOpenGLRendererTest.cpp
new file mode 100644
index 000000000..ce966d12c
--- /dev/null
+++ b/cad/plugins/NanoVision-1/src/Plugins/NanorexMMPImportExport/MMPOpenGLRendererTest.cpp
@@ -0,0 +1,52 @@
+// Copyright 2008 Nanorex, Inc.  See LICENSE file for details.
+
+#include "Nanorex/Interface/NXMoleculeSet.h"
+#include "Nanorex/Interface/NXDataStoreInfo.h"
+#include "Plugins/RenderingEngines/OpenGL/NXOpenGLRenderingEngine.h"
+#include "Plugins/NanorexMMPImportExport/NanorexMMPImportExport.h"
+#include "Plugins/RenderingEngines/OpenGL/Renderers/NXBallAndStickOpenGLRenderer.h"
+
+#include <QApplication>
+#include <QMainWindow>
+
+using namespace Nanorex;
+using namespace std;
+
+int main(int argc, char *argv[])
+{
+	NXAtomData basRenderData(0);
+	
+    // create application and main window
+	QApplication app(argc, argv);
+	QMainWindow mainWindow;
+	NXOpenGLRenderingEngine *renderingEngine
+		= new NXOpenGLRenderingEngine(&mainWindow);
+	mainWindow.setCentralWidget(renderingEngine);
+	NXBallAndStickOpenGLRenderer *renderer =
+		new NXBallAndStickOpenGLRenderer(renderingEngine);
+	renderingEngine->setRenderer("bas", renderer);
+	renderingEngine->setRenderer("def", renderer);
+	renderingEngine->initializePlugins();
+	
+	mainWindow.show();
+	
+	basRenderData.setRenderStyleCode("bas");
+	NXMoleculeSet theMoleculeSet;
+	NXDataStoreInfo dataStoreInfo;
+	NanorexMMPImportExport importer;
+	NXCommandResult const *result =
+		importer.importFromFile(&theMoleculeSet, &dataStoreInfo,
+		                        "../src/Testing/MMP_TestFiles/benzene.mmp", 0,0);
+	assert(result->getResult() == (int) NX_CMD_SUCCESS);
+    
+	renderingEngine->clearFrames();
+	assert(renderingEngine->getFrameCount() == 0);
+	result = renderingEngine->addFrame(&theMoleculeSet);
+	assert(result->getResult() == (int) NX_CMD_SUCCESS);
+	assert(renderingEngine->getFrameCount() == 1);
+	renderingEngine->setCurrentFrame(0);
+	
+	return app.exec();
+}
+
+
diff --git a/cad/plugins/NanoVision-1/src/Plugins/NanorexMMPImportExport/NanorexMMPImportExport.cpp b/cad/plugins/NanoVision-1/src/Plugins/NanorexMMPImportExport/NanorexMMPImportExport.cpp
index 6ef6cb658..c372ad896 100644
--- a/cad/plugins/NanoVision-1/src/Plugins/NanorexMMPImportExport/NanorexMMPImportExport.cpp
+++ b/cad/plugins/NanoVision-1/src/Plugins/NanorexMMPImportExport/NanorexMMPImportExport.cpp
@@ -928,7 +928,7 @@ char const NanorexMMPImportExport::_s_hybridizationName[8][8] = {
 /* CONSTRUCTOR */
 NanorexMMPImportExport::NanorexMMPImportExport()
 {
-	reset();
+reset();
 }
 
 /* DESTRUCTOR */
@@ -990,7 +990,7 @@ importFromFile(NXMoleculeSet *rootMoleculeSetPtr,
 {
 	reset();
 	bool success = true;
-		
+	
 	NXCommandResult *result = new NXCommandResult();
 	result->setResult(NX_CMD_SUCCESS);
 	
@@ -1281,32 +1281,32 @@ _eof_trans:
 	case 38:
 #line 79 "NanorexMMPImportExport.rl"
 	{ p--; {
-	if(top == stackSize) {
-		stackSize += stackSize;
-	    stack.resize(stackSize, 0);
+		if(top == stackSize) {
+			stackSize += stackSize;
+			stack.resize(stackSize, 0);
 		// cerr << "Resized stack" << endl;
-	}
-{stack[top++] = cs; cs = 294; goto _again;}} }
+		}
+	{stack[top++] = cs; cs = 294; goto _again;}} }
 	break;
 	case 39:
 #line 82 "NanorexMMPImportExport.rl"
 	{ p--; {
-	if(top == stackSize) {
-		stackSize += stackSize;
-	    stack.resize(stackSize, 0);
+		if(top == stackSize) {
+			stackSize += stackSize;
+			stack.resize(stackSize, 0);
 		// cerr << "Resized stack" << endl;
-	}
-{stack[top++] = cs; cs = 294; goto _again;}} }
+		}
+	{stack[top++] = cs; cs = 294; goto _again;}} }
 	break;
 	case 40:
 #line 87 "NanorexMMPImportExport.rl"
 	{ p--; {
-	if(top == stackSize) {
-		stackSize += stackSize;
-	    stack.resize(stackSize, 0);
+		if(top == stackSize) {
+			stackSize += stackSize;
+			stack.resize(stackSize, 0);
 		// cerr << "Resized stack" << endl;
-	}
-{stack[top++] = cs; cs = 294; goto _again;}} }
+		}
+	{stack[top++] = cs; cs = 294; goto _again;}} }
 	break;
 	case 44:
 #line 1 "NanorexMMPImportExport.rl"
@@ -1465,10 +1465,13 @@ void NanorexMMPImportExport::newAtom(int id, int atomicNum, int x, int y, int z,
 	
 	
 	atomPtr = molPtr->NewAtom();
+	atomPtr->SetAtomicNum(atomicNum);
 	NXAtomData *atomDataPtr = new NXAtomData(atomicNum);
 	atomDataPtr->setIdx(id);
 	atomDataPtr->setRenderStyleCode(style);
+	assert(atomDataPtr->GetDataType() == NXAtomDataType);
 	atomPtr->SetData(atomDataPtr); // atomic number
+	assert(atomPtr->HasData(NXAtomDataType));
 	
 	foundAtomList[id] = atomPtr;
 	
@@ -1519,7 +1522,7 @@ void NanorexMMPImportExport::newBond(string const& bondType, int targetAtomId)
 	
 	if(targetAtomExistsQuery == foundAtomList.end()) {
 		CSEVERE("**ERROR** attempting to bond to non-existent atomID "
-		       + NXUtility::itos(targetAtomId));
+		        + NXUtility::itos(targetAtomId));
 	}
 	else {
 		OBAtom *const targetAtomPtr = targetAtomExistsQuery->second;
@@ -1528,20 +1531,21 @@ void NanorexMMPImportExport::newBond(string const& bondType, int targetAtomId)
 		// when encountering a blank line
 		if(molPtr->GetBond(atomPtr, targetAtomPtr) == NULL) {
 			// bond was not previously encountered, include
-			CDEBUG("bonding atom #" + NXUtility::itos(atomPtr->GetIdx()) +
-			       " to atom #" + NXUtility::itos(targetAtomPtr->GetIdx()));
+			int atomId = ((NXAtomData*)(atomPtr->GetData(NXAtomDataType)))->getIdx();
+			CDEBUG("bonding atom #" + NXUtility::itos(atomId) +
+			       " to atom #" + NXUtility::itos(targetAtomId));
 			bondPtr = molPtr->NewBond();
 			bondOrder = GetBondOrderFromType(bondType);
 			bondPtr->SetBondOrder(bondOrder);
-			bondPtr->SetBegin(atomPtr);
-			bondPtr->SetEnd(targetAtomPtr);
 			atomPtr->AddBond(bondPtr);
 			targetAtomPtr->AddBond(bondPtr);
+			bondPtr->SetBegin(atomPtr);
+			bondPtr->SetEnd(targetAtomPtr);
 			CDEBUG("bond" + bondType + " " + NXUtility::itos(targetAtomId));
 		}
 		else {
 			CSEVERE("bond to atom #" + NXUtility::itos(targetAtomId) +
-			       " already exists");
+			        " already exists");
 		}
 	}
 	
@@ -1554,7 +1558,7 @@ int NanorexMMPImportExport::GetBondOrderFromType(string const& type)
 	if(type == "1")
 		return 1;
 	else if(type == "2")
-	        return 2;
+		return 2;
 	else if(type == "3")
 		return 3;
 	else if(type == "a")
@@ -1598,7 +1602,7 @@ NanorexMMPImportExport::newMolecule(string const& name, string const& style)
 /* FUNCTION: newViewDataGroup */
 void NanorexMMPImportExport::newViewDataGroup(void)
 {
-	insideViewDataGroup = true;
+insideViewDataGroup = true;
 	CDEBUG("[special] group (View Data)");
 }
 
@@ -1690,7 +1694,7 @@ void NanorexMMPImportExport::endGroup(string const& name)
 		              "group (" + groupName + ')');
 	}
 	
-
+	
 	if(insideViewDataGroup) {
 		insideViewDataGroup = false;
 		molSetPtr = NULL;
@@ -1731,7 +1735,7 @@ NanorexMMPImportExport::newChunkInfo(std::string const& key,
 	
 	if(insideViewDataGroup)
 		return;
-
+	
 	/// @todo
 }
 
@@ -1795,7 +1799,7 @@ NanorexMMPImportExport::GetAtomRenderStyleCode(OBAtom *const atomPtr)
 /* FUNCTION: PrintMolecule */
 /* static */
 void NanorexMMPImportExport::PrintMolecule(ostream& o,
-                                           OBMol *const molPtr)
+OBMol *const molPtr)
 {
 	set<int> prevAtomIdx;
 	set<int> prevBondIdx; /// @todo - replace with simple bond count
diff --git a/cad/plugins/NanoVision-1/src/Plugins/NanorexMMPImportExport/NanorexMMPImportExport.rl b/cad/plugins/NanoVision-1/src/Plugins/NanorexMMPImportExport/NanorexMMPImportExport.rl
index 99c4e7d3e..be03cff1f 100644
--- a/cad/plugins/NanoVision-1/src/Plugins/NanorexMMPImportExport/NanorexMMPImportExport.rl
+++ b/cad/plugins/NanoVision-1/src/Plugins/NanorexMMPImportExport/NanorexMMPImportExport.rl
@@ -46,7 +46,7 @@ inline void DEBUG_MSG(string const& filename, int line, string const& s)
 	machine mmp_parser;
 	
 	include group "group.rl";
-		
+	
 	
 	mmpformat_line =
 		'mmpformat'  nonNEWLINEspace+
@@ -63,7 +63,7 @@ inline void DEBUG_MSG(string const& filename, int line, string const& s)
 		'kelvin'
 		nonNEWLINEspace+
 		whole_number % { kelvinTemp = intVal; }
-		nonNEWLINEspace*
+	nonNEWLINEspace*
 		EOL;
 	
 	end_line = 'end' nonNEWLINEspace+;
@@ -76,28 +76,28 @@ main := WHITESPACE*
 		  WHITESPACE*
 		)?
 		group_view_data_stmt_begin_line
-			@ { fhold; fcall group_scanner; }
-		WHITESPACE*
+		@ { fhold; fcall group_scanner; }
+	WHITESPACE*
 		group_mol_struct_stmt_begin_line
-			@ { fhold; fcall group_scanner; }
-		WHITESPACE*
+		@ { fhold; fcall group_scanner; }
+	WHITESPACE*
 		end1_line
 		WHITESPACE*
 		group_clipboard_stmt_begin_line
-			@ { fhold; fcall group_scanner; }
-		WHITESPACE*
+		@ { fhold; fcall group_scanner; }
+	WHITESPACE*
 		end_line
 		any*
 		;
 	
 # dynamic stack re-sizing
-prepush {
-	if(top == stackSize) {
-		stackSize += stackSize;
-	    stack.resize(stackSize, 0);
+	prepush {
+		if(top == stackSize) {
+			stackSize += stackSize;
+			stack.resize(stackSize, 0);
 		// cerr << "Resized stack" << endl;
+		}
 	}
-}
 	
 }%%
 
@@ -129,7 +129,7 @@ char const NanorexMMPImportExport::_s_hybridizationName[8][8] = {
 /* CONSTRUCTOR */
 NanorexMMPImportExport::NanorexMMPImportExport()
 {
-	reset();
+reset();
 }
 
 /* DESTRUCTOR */
@@ -182,7 +182,7 @@ importFromFile(NXMoleculeSet *rootMoleculeSetPtr,
 {
 	reset();
 	bool success = true;
-		
+	
 	NXCommandResult *result = new NXCommandResult();
 	result->setResult(NX_CMD_SUCCESS);
 	
@@ -255,10 +255,13 @@ void NanorexMMPImportExport::newAtom(int id, int atomicNum, int x, int y, int z,
 	
 	
 	atomPtr = molPtr->NewAtom();
+	atomPtr->SetAtomicNum(atomicNum);
 	NXAtomData *atomDataPtr = new NXAtomData(atomicNum);
 	atomDataPtr->setIdx(id);
 	atomDataPtr->setRenderStyleCode(style);
+	assert(atomDataPtr->GetDataType() == NXAtomDataType);
 	atomPtr->SetData(atomDataPtr); // atomic number
+	assert(atomPtr->HasData(NXAtomDataType));
 	
 	foundAtomList[id] = atomPtr;
 	
@@ -309,7 +312,7 @@ void NanorexMMPImportExport::newBond(string const& bondType, int targetAtomId)
 	
 	if(targetAtomExistsQuery == foundAtomList.end()) {
 		CSEVERE("**ERROR** attempting to bond to non-existent atomID "
-		       + NXUtility::itos(targetAtomId));
+		        + NXUtility::itos(targetAtomId));
 	}
 	else {
 		OBAtom *const targetAtomPtr = targetAtomExistsQuery->second;
@@ -318,20 +321,21 @@ void NanorexMMPImportExport::newBond(string const& bondType, int targetAtomId)
 		// when encountering a blank line
 		if(molPtr->GetBond(atomPtr, targetAtomPtr) == NULL) {
 			// bond was not previously encountered, include
-			CDEBUG("bonding atom #" + NXUtility::itos(atomPtr->GetIdx()) +
-			       " to atom #" + NXUtility::itos(targetAtomPtr->GetIdx()));
+			int atomId = ((NXAtomData*)(atomPtr->GetData(NXAtomDataType)))->getIdx();
+			CDEBUG("bonding atom #" + NXUtility::itos(atomId) +
+			       " to atom #" + NXUtility::itos(targetAtomId));
 			bondPtr = molPtr->NewBond();
 			bondOrder = GetBondOrderFromType(bondType);
 			bondPtr->SetBondOrder(bondOrder);
-			bondPtr->SetBegin(atomPtr);
-			bondPtr->SetEnd(targetAtomPtr);
 			atomPtr->AddBond(bondPtr);
 			targetAtomPtr->AddBond(bondPtr);
+			bondPtr->SetBegin(atomPtr);
+			bondPtr->SetEnd(targetAtomPtr);
 			CDEBUG("bond" + bondType + " " + NXUtility::itos(targetAtomId));
 		}
 		else {
 			CSEVERE("bond to atom #" + NXUtility::itos(targetAtomId) +
-			       " already exists");
+			        " already exists");
 		}
 	}
 	
@@ -344,7 +348,7 @@ int NanorexMMPImportExport::GetBondOrderFromType(string const& type)
 	if(type == "1")
 		return 1;
 	else if(type == "2")
-	        return 2;
+		return 2;
 	else if(type == "3")
 		return 3;
 	else if(type == "a")
@@ -388,7 +392,7 @@ NanorexMMPImportExport::newMolecule(string const& name, string const& style)
 /* FUNCTION: newViewDataGroup */
 void NanorexMMPImportExport::newViewDataGroup(void)
 {
-	insideViewDataGroup = true;
+insideViewDataGroup = true;
 	CDEBUG("[special] group (View Data)");
 }
 
@@ -480,7 +484,7 @@ void NanorexMMPImportExport::endGroup(string const& name)
 		              "group (" + groupName + ')');
 	}
 	
-
+	
 	if(insideViewDataGroup) {
 		insideViewDataGroup = false;
 		molSetPtr = NULL;
@@ -521,7 +525,7 @@ NanorexMMPImportExport::newChunkInfo(std::string const& key,
 	
 	if(insideViewDataGroup)
 		return;
-
+	
 	/// @todo
 }
 
@@ -585,7 +589,7 @@ NanorexMMPImportExport::GetAtomRenderStyleCode(OBAtom *const atomPtr)
 /* FUNCTION: PrintMolecule */
 /* static */
 void NanorexMMPImportExport::PrintMolecule(ostream& o,
-                                           OBMol *const molPtr)
+OBMol *const molPtr)
 {
 	set<int> prevAtomIdx;
 	set<int> prevBondIdx; /// @todo - replace with simple bond count
diff --git a/cad/plugins/NanoVision-1/src/Plugins/NanorexMMPImportExport/NanorexMMPImportExportRagelTest.cpp b/cad/plugins/NanoVision-1/src/Plugins/NanorexMMPImportExport/NanorexMMPImportExportRagelTest.cpp
index aaaa84f62..80f96b45c 100644
--- a/cad/plugins/NanoVision-1/src/Plugins/NanorexMMPImportExport/NanorexMMPImportExportRagelTest.cpp
+++ b/cad/plugins/NanoVision-1/src/Plugins/NanorexMMPImportExport/NanorexMMPImportExportRagelTest.cpp
@@ -9497,7 +9497,7 @@ void NanorexMMPImportExportRagelTest::fileParseTest(void)
 
 void NanorexMMPImportExportRagelTest::fileParseTestH2O(void)
 {
-	ifstream infile("H2O.mmp", ios::in);
+	ifstream infile("../src/Testing/MMP_TestFiles/H2O.mmp", ios::in);
 	if(infile) {
 		reset();
 		RagelIstreamPtr testInput(infile);
@@ -9513,7 +9513,7 @@ void NanorexMMPImportExportRagelTest::fileParseTestH2O(void)
 
 void NanorexMMPImportExportRagelTest::fileParseTestHOOH(void)
 {
-	ifstream infile("hydrogen_peroxide.mmp", ios::in);
+	ifstream infile("../src/Testing/MMP_TestFiles/hydrogen_peroxide.mmp", ios::in);
 	if(infile) {
 		reset();
 		RagelIstreamPtr testInput(infile);
@@ -9529,7 +9529,7 @@ void NanorexMMPImportExportRagelTest::fileParseTestHOOH(void)
 
 void NanorexMMPImportExportRagelTest::fileParseTestChlorophyll(void)
 {
-	ifstream infile("chlorophyll.mmp", ios::in);
+	ifstream infile("../src/Testing/MMP_TestFiles/chlorophyll.mmp", ios::in);
 	if(infile) {
 		reset();
 		RagelIstreamPtr testInput(infile, 0, ios::beg);
@@ -9545,7 +9545,7 @@ void NanorexMMPImportExportRagelTest::fileParseTestChlorophyll(void)
 
 void NanorexMMPImportExportRagelTest::fileParseTestVanillin(void)
 {
-	ifstream infile("vanillin.mmp", ios::in);
+	ifstream infile("../src/Testing/MMP_TestFiles/vanillin.mmp", ios::in);
 	if(infile) {
 		reset();
 		RagelIstreamPtr testInput(infile, 0, ios::beg);
@@ -9562,7 +9562,7 @@ void NanorexMMPImportExportRagelTest::fileParseTestVanillin(void)
 
 void NanorexMMPImportExportRagelTest::fileParseTestNanocar(void)
 {
-	ifstream infile("nanocar.mmp", ios::in);
+	ifstream infile("../src/Testing/MMP_TestFiles/nanocar.mmp", ios::in);
 	if(infile) {
 		reset();
 		RagelIstreamPtr testInput(infile, 0, ios::beg);
diff --git a/cad/plugins/NanoVision-1/src/Plugins/NanorexMMPImportExport/NanorexMMPImportExportRagelTest.rl b/cad/plugins/NanoVision-1/src/Plugins/NanorexMMPImportExport/NanorexMMPImportExportRagelTest.rl
new file mode 100644
index 000000000..2f2f9dd70
--- /dev/null
+++ b/cad/plugins/NanoVision-1/src/Plugins/NanorexMMPImportExport/NanorexMMPImportExportRagelTest.rl
@@ -0,0 +1,1291 @@
+// Copyright 2008 Nanorex, Inc.  See LICENSE file for details.
+
+#include "NanorexMMPImportExportRagelTest.h"
+#include "Nanorex/Utility/NXUtility.h"
+#include <sstream>
+#include <cfloat>
+
+using namespace Nanorex;
+using namespace std;
+
+CPPUNIT_TEST_SUITE_REGISTRATION(NanorexMMPImportExportRagelTest);
+CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(NanorexMMPImportExportRagelTest,
+                                      "NanorexMMPImportExportRagelTestSuite");
+
+// #define VERBOSE
+
+#if defined(VERBOSE)
+#define CERR(s) \
+{ cerr << (NXUtility::itos(lineNum) + ": ") << s << endl; }
+#else
+#define CERR(S)
+#endif
+
+// -- member functions --
+
+void NanorexMMPImportExportRagelTest::setUp(void)
+{
+}
+
+
+void NanorexMMPImportExportRagelTest::tearDown(void)
+{
+}
+
+
+void NanorexMMPImportExportRagelTest::reset(void)
+{
+	atomIds.clear();
+	atomicNums.clear();
+	atomLocs.clear();
+	atomStyles.clear();
+	atomProps.clear();
+	bonds.clear();
+	lineNum = 1;
+	
+	atomCount = 0;
+	molCount = 0;
+	groupCount = 0;
+	egroupCount = 0;
+	
+	infoAtomCount = 0;
+	infoChunkCount = 0;
+	infoOpenGroupCount = 0;
+	
+	bond1Count = 0;
+	bond2Count = 0;
+	bond3Count = 0;
+	bondaCount = 0;
+	bondcCount = 0;
+	bondgCount = 0;
+}
+
+
+void NanorexMMPImportExportRagelTest::syntaxError(string const& errorMessage)
+{
+	cerr << lineNum << ": Syntax Error : " << errorMessage << endl;
+}
+
+
+void
+NanorexMMPImportExportRagelTest::atomLineTestSetUp(vector<string>& testStrings,
+	vector<AtomTestInfo>& answers)
+{
+	testStrings.clear();
+	answers.clear();
+	
+	testStrings.push_back("atom 12  (10) (1,2,3) def\n");
+	answers.push_back(AtomTestInfo(12, 10, 1, 2, 3, "def"));
+	
+	testStrings.push_back("atom    6   (99 ) ( 15632,-2,     -63  ) bas  \n");
+	answers.push_back(AtomTestInfo(6, 99, 15632, -2, -63, "bas"));
+	
+	testStrings.push_back("atom 12  (10) (1,2,3) def  "
+	                      "# this one's got a comment \n");
+	answers.push_back(AtomTestInfo(12, 10, 1, 2, 3, "def"));
+	
+	testStrings.push_back("atom    6   (99 ) ( 15632,-2,     -63  ) bas"
+	                      "# comment where the '#' touches the style\n");
+	answers.push_back(AtomTestInfo(6, 99, 15632, -2, -63, "bas"));
+}
+
+
+void NanorexMMPImportExportRagelTest::atomLineTest(void)
+{
+	vector<string> testStrings;
+	vector<AtomTestInfo> answers;
+	atomLineTestSetUp(testStrings, answers);
+	
+	for(int i = 0; i < (int) testStrings.size(); ++i) {
+		atomLineTestHelper(testStrings[i].c_str());
+		
+		CPPUNIT_ASSERT(atomIds.back() == answers[i].id);
+		CPPUNIT_ASSERT(atomicNums.back() = answers[i].atomicNum);
+		CPPUNIT_ASSERT(atomLocs.back().x == answers[i].pos.x);
+		CPPUNIT_ASSERT(atomLocs.back().y == answers[i].pos.y);
+		CPPUNIT_ASSERT(atomLocs.back().z == answers[i].pos.z);
+// cerr << "style comparison: " << currentAtomStyle << " =?= " << answers[i].style << endl; 
+		CPPUNIT_ASSERT(atomStyles.back() == answers[i].style);
+	}
+	CPPUNIT_ASSERT(atomIds.size() == testStrings.size());
+	CPPUNIT_ASSERT(atomicNums.size() == testStrings.size());
+	CPPUNIT_ASSERT(atomLocs.size() == testStrings.size());
+	CPPUNIT_ASSERT(atomStyles.size() == testStrings.size());
+}
+
+
+%%{
+# ***** Ragel: atom declaration line test machine *****
+	machine atom_decl_line_test;
+	include utilities "utilities.rl";
+	include atom "atom.rl";
+	
+main := space** atom_decl_line
+// @ { newAtom(atomId, atomicNum, x, y, z, atomStyle); }
+		$lerr { CPPUNIT_ASSERT_MESSAGE(false,
+		                               "Error encountered in atom_decl_line_test"
+		                               " state machine");
+		};
+	
+}%%
+
+
+void NanorexMMPImportExportRagelTest::atomLineTestHelper(char const *const testInput)
+{
+	char const *p = testInput;
+	char const *pe = p + strlen(p);
+	char const *eof = NULL;
+	int cs;
+	
+// cerr << "atomLineTestHelper (debug): *(pe-1) = (int) " << (int) *(pe-1) << endl;
+	
+	%% machine atom_decl_line_test;
+	%% write data;
+	%% write init;
+	%% write exec;
+}
+
+
+void NanorexMMPImportExportRagelTest::newAtom(int atomId, int atomicNum,
+                                              int x, int y, int z,
+                                              std::string const& atomStyle)
+{
+	++atomCount;
+	CERR("atom " + NXUtility::itos(atomId) + " (" + NXUtility::itos(atomicNum)
+	     + ") (" + NXUtility::itos(x) + ',' + NXUtility::itos(y) + ',' +
+	     NXUtility::itos(z) + ") " + atomStyle);
+	atomIds.push_back(atomId);
+	atomicNums.push_back(atomicNum);
+	atomLocs.push_back(Position(x,y,z));
+	atomStyles.push_back(atomStyle);
+	
+// properties
+	atomProps.push_back(map<string,string>());
+	bonds.push_back(map<string, vector<int> >());
+}
+
+
+
+void NanorexMMPImportExportRagelTest::bondLineTest(void)
+{
+	char *testInput = NULL;
+	
+	reset();
+	bonds.push_back(map<string, vector<int> >());
+	
+	testInput = "bonda 1\n";
+	bondLineTestHelper(testInput);
+	CPPUNIT_ASSERT(bonds.back()["a"][0] == 1);
+	
+	testInput = "bondc 32    65535  \n";
+	bondLineTestHelper(testInput);
+	CPPUNIT_ASSERT(bonds.back()["c"][0] == 32);
+	CPPUNIT_ASSERT(bonds.back()["c"][1] == 65535);
+	
+	bonds.clear();
+}
+
+
+%%{
+# ***** Ragel: bond declaration line test machine *****
+	machine bond_line_test;
+	include utilities "utilities.rl";
+	include atom "atom.rl";
+	
+main := space** bond_line
+		$lerr { CPPUNIT_ASSERT_MESSAGE(false,
+		                               "Error encountered in bond_line_test "
+		                               "state machine");
+		};
+	
+}%%
+
+
+void NanorexMMPImportExportRagelTest::bondLineTestHelper(char const *const testInput)
+{
+	char const *p   = testInput;
+	char const *pe  = p + strlen(p);
+	char const *eof = NULL;
+	int cs;
+	
+	%% machine bond_line_test;
+	%% write data;
+	%% write init;
+	%% write exec;
+}
+
+
+void NanorexMMPImportExportRagelTest::newBond(std::string const& bondType,
+                                              int targetAtomId)
+{
+	if(bondType == "1")
+		++bond1Count;
+	else if(bondType == "2")
+		++bond2Count;
+	else if(bondType == "3")
+		++bond3Count;
+	else if(bondType == "a")
+		++bondaCount;
+	else if(bondType == "c")
+		++bondcCount;
+	else if(bondType == "g")
+		++bondgCount;
+	
+	CERR("bond" + bondType + " " + NXUtility::itos(targetAtomId));
+// currentBondType = bondType;
+// targetAtomIds.push_back(targetAtomId);
+	bonds.back()[bondType].push_back(targetAtomId);
+}
+
+
+void NanorexMMPImportExportRagelTest::bondDirectionTest(void)
+{
+	char const *testInput = NULL;
+	
+	testInput = "bond_direction 10 12\n";
+	bondDirectionTestHelper(testInput);
+	CPPUNIT_ASSERT(bondDirectionStartId == 10);
+	CPPUNIT_ASSERT(bondDirectionStopId  == 12);
+	
+	testInput = "bond_direction    1000                 812  \n";
+	bondDirectionTestHelper(testInput);
+	CPPUNIT_ASSERT(bondDirectionStartId == 1000);
+	CPPUNIT_ASSERT(bondDirectionStopId  == 812);
+}
+
+
+%%{
+# ***** Ragel: bond_direction line test machine *****
+	machine bond_direction_line_test;
+	include utilities "utilities.rl";
+	include atom "atom.rl";
+	
+main := space** bond_direction_line
+		$lerr { CPPUNIT_ASSERT_MESSAGE(false,
+		                               "Error encountered in "
+		                               "bond_direction_line_test state machine");
+		};
+	
+}%%
+
+
+void
+NanorexMMPImportExportRagelTest::bondDirectionTestHelper(char const *const testInput)
+{
+	char const *p   = testInput;
+	char const *pe  = p + strlen(p);
+	char const *eof = 0;
+	int cs;
+	
+	%% machine bond_direction_line_test;
+	%% write data;
+	%% write init;
+	%% write exec;
+}
+
+
+void NanorexMMPImportExportRagelTest::newBondDirection(int atomId1, int atomId2)
+{
+	CERR("bond_direction " + NXUtility::itos(atomId1) + " " +
+	     NXUtility::itos(atomId2));
+	bondDirectionStartId = atomId1;
+	bondDirectionStopId = atomId2;
+}
+
+
+void NanorexMMPImportExportRagelTest::infoAtomTest(void)
+{
+	char const *testInput = NULL;
+	atomProps.push_back(map<string,string>());
+	
+	testInput = "info atom hybridization = sp3\n";
+	infoAtomTestHelper(testInput);
+	CPPUNIT_ASSERT(atomProps.back()["hybridization"] == "sp3");
+	
+// spaces
+	testInput = "info      atom     company      = Nanorex   \n";
+	infoAtomTestHelper(testInput);
+	CPPUNIT_ASSERT(atomProps.back()["company"] == "Nanorex");
+	
+// spaces in keys and values
+	testInput = "info atom key with spaces     =  value with spaces\n";
+	infoAtomTestHelper(testInput);
+// cerr << "infoAtomTest: COMPARING '" << infoAtomKeys.back() << "' and '"
+// 	<< infoAtomValues.back() << "'" << endl;
+	CPPUNIT_ASSERT(atomProps.back()["key with spaces"] == "value with spaces");
+	
+	testInput =	"   info  atom "
+		"spaces at the beginning   =    and spaces at    the end     \n";
+	infoAtomTestHelper(testInput);
+	CPPUNIT_ASSERT(atomProps.back()["spaces at the beginning"] ==
+	               "and spaces at    the end");
+	
+	atomProps.clear();
+}
+
+
+%%{
+# ***** Ragel: info_atom_line test machine *****
+	machine info_atom_line_test;
+	include utilities "utilities.rl";
+	include atom "atom.rl";
+	
+main := space**
+		info_atom_line
+		$lerr { CPPUNIT_ASSERT_MESSAGE(false,
+		                               "Error encountered in "
+		                               "info_atom_line_test state machine");
+		};
+	
+}%%
+
+
+void NanorexMMPImportExportRagelTest::infoAtomTestHelper(char const *const testInput)
+{
+	char const *p   = testInput;
+	char const *pe  = p + strlen(p);
+	char const *eof = NULL;
+	int cs;
+	
+	%% machine info_atom_line_test;
+	%% write data;
+	%% write init;
+	%% write exec;
+}
+
+
+void NanorexMMPImportExportRagelTest::newAtomInfo(std::string const& key,
+	std::string const& value)
+{
+	++infoAtomCount;
+// string key1 = key;
+// stripTrailingWhiteSpaces(key1);
+// string value1 = value;
+// stripTrailingWhiteSpaces(value1);
+	CERR("info atom '" + key + "' = '" + value + "'");
+// infoAtomKeys.push_back(key);
+// infoAtomValues.push_back(value);
+	atomProps.back().insert(make_pair(key, value));
+}
+
+
+void NanorexMMPImportExportRagelTest::atomStmtTest(void)
+{
+	reset();
+	
+	char const *testInput = NULL;
+	
+// cerr << "Performing atom_stmt test" << endl;
+	
+	testInput =
+		"atom 15 (6)  (50, -50, 600) style with spaces  \n"
+		"\n"
+		"\n"
+		"info atom atomtype   =  sp3\n"
+		"bonda 2 \n"
+		"\n"
+		"bond1 4 6 7\n";
+	atomStmtTestHelper(testInput);
+	
+	CPPUNIT_ASSERT(atomIds.size() == 1);
+	CPPUNIT_ASSERT(atomIds.back() == 15);
+	CPPUNIT_ASSERT(atomicNums.back() == 6);
+	CPPUNIT_ASSERT(atomLocs.back() == Position(50, -50, 600));
+	CPPUNIT_ASSERT(atomStyles.back() == "style with spaces");
+	CPPUNIT_ASSERT(atomProps.back()["atomtype"] == "sp3");
+	CPPUNIT_ASSERT(bonds.back()["a"][0] == 2);
+	CPPUNIT_ASSERT(bonds.back()["1"][0] == 4);
+	CPPUNIT_ASSERT(bonds.back()["1"][1] == 6);
+	CPPUNIT_ASSERT(bonds.back()["1"][2] == 7);
+}
+
+
+%%{
+# ***** Ragel: atom_stmt test machine *****
+	machine atom_stmt_test;
+	include utilities "utilities.rl";
+	include atom "atom.rl";
+	
+main := WHITESPACE* atom_decl_line
+// %{newAtom(atomId, atomicNum, x, y, z, atomStyle);}
+		(WHITESPACE*  (atom_decl_line | atom_attrib_line))*
+		$lerr { CPPUNIT_ASSERT_MESSAGE(false,
+		                               "Error encountered in "
+		                               "atom_stmt_test state machine");
+		};
+	
+}%%
+
+
+void NanorexMMPImportExportRagelTest::atomStmtTestHelper(char const *const testInput)
+{
+	char const *p   = testInput;
+	char const *pe  = p + strlen(p);
+	char const *eof = 0;
+	int cs;
+	
+	%% machine atom_stmt_test;
+	%% write data;
+	%% write init;
+	%% write exec;
+}
+
+
+void NanorexMMPImportExportRagelTest::multipleAtomStmtTest(void)
+{
+	reset();
+	
+	char const *testInput = NULL;
+	
+// cerr << "Performing atom_stmt test" << endl;
+// #if 0
+	testInput = "";
+	multipleAtomStmtTestHelper(testInput);
+	CPPUNIT_ASSERT(atomIds.size() == 0);
+	CPPUNIT_ASSERT(atomicNums.size() == 0);
+	
+	testInput = "\n";
+	multipleAtomStmtTestHelper(testInput);
+	CPPUNIT_ASSERT(atomIds.size() == 0);
+	CPPUNIT_ASSERT(atomicNums.size() == 0);
+	
+	testInput =
+		"\n"
+		"   \t  \n";
+	multipleAtomStmtTestHelper(testInput);
+	CPPUNIT_ASSERT(atomIds.size() == 0);
+	CPPUNIT_ASSERT(atomicNums.size() == 0);
+	
+// single line
+	lineNum = 1;
+	testInput =
+		"atom 15 (6)  (50, -50, 600) style with spaces  \n"
+		"info atom atomtype   =  sp3\n"
+		"bonda 2 \n"
+		"\n"
+		"bond1 4 6 7\n"
+		"\n";
+	
+	multipleAtomStmtTestHelper(testInput);
+	
+	CPPUNIT_ASSERT(atomIds.size() == 1);
+	CPPUNIT_ASSERT(atomIds.back() == 15);
+	CPPUNIT_ASSERT(atomicNums.back() == 6);
+	CPPUNIT_ASSERT(atomLocs.back() == Position(50, -50, 600));
+	CPPUNIT_ASSERT(atomStyles.back() == "style with spaces");
+	CPPUNIT_ASSERT(atomProps.back()["atomtype"] == "sp3");
+	CPPUNIT_ASSERT(bonds.back()["a"][0] == 2);
+	CPPUNIT_ASSERT(bonds.back()["1"][0] == 4);
+	CPPUNIT_ASSERT(bonds.back()["1"][1] == 6);
+	CPPUNIT_ASSERT(bonds.back()["1"][2] == 7);
+// #endif
+	
+// two lines
+	lineNum = 1;
+	testInput =
+		"atom 1 (9) (-2, 4, 1000) custom style  \n"
+		" \n"
+		"\t\n"
+		"atom  3  (  87 )  ( -10  ,-2,  32)  ball and stick\n"
+		"\n"
+		"\t\n"
+		"bond1 \t1 2\n"
+		"\n"
+		"atom 4 (6\t) (0,0,0) def\n"
+		"bondg \t1 22 333\n"
+		"\n"
+		"bondc 33   2 \n"
+		"\n"
+		;
+	
+	multipleAtomStmtTestHelper(testInput);
+	
+// include contribs from previous test - data structures haven't been cleared
+	CPPUNIT_ASSERT(atomIds.size() == 4);
+	CPPUNIT_ASSERT(atomicNums.size() == 4);
+	CPPUNIT_ASSERT(atomLocs.size() == 4);
+	CPPUNIT_ASSERT(atomProps.size() == 4);
+	CPPUNIT_ASSERT(bonds.size() == 4);
+	
+	CPPUNIT_ASSERT(atomIds[1] == 1);
+	CPPUNIT_ASSERT(atomicNums[1] == 9);
+	CPPUNIT_ASSERT(atomLocs[1] == Position(-2, 4, 1000));
+	CPPUNIT_ASSERT(atomStyles[1] == "custom style");
+	CPPUNIT_ASSERT(bonds[1].size() == 0);
+	
+	CPPUNIT_ASSERT(atomIds[2] == 3);
+	CPPUNIT_ASSERT(atomicNums[2] == 87);
+	CPPUNIT_ASSERT(atomLocs[2] == Position(-10, -2, 32));
+	CPPUNIT_ASSERT(atomStyles[2] == "ball and stick");
+	CPPUNIT_ASSERT(bonds[2].size() == 1);
+	
+	CPPUNIT_ASSERT(atomIds[3] == 4);
+	CPPUNIT_ASSERT(atomicNums[3] == 6);
+	CPPUNIT_ASSERT(bonds[3].size() == 2);
+	CPPUNIT_ASSERT(bonds[3]["g"].size() == 3);
+	CPPUNIT_ASSERT(bonds[3]["g"][0] == 1);
+	CPPUNIT_ASSERT(bonds[3]["g"][1] == 22);
+	CPPUNIT_ASSERT(bonds[3]["g"][2] == 333);
+	CPPUNIT_ASSERT(bonds[3]["c"].size() == 2);
+	CPPUNIT_ASSERT(bonds[3]["c"][0] == 33);
+	CPPUNIT_ASSERT(bonds[3]["c"][1] == 2);
+	
+}
+
+
+%%{
+# ***** Ragel: atom_stmt test machine (zero or more lines) *****
+	machine multiple_atom_stmt_test;
+	include utilities "utilities.rl";
+	include atom "atom.rl";
+	
+atom_stmt := |*
+#EOL => { cerr << "EOL, p = " << p << endl; };
+		WHITESPACE* atom_decl_line;
+	WHITESPACE* bond_line;
+	WHITESPACE* bond_direction_line;
+	WHITESPACE* info_atom_line;
+	WHITESPACE* 0 => {fret;};
+	*|;
+	
+main := (WHITESPACE** atom_decl_line
+         @ { //newAtom(atomId, atomicNum, x, y, z, atomStyle);
+// cerr << "calling, p = " << p << endl;
+	         fcall atom_stmt;})*
+		$lerr { CPPUNIT_ASSERT_MESSAGE(false,
+		                               "Error encountered in "
+		                               "multiple_atom_stmt_test state machine");
+			
+		};
+	
+}%%
+
+
+void
+NanorexMMPImportExportRagelTest::
+multipleAtomStmtTestHelper(char const *const testInput)
+{
+	char const *p   = testInput;
+	char const *pe  = p + strlen(p);
+	char const *eof = 0;
+	int cs;
+	
+	char const *ts, *te;
+	int top, act, stack[1024];
+	
+	%% machine multiple_atom_stmt_test;
+	%% write data;
+	%% write init;
+	%% write exec;
+}
+
+
+void NanorexMMPImportExportRagelTest::molLineTest(void)
+{
+	char const *testInput = NULL;
+	
+	testInput = "mol (Nanorex1) style1\n";
+	molLineTestHelper(testInput);
+	CPPUNIT_ASSERT(currentMolName == "Nanorex1");
+	CPPUNIT_ASSERT(currentMolStyle == "style1");
+	
+// spaces and tabs
+	testInput =
+		"   mol (  Nanorex2  )   style with   lotsa         spaces"
+		"\tand \t\ttabs  \n";
+	molLineTestHelper(testInput);
+	CPPUNIT_ASSERT(currentMolName == "Nanorex2");
+	CPPUNIT_ASSERT(currentMolStyle ==
+	               "style with   lotsa         spaces\tand \t\ttabs");
+	
+// mol names with spaces
+	testInput = "mol ( name with spaces and\ttabs\t) style\t3 \n";
+	molLineTestHelper(testInput);
+	CPPUNIT_ASSERT(currentMolName == "name with spaces and\ttabs");
+	CPPUNIT_ASSERT(currentMolStyle == "style\t3");
+	
+// no mol style which should default to "def"
+	testInput = "mol (Untitled)\n";
+	molLineTestHelper(testInput);
+	CPPUNIT_ASSERT(currentMolName == "Untitled");
+	CPPUNIT_ASSERT(currentMolStyle == "def");
+	
+}
+
+
+%%{
+	machine mol_decl_line_test;
+	include utilities "utilities.rl";
+	include molecule "molecule.rl";
+	
+main := mol_decl_line
+		$lerr { CPPUNIT_ASSERT_MESSAGE(false,
+		                               "Error encountered in "
+		                               "multiple_atom_stmt_test state machine");
+		};
+}%%
+
+
+void NanorexMMPImportExportRagelTest::molLineTestHelper(char const *const testInput)
+{
+	char const *p   = testInput;
+	char const *pe  = p + strlen(p);
+	char const *eof = 0;
+	int cs;
+	
+	%% machine mol_decl_line_test;
+	%% write data;
+	%% write init;
+	%% write exec;
+}
+
+
+void
+NanorexMMPImportExportRagelTest::newMolecule(string const& name, string const& style)
+{
+	++molCount;
+	currentMolName = name;
+	currentMolStyle = style;
+	CERR("mol (" + name + ") " + style);
+}
+
+
+void
+NanorexMMPImportExportRagelTest::newChunkInfo(string const& key,
+                                              string const& value)
+{
+	++infoChunkCount;
+	CERR("info chunk " << key << " = " << value);
+/// @todo
+}
+
+
+void NanorexMMPImportExportRagelTest::groupLineTest(void)
+{
+// clear group-name stack
+	while(!groupNameStack.empty())
+		groupNameStack.pop_back();
+	
+	char const *testInput = NULL;
+	
+// #if 0
+	testInput = "group (FirstGroup) #FirstGroupStyle\n";
+	groupLineTestHelper(testInput);
+	CPPUNIT_ASSERT(groupNameStack.size() == 1);
+	CPPUNIT_ASSERT(groupNameStack.back() == "FirstGroup");
+// CPPUNIT_ASSERT(currentGroupStyle == "FirstGroupStyle");
+	
+	testInput = "group ( Group name with spaces   ) \n";
+	groupLineTestHelper(testInput);
+	CPPUNIT_ASSERT(groupNameStack.size() == 2);
+	CPPUNIT_ASSERT(groupNameStack.back() == "Group name with spaces");
+// CPPUNIT_ASSERT(currentGroupStyle == "Group s\ttyle with spaces");
+	
+	testInput = "group ( Group that has a name but no style)   \n";
+	groupLineTestHelper(testInput);
+	CPPUNIT_ASSERT(groupNameStack.size() == 3);
+// CPPUNIT_ASSERT(groupNameStack.back() == "Group that has a name but no style");
+// #endif
+	
+	testInput = "group   \t  (View \t  Data\t)\n";
+// testInput = "group   \t  (\tClipboard\t)\n";
+	groupLineTestHelper(testInput);
+	CPPUNIT_ASSERT(groupNameStack.size() == 4);
+	CPPUNIT_ASSERT(groupNameStack.back() == "View Data");
+	
+	testInput = "egroup (View   Data\t)\n";
+	groupLineTestHelper(testInput);
+	CPPUNIT_ASSERT(currentGroupName == "View Data");
+	CPPUNIT_ASSERT(groupNameStack.size() == 3);
+	
+	testInput = "\tegroup\t\n";
+	groupLineTestHelper(testInput);
+	CPPUNIT_ASSERT(currentGroupName == "Group that has a name but no style");
+	CPPUNIT_ASSERT(groupNameStack.size() == 2);
+	
+	testInput = "   egroup   (  mismatched group------name_)  \n";
+	groupLineTestHelper(testInput);
+	CPPUNIT_ASSERT(groupNameStack.size() == 1);
+	
+	testInput = "egroup  ( FirstGroup   \t ) \t\t\n";
+	groupLineTestHelper(testInput);
+	CPPUNIT_ASSERT(currentGroupName == "FirstGroup");
+	CPPUNIT_ASSERT(groupNameStack.empty());
+	
+// Set of statements one after another
+	lineNum = 0;
+	testInput =
+		"group (group 1)\n"
+		"group (group 1_1) #def\n"
+		"egroup (group 1_1)\n"
+		"group (amines)\n"
+		"group (histamines) #def\n"
+		"group ( histhistamines\t) \t#def\t\n"
+		"egroup\n"
+		"group (histhistamines siblings)\n"
+		"egroup (histhistamines siblings)\n"
+		"egroup (Ok so I have lost track of which group  )  \n"
+		"egroup (gotcha now I am ending amines) \n"
+		"egroup (This closes the top-level duh)\n"
+		"\n";
+	groupLineTestHelper(testInput);
+	CPPUNIT_ASSERT(groupNameStack.empty());
+}
+
+
+%%{
+# ***** Ragel: group lines test machine *****
+	
+	machine group_lines_test;
+#include utilities "utilities.rl";
+	include group "group.rl";
+	
+mini_group_scanner :=
+		|*
+		WHITESPACE* egroup_line;
+	WHITESPACE* group_view_data_stmt_begin_line @(group,2) => {/*cerr << "view_data begin, p = '" << p << "' [" << strlen(p) << ']' << endl;*/};
+	WHITESPACE* group_clipboard_stmt_begin_line @(group,2) => {/*cerr << "clipboard begin, p = '" << p << "' [" << strlen(p) << ']' << endl;*/};
+	WHITESPACE* group_mol_struct_stmt_begin_line @(group,1) => {/*cerr << "mol_struct begin, p = '" << p << "' [" << strlen(p) << ']' << endl;*/};
+	
+#WHITESPACE* group_view_data_stmt_end_line @(group,2) => {/*cerr << "view_data end, p = '" << p << "' [" << strlen(p) << ']' << endl;*/};
+#WHITESPACE* group_clipboard_stmt_end_line @(group,2) => {/*cerr << "clipboard end, p = '" << p << "' [" << strlen(p) << ']' << endl;*/};
+#WHITESPACE* group_mol_struct_stmt_end_line @(group,1) => {/*cerr << "mol_struct end, p = '" << p << "' [" << strlen(p) << ']' << endl;*/};
+	
+	WHITESPACE* IGNORED_LINE => {/*cerr << "Ignored line, p = " << p << endl;*/};
+	*|;
+	
+main := any* >{ /*cerr << "scanner call: p = " << p << endl;*/ fhold; fcall mini_group_scanner; };
+	
+}%%
+
+
+void
+NanorexMMPImportExportRagelTest::groupLineTestHelper(char const *const testInput)
+{
+	char const *p   = testInput;
+	char const *pe  = p + strlen(p);
+	char const *eof = 0;
+	char const *ts, *te;
+	int cs, stack[128], top, act;
+	
+	%% machine group_lines_test;
+	%% write data;
+	%% write init;
+	%% write exec;
+}
+
+
+void NanorexMMPImportExportRagelTest::newViewDataGroup(void)
+{
+	++groupCount;
+	CERR("group (View Data)");
+	currentGroupName = "View Data";
+	groupNameStack.push_back(currentGroupName);
+}
+
+#if 0
+void NanorexMMPImportExportRagelTest::endViewDataGroup(void)
+{
+cerr << lineNum << ": endgroup (View Data)" << endl;
+currentGroupName = groupNameStack.back();
+groupNameStack.pop_back();
+}
+#endif
+
+void
+NanorexMMPImportExportRagelTest::newMolStructGroup(std::string const& name)
+{
+	++groupCount;
+	CERR("group (" + name + ") ");
+	currentGroupName = name;
+	groupNameStack.push_back(currentGroupName);
+}
+
+#if 0
+void NanorexMMPImportExportRagelTest::endMolStructGroup(std::string const& name)
+{
+// comparing for errors should be done by parser application
+// here we are only testing to see if the tokens are being recognized
+cerr << lineNum << ": endgroup (" << name << ")  "
+<< "[stack-top = " << groupNameStack.back() << ']' << endl;
+currentGroupName = groupNameStack.back();
+groupNameStack.pop_back();
+}
+#endif
+
+void NanorexMMPImportExportRagelTest::newClipboardGroup(void)
+{
+	++groupCount;
+	CERR("group (Clipboard)");
+	currentGroupName = "Clipboard";
+	groupNameStack.push_back(currentGroupName);
+}
+
+
+#if 0
+void NanorexMMPImportExportRagelTest::endClipboardGroup(void)
+{
+cerr << lineNum << ": endgroup (Clipboard)" << endl;
+currentGroupName = groupNameStack.back();
+groupNameStack.pop_back();
+}
+#endif
+
+
+void NanorexMMPImportExportRagelTest::endGroup(string const& name)
+{
+	++egroupCount;
+// comparing for errors should be done by parser application
+// here we are only testing to see if the tokens are being recognized
+	CERR("egroup (" + name + ")  " + "[stack-top = " + groupNameStack.back()
+	       + ']');
+	currentGroupName = groupNameStack.back();
+	groupNameStack.pop_back();
+}
+
+
+void
+NanorexMMPImportExportRagelTest::newOpenGroupInfo(string const& key,
+	string const& value)
+{
+	++infoOpenGroupCount;
+	CERR("info opengroup " + key + " = " + value);
+/// @todo
+}
+
+
+void NanorexMMPImportExportRagelTest::end1(void)
+{
+	CERR("end1");
+}
+
+
+void NanorexMMPImportExportRagelTest::uncheckedParseTest(void)
+{
+	char const *testInput = NULL;
+	
+	reset();
+	
+	testInput =
+		"group (View Data)\n"
+		"csys <coordinate-system-info>\n"
+		"egroup (View\tData) # comment to make life tough \n"
+		"group (nitrogen compounds)\n"
+		"mol (ammonia) no molecule style \n"
+		"atom 1 (1) (1,1,1) def\n"
+		"atom 2 (7) (0,0,0) bas\n"
+		"bond1 1\n"
+		"atom 3 (1) (1,1,-1) cpk\n"
+		"bond1 2\n"
+		"atom 4 (1) (-1,1,1) lin\n"
+		"bond1 2\n"
+		"egroup\n"
+		"  end1  \n"
+		"group (Clipboard)  \n"
+		"<clipboard statements to be ignored>\n"
+		"<more statements to be ignored>\n"
+		"egroup\n"
+		"end  \n"
+		" <this line should be ignored>"
+		;
+	
+	uncheckedParseTestHelper(testInput);
+	CPPUNIT_ASSERT(groupNameStack.size() == 0);
+	CPPUNIT_ASSERT(currentMolName == "ammonia");
+	CPPUNIT_ASSERT(currentMolStyle == "no molecule style");
+}
+
+
+%%{
+	machine unchecked_parse_test;
+	include group "group.rl";
+	
+main := WHITESPACE*
+		group_view_data_stmt_begin_line
+		@ { /*cerr << "*p=" << *p << endl;*/ fhold; fcall group_scanner; }
+	WHITESPACE*
+		group_mol_struct_stmt_begin_line
+		@ { fhold; fcall group_scanner; }
+	WHITESPACE*
+		end1_line
+		WHITESPACE*
+		group_clipboard_stmt_begin_line
+		@ { fhold; fcall group_scanner; }
+	any*
+		;
+}%%
+
+
+void
+NanorexMMPImportExportRagelTest::uncheckedParseTestHelper(char const *const testInput)
+{
+	char const *p   = testInput;
+	char const *pe  = p + strlen(p);
+	char const *eof = 0;
+	char const *ts, *te;
+	int cs, stack[128], top, act;
+	
+	%% machine unchecked_parse_test;
+	%% write data;
+	%% write init;
+	%% write exec;
+}
+
+
+/// Test the checked pattern matchers to see if local error actions introduced
+/// interfere with the regular functioning
+void NanorexMMPImportExportRagelTest::checkedParseTest(void)
+{
+	char const *testInput = NULL;
+	
+	reset();
+	
+	testInput =
+		"group (View Data)\n"
+		"#csys <coordinate-system-info>\n"
+		"egroup (View\tData) # comment to make life tough \n"
+		"group (nitrogen compounds)\n"
+		"mol (ammonia) no molecule style \n"
+		"atom 1 (1) (1,1,1) def\n"
+		"atom 2 (7) (0,0,0) bas\n"
+		"bond1 1\n"
+		"atom 3 (1) (1,1,-1) cpk\n"
+		"bond1 2\n"
+		"atom 4 (1) (-1,1,1) lin\n"
+		"bond1 2\n"
+		"egroup\n"
+		"  end1  \n"
+		"group (Clipboard)  \n"
+		"<clipboard statements to be ignored>\n"
+		"<more statements to be ignored>\n"
+		"egroup\n"
+		"end  \n"
+		" <this line should be ignored>"
+		;
+	
+	checkedParseTestHelper(testInput);
+	CPPUNIT_ASSERT(groupNameStack.size() == 0);
+	CPPUNIT_ASSERT(currentMolName == "ammonia");
+	CPPUNIT_ASSERT(currentMolStyle == "no molecule style");
+}
+
+
+%%{
+	machine checked_parse_test;
+	include checked_group "checked_group.rl";
+	
+main := WHITESPACE**
+		checked_group_view_data_stmt_begin_line
+		@ { cerr << "*p=" << *p << endl;
+			fhold;
+			fcall checked_group_scanner;
+		}
+	WHITESPACE**
+		checked_group_mol_struct_stmt_begin_line
+		@ { fhold; fcall checked_group_scanner; }
+	WHITESPACE**
+		checked_end1_line
+		WHITESPACE**
+		checked_group_clipboard_stmt_begin_line
+		@ { fhold; fcall checked_group_scanner; }
+	any*
+		;
+}%%
+
+
+void
+NanorexMMPImportExportRagelTest::checkedParseTestHelper(char const *const testInput)
+{
+	char const *p   = testInput;
+	char const *pe  = p + strlen(p);
+	char const *eof = 0;
+	char const *ts, *te;
+	int cs, stack[128], top, act;
+	
+	%% machine checked_parse_test;
+	%% write data;
+	%% write init;
+	%% write exec;
+}
+
+
+void
+NanorexMMPImportExportRagelTest::
+checkCounts(int atomCountRef, int molCountRef,
+            int groupCountRef, int egroupCountRef,
+            int bond1CountRef, int bond2CountRef, int bond3CountRef,
+            int bondaCountRef, int bondcCountRef, int bondgCountRef,
+            int infoAtomCountRef, int infoChunkCountRef,
+            int infoOpenGroupCountRef)
+{
+	CPPUNIT_ASSERT(atomCount == atomCountRef);
+	CPPUNIT_ASSERT(molCount == molCountRef);
+	CPPUNIT_ASSERT(groupCount == groupCountRef);
+	CPPUNIT_ASSERT(egroupCount == egroupCountRef);
+	CPPUNIT_ASSERT(bond1Count == bond1CountRef);
+	CPPUNIT_ASSERT(bond2Count == bond2CountRef);
+	CPPUNIT_ASSERT(bond3Count == bond3CountRef);
+	CPPUNIT_ASSERT(bondaCount == bondaCountRef);
+	CPPUNIT_ASSERT(bondcCount == bondcCountRef);
+	CPPUNIT_ASSERT(bondgCount == bondgCountRef);
+	CPPUNIT_ASSERT(infoAtomCount == infoAtomCountRef);
+	CPPUNIT_ASSERT(infoChunkCount == infoChunkCountRef);
+	CPPUNIT_ASSERT(infoOpenGroupCount == infoOpenGroupCountRef);
+}
+
+
+void NanorexMMPImportExportRagelTest::charBufParseTest(void)
+{
+	charBufParseTestVanillin();
+}
+
+
+%%{
+	machine parse_tester;
+	include group "group.rl";
+	
+	mmpformat_line =
+		'mmpformat'  nonNEWLINEspace+
+		digit{6} nonNEWLINEspace+
+		'required' nonNEWLINEspace*
+		(   ';' nonNEWLINEspace+
+		    digit{6} nonNEWLINEspace+
+		    'preferred'
+		)?
+		nonNEWLINEspace*
+		EOL;
+	
+	kelvin_line =
+		'kelvin'
+		nonNEWLINEspace+
+		whole_number % { kelvinTemp = intVal; }
+	nonNEWLINEspace*
+		EOL;
+	
+	end_line = 'end' nonNEWLINEspace+;
+	
+	
+main := WHITESPACE*
+		mmpformat_line
+		WHITESPACE*
+		( kelvin_line
+		  WHITESPACE*
+		)?
+		group_view_data_stmt_begin_line
+		@ { /*cerr << "*p=" << *p << endl;*/ fhold; fcall group_scanner; }
+	WHITESPACE*
+		group_mol_struct_stmt_begin_line
+		@ { fhold; fcall group_scanner; }
+	WHITESPACE*
+		end1_line
+		WHITESPACE*
+		group_clipboard_stmt_begin_line
+		@ { fhold; fcall group_scanner; }
+	WHITESPACE*
+		end_line
+		any*
+		;
+	
+}%%
+
+
+void NanorexMMPImportExportRagelTest::charBufParseTestVanillin(void)
+{
+	char const *testInput =
+		"mmpformat 050502 required; 050706 preferred\n"
+		"kelvin 300\n"
+		"group (View Data)\n"
+		"info opengroup open = True\n"
+		"csys (HomeView) (1.000000, 0.000000, 0.000000, 0.000000) (10.000000) (0.000000, 0.000000, 0.000000) (1.000000)\n"
+		"csys (LastView) (0.593283, -0.047584, -0.587604, 0.548154) (5.950136) (2.701500, 2.159000, -0.854500) (1.000000)\n"
+		"egroup (View Data)\n"
+		"group (vanillin)\n"
+		"info opengroup open = True\n"
+		"mol (vanillin) def\n"
+		"atom 1 (6) (-1533, -113, -98) def\n"
+		"info atom atomtype = sp2\n"
+		"atom 2 (6) (-2142, -1287, -548) def\n"
+		"info atom atomtype = sp2\n"
+		"bonda 1\n"
+		"atom 3 (6) (-2600, -2232, 373) def\n"
+		"info atom atomtype = sp2\n"
+		"bonda 2\n"
+		"atom 4 (6) (-2448, -2004, 1742) def\n"
+		"info atom atomtype = sp2\n"
+		"bonda 3\n"
+		"atom 5 (6) (-1839, -830, 2191) def\n"
+		"info atom atomtype = sp2\n"
+		"bonda 4\n"
+		"atom 6 (6) (-1382, 116, 1271) def\n"
+		"info atom atomtype = sp2\n"
+		"bonda 5 1\n"
+		"atom 7 (1) (-1176, 625, -817) def\n"
+		"bond1 1\n"
+		"atom 8 (8) (-2304, -1532, -2019) def\n"
+		"bond1 2\n"
+		"atom 9 (8) (-3253, -3493, -110) def\n"
+		"bond1 3\n"
+		"atom 10 (1) (-2806, -2742, 2460) def\n"
+		"bond1 4\n"
+		"atom 11 (6) (-1673, -578, 3702) def\n"
+		"info atom atomtype = sp2\n"
+		"bond1 5\n"
+		"atom 12 (1) (-907, 1032, 1622) def\n"
+		"bond1 6\n"
+		"atom 13 (8) (-1099, 529, 4125) def\n"
+		"info atom atomtype = sp2\n"
+		"bond2 11\n"
+		"atom 14 (1) (-1960, -821, -2711) def\n"
+		"bond1 8\n"
+		"atom 15 (6) (-3745, -4509, 878) def\n"
+		"bond1 9\n"
+		"atom 16 (1) (-2029, -1316, 4420) def\n"
+		"bond1 11\n"
+		"atom 17 (1) (-4496, -4053, 1524) def\n"
+		"bond1 15\n"
+		"atom 18 (1) (-2910, -4860, 1484) def\n"
+		"bond1 15\n"
+		"atom 19 (1) (-4187, -5350, 345) def\n"
+		"bond1 15\n"
+		"egroup (vanillin)\n"
+		"end1\n"
+		"group (Clipboard)\n"
+		"info opengroup open = False\n"
+		"egroup (Clipboard)\n"
+		"end molecular machine part vanillin"
+		;
+	
+	charBufParseTestHelper(testInput);
+	CPPUNIT_ASSERT(groupNameStack.size()==0);
+	CPPUNIT_ASSERT(kelvinTemp == 300);
+	checkCounts(19, 1, 3, 3,
+	            12, 1, 0, 6, 0, 0,
+	            8, 0, 3);
+}
+
+void
+NanorexMMPImportExportRagelTest::charBufParseTestHelper(char const *const testInput)
+{
+	char const *p   = testInput;
+	char const *pe  = p + strlen(p);
+	char const *eof = 0;
+	char const *ts, *te;
+	int cs, stack[1024], top, act;
+	
+	%% machine parse_tester;
+	%% write data;
+	%% write init;
+	%% write exec;
+}
+
+
+void NanorexMMPImportExportRagelTest::fileParseTest(void)
+{
+	fileParseTestH2O();
+	fileParseTestHOOH();
+	fileParseTestChlorophyll();
+	fileParseTestVanillin();
+	fileParseTestNanocar();
+}
+
+
+
+void NanorexMMPImportExportRagelTest::fileParseTestH2O(void)
+{
+	ifstream infile("../src/Testing/MMP_TestFiles/H2O.mmp", ios::in);
+	if(infile) {
+		reset();
+		RagelIstreamPtr testInput(infile);
+		RagelIstreamPtr testInputEnd(infile, 0, ios::end);
+		fileParseTestHelper(testInput, testInputEnd);
+		CPPUNIT_ASSERT(groupNameStack.empty());
+		checkCounts(3, 1, 3, 3,
+		            2, 0, 0, 0, 0, 0,
+		            0, 0, 3);
+	}
+}
+
+
+void NanorexMMPImportExportRagelTest::fileParseTestHOOH(void)
+{
+	ifstream infile("../src/Testing/MMP_TestFiles/hydrogen_peroxide.mmp", ios::in);
+	if(infile) {
+		reset();
+		RagelIstreamPtr testInput(infile);
+		RagelIstreamPtr testInputEnd(infile, 0, ios::end);
+		fileParseTestHelper(testInput, testInputEnd);
+		CPPUNIT_ASSERT(groupNameStack.empty());
+		checkCounts(4, 1, 3, 3,
+		            3, 0, 0, 0, 0, 0,
+		            0, 0, 3);
+	}
+}
+
+
+void NanorexMMPImportExportRagelTest::fileParseTestChlorophyll(void)
+{
+	ifstream infile("../src/Testing/MMP_TestFiles/chlorophyll.mmp", ios::in);
+	if(infile) {
+		reset();
+		RagelIstreamPtr testInput(infile, 0, ios::beg);
+		RagelIstreamPtr testInputEnd(infile, 0, ios::end);
+		fileParseTestHelper(testInput, testInputEnd);
+		CPPUNIT_ASSERT(groupNameStack.empty());
+		checkCounts(133, 1, 3, 3,
+		            141, 0, 0, 0, 0, 0,
+		            0, 0, 3);
+	}
+}
+
+
+void NanorexMMPImportExportRagelTest::fileParseTestVanillin(void)
+{
+	ifstream infile("../src/Testing/MMP_TestFiles/vanillin.mmp", ios::in);
+	if(infile) {
+		reset();
+		RagelIstreamPtr testInput(infile, 0, ios::beg);
+		RagelIstreamPtr testInputEnd(infile, 0, ios::end);
+		fileParseTestHelper(testInput, testInputEnd);
+		CPPUNIT_ASSERT(groupNameStack.size()==0);
+		CPPUNIT_ASSERT(kelvinTemp == 300);
+		checkCounts(19, 1, 3, 3,
+		            12, 1, 0, 6, 0, 0,
+		            8, 0, 3);
+	}
+}
+
+
+void NanorexMMPImportExportRagelTest::fileParseTestNanocar(void)
+{
+	ifstream infile("../src/Testing/MMP_TestFiles/nanocar.mmp", ios::in);
+	if(infile) {
+		reset();
+		RagelIstreamPtr testInput(infile, 0, ios::beg);
+		RagelIstreamPtr testInputEnd(infile, 0, ios::end);
+		fileParseTestHelper(testInput, testInputEnd);
+		CPPUNIT_ASSERT(groupNameStack.size()==0);
+		CPPUNIT_ASSERT(kelvinTemp == 300);
+		checkCounts(462, 9, 3, 3,
+		            111, 0, 16, 72, 0, 425,
+		            394, 3, 3);
+	}
+}
+
+
+void
+NanorexMMPImportExportRagelTest::
+fileParseTestHelper(RagelIstreamPtr& p, RagelIstreamPtr& pe)
+{
+	RagelIstreamPtr eof(p);
+	RagelIstreamPtr ts, te;
+	int cs, stack[1024], top, act;
+	RagelIstreamPtr charStringWithSpaceStart, charStringWithSpaceStop;
+	RagelIstreamPtr lineStart;
+	
+	%% machine parse_tester;
+	%% write data;
+	%% write init;
+	%% write exec;
+}
+
+
diff --git a/cad/plugins/NanoVision-1/src/Plugins/NanorexMMPImportExport/NanorexMMPImportExportTest.cpp b/cad/plugins/NanoVision-1/src/Plugins/NanorexMMPImportExport/NanorexMMPImportExportTest.cpp
index 0a151eca9..657e10297 100644
--- a/cad/plugins/NanoVision-1/src/Plugins/NanorexMMPImportExport/NanorexMMPImportExportTest.cpp
+++ b/cad/plugins/NanoVision-1/src/Plugins/NanorexMMPImportExport/NanorexMMPImportExportTest.cpp
@@ -78,7 +78,8 @@ void NanorexMMPImportExportTest::HTest(void)
 	NXMoleculeSet molSet;
 	NXDataStoreInfo dataStoreInfo;
 	
-	importer.importFromFile(&molSet, &dataStoreInfo, "H.mmp", 0, 0);
+	importer.importFromFile(&molSet, &dataStoreInfo,
+	                        "../src/Testing/MMP_TestFiles/H.mmp", 0, 0);
 	
 	CPPUNIT_ASSERT(molSet.childCount() == 0);
 	CPPUNIT_ASSERT(molSet.moleculeCount() == 1);
@@ -94,7 +95,8 @@ void NanorexMMPImportExportTest::H2OTest(void)
 	NXMoleculeSet molSet;
 	NXDataStoreInfo dataStoreInfo;
 	
-	importer.importFromFile(&molSet, &dataStoreInfo, "H2O.mmp", 0, 0);
+	importer.importFromFile(&molSet, &dataStoreInfo,
+	                        "../src/Testing/MMP_TestFiles/H2O.mmp", 0, 0);
 	
 	CPPUNIT_ASSERT(molSet.childCount() == 0);
 	CPPUNIT_ASSERT(molSet.moleculeCount() == 1);
@@ -111,7 +113,8 @@ void NanorexMMPImportExportTest::H2O2Test(void)
 	NXDataStoreInfo dataStoreInfo;
 	
 	importer.importFromFile(&molSet, &dataStoreInfo,
-	                        "hydrogen_peroxide.mmp", 0, 0);
+	                        "../src/Testing/MMP_TestFiles/hydrogen_peroxide.mmp",
+	                        0, 0);
 	
 	CPPUNIT_ASSERT(molSet.childCount() == 0);
 	CPPUNIT_ASSERT(molSet.moleculeCount() == 1);
@@ -127,7 +130,8 @@ void NanorexMMPImportExportTest::chlorophyllTest(void)
 	NXMoleculeSet molSet;
 	NXDataStoreInfo dataStoreInfo;
 	
-	importer.importFromFile(&molSet, &dataStoreInfo, "chlorophyll.mmp", 0, 0);
+	importer.importFromFile(&molSet, &dataStoreInfo,
+	                        "../src/Testing/MMP_TestFiles/chlorophyll.mmp",0,0);
 	
 	CPPUNIT_ASSERT(molSet.childCount() == 0);
 	CPPUNIT_ASSERT(molSet.moleculeCount() == 1);
@@ -143,7 +147,8 @@ void NanorexMMPImportExportTest::vanillinTest(void)
 	NXMoleculeSet molSet;
 	NXDataStoreInfo dataStoreInfo;
 	
-	importer.importFromFile(&molSet, &dataStoreInfo, "vanillin.mmp", 0, 0);
+	importer.importFromFile(&molSet, &dataStoreInfo,
+	                        "../src/Testing/MMP_TestFiles/vanillin.mmp", 0, 0);
 	
 	CPPUNIT_ASSERT(molSet.childCount() == 0);
 	CPPUNIT_ASSERT(molSet.moleculeCount() == 1);
@@ -159,7 +164,8 @@ void NanorexMMPImportExportTest::nanocarTest(void)
 	NXMoleculeSet molSet;
 	NXDataStoreInfo dataStoreInfo;
 	
-	importer.importFromFile(&molSet, &dataStoreInfo, "nanocar.mmp", 0, 0);
+	importer.importFromFile(&molSet, &dataStoreInfo,
+	                        "../src/Testing/MMP_TestFiles/nanocar.mmp", 0, 0);
 	
 	CPPUNIT_ASSERT(molSet.childCount() == 0);
 	CPPUNIT_ASSERT(molSet.moleculeCount() == 5);
@@ -188,4 +194,72 @@ void NanorexMMPImportExportTest::nanocarTest(void)
 	NXMoleculeSet *clipboardGroup = dataStoreInfo.getClipboardStructure();
 	CPPUNIT_ASSERT(clipboardGroup->moleculeCount() == 4);
 	CPPUNIT_ASSERT(clipboardGroup->childCount() == 0);
+	
+	/// @todo test clipboard members
+}
+
+
+void NanorexMMPImportExportTest::benzeneTest(void)
+{
+	NanorexMMPImportExport importer;
+	NXMoleculeSet molSet;
+	NXDataStoreInfo dataStoreInfo;
+	
+	importer.importFromFile(&molSet, &dataStoreInfo,
+	                        "../src/Testing/MMP_TestFiles/benzene.mmp", 0, 0);
+	
+	CPPUNIT_ASSERT(molSet.childCount() == 0);
+	CPPUNIT_ASSERT(molSet.moleculeCount() == 1);
+	
+	int atomCount = 0;
+	OBAtomIterator atomIter;
+	OBMol *benzeneMol = *molSet.moleculesBegin();
+	OBAtom *atomPtr = NULL;
+	for(atomPtr = benzeneMol->BeginAtom(atomIter);
+	    atomPtr != NULL;
+	    atomPtr = benzeneMol->NextAtom(atomIter))
+	{
+		++atomCount;
+		int atomicNum = atomPtr->GetAtomicNum();
+		CPPUNIT_ASSERT_MESSAGE(("Atomic num " + NXUtility::itos(atomicNum) +
+		                        " found in Benzene molecule").c_str(),
+		                       atomicNum == 1 || atomicNum == 6);
+		if(atomicNum == 1) {
+			int bondCount = 0;
+			OBBondIterator bondIter;
+			OBAtom *nbrAtomPtr = NULL;
+			for(nbrAtomPtr = atomPtr->BeginNbrAtom(bondIter);
+			    nbrAtomPtr != NULL;
+			    nbrAtomPtr = atomPtr->NextNbrAtom(bondIter))
+			{
+				++bondCount;
+				CPPUNIT_ASSERT(nbrAtomPtr->GetAtomicNum() == 6);
+			}
+			CPPUNIT_ASSERT(bondCount == 1);
+		}
+		
+		else /*(atomicNum == 6)*/ {
+			int HBondCount = 0, CBondCount = 0;
+			OBBondIterator bondIter;
+			OBAtom *nbrAtomPtr = NULL;
+			for(nbrAtomPtr = atomPtr->BeginNbrAtom(bondIter);
+			    nbrAtomPtr != NULL;
+			    nbrAtomPtr = atomPtr->NextNbrAtom(bondIter))
+			{
+				int nbrAtomAtomicNum = nbrAtomPtr->GetAtomicNum();
+				CPPUNIT_ASSERT(nbrAtomAtomicNum == 6 ||
+				               nbrAtomAtomicNum == 1);
+				if(nbrAtomAtomicNum == 1)
+					++HBondCount;
+				else
+					++CBondCount;
+			}
+			CPPUNIT_ASSERT_MESSAGE("CBondCount = " + NXUtility::itos(CBondCount),
+			                       CBondCount == 2);
+			CPPUNIT_ASSERT_MESSAGE("HBondCount = " + NXUtility::itos(HBondCount),
+			                       HBondCount == 1);
+		}
+	}
+	CPPUNIT_ASSERT_MESSAGE("Benzene: atomCount = " + NXUtility::itos(atomCount),
+	                       atomCount == 12);
 }
diff --git a/cad/plugins/NanoVision-1/src/Plugins/NanorexMMPImportExport/NanorexMMPImportExportTest.h b/cad/plugins/NanoVision-1/src/Plugins/NanorexMMPImportExport/NanorexMMPImportExportTest.h
index c5146f1b2..bb324310a 100644
--- a/cad/plugins/NanoVision-1/src/Plugins/NanorexMMPImportExport/NanorexMMPImportExportTest.h
+++ b/cad/plugins/NanoVision-1/src/Plugins/NanorexMMPImportExport/NanorexMMPImportExportTest.h
@@ -16,13 +16,14 @@
 class NanorexMMPImportExportTest: public CPPUNIT_NS::TestFixture {
 	
 	CPPUNIT_TEST_SUITE(NanorexMMPImportExportTest);
-	CPPUNIT_TEST(atomHTest);
-	CPPUNIT_TEST(HTest);
-	CPPUNIT_TEST(H2OTest);
-	CPPUNIT_TEST(H2O2Test);
-	CPPUNIT_TEST(chlorophyllTest);
-	CPPUNIT_TEST(vanillinTest);
-	CPPUNIT_TEST(nanocarTest);
+// 	CPPUNIT_TEST(atomHTest);
+// 	CPPUNIT_TEST(HTest);
+// 	CPPUNIT_TEST(H2OTest);
+// 	CPPUNIT_TEST(H2O2Test);
+// 	CPPUNIT_TEST(chlorophyllTest);
+// 	CPPUNIT_TEST(vanillinTest);
+// 	CPPUNIT_TEST(nanocarTest);
+	CPPUNIT_TEST(benzeneTest);
 	CPPUNIT_TEST_SUITE_END();
 	
 public:
@@ -36,6 +37,7 @@ private:
 	void H2O2Test(void);
 	void chlorophyllTest(void);
 	void vanillinTest(void);
+	void benzeneTest(void);
 	void nanocarTest(void);
 };
 
diff --git a/cad/plugins/NanoVision-1/src/Plugins/NanorexMMPImportExport/NanorexMMPImportExportTest.rl b/cad/plugins/NanoVision-1/src/Plugins/NanorexMMPImportExport/NanorexMMPImportExportTest.rl
deleted file mode 100644
index 913a5ac52..000000000
--- a/cad/plugins/NanoVision-1/src/Plugins/NanorexMMPImportExport/NanorexMMPImportExportTest.rl
+++ /dev/null
@@ -1,1289 +0,0 @@
-// Copyright 2008 Nanorex, Inc.  See LICENSE file for details.
-
-#include "NanorexMMPImportExportTest.h"
-#include "Nanorex/Utility/NXUtility.h"
-#include <sstream>
-#include <cfloat>
-
-using namespace Nanorex;
-using namespace std;
-
-CPPUNIT_TEST_SUITE_REGISTRATION(NanorexMMPImportExportTest);
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(NanorexMMPImportExportTest,
-                                      "NanorexMMPImportExportTestSuite");
-
-#if defined(VERBOSE)
-#define CERR(s) \
-{ cerr << (NXUtility::itos(lineNum) + ": ") << s << endl; }
-#else
-#define CERR(S)
-#endif
-
-// -- member functions --
-
-void NanorexMMPImportExportTest::setUp(void)
-{
-}
-
-
-void NanorexMMPImportExportTest::tearDown(void)
-{
-}
-
-
-void NanorexMMPImportExportTest::reset(void)
-{
-	atomIds.clear();
-	atomicNums.clear();
-	atomLocs.clear();
-	atomStyles.clear();
-	atomProps.clear();
-	bonds.clear();
-	lineNum = 1;
-	
-	atomCount = 0;
-	molCount = 0;
-	groupCount = 0;
-	egroupCount = 0;
-	
-	infoAtomCount = 0;
-	infoChunkCount = 0;
-	infoOpenGroupCount = 0;
-	
-	bond1Count = 0;
-	bond2Count = 0;
-	bond3Count = 0;
-	bondaCount = 0;
-	bondcCount = 0;
-	bondgCount = 0;
-}
-
-
-void NanorexMMPImportExportTest::syntaxError(string const& errorMessage)
-{
-	cerr << lineNum << ": Syntax Error : " << errorMessage << endl;
-}
-
-
-void
-NanorexMMPImportExportTest::atomLineTestSetUp(vector<string>& testStrings,
-                                              vector<AtomTestInfo>& answers)
-{
-	testStrings.clear();
-	answers.clear();
-	
-	testStrings.push_back("atom 12  (10) (1,2,3) def\n");
-	answers.push_back(AtomTestInfo(12, 10, 1, 2, 3, "def"));
-
-	testStrings.push_back("atom    6   (99 ) ( 15632,-2,     -63  ) bas  \n");
-	answers.push_back(AtomTestInfo(6, 99, 15632, -2, -63, "bas"));
-
-	testStrings.push_back("atom 12  (10) (1,2,3) def  "
-	                      "# this one's got a comment \n");
-	answers.push_back(AtomTestInfo(12, 10, 1, 2, 3, "def"));
-	
-	testStrings.push_back("atom    6   (99 ) ( 15632,-2,     -63  ) bas"
-	                      "# comment where the '#' touches the style\n");
-	answers.push_back(AtomTestInfo(6, 99, 15632, -2, -63, "bas"));
-}
-
-
-void NanorexMMPImportExportTest::atomLineTest(void)
-{
-	vector<string> testStrings;
-	vector<AtomTestInfo> answers;
-	atomLineTestSetUp(testStrings, answers);
-	
-	for(int i = 0; i < (int) testStrings.size(); ++i) {
-		atomLineTestHelper(testStrings[i].c_str());
-		
-		CPPUNIT_ASSERT(atomIds.back() == answers[i].id);
-		CPPUNIT_ASSERT(atomicNums.back() = answers[i].atomicNum);
-		CPPUNIT_ASSERT(atomLocs.back().x == answers[i].pos.x);
-		CPPUNIT_ASSERT(atomLocs.back().y == answers[i].pos.y);
-		CPPUNIT_ASSERT(atomLocs.back().z == answers[i].pos.z);
-		// cerr << "style comparison: " << currentAtomStyle << " =?= " << answers[i].style << endl; 
-		CPPUNIT_ASSERT(atomStyles.back() == answers[i].style);
-	}
-	CPPUNIT_ASSERT(atomIds.size() == testStrings.size());
-	CPPUNIT_ASSERT(atomicNums.size() == testStrings.size());
-	CPPUNIT_ASSERT(atomLocs.size() == testStrings.size());
-	CPPUNIT_ASSERT(atomStyles.size() == testStrings.size());
-}
-
-
-%%{
-# ***** Ragel: atom declaration line test machine *****
-	machine atom_decl_line_test;
-	include utilities "utilities.rl";
-	include atom "atom.rl";
-	
-main := space** atom_decl_line
-		// @ { newAtom(atomId, atomicNum, x, y, z, atomStyle); }
-		$lerr { CPPUNIT_ASSERT_MESSAGE(false,
-		                               "Error encountered in atom_decl_line_test"
-		                               " state machine");
-		};
-	
-}%%
-
-
-void NanorexMMPImportExportTest::atomLineTestHelper(char const *const testInput)
-{
-	char const *p = testInput;
-	char const *pe = p + strlen(p);
-	char const *eof = NULL;
-	int cs;
-	
-	// cerr << "atomLineTestHelper (debug): *(pe-1) = (int) " << (int) *(pe-1) << endl;
-	
-	%% machine atom_decl_line_test;
-	%% write data;
-	%% write init;
-	%% write exec;
-}
-
-
-void NanorexMMPImportExportTest::newAtom(int atomId, int atomicNum,
-                                         int x, int y, int z,
-                                         std::string const& atomStyle)
-{
-	++atomCount;
-	CERR("atom " + NXUtility::itos(atomId) + " (" + NXUtility::itos(atomicNum)
-	     + ") (" + NXUtility::itos(x) + ',' + NXUtility::itos(y) + ',' +
-	     NXUtility::itos(z) + ") " + atomStyle);
-	atomIds.push_back(atomId);
-	atomicNums.push_back(atomicNum);
-	atomLocs.push_back(Position(x,y,z));
-	atomStyles.push_back(atomStyle);
-	
-	// properties
-	atomProps.push_back(map<string,string>());
-	bonds.push_back(map<string, vector<int> >());
-}
-
-
-
-void NanorexMMPImportExportTest::bondLineTest(void)
-{
-	char *testInput = NULL;
-	
-	reset();
-	bonds.push_back(map<string, vector<int> >());
-	
-	testInput = "bonda 1\n";
-	bondLineTestHelper(testInput);
-	CPPUNIT_ASSERT(bonds.back()["a"][0] == 1);
-	
-	testInput = "bondc 32    65535  \n";
-	bondLineTestHelper(testInput);
-	CPPUNIT_ASSERT(bonds.back()["c"][0] == 32);
-	CPPUNIT_ASSERT(bonds.back()["c"][1] == 65535);
-	
-	bonds.clear();
-}
-
-
-%%{
-# ***** Ragel: bond declaration line test machine *****
-	machine bond_line_test;
-	include utilities "utilities.rl";
-	include atom "atom.rl";
-	
-main := space** bond_line
-		$lerr { CPPUNIT_ASSERT_MESSAGE(false,
-		                               "Error encountered in bond_line_test "
-		                               "state machine");
-		};
-	
-}%%
-
-
-void NanorexMMPImportExportTest::bondLineTestHelper(char const *const testInput)
-{
-	char const *p   = testInput;
-	char const *pe  = p + strlen(p);
-	char const *eof = NULL;
-	int cs;
-	
-	%% machine bond_line_test;
-	%% write data;
-	%% write init;
-	%% write exec;
-}
-
-
-void NanorexMMPImportExportTest::newBond(std::string const& bondType,
-                                         int targetAtomId)
-{
-	if(bondType == "1")
-		++bond1Count;
-	else if(bondType == "2")
-		++bond2Count;
-	else if(bondType == "3")
-		++bond3Count;
-	else if(bondType == "a")
-		++bondaCount;
-	else if(bondType == "c")
-		++bondcCount;
-	else if(bondType == "g")
-		++bondgCount;
-	
-	CERR("bond" + bondType + " " + NXUtility::itos(targetAtomId));
-	// currentBondType = bondType;
-	// targetAtomIds.push_back(targetAtomId);
-	bonds.back()[bondType].push_back(targetAtomId);
-}
-
-
-void NanorexMMPImportExportTest::bondDirectionTest(void)
-{
-	char const *testInput = NULL;
-	
-	testInput = "bond_direction 10 12\n";
-	bondDirectionTestHelper(testInput);
-	CPPUNIT_ASSERT(bondDirectionStartId == 10);
-	CPPUNIT_ASSERT(bondDirectionStopId  == 12);
-	
-	testInput = "bond_direction    1000                 812  \n";
-	bondDirectionTestHelper(testInput);
-	CPPUNIT_ASSERT(bondDirectionStartId == 1000);
-	CPPUNIT_ASSERT(bondDirectionStopId  == 812);
-}
-
-
-%%{
-# ***** Ragel: bond_direction line test machine *****
-	machine bond_direction_line_test;
-	include utilities "utilities.rl";
-	include atom "atom.rl";
-	
-main := space** bond_direction_line
-		$lerr { CPPUNIT_ASSERT_MESSAGE(false,
-		                               "Error encountered in "
-		                               "bond_direction_line_test state machine");
-		};
-	
-}%%
-
-
-void
-NanorexMMPImportExportTest::bondDirectionTestHelper(char const *const testInput)
-{
-	char const *p   = testInput;
-	char const *pe  = p + strlen(p);
-	char const *eof = 0;
-	int cs;
-	
-	%% machine bond_direction_line_test;
-	%% write data;
-	%% write init;
-	%% write exec;
-}
-
-
-void NanorexMMPImportExportTest::newBondDirection(int atomId1, int atomId2)
-{
-	CERR("bond_direction " + NXUtility::itos(atomId1) + " " +
-	     NXUtility::itos(atomId2));
-	bondDirectionStartId = atomId1;
-	bondDirectionStopId = atomId2;
-}
-
-
-void NanorexMMPImportExportTest::infoAtomTest(void)
-{
-	char const *testInput = NULL;
-	atomProps.push_back(map<string,string>());
-	
-	testInput = "info atom hybridization = sp3\n";
-	infoAtomTestHelper(testInput);
-	CPPUNIT_ASSERT(atomProps.back()["hybridization"] == "sp3");
-	
-	// spaces
-	testInput = "info      atom     company      = Nanorex   \n";
-	infoAtomTestHelper(testInput);
-	CPPUNIT_ASSERT(atomProps.back()["company"] == "Nanorex");
-	
-	// spaces in keys and values
-	testInput = "info atom key with spaces     =  value with spaces\n";
-	infoAtomTestHelper(testInput);
-	// cerr << "infoAtomTest: COMPARING '" << infoAtomKeys.back() << "' and '"
-	// 	<< infoAtomValues.back() << "'" << endl;
-	CPPUNIT_ASSERT(atomProps.back()["key with spaces"] == "value with spaces");
-	
-	testInput =	"   info  atom "
-		"spaces at the beginning   =    and spaces at    the end     \n";
-	infoAtomTestHelper(testInput);
-	CPPUNIT_ASSERT(atomProps.back()["spaces at the beginning"] ==
-	               "and spaces at    the end");
-	
-	atomProps.clear();
-}
-
-
-%%{
-# ***** Ragel: info_atom_line test machine *****
-	machine info_atom_line_test;
-	include utilities "utilities.rl";
-	include atom "atom.rl";
-	
-main := space**
-		info_atom_line
-		$lerr { CPPUNIT_ASSERT_MESSAGE(false,
-		                               "Error encountered in "
-		                               "info_atom_line_test state machine");
-		};
-	
-}%%
-
-
-void NanorexMMPImportExportTest::infoAtomTestHelper(char const *const testInput)
-{
-	char const *p   = testInput;
-	char const *pe  = p + strlen(p);
-	char const *eof = NULL;
-	int cs;
-	
-	%% machine info_atom_line_test;
-	%% write data;
-	%% write init;
-	%% write exec;
-}
-
-
-void NanorexMMPImportExportTest::newAtomInfo(std::string const& key,
-                                             std::string const& value)
-{
-	++infoAtomCount;
-	// string key1 = key;
-	// stripTrailingWhiteSpaces(key1);
-	// string value1 = value;
-	// stripTrailingWhiteSpaces(value1);
-	CERR("info atom '" + key + "' = '" + value + "'");
-	// infoAtomKeys.push_back(key);
-	// infoAtomValues.push_back(value);
-	atomProps.back().insert(make_pair(key, value));
-}
-
-
-void NanorexMMPImportExportTest::atomStmtTest(void)
-{
-	reset();
-	
-	char const *testInput = NULL;
-	
-	// cerr << "Performing atom_stmt test" << endl;
-	
-	testInput =
-		"atom 15 (6)  (50, -50, 600) style with spaces  \n"
-		"\n"
-		"\n"
-		"info atom atomtype   =  sp3\n"
-		"bonda 2 \n"
-		"\n"
-		"bond1 4 6 7\n";
-	atomStmtTestHelper(testInput);
-	
-	CPPUNIT_ASSERT(atomIds.size() == 1);
-	CPPUNIT_ASSERT(atomIds.back() == 15);
-	CPPUNIT_ASSERT(atomicNums.back() == 6);
-	CPPUNIT_ASSERT(atomLocs.back() == Position(50, -50, 600));
-	CPPUNIT_ASSERT(atomStyles.back() == "style with spaces");
-	CPPUNIT_ASSERT(atomProps.back()["atomtype"] == "sp3");
-	CPPUNIT_ASSERT(bonds.back()["a"][0] == 2);
-	CPPUNIT_ASSERT(bonds.back()["1"][0] == 4);
-	CPPUNIT_ASSERT(bonds.back()["1"][1] == 6);
-	CPPUNIT_ASSERT(bonds.back()["1"][2] == 7);
-}
-
-
-%%{
-# ***** Ragel: atom_stmt test machine *****
-	machine atom_stmt_test;
-	include utilities "utilities.rl";
-	include atom "atom.rl";
-	
-main := WHITESPACE* atom_decl_line
-		// %{newAtom(atomId, atomicNum, x, y, z, atomStyle);}
-		(WHITESPACE*  (atom_decl_line | atom_attrib_line))*
-		$lerr { CPPUNIT_ASSERT_MESSAGE(false,
-		                               "Error encountered in "
-		                               "atom_stmt_test state machine");
-		};
-	
-}%%
-
-
-void NanorexMMPImportExportTest::atomStmtTestHelper(char const *const testInput)
-{
-	char const *p   = testInput;
-	char const *pe  = p + strlen(p);
-	char const *eof = 0;
-	int cs;
-	
-	%% machine atom_stmt_test;
-	%% write data;
-	%% write init;
-	%% write exec;
-}
-
-
-void NanorexMMPImportExportTest::multipleAtomStmtTest(void)
-{
-	reset();
-	
-	char const *testInput = NULL;
-	
-	// cerr << "Performing atom_stmt test" << endl;
-	// #if 0
-	testInput = "";
-	multipleAtomStmtTestHelper(testInput);
-	CPPUNIT_ASSERT(atomIds.size() == 0);
-	CPPUNIT_ASSERT(atomicNums.size() == 0);
-	
-	testInput = "\n";
-	multipleAtomStmtTestHelper(testInput);
-	CPPUNIT_ASSERT(atomIds.size() == 0);
-	CPPUNIT_ASSERT(atomicNums.size() == 0);
-	
-	testInput =
-		"\n"
-		"   \t  \n";
-	multipleAtomStmtTestHelper(testInput);
-	CPPUNIT_ASSERT(atomIds.size() == 0);
-	CPPUNIT_ASSERT(atomicNums.size() == 0);
-	
-	// single line
-	lineNum = 1;
-	testInput =
-		"atom 15 (6)  (50, -50, 600) style with spaces  \n"
-		"info atom atomtype   =  sp3\n"
-		"bonda 2 \n"
-		"\n"
-		"bond1 4 6 7\n"
-		"\n";
-	
-	multipleAtomStmtTestHelper(testInput);
-	
-	CPPUNIT_ASSERT(atomIds.size() == 1);
-	CPPUNIT_ASSERT(atomIds.back() == 15);
-	CPPUNIT_ASSERT(atomicNums.back() == 6);
-	CPPUNIT_ASSERT(atomLocs.back() == Position(50, -50, 600));
-	CPPUNIT_ASSERT(atomStyles.back() == "style with spaces");
-	CPPUNIT_ASSERT(atomProps.back()["atomtype"] == "sp3");
-	CPPUNIT_ASSERT(bonds.back()["a"][0] == 2);
-	CPPUNIT_ASSERT(bonds.back()["1"][0] == 4);
-	CPPUNIT_ASSERT(bonds.back()["1"][1] == 6);
-	CPPUNIT_ASSERT(bonds.back()["1"][2] == 7);
-	// #endif
-	
-	// two lines
-	lineNum = 1;
-	testInput =
-		"atom 1 (9) (-2, 4, 1000) custom style  \n"
-		" \n"
-		"\t\n"
-		"atom  3  (  87 )  ( -10  ,-2,  32)  ball and stick\n"
-		"\n"
-		"\t\n"
-		"bond1 \t1 2\n"
-		"\n"
-		"atom 4 (6\t) (0,0,0) def\n"
-		"bondg \t1 22 333\n"
-		"\n"
-		"bondc 33   2 \n"
-		"\n"
-		;
-	
-	multipleAtomStmtTestHelper(testInput);
-	
-	// include contribs from previous test - data structures haven't been cleared
-	CPPUNIT_ASSERT(atomIds.size() == 4);
-	CPPUNIT_ASSERT(atomicNums.size() == 4);
-	CPPUNIT_ASSERT(atomLocs.size() == 4);
-	CPPUNIT_ASSERT(atomProps.size() == 4);
-	CPPUNIT_ASSERT(bonds.size() == 4);
-	
-	CPPUNIT_ASSERT(atomIds[1] == 1);
-	CPPUNIT_ASSERT(atomicNums[1] == 9);
-	CPPUNIT_ASSERT(atomLocs[1] == Position(-2, 4, 1000));
-	CPPUNIT_ASSERT(atomStyles[1] == "custom style");
-	CPPUNIT_ASSERT(bonds[1].size() == 0);
-	
-	CPPUNIT_ASSERT(atomIds[2] == 3);
-	CPPUNIT_ASSERT(atomicNums[2] == 87);
-	CPPUNIT_ASSERT(atomLocs[2] == Position(-10, -2, 32));
-	CPPUNIT_ASSERT(atomStyles[2] == "ball and stick");
-	CPPUNIT_ASSERT(bonds[2].size() == 1);
-	
-	CPPUNIT_ASSERT(atomIds[3] == 4);
-	CPPUNIT_ASSERT(atomicNums[3] == 6);
-	CPPUNIT_ASSERT(bonds[3].size() == 2);
-	CPPUNIT_ASSERT(bonds[3]["g"].size() == 3);
-	CPPUNIT_ASSERT(bonds[3]["g"][0] == 1);
-	CPPUNIT_ASSERT(bonds[3]["g"][1] == 22);
-	CPPUNIT_ASSERT(bonds[3]["g"][2] == 333);
-	CPPUNIT_ASSERT(bonds[3]["c"].size() == 2);
-	CPPUNIT_ASSERT(bonds[3]["c"][0] == 33);
-	CPPUNIT_ASSERT(bonds[3]["c"][1] == 2);
-	
-}
-
-
-%%{
-# ***** Ragel: atom_stmt test machine (zero or more lines) *****
-	machine multiple_atom_stmt_test;
-	include utilities "utilities.rl";
-	include atom "atom.rl";
-	
-atom_stmt := |*
-#EOL => { cerr << "EOL, p = " << p << endl; };
-		WHITESPACE* atom_decl_line;
-		WHITESPACE* bond_line;
-		WHITESPACE* bond_direction_line;
-		WHITESPACE* info_atom_line;
-		WHITESPACE* 0 => {fret;};
-	*|;
-	
-main := (WHITESPACE** atom_decl_line
-         @ { //newAtom(atomId, atomicNum, x, y, z, atomStyle);
-			// cerr << "calling, p = " << p << endl;
-	         fcall atom_stmt;})*
-		$lerr { CPPUNIT_ASSERT_MESSAGE(false,
-		                               "Error encountered in "
-		                               "multiple_atom_stmt_test state machine");
-			
-		};
-	
-}%%
-
-
-void
-NanorexMMPImportExportTest::
-multipleAtomStmtTestHelper(char const *const testInput)
-{
-	char const *p   = testInput;
-	char const *pe  = p + strlen(p);
-	char const *eof = 0;
-	int cs;
-	
-	char const *ts, *te;
-	int top, act, stack[1024];
-	
-	%% machine multiple_atom_stmt_test;
-	%% write data;
-	%% write init;
-	%% write exec;
-}
-
-
-void NanorexMMPImportExportTest::molLineTest(void)
-{
-	char const *testInput = NULL;
-	
-	testInput = "mol (Nanorex1) style1\n";
-	molLineTestHelper(testInput);
-	CPPUNIT_ASSERT(currentMolName == "Nanorex1");
-	CPPUNIT_ASSERT(currentMolStyle == "style1");
-	
-	// spaces and tabs
-	testInput =
-		"   mol (  Nanorex2  )   style with   lotsa         spaces"
-		"\tand \t\ttabs  \n";
-	molLineTestHelper(testInput);
-	CPPUNIT_ASSERT(currentMolName == "Nanorex2");
-	CPPUNIT_ASSERT(currentMolStyle ==
-	               "style with   lotsa         spaces\tand \t\ttabs");
-	
-	// mol names with spaces
-	testInput = "mol ( name with spaces and\ttabs\t) style\t3 \n";
-	molLineTestHelper(testInput);
-	CPPUNIT_ASSERT(currentMolName == "name with spaces and\ttabs");
-	CPPUNIT_ASSERT(currentMolStyle == "style\t3");
-	
-	// no mol style which should default to "def"
-	testInput = "mol (Untitled)\n";
-	molLineTestHelper(testInput);
-	CPPUNIT_ASSERT(currentMolName == "Untitled");
-	CPPUNIT_ASSERT(currentMolStyle == "def");
-	
-}
-
-
-%%{
-	machine mol_decl_line_test;
-	include utilities "utilities.rl";
-	include molecule "molecule.rl";
-	
-main := mol_decl_line
-		$lerr { CPPUNIT_ASSERT_MESSAGE(false,
-		                               "Error encountered in "
-		                               "multiple_atom_stmt_test state machine");
-		};
-}%%
-
-
-void NanorexMMPImportExportTest::molLineTestHelper(char const *const testInput)
-{
-	char const *p   = testInput;
-	char const *pe  = p + strlen(p);
-	char const *eof = 0;
-	int cs;
-	
-	%% machine mol_decl_line_test;
-	%% write data;
-	%% write init;
-	%% write exec;
-}
-
-
-void
-NanorexMMPImportExportTest::newMolecule(string const& name, string const& style)
-{
-	++molCount;
-	currentMolName = name;
-	currentMolStyle = style;
-	CERR("mol (" + name + ") " + style);
-}
-
-
-void
-NanorexMMPImportExportTest::newChunkInfo(string const& key,
-                                         string const& value)
-{
-	++infoChunkCount;
-	CERR("info chunk " << key << " = " << value);
-	/// @todo
-}
-
-
-void NanorexMMPImportExportTest::groupLineTest(void)
-{
-	// clear group-name stack
-	while(!groupNameStack.empty())
-		groupNameStack.pop_back();
-	
-	char const *testInput = NULL;
-	
-	// #if 0
-	testInput = "group (FirstGroup) #FirstGroupStyle\n";
-	groupLineTestHelper(testInput);
-	CPPUNIT_ASSERT(groupNameStack.size() == 1);
-	CPPUNIT_ASSERT(groupNameStack.back() == "FirstGroup");
-	// CPPUNIT_ASSERT(currentGroupStyle == "FirstGroupStyle");
-	
-	testInput = "group ( Group name with spaces   ) \n";
-	groupLineTestHelper(testInput);
-	CPPUNIT_ASSERT(groupNameStack.size() == 2);
-	CPPUNIT_ASSERT(groupNameStack.back() == "Group name with spaces");
-	// CPPUNIT_ASSERT(currentGroupStyle == "Group s\ttyle with spaces");
-	
-	testInput = "group ( Group that has a name but no style)   \n";
-	groupLineTestHelper(testInput);
-	CPPUNIT_ASSERT(groupNameStack.size() == 3);
-	// CPPUNIT_ASSERT(groupNameStack.back() == "Group that has a name but no style");
-	// #endif
-	
-	testInput = "group   \t  (View \t  Data\t)\n";
-	// testInput = "group   \t  (\tClipboard\t)\n";
-	groupLineTestHelper(testInput);
-	CPPUNIT_ASSERT(groupNameStack.size() == 4);
-	CPPUNIT_ASSERT(groupNameStack.back() == "View Data");
-	
-	testInput = "egroup (View   Data\t)\n";
-	groupLineTestHelper(testInput);
-	CPPUNIT_ASSERT(currentGroupName == "View Data");
-	CPPUNIT_ASSERT(groupNameStack.size() == 3);
-	
-	testInput = "\tegroup\t\n";
-	groupLineTestHelper(testInput);
-	CPPUNIT_ASSERT(currentGroupName == "Group that has a name but no style");
-	CPPUNIT_ASSERT(groupNameStack.size() == 2);
-	
-	testInput = "   egroup   (  mismatched group------name_)  \n";
-	groupLineTestHelper(testInput);
-	CPPUNIT_ASSERT(groupNameStack.size() == 1);
-	
-	testInput = "egroup  ( FirstGroup   \t ) \t\t\n";
-	groupLineTestHelper(testInput);
-	CPPUNIT_ASSERT(currentGroupName == "FirstGroup");
-	CPPUNIT_ASSERT(groupNameStack.empty());
-	
-	// Set of statements one after another
-	lineNum = 0;
-	testInput =
-		"group (group 1)\n"
-		"group (group 1_1) #def\n"
-		"egroup (group 1_1)\n"
-		"group (amines)\n"
-		"group (histamines) def\n"
-		"group ( histhistamines\t) \t#def\t\n"
-		"egroup\n"
-		"group (histhistamines siblings)\n"
-		"egroup (histhistamines siblings)\n"
-		"egroup (Ok so I have lost track of which group  )  \n"
-		"egroup (gotcha now I am ending amines) \n"
-		"egroup (This closes the top-level duh)\n"
-		"\n";
-	groupLineTestHelper(testInput);
-	CPPUNIT_ASSERT(groupNameStack.empty());
-}
-
-
-%%{
-# ***** Ragel: group lines test machine *****
-	
-	machine group_lines_test;
-#include utilities "utilities.rl";
-	include group "group.rl";
-	
-mini_group_scanner :=
-		|*
-		WHITESPACE* egroup_line;
-	WHITESPACE* group_view_data_stmt_begin_line @(group,2) => {/*cerr << "view_data begin, p = '" << p << "' [" << strlen(p) << ']' << endl;*/};
-	WHITESPACE* group_clipboard_stmt_begin_line @(group,2) => {/*cerr << "clipboard begin, p = '" << p << "' [" << strlen(p) << ']' << endl;*/};
-	WHITESPACE* group_mol_struct_stmt_begin_line @(group,1) => {/*cerr << "mol_struct begin, p = '" << p << "' [" << strlen(p) << ']' << endl;*/};
-	
-#WHITESPACE* group_view_data_stmt_end_line @(group,2) => {/*cerr << "view_data end, p = '" << p << "' [" << strlen(p) << ']' << endl;*/};
-#WHITESPACE* group_clipboard_stmt_end_line @(group,2) => {/*cerr << "clipboard end, p = '" << p << "' [" << strlen(p) << ']' << endl;*/};
-#WHITESPACE* group_mol_struct_stmt_end_line @(group,1) => {/*cerr << "mol_struct end, p = '" << p << "' [" << strlen(p) << ']' << endl;*/};
-	
-	WHITESPACE* IGNORED_LINE => {/*cerr << "Ignored line, p = " << p << endl;*/};
-	*|;
-	
-main := any* >{ /*cerr << "scanner call: p = " << p << endl;*/ fhold; fcall mini_group_scanner; };
-	
-}%%
-
-
-void
-NanorexMMPImportExportTest::groupLineTestHelper(char const *const testInput)
-{
-	char const *p   = testInput;
-	char const *pe  = p + strlen(p);
-	char const *eof = 0;
-	char const *ts, *te;
-	int cs, stack[128], top, act;
-	
-	%% machine group_lines_test;
-	%% write data;
-	%% write init;
-	%% write exec;
-}
-
-
-void NanorexMMPImportExportTest::newViewDataGroup(void)
-{
-	++groupCount;
-	CERR("group (View Data)");
-	currentGroupName = "View Data";
-	groupNameStack.push_back(currentGroupName);
-}
-
-#if 0
-void NanorexMMPImportExportTest::endViewDataGroup(void)
-{
-	cerr << lineNum << ": endgroup (View Data)" << endl;
-	currentGroupName = groupNameStack.back();
-	groupNameStack.pop_back();
-}
-#endif
-
-void
-NanorexMMPImportExportTest::newMolStructGroup(std::string const& name)
-{
-	++groupCount;
-	CERR("group (" + name + ") ");
-	currentGroupName = name;
-	groupNameStack.push_back(currentGroupName);
-}
-
-#if 0
-void NanorexMMPImportExportTest::endMolStructGroup(std::string const& name)
-{
-	// comparing for errors should be done by parser application
-	// here we are only testing to see if the tokens are being recognized
-	cerr << lineNum << ": endgroup (" << name << ")  "
-		<< "[stack-top = " << groupNameStack.back() << ']' << endl;
-	currentGroupName = groupNameStack.back();
-	groupNameStack.pop_back();
-}
-#endif
-
-void NanorexMMPImportExportTest::newClipboardGroup(void)
-{
-	++groupCount;
-	CERR("group (Clipboard)");
-	currentGroupName = "Clipboard";
-	groupNameStack.push_back(currentGroupName);
-}
-
-
-#if 0
-void NanorexMMPImportExportTest::endClipboardGroup(void)
-{
-	cerr << lineNum << ": endgroup (Clipboard)" << endl;
-	currentGroupName = groupNameStack.back();
-	groupNameStack.pop_back();
-}
-#endif
-
-
-void NanorexMMPImportExportTest::endGroup(string const& name)
-{
-	++egroupCount;
-	// comparing for errors should be done by parser application
-	// here we are only testing to see if the tokens are being recognized
-	CERR("egroup (" + name + ")  " + "[stack-top = " + groupNameStack.back()
-	     + ']');
-	currentGroupName = groupNameStack.back();
-	groupNameStack.pop_back();
-}
-
-
-void
-NanorexMMPImportExportTest::newOpenGroupInfo(string const& key,
-                                             string const& value)
-{
-	++infoOpenGroupCount;
-	CERR("info opengroup " + key + " = " + value);
-	/// @todo
-}
-
-
-void NanorexMMPImportExportTest::end1(void)
-{
-	CERR("end1");
-}
-
-
-void NanorexMMPImportExportTest::uncheckedParseTest(void)
-{
-	char const *testInput = NULL;
-	
-	reset();
-	
-	testInput =
-		"group (View Data)\n"
-		"csys <coordinate-system-info>\n"
-		"egroup (View\tData) # comment to make life tough \n"
-		"group (nitrogen compounds)\n"
-		"mol (ammonia) no molecule style \n"
-		"atom 1 (1) (1,1,1) def\n"
-		"atom 2 (7) (0,0,0) bas\n"
-		"bond1 1\n"
-		"atom 3 (1) (1,1,-1) cpk\n"
-		"bond1 2\n"
-		"atom 4 (1) (-1,1,1) lin\n"
-		"bond1 2\n"
-		"egroup\n"
-		"  end1  \n"
-		"group (Clipboard)  \n"
-		"<clipboard statements to be ignored>\n"
-		"<more statements to be ignored>\n"
-		"egroup\n"
-		"end  \n"
-		" <this line should be ignored>"
-		;
-	
-	uncheckedParseTestHelper(testInput);
-	CPPUNIT_ASSERT(groupNameStack.size() == 0);
-	CPPUNIT_ASSERT(currentMolName == "ammonia");
-	CPPUNIT_ASSERT(currentMolStyle == "no molecule style");
-}
-
-
-%%{
-	machine unchecked_parse_test;
-	include group "group.rl";
-	
-main := WHITESPACE*
-		group_view_data_stmt_begin_line
-			@ { /*cerr << "*p=" << *p << endl;*/ fhold; fcall group_scanner; }
-		WHITESPACE*
-		group_mol_struct_stmt_begin_line
-			@ { fhold; fcall group_scanner; }
-		WHITESPACE*
-		end1_line
-		WHITESPACE*
-		group_clipboard_stmt_begin_line
-			@ { fhold; fcall group_scanner; }
-		any*
-		;
-}%%
-
-
-void
-NanorexMMPImportExportTest::uncheckedParseTestHelper(char const *const testInput)
-{
-	char const *p   = testInput;
-	char const *pe  = p + strlen(p);
-	char const *eof = 0;
-	char const *ts, *te;
-	int cs, stack[128], top, act;
-	
-	%% machine unchecked_parse_test;
-	%% write data;
-	%% write init;
-	%% write exec;
-}
-
-
-/// Test the checked pattern matchers to see if local error actions introduced
-/// interfere with the regular functioning
-void NanorexMMPImportExportTest::checkedParseTest(void)
-{
-	char const *testInput = NULL;
-	
-	reset();
-	
-	testInput =
-		"group (View Data)\n"
-		"#csys <coordinate-system-info>\n"
-		"egroup (View\tData) # comment to make life tough \n"
-		"group (nitrogen compounds)\n"
-		"mol (ammonia) no molecule style \n"
-		"atom 1 (1) (1,1,1) def\n"
-		"atom 2 (7) (0,0,0) bas\n"
-		"bond1 1\n"
-		"atom 3 (1) (1,1,-1) cpk\n"
-		"bond1 2\n"
-		"atom 4 (1) (-1,1,1) lin\n"
-		"bond1 2\n"
-		"egroup\n"
-		"  end1  \n"
-		"group (Clipboard)  \n"
-		"<clipboard statements to be ignored>\n"
-		"<more statements to be ignored>\n"
-		"egroup\n"
-		"end  \n"
-		" <this line should be ignored>"
-		;
-	
-	checkedParseTestHelper(testInput);
-	CPPUNIT_ASSERT(groupNameStack.size() == 0);
-	CPPUNIT_ASSERT(currentMolName == "ammonia");
-	CPPUNIT_ASSERT(currentMolStyle == "no molecule style");
-}
-
-
-%%{
-	machine checked_parse_test;
-	include checked_group "checked_group.rl";
-	
-main := WHITESPACE**
-		checked_group_view_data_stmt_begin_line
-		@ { cerr << "*p=" << *p << endl;
-			fhold;
-			fcall checked_group_scanner;
-		}
-		WHITESPACE**
-		checked_group_mol_struct_stmt_begin_line
-		@ { fhold; fcall checked_group_scanner; }
-		WHITESPACE**
-		checked_end1_line
-		WHITESPACE**
-		checked_group_clipboard_stmt_begin_line
-		@ { fhold; fcall checked_group_scanner; }
-	any*
-		;
-}%%
-
-
-void
-NanorexMMPImportExportTest::checkedParseTestHelper(char const *const testInput)
-{
-	char const *p   = testInput;
-	char const *pe  = p + strlen(p);
-	char const *eof = 0;
-	char const *ts, *te;
-	int cs, stack[128], top, act;
-	
-	%% machine checked_parse_test;
-	%% write data;
-	%% write init;
-	%% write exec;
-}
-
-
-void
-NanorexMMPImportExportTest::
-checkCounts(int atomCountRef, int molCountRef,
-            int groupCountRef, int egroupCountRef,
-            int bond1CountRef, int bond2CountRef, int bond3CountRef,
-            int bondaCountRef, int bondcCountRef, int bondgCountRef,
-            int infoAtomCountRef, int infoChunkCountRef,
-            int infoOpenGroupCountRef)
-{
-	CPPUNIT_ASSERT(atomCount == atomCountRef);
-	CPPUNIT_ASSERT(molCount == molCountRef);
-	CPPUNIT_ASSERT(groupCount == groupCountRef);
-	CPPUNIT_ASSERT(egroupCount == egroupCountRef);
-	CPPUNIT_ASSERT(bond1Count == bond1CountRef);
-	CPPUNIT_ASSERT(bond2Count == bond2CountRef);
-	CPPUNIT_ASSERT(bond3Count == bond3CountRef);
-	CPPUNIT_ASSERT(bondaCount == bondaCountRef);
-	CPPUNIT_ASSERT(bondcCount == bondcCountRef);
-	CPPUNIT_ASSERT(bondgCount == bondgCountRef);
-	CPPUNIT_ASSERT(infoAtomCount == infoAtomCountRef);
-	CPPUNIT_ASSERT(infoChunkCount == infoChunkCountRef);
-	CPPUNIT_ASSERT(infoOpenGroupCount == infoOpenGroupCountRef);
-}
-
-
-void NanorexMMPImportExportTest::charBufParseTest(void)
-{
-	charBufParseTestVanillin();
-}
-
-
-%%{
-	machine parse_tester;
-	include group "group.rl";
-	
-	mmpformat_line =
-		'mmpformat'  nonNEWLINEspace+
-		digit{6} nonNEWLINEspace+
-		'required' nonNEWLINEspace*
-		(   ';' nonNEWLINEspace+
-		    digit{6} nonNEWLINEspace+
-		    'preferred'
-		)?
-		nonNEWLINEspace*
-		EOL;
-	
-	kelvin_line =
-		'kelvin'
-		nonNEWLINEspace+
-		whole_number % { kelvinTemp = intVal; }
-		nonNEWLINEspace*
-		EOL;
-	
-	end_line = 'end' nonNEWLINEspace+;
-	
-	
-main := WHITESPACE*
-		mmpformat_line
-		WHITESPACE*
-		( kelvin_line
-		  WHITESPACE*
-		)?
-		group_view_data_stmt_begin_line
-		@ { /*cerr << "*p=" << *p << endl;*/ fhold; fcall group_scanner; }
-		WHITESPACE*
-		group_mol_struct_stmt_begin_line
-		@ { fhold; fcall group_scanner; }
-		WHITESPACE*
-		end1_line
-		WHITESPACE*
-		group_clipboard_stmt_begin_line
-		@ { fhold; fcall group_scanner; }
-		WHITESPACE*
-		end_line
-		any*
-		;
-	
-}%%
-
-
-void NanorexMMPImportExportTest::charBufParseTestVanillin(void)
-{
-	char const *testInput =
-		"mmpformat 050502 required; 050706 preferred\n"
-		"kelvin 300\n"
-		"group (View Data)\n"
-		"info opengroup open = True\n"
-		"csys (HomeView) (1.000000, 0.000000, 0.000000, 0.000000) (10.000000) (0.000000, 0.000000, 0.000000) (1.000000)\n"
-		"csys (LastView) (0.593283, -0.047584, -0.587604, 0.548154) (5.950136) (2.701500, 2.159000, -0.854500) (1.000000)\n"
-		"egroup (View Data)\n"
-		"group (vanillin)\n"
-		"info opengroup open = True\n"
-		"mol (vanillin) def\n"
-		"atom 1 (6) (-1533, -113, -98) def\n"
-		"info atom atomtype = sp2\n"
-		"atom 2 (6) (-2142, -1287, -548) def\n"
-		"info atom atomtype = sp2\n"
-		"bonda 1\n"
-		"atom 3 (6) (-2600, -2232, 373) def\n"
-		"info atom atomtype = sp2\n"
-		"bonda 2\n"
-		"atom 4 (6) (-2448, -2004, 1742) def\n"
-		"info atom atomtype = sp2\n"
-		"bonda 3\n"
-		"atom 5 (6) (-1839, -830, 2191) def\n"
-		"info atom atomtype = sp2\n"
-		"bonda 4\n"
-		"atom 6 (6) (-1382, 116, 1271) def\n"
-		"info atom atomtype = sp2\n"
-		"bonda 5 1\n"
-		"atom 7 (1) (-1176, 625, -817) def\n"
-		"bond1 1\n"
-		"atom 8 (8) (-2304, -1532, -2019) def\n"
-		"bond1 2\n"
-		"atom 9 (8) (-3253, -3493, -110) def\n"
-		"bond1 3\n"
-		"atom 10 (1) (-2806, -2742, 2460) def\n"
-		"bond1 4\n"
-		"atom 11 (6) (-1673, -578, 3702) def\n"
-		"info atom atomtype = sp2\n"
-		"bond1 5\n"
-		"atom 12 (1) (-907, 1032, 1622) def\n"
-		"bond1 6\n"
-		"atom 13 (8) (-1099, 529, 4125) def\n"
-		"info atom atomtype = sp2\n"
-		"bond2 11\n"
-		"atom 14 (1) (-1960, -821, -2711) def\n"
-		"bond1 8\n"
-		"atom 15 (6) (-3745, -4509, 878) def\n"
-		"bond1 9\n"
-		"atom 16 (1) (-2029, -1316, 4420) def\n"
-		"bond1 11\n"
-		"atom 17 (1) (-4496, -4053, 1524) def\n"
-		"bond1 15\n"
-		"atom 18 (1) (-2910, -4860, 1484) def\n"
-		"bond1 15\n"
-		"atom 19 (1) (-4187, -5350, 345) def\n"
-		"bond1 15\n"
-		"egroup (vanillin)\n"
-		"end1\n"
-		"group (Clipboard)\n"
-		"info opengroup open = False\n"
-		"egroup (Clipboard)\n"
-		"end molecular machine part vanillin"
-		;
-	
-	charBufParseTestHelper(testInput);
-	CPPUNIT_ASSERT(groupNameStack.size()==0);
-	CPPUNIT_ASSERT(kelvinTemp == 300);
-	checkCounts(19, 1, 3, 3,
-	            12, 1, 0, 6, 0, 0,
-	            8, 0, 3);
-}
-
-void
-NanorexMMPImportExportTest::charBufParseTestHelper(char const *const testInput)
-{
-	char const *p   = testInput;
-	char const *pe  = p + strlen(p);
-	char const *eof = 0;
-	char const *ts, *te;
-	int cs, stack[1024], top, act;
-	
-	%% machine parse_tester;
-	%% write data;
-	%% write init;
-	%% write exec;
-}
-
-
-void NanorexMMPImportExportTest::fileParseTest(void)
-{
-	fileParseTestH2O();
-	fileParseTestHOOH();
-	fileParseTestChlorophyll();
-	fileParseTestVanillin();
-	fileParseTestNanocar();
-}
-
-
-
-void NanorexMMPImportExportTest::fileParseTestH2O(void)
-{
-	ifstream infile("H2O.mmp", ios::in);
-	if(infile) {
-		reset();
-		RagelIstreamPtr testInput(infile);
-		RagelIstreamPtr testInputEnd(infile, 0, ios::end);
-		fileParseTestHelper(testInput, testInputEnd);
-		CPPUNIT_ASSERT(groupNameStack.empty());
-		checkCounts(3, 1, 3, 3,
-		            2, 0, 0, 0, 0, 0,
-		            0, 0, 3);
-	}
-}
-
-
-void NanorexMMPImportExportTest::fileParseTestHOOH(void)
-{
-	ifstream infile("hydrogen_peroxide.mmp", ios::in);
-	if(infile) {
-		reset();
-		RagelIstreamPtr testInput(infile);
-		RagelIstreamPtr testInputEnd(infile, 0, ios::end);
-		fileParseTestHelper(testInput, testInputEnd);
-		CPPUNIT_ASSERT(groupNameStack.empty());
-		checkCounts(4, 1, 3, 3,
-		            3, 0, 0, 0, 0, 0,
-		            0, 0, 3);
-	}
-}
-
-
-void NanorexMMPImportExportTest::fileParseTestChlorophyll(void)
-{
-	ifstream infile("chlorophyll.mmp", ios::in);
-	if(infile) {
-		reset();
-		RagelIstreamPtr testInput(infile, 0, ios::beg);
-		RagelIstreamPtr testInputEnd(infile, 0, ios::end);
-		fileParseTestHelper(testInput, testInputEnd);
-		CPPUNIT_ASSERT(groupNameStack.empty());
-		checkCounts(133, 1, 3, 3,
-		            141, 0, 0, 0, 0, 0,
-		            0, 0, 3);
-	}
-}
-
-
-void NanorexMMPImportExportTest::fileParseTestVanillin(void)
-{
-	ifstream infile("vanillin.mmp", ios::in);
-	if(infile) {
-		reset();
-		RagelIstreamPtr testInput(infile, 0, ios::beg);
-		RagelIstreamPtr testInputEnd(infile, 0, ios::end);
-		fileParseTestHelper(testInput, testInputEnd);
-		CPPUNIT_ASSERT(groupNameStack.size()==0);
-		CPPUNIT_ASSERT(kelvinTemp == 300);
-		checkCounts(19, 1, 3, 3,
-		            12, 1, 0, 6, 0, 0,
-		            8, 0, 3);
-	}
-}
-
-
-void NanorexMMPImportExportTest::fileParseTestNanocar(void)
-{
-	ifstream infile("nanocar.mmp", ios::in);
-	if(infile) {
-		reset();
-		RagelIstreamPtr testInput(infile, 0, ios::beg);
-		RagelIstreamPtr testInputEnd(infile, 0, ios::end);
-		fileParseTestHelper(testInput, testInputEnd);
-		CPPUNIT_ASSERT(groupNameStack.size()==0);
-		CPPUNIT_ASSERT(kelvinTemp == 300);
-		checkCounts(462, 9, 3, 3,
-		            111, 0, 16, 72, 0, 425,
-		            394, 3, 3);
-	}
-}
-
-
-void
-NanorexMMPImportExportTest::
-fileParseTestHelper(RagelIstreamPtr& p, RagelIstreamPtr& pe)
-{
-	RagelIstreamPtr eof(p);
-	RagelIstreamPtr ts, te;
-	int cs, stack[1024], top, act;
-	RagelIstreamPtr charStringWithSpaceStart, charStringWithSpaceStop;
-	RagelIstreamPtr lineStart;
-	
-	%% machine parse_tester;
-	%% write data;
-	%% write init;
-	%% write exec;
-}
-
-
diff --git a/cad/plugins/NanoVision-1/src/Plugins/RenderingEngines/OpenGL/NXOpenGLCamera_sm.h b/cad/plugins/NanoVision-1/src/Plugins/RenderingEngines/OpenGL/NXOpenGLCamera_sm.h
index 6510f3bac..bb2456024 100644
--- a/cad/plugins/NanoVision-1/src/Plugins/RenderingEngines/OpenGL/NXOpenGLCamera_sm.h
+++ b/cad/plugins/NanoVision-1/src/Plugins/RenderingEngines/OpenGL/NXOpenGLCamera_sm.h
@@ -3,7 +3,7 @@
 
 #define SMC_USES_IOSTREAMS
 
-#include <statemap.h>
+#include "statemap.h"
 
 // Forward declarations.
 class Trackball;
diff --git a/cad/plugins/NanoVision-1/src/Plugins/RenderingEngines/OpenGL/NXOpenGLRenderingEngine.cpp b/cad/plugins/NanoVision-1/src/Plugins/RenderingEngines/OpenGL/NXOpenGLRenderingEngine.cpp
index 90a27b847..f83641254 100644
--- a/cad/plugins/NanoVision-1/src/Plugins/RenderingEngines/OpenGL/NXOpenGLRenderingEngine.cpp
+++ b/cad/plugins/NanoVision-1/src/Plugins/RenderingEngines/OpenGL/NXOpenGLRenderingEngine.cpp
@@ -595,8 +595,10 @@ NXOpenGLRenderingEngine::createOpenGLSceneGraph(OBMol *const molPtr,
     // create scenegraph node and mark atom as rendered
 	// NXAtomRenderData atomRenderData(atomPtr->GetAtomicNum());
 	// atomRenderData.addData(static_cast<void const *>(&defaultAtomMaterial));
+	assert(atomPtr->HasData(NXAtomDataType));
 	NXAtomData *atomData =
-		dynamic_cast<NXAtomData*>(atomPtr->GetData(NXAtomDataType)); 
+		static_cast<NXAtomData*>(atomPtr->GetData(NXAtomDataType)); 
+	assert(atomData->GetDataType() == NXAtomDataType);
 	assert(atomData != NULL);
 	string const& atomRenderStyleCode = atomData->getRenderStyleCode();
 	atomData->addSupplementalData(static_cast<void const*>(&defaultAtomMaterial));
@@ -604,7 +606,7 @@ NXOpenGLRenderingEngine::createOpenGLSceneGraph(OBMol *const molPtr,
 	// The following dynamic_cast is ok because plugins were type-checked at
 	// initialization time
 	NXOpenGLRendererPlugin *renderer =
-		dynamic_cast<NXOpenGLRendererPlugin*>(renderStyleMap[atomRenderStyleCode]);
+		static_cast<NXOpenGLRendererPlugin*>(renderStyleMap[atomRenderStyleCode]);
 	if(renderer == (NXOpenGLRendererPlugin*) NULL) {
 		SetResult(commandResult,
 		          NX_PLUGIN_CAUSED_ERROR,
@@ -717,7 +719,6 @@ NXOpenGLRenderingEngine::createOpenGLSceneGraph(OBMol *const molPtr,
 		}
 	}
 	
-	renderedAtoms.insert(atomPtr);
 	return atomNode;
 }
 
@@ -851,6 +852,12 @@ bool NXOpenGLRenderingEngine::initializePlugins(void)
 	    pluginIter != renderStyleMap.end();
 	    ++pluginIter)
 	{
+		// since default rendering style must also appear independently
+		// do not initialize
+		string const& renderStyleCode = pluginIter->first;
+		if(renderStyleCode == "def")
+			continue;
+		
 		NXRendererPlugin *plugin = pluginIter->second;
 		NXCommandResult const *const result = plugin->initialize();
 		
diff --git a/cad/plugins/NanoVision-1/src/Plugins/RenderingEngines/OpenGL/Renderers/NXBallAndStickOpenGLRenderer.cpp b/cad/plugins/NanoVision-1/src/Plugins/RenderingEngines/OpenGL/Renderers/NXBallAndStickOpenGLRenderer.cpp
index 025b903e7..2d6d97dc2 100644
--- a/cad/plugins/NanoVision-1/src/Plugins/RenderingEngines/OpenGL/Renderers/NXBallAndStickOpenGLRenderer.cpp
+++ b/cad/plugins/NanoVision-1/src/Plugins/RenderingEngines/OpenGL/Renderers/NXBallAndStickOpenGLRenderer.cpp
@@ -723,7 +723,7 @@ NXSGOpenGLNode*
 	NXSGOpenGLScale *atomScaleNode;
 	try {
 		// Atoms of radius 0.25 Angstrom
-		atomScaleNode = new NXSGOpenGLScale(2.5e-10, 2.5e-10, 2.5e-10);
+		atomScaleNode = new NXSGOpenGLScale(2.5e-11, 2.5e-11, 2.5e-11);
 	}
 	catch (...) { 
 		SetError(commandResult, "Could not create node for rendering atom");
@@ -769,7 +769,7 @@ NXSGOpenGLNode*
     try {
 	    double const bondLength = info.getLength();
 	    cerr << "bond-length = " << bondLength << endl;
-        bondScale = new NXSGOpenGLScale(1.0e-10,1.0e-10, bondLength);
+        bondScale = new NXSGOpenGLScale(1.0e-11,1.0e-11, bondLength);
     }
     catch(...) {
         SetError(commandResult,
diff --git a/cad/plugins/NanoVision-1/src/Testing/MMP_TestFiles/CH4-mol-section.mmp b/cad/plugins/NanoVision-1/src/Testing/MMP_TestFiles/CH4-mol-section.mmp
new file mode 100644
index 000000000..c9d354ada
--- /dev/null
+++ b/cad/plugins/NanoVision-1/src/Testing/MMP_TestFiles/CH4-mol-section.mmp
@@ -0,0 +1,12 @@
+# Test incomplete valence satisfaction
+# to test for OpenBabel OBAtom::GetHyb() segfault heisenbug
+# bug 2610 sub-issue
+# # segfault generated when contiguous atomID generation is not followed
+mol (CH4) def
+atom 2 (1) (3,3,3) def
+atom 3 (1) (-3,-3,3) def
+atom 4 (1) (-3,3,-3) def
+atom 5 (1) (3,-3,-3) def
+atom 1 (6) (0,0,0) def
+bond1 2 3 4 5
+
diff --git a/cad/plugins/NanoVision-1/src/Testing/MMP_TestFiles/H.mmp b/cad/plugins/NanoVision-1/src/Testing/MMP_TestFiles/H.mmp
new file mode 100755
index 000000000..393ee2ad0
--- /dev/null
+++ b/cad/plugins/NanoVision-1/src/Testing/MMP_TestFiles/H.mmp
@@ -0,0 +1,16 @@
+mmpformat 050502 required; 050706 preferred
+kelvin 300
+group (View Data)
+info opengroup open = True
+csys (HomeView) (1.000000, 0.000000, 0.000000, 0.000000) (10.000000) (0.000000, 0.000000, 0.000000) (1.000000)
+csys (LastView) (1.000000, 0.000000, 0.000000, 0.000000) (3.880744) (0.082000, 0.076500, 0.072500) (1.000000)
+egroup (View Data)
+group (Hydrogen atom)
+mol (Hydrogen) def
+atom 1 (1) (0, 0, 0) bas
+egroup 
+end1
+group (Clipboard)
+info opengroup open = False
+egroup (Clipboard)
+end 
diff --git a/cad/plugins/NanoVision-1/src/Testing/MMP_TestFiles/H2O.mmp b/cad/plugins/NanoVision-1/src/Testing/MMP_TestFiles/H2O.mmp
new file mode 100755
index 000000000..1bb4d41db
--- /dev/null
+++ b/cad/plugins/NanoVision-1/src/Testing/MMP_TestFiles/H2O.mmp
@@ -0,0 +1,21 @@
+mmpformat 050502 required; 050706 preferred
+kelvin 300
+group (View Data)
+info opengroup open = True
+csys (HomeView) (1.000000, 0.000000, 0.000000, 0.000000) (10.000000) (0.000000, 0.000000, 0.000000) (1.000000)
+csys (LastView) (1.000000, 0.000000, 0.000000, 0.000000) (3.880744) (0.082000, 0.076500, 0.072500) (1.000000)
+egroup (View Data)
+group (H2O)
+info opengroup open = True
+mol (H2O.pdb) bas
+atom 1 (8) (82, 207, 197) bas
+atom 2 (1) (655, -360, -342) bas
+bond1 1
+atom 3 (1) (-819, -54, -51) bas
+bond1 1
+egroup (H2O)
+end1
+group (Clipboard)
+info opengroup open = False
+egroup (Clipboard)
+end molecular machine part H2O
diff --git a/cad/plugins/NanoVision-1/src/Testing/MMP_TestFiles/benzene.mmp b/cad/plugins/NanoVision-1/src/Testing/MMP_TestFiles/benzene.mmp
new file mode 100755
index 000000000..f2be9d4fa
--- /dev/null
+++ b/cad/plugins/NanoVision-1/src/Testing/MMP_TestFiles/benzene.mmp
@@ -0,0 +1,45 @@
+mmpformat 050502 required; 050706 preferred
+kelvin 300
+group (View Data)
+info opengroup open = True
+csys (HomeView) (1.000000, 0.000000, 0.000000, 0.000000) (10.000000) (0.000000, 0.000000, 0.000000) (1.000000)
+csys (LastView) (1.000000, 0.000000, 0.000000, 0.000000) (4.019122) (-0.004000, -0.048500, 0.054000) (1.000000)
+egroup (View Data)
+group (benzene)
+info opengroup open = True
+mol (benzene) def
+atom 1 (6) (1199, 769, -24) def
+info atom atomtype = sp2
+atom 2 (6) (1225, -627, -32) def
+info atom atomtype = sp2
+bonda 1
+atom 3 (6) (29, -1348, -62) def
+info atom atomtype = sp2
+bonda 2
+atom 4 (6) (-1192, -672, -85) def
+info atom atomtype = sp2
+bonda 3
+atom 5 (6) (-1219, 724, -77) def
+info atom atomtype = sp2
+bonda 4
+atom 6 (6) (-23, 1445, -48) def
+info atom atomtype = sp2
+bonda 5 1
+atom 7 (1) (2128, 1329, -1) def
+bond1 1
+atom 8 (1) (2175, -1151, -15) def
+bond1 2
+atom 9 (1) (50, -2432, -67) def
+bond1 3
+atom 10 (1) (-2121, -1232, -107) def
+bond1 4
+atom 11 (1) (-2167, 1248, -95) def
+bond1 5
+atom 12 (1) (-44, 2529, -42) def
+bond1 6
+egroup (benzene)
+end1
+group (Clipboard)
+info opengroup open = False
+egroup (Clipboard)
+end molecular machine part benzene
diff --git a/cad/plugins/NanoVision-1/src/Testing/MMP_TestFiles/chlorophyll.mmp b/cad/plugins/NanoVision-1/src/Testing/MMP_TestFiles/chlorophyll.mmp
new file mode 100755
index 000000000..747e21ebb
--- /dev/null
+++ b/cad/plugins/NanoVision-1/src/Testing/MMP_TestFiles/chlorophyll.mmp
@@ -0,0 +1,281 @@
+mmpformat 050502 required; 050706 preferred
+kelvin 300
+group (View Data)
+info opengroup open = True
+csys (HomeView) (1.000000, 0.000000, 0.000000, 0.000000) (10.000000) (0.000000, 0.000000, 0.000000) (1.000000)
+csys (LastView) (0.588103, -0.511782, -0.475570, 0.407490) (11.565961) (-2.753000, 2.128000, 6.235000) (1.000000)
+egroup (View Data)
+group (chlorophyll)
+info opengroup open = True
+mol (chlorophyll) def
+atom 1 (6) (4696, 223, 1602) def
+atom 2 (6) (3348, 72, 1289) def
+bond1 1
+atom 3 (6) (3294, -267, -65) def
+bond1 2
+atom 4 (6) (2017, -531, -727) def
+bond1 3
+atom 5 (6) (2003, -918, -2000) def
+bond1 4
+atom 6 (6) (795, -1235, -2636) def
+bond1 5
+atom 7 (6) (1123, -1626, -3930) def
+bond1 6
+atom 8 (6) (2516, -1517, -4032) def
+bond1 7
+atom 9 (6) (3133, -1796, -5177) def
+bond1 8
+atom 10 (6) (4570, -1571, -5315) def
+bond1 9
+atom 11 (6) (5217, -1747, -6543) def
+bond1 10
+atom 12 (6) (6551, -1410, -6326) def
+bond1 11
+atom 13 (6) (6658, -1061, -4972) def
+bond1 12
+atom 14 (6) (7828, -711, -4441) def
+bond1 13
+atom 15 (6) (7912, -428, -3008) def
+bond1 14
+atom 16 (6) (9121, -136, -2367) def
+bond1 15
+atom 17 (6) (10479, -63, -2928) def
+bond1 16
+atom 18 (6) (10984, -979, -3765) def
+bond1 17
+atom 19 (6) (8802, 128, -1037) def
+bond1 16
+atom 20 (6) (7421, -49, -915) def
+bond1 19
+atom 21 (6) (6730, 143, 359) def
+bond1 20
+atom 22 (6) (5406, 8, 414) def
+bond1 21 1
+atom 23 (6) (5193, 579, 2941) def
+bond1 1
+atom 24 (6) (6224, -39, 3534) def
+bond1 23
+atom 25 (7) (4551, -314, -623) def
+bond1 3 22
+atom 26 (7) (3080, -1075, -2851) def
+bond1 5 8
+atom 27 (7) (6857, -391, -2122) def
+bond1 20 15
+atom 28 (7) (5436, -1147, -4335) def
+bond1 13 10
+atom 29 (6) (2186, 198, 2228) def
+bond1 2
+atom 30 (6) (-583, -1148, -2045) def
+bond1 6
+atom 31 (6) (7657, -1418, -7340) def
+bond1 12
+atom 32 (6) (9757, 488, 62) def
+bond1 19
+atom 33 (6) (150, -2087, -5031) def
+bond1 7
+atom 34 (6) (-1291, -2056, -4488) def
+bond1 33
+atom 35 (6) (-2264, -2517, -5589) def
+bond1 34
+atom 36 (8) (-1804, -2859, -6775) def
+bond1 35
+atom 37 (8) (-3737, -2577, -5311) def
+bond1 35
+atom 38 (6) (-4685, -3026, -6384) def
+bond1 37
+atom 39 (1) (229, -1419, -5889) def
+bond1 33
+atom 40 (1) (401, -3103, -5337) def
+bond1 33
+atom 41 (1) (-1370, -2724, -3630) def
+bond1 34
+atom 42 (1) (-1543, -1041, -4183) def
+bond1 34
+atom 43 (1) (4655, 1359, 3505) def
+bond1 23
+atom 44 (1) (6539, 239, 4553) def
+bond1 24
+atom 45 (1) (6768, -862, 3044) def
+bond1 24
+atom 46 (1) (7310, 448, 1241) def
+bond1 21
+atom 47 (1) (9575, 1533, 399) def
+bond1 32
+atom 48 (1) (10817, 407, -265) def
+bond1 32
+atom 49 (1) (9630, -201, 927) def
+bond1 32
+atom 50 (1) (11131, 765, -2602) def
+bond1 17
+atom 51 (1) (12020, -898, -4134) def
+bond1 18
+atom 52 (1) (10402, -1858, -4086) def
+bond1 18
+atom 53 (1) (8733, -654, -5062) def
+bond1 14
+atom 54 (1) (7286, -1612, -8370) def
+bond1 31
+atom 55 (1) (8403, -2206, -7089) def
+bond1 31
+atom 56 (1) (8167, -429, -7366) def
+bond1 31
+atom 57 (6) (-3893, -3363, -7660) def
+bond1 38
+atom 58 (1) (-5224, -3911, -6045) def
+bond1 38
+atom 59 (1) (-5396, -2227, -6597) def
+bond1 38
+atom 60 (6) (-4543, -3793, -8765) def
+bond1 57
+atom 61 (6) (-3752, -4130, -10042) def
+bond1 60
+atom 62 (6) (-6076, -3943, -8747) def
+bond1 60
+atom 63 (1) (-2809, -3257, -7673) def
+bond1 57
+atom 64 (6) (-2250, -3895, -9793) def
+bond1 61
+atom 65 (6) (-1459, -4233, -11070) def
+bond1 64
+atom 66 (6) (43, -3997, -10820) def
+bond1 65
+atom 67 (1) (-752, -144, -1595) def
+bond1 30
+atom 68 (1) (-713, -1927, -1260) def
+bond1 30
+atom 69 (1) (-1380, -1289, -2806) def
+bond1 30
+atom 70 (6) (2812, -2183, -6712) def
+bond1 9
+atom 71 (1) (1100, -447, -159) def
+bond1 4
+atom 72 (1) (1553, 1068, 1937) def
+bond1 29
+atom 73 (1) (2512, 346, 3281) def
+bond1 29
+atom 74 (1) (1565, -726, 2204) def
+bond1 29
+atom 75 (12) (4975, -736, -2483) def
+bond1 26 27 25 28
+atom 76 (1) (-6514, -3297, -9507) def
+bond1 62
+atom 77 (1) (-6341, -4980, -8955) def
+bond1 62
+atom 78 (1) (-6457, -3661, -7766) def
+bond1 62
+atom 79 (6) (835, -4335, -12097) def
+bond1 66
+atom 80 (6) (2336, -4099, -11847) def
+bond1 79
+atom 81 (6) (3128, -4437, -13124) def
+bond1 80
+atom 82 (6) (4629, -4202, -12875) def
+bond1 81
+atom 83 (6) (5421, -4540, -14152) def
+bond1 82
+atom 84 (6) (6922, -4304, -13902) def
+bond1 83
+atom 85 (6) (7714, -4642, -15179) def
+bond1 84
+atom 86 (6) (9215, -4406, -14929) def
+bond1 85
+atom 87 (6) (9448, -2930, -14556) def
+bond1 86
+atom 88 (6) (10007, -4744, -16206) def
+bond1 86
+atom 89 (6) (4862, -2726, -12502) def
+bond1 82
+atom 90 (6) (276, -2521, -10447) def
+bond1 66
+atom 91 (1) (-3916, -5175, -10306) def
+bond1 61
+atom 92 (1) (-4089, -3492, -10858) def
+bond1 61
+atom 93 (1) (-1913, -4534, -8976) def
+bond1 64
+atom 94 (1) (-2085, -2850, -9529) def
+bond1 64
+atom 95 (1) (-1623, -5277, -11334) def
+bond1 65
+atom 96 (1) (-1796, -3594, -11886) def
+bond1 65
+atom 97 (1) (380, -4636, -10004) def
+bond1 66
+atom 98 (1) (670, -5380, -12361) def
+bond1 79
+atom 99 (1) (497, -3696, -12913) def
+bond1 79
+atom 100 (1) (2673, -4738, -11031) def
+bond1 80
+atom 101 (1) (2501, -3055, -11583) def
+bond1 80
+atom 102 (1) (2963, -5482, -13388) def
+bond1 81
+atom 103 (1) (2790, -3798, -13941) def
+bond1 81
+atom 104 (1) (4966, -4840, -12058) def
+bond1 82
+atom 105 (1) (5256, -5584, -14416) def
+bond1 83
+atom 106 (1) (5083, -3901, -14968) def
+bond1 83
+atom 107 (1) (7259, -4943, -13086) def
+bond1 84
+atom 108 (1) (7087, -3259, -13638) def
+bond1 84
+atom 109 (1) (7549, -5686, -15443) def
+bond1 85
+atom 110 (1) (7376, -4003, -15995) def
+bond1 85
+atom 111 (1) (9552, -5045, -14113) def
+bond1 86
+atom 112 (1) (9111, -2292, -15373) def
+bond1 87
+atom 113 (1) (8887, -2691, -13653) def
+bond1 87
+atom 114 (1) (10510, -2764, -14380) def
+bond1 87
+atom 115 (1) (9670, -4105, -17023) def
+bond1 88
+atom 116 (1) (9842, -5789, -16470) def
+bond1 88
+atom 117 (1) (11069, -4577, -16030) def
+bond1 88
+atom 118 (1) (4525, -2087, -13318) def
+bond1 89
+atom 119 (1) (5925, -2559, -12325) def
+bond1 89
+atom 120 (1) (4302, -2487, -11598) def
+bond1 89
+atom 121 (1) (-61, -1882, -11263) def
+bond1 90
+atom 122 (1) (1338, -2354, -10270) def
+bond1 90
+atom 123 (1) (-285, -2282, -9543) def
+bond1 90
+atom 124 (6) (4096, -1239, -7575) def
+bond1 11 70
+atom 125 (8) (4843, -1224, -8318) def
+bond1 124
+atom 126 (6) (1928, -1407, -7706) def
+bond1 70
+atom 127 (8) (618, -1535, -7660) def
+bond1 126
+atom 128 (8) (2558, -506, -8725) def
+bond1 126
+atom 129 (6) (1697, 250, -9694) def
+bond1 128
+atom 130 (1) (2750, -3265, -6825) def
+bond1 70
+atom 131 (1) (1115, -454, -10288) def
+bond1 129
+atom 132 (1) (1022, 906, -9144) def
+bond1 129
+atom 133 (1) (2328, 847, -10352) def
+bond1 129
+egroup (chlorophyll)
+end1
+group (Clipboard)
+info opengroup open = False
+egroup (Clipboard)
+end molecular machine part chlorophyll
diff --git a/cad/plugins/NanoVision-1/src/Testing/MMP_TestFiles/hydrogen_peroxide.mmp b/cad/plugins/NanoVision-1/src/Testing/MMP_TestFiles/hydrogen_peroxide.mmp
new file mode 100755
index 000000000..b775ce299
--- /dev/null
+++ b/cad/plugins/NanoVision-1/src/Testing/MMP_TestFiles/hydrogen_peroxide.mmp
@@ -0,0 +1,23 @@
+mmpformat 050502 required; 050706 preferred
+kelvin 300
+group (View Data)
+info opengroup open = True
+csys (HomeView) (1.000000, 0.000000, 0.000000, 0.000000) (10.000000) (0.000000, 0.000000, 0.000000) (1.000000)
+csys (LastView) (-0.141949, 0.442441, -0.521174, 0.715873) (3.128059) (-0.947000, 0.291500, 3.566500) (1.000000)
+egroup (View Data)
+group (hydrogen_peroxide)
+info opengroup open = True
+mol (hydrogen_peroxide.pdb) def
+atom 1 (8) (1059, -578, -4216) def
+atom 2 (8) (832, -2, -2912) def
+bond1 1
+atom 3 (1) (2009, -648, -4374) def
+bond1 1
+atom 4 (1) (-116, 65, -2754) def
+bond1 2
+egroup (hydrogen_peroxide)
+end1
+group (Clipboard)
+info opengroup open = False
+egroup (Clipboard)
+end molecular machine part hydrogen_peroxide
diff --git a/cad/plugins/NanoVision-1/src/Testing/MMP_TestFiles/nanocar.mmp b/cad/plugins/NanoVision-1/src/Testing/MMP_TestFiles/nanocar.mmp
new file mode 100755
index 000000000..fa624628f
--- /dev/null
+++ b/cad/plugins/NanoVision-1/src/Testing/MMP_TestFiles/nanocar.mmp
@@ -0,0 +1,1325 @@
+mmpformat 050920 required; 060421 preferred
+kelvin 300
+group (View Data)
+info opengroup open = True
+csys (HomeView) (1.000000, 0.000000, 0.000000, 0.000000) (10.000000) (0.000000, 0.000000, 0.000000) (1.000000)
+csys (LastView) (0.356228, 0.816395, 0.396533, -0.222175) (30.339253) (-10.526067, 0.143466, -1.133044) (1.000000)
+csys (HomeView1) (1.000000, 0.000000, 0.000000, 0.000000) (10.000000) (0.000000, 0.000000, 0.000000) (1.000000)
+csys (LastView1) (1.000000, 0.000000, 0.000000, 0.000000) (9.878460) (0.000000, 0.000000, 0.000000) (1.000000)
+csys (HomeView2) (1.000000, 0.000000, 0.000000, 0.000000) (10.000000) (0.000000, 0.000000, 0.000000) (1.000000)
+csys (LastView2) (1.000000, 0.000000, 0.000000, 0.000000) (4.630813) (0.000000, 0.000000, 0.000000) (1.000000)
+csys (HomeView3) (1.000000, 0.000000, 0.000000, 0.000000) (10.000000) (0.000000, 0.000000, 0.000000) (1.000000)
+csys (LastView3) (1.000000, 0.000000, 0.000000, 0.000000) (12.011135) (0.000000, 0.000000, 0.000000) (1.000000)
+csys (HomeView4) (1.000000, 0.000000, 0.000000, 0.000000) (10.000000) (0.000000, 0.000000, 0.000000) (1.000000)
+csys (LastView4) (1.000000, 0.000000, 0.000000, 0.000000) (21.135852) (0.000000, 0.000000, 0.000000) (1.000000)
+egroup (View Data)
+group (nanocar)
+info opengroup open = True
+mol (Chassis) def
+atom 1 (6) (-9929, -730, -372) def
+info atom atomtype = sp2
+atom 2 (6) (-9935, -2120, -379) def
+info atom atomtype = sp2
+bonda 1
+atom 3 (6) (-11153, -2796, -406) def
+info atom atomtype = sp2
+bonda 2
+atom 4 (6) (-12373, -2116, -427) def
+info atom atomtype = sp2
+bonda 3
+atom 5 (6) (-12370, -720, -419) def
+info atom atomtype = sp2
+bonda 4
+atom 6 (6) (-11146, -37, -391) def
+info atom atomtype = sp2
+bonda 1 5
+atom 7 (1) (-13310, -170, -435) def
+bond1 5
+atom 8 (1) (-8995, -2670, -364) def
+bond1 2
+atom 9 (1) (-13310, -2668, -448) def
+bond1 4
+atom 10 (6) (-11115, -4317, -412) def
+info atom atomtype = sp
+bond1 3
+atom 11 (6) (-11159, 1483, -379) def
+info atom atomtype = sp
+bond1 6
+atom 12 (6) (-11180, 2683, -354) def
+info atom atomtype = sp
+bond3 11
+atom 13 (6) (-11056, -5516, -410) def
+info atom atomtype = sp
+bond3 10
+atom 14 (6) (-10416, -9105, 643) def
+info atom atomtype = sp2
+atom 15 (6) (-10420, -7711, 653) def
+info atom atomtype = sp2
+bonda 14
+atom 16 (6) (-11031, -7033, -413) def
+info atom atomtype = sp2
+bond1 13
+bonda 15
+atom 17 (6) (-11636, -7674, -1500) def
+info atom atomtype = sp2
+bonda 16
+atom 18 (6) (-11635, -9052, -1517) def
+info atom atomtype = sp2
+bonda 17
+atom 19 (6) (-11037, -9702, -455) def
+info atom atomtype = sp2
+bonda 14 18
+atom 20 (1) (-12090, -9620, -2331) def
+bond1 18
+atom 21 (1) (-9959, -9688, 1446) def
+bond1 14
+atom 22 (1) (-9962, -7165, 1476) def
+bond1 15
+atom 23 (1) (-12099, -7125, -2313) def
+bond1 17
+atom 24 (6) (-12297, 4811, 314) def
+info atom atomtype = sp2
+atom 25 (6) (-12363, 6190, 296) def
+info atom atomtype = sp2
+bonda 24
+atom 26 (6) (-11369, 6858, -395) def
+info atom atomtype = sp2
+bonda 25
+atom 27 (6) (-10283, 6291, -1060) def
+info atom atomtype = sp2
+bonda 26
+atom 28 (6) (-10223, 4901, -1036) def
+info atom atomtype = sp2
+bonda 27
+atom 29 (6) (-11232, 4201, -359) def
+info atom atomtype = sp2
+bond1 12
+bonda 24 28
+atom 30 (1) (-9415, 4377, -1540) def
+bond1 28
+atom 31 (1) (-13060, 4241, 835) def
+bond1 24
+atom 32 (1) (-13164, 6739, 792) def
+bond1 25
+atom 33 (1) (-9534, 6898, -1575) def
+bond1 27
+atom 34 (6) (-11191, -11154, -706) def
+info atom atomtype = sp
+bond1 19
+atom 35 (6) (-11375, -12293, -996) def
+info atom atomtype = sp
+bond3 34
+atom 36 (6) (-11664, 8306, -335) def
+info atom atomtype = sp
+bond1 26
+atom 37 (6) (-12044, 9431, -306) def
+info atom atomtype = sp
+bond3 36
+atom 38 (6) (-8520, -106, -342) def
+info atom atomtype = sp
+bond1 1
+atom 39 (6) (-7322, 35, -320) def
+info atom atomtype = sp
+bond3 38
+atom 40 (6) (-5107, 1249, -268) def
+info atom atomtype = sp2
+atom 41 (6) (-3710, 1274, -238) def
+info atom atomtype = sp2
+bonda 40
+atom 42 (6) (-2995, 70, -231) def
+info atom atomtype = sp2
+bonda 41
+atom 43 (6) (-3664, -1160, -255) def
+info atom atomtype = sp2
+bonda 42
+atom 44 (6) (-5064, -1184, -284) def
+info atom atomtype = sp2
+bonda 43
+atom 45 (6) (-5780, 24, -290) def
+info atom atomtype = sp2
+bond1 39
+bonda 40 44
+atom 46 (1) (-5590, -2138, -302) def
+bond1 44
+atom 47 (1) (-5671, 2180, -273) def
+bond1 40
+atom 48 (1) (-3182, 2225, -221) def
+bond1 41
+atom 49 (1) (-3097, -2091, -250) def
+bond1 43
+atom 50 (6) (-1456, 107, -196) def
+info atom atomtype = sp
+bond1 42
+atom 51 (6) (-253, 144, -157) def
+info atom atomtype = sp
+bond3 50
+atom 52 (6) (1956, 1412, -117) def
+info atom atomtype = sp2
+atom 53 (6) (3358, 1437, -104) def
+info atom atomtype = sp2
+bonda 52
+atom 54 (6) (4075, 227, -110) def
+info atom atomtype = sp2
+bonda 53
+atom 55 (6) (3398, -995, -119) def
+info atom atomtype = sp2
+bonda 54
+atom 56 (6) (2001, -1020, -130) def
+info atom atomtype = sp2
+bonda 55
+atom 57 (6) (1287, 182, -133) def
+info atom atomtype = sp2
+bond1 51
+bonda 52 56
+atom 58 (1) (1475, -1973, -140) def
+bond1 56
+atom 59 (1) (1388, 2343, -117) def
+bond1 52
+atom 60 (1) (3884, 2392, -95) def
+bond1 53
+atom 61 (1) (3961, -1925, -120) def
+bond1 55
+atom 62 (6) (5621, 178, -125) def
+info atom atomtype = sp
+bond1 54
+atom 63 (6) (6822, 230, -234) def
+info atom atomtype = sp
+bond3 62
+atom 64 (6) (10732, 2122, -405) def
+info atom atomtype = sp2
+atom 65 (6) (10703, 726, -388) def
+info atom atomtype = sp2
+bonda 64
+atom 66 (6) (9469, 59, -341) def
+info atom atomtype = sp2
+bonda 65
+atom 67 (6) (8262, 776, -308) def
+info atom atomtype = sp2
+bond1 63
+bonda 66
+atom 68 (6) (8296, 2165, -333) def
+info atom atomtype = sp2
+bonda 67
+atom 69 (6) (9523, 2816, -381) def
+info atom atomtype = sp2
+bonda 64 68
+atom 70 (1) (7367, 2735, -313) def
+bond1 68
+atom 71 (1) (11636, 166, -410) def
+bond1 65
+atom 72 (6) (9501, -1470, -331) def
+info atom atomtype = sp
+bond1 66
+atom 73 (6) (9512, 4332, -398) def
+info atom atomtype = sp
+bond1 69
+atom 74 (6) (9480, 5531, -369) def
+info atom atomtype = sp
+bond3 73
+atom 75 (6) (9582, -2668, -376) def
+info atom atomtype = sp
+bond3 72
+atom 76 (6) (10244, -6269, 641) def
+info atom atomtype = sp2
+atom 77 (6) (10230, -4875, 657) def
+info atom atomtype = sp2
+bonda 76
+atom 78 (6) (9614, -4191, -405) def
+info atom atomtype = sp2
+bond1 75
+bonda 77
+atom 79 (6) (9015, -4837, -1495) def
+info atom atomtype = sp2
+bonda 78
+atom 80 (6) (9024, -6217, -1517) def
+info atom atomtype = sp2
+bonda 79
+atom 81 (6) (9625, -6868, -457) def
+info atom atomtype = sp2
+bonda 76 80
+atom 82 (1) (8573, -6786, -2332) def
+bond1 80
+atom 83 (1) (10704, -6852, 1443) def
+bond1 76
+atom 84 (1) (10686, -4331, 1480) def
+bond1 77
+atom 85 (1) (8549, -4291, -2308) def
+bond1 79
+atom 86 (6) (8358, 7645, 310) def
+info atom atomtype = sp2
+atom 87 (6) (8291, 9024, 294) def
+info atom atomtype = sp2
+bonda 86
+atom 88 (6) (9286, 9693, -398) def
+info atom atomtype = sp2
+bonda 87
+atom 89 (6) (10372, 9128, -1064) def
+info atom atomtype = sp2
+bonda 88
+atom 90 (6) (10433, 7738, -1041) def
+info atom atomtype = sp2
+bonda 89
+atom 91 (6) (9422, 7040, -366) def
+info atom atomtype = sp2
+bond1 74
+bonda 86 90
+atom 92 (1) (11241, 7212, -1546) def
+bond1 90
+atom 93 (1) (7595, 7072, 827) def
+bond1 86
+atom 94 (1) (7489, 9572, 790) def
+bond1 87
+atom 95 (1) (11122, 9734, -1577) def
+bond1 89
+atom 96 (6) (9479, -8321, -705) def
+info atom atomtype = sp
+bond1 81
+atom 97 (6) (9286, -9459, -992) def
+info atom atomtype = sp
+bond3 96
+atom 98 (6) (8989, 11139, -335) def
+info atom atomtype = sp
+bond1 88
+atom 99 (6) (8605, 12264, -308) def
+info atom atomtype = sp
+bond3 98
+atom 100 (1) (11675, 2660, -438) def
+bond1 64
+mol (Wheel-1) def
+atom 101 (6) (-8366, 15449, 2332) def
+info atom atomtype = sp2
+atom 102 (6) (-10777, 14234, 3011) def
+info atom atomtype = sp2
+atom 103 (6) (-12927, 14330, 1971) def
+info atom atomtype = sp2
+atom 104 (6) (-7838, 16905, 461) def
+info atom atomtype = sp2
+atom 105 (6) (-7550, 15785, 1247) def
+info atom atomtype = sp2
+bondg 101 104
+atom 106 (6) (-8490, 14056, 2335) def
+info atom atomtype = sp2
+bondg 101
+atom 107 (6) (-11882, 13556, 2487) def
+info atom atomtype = sp2
+bondg 102 103
+atom 108 (6) (-13508, 13867, 788) def
+info atom atomtype = sp2
+bondg 103
+atom 109 (6) (-7725, 16845, -931) def
+info atom atomtype = sp2
+bondg 104
+atom 110 (6) (-9218, 13178, -3115) def
+info atom atomtype = sp2
+atom 111 (6) (-9738, 12090, -2407) def
+info atom atomtype = sp2
+bondg 110
+atom 112 (6) (-8080, 13847, -2651) def
+info atom atomtype = sp2
+bondg 110
+atom 113 (6) (-11130, 12184, -2524) def
+info atom atomtype = sp2
+bondg 111
+atom 114 (6) (-9195, 11508, -1251) def
+info atom atomtype = sp2
+bondg 111
+atom 115 (6) (-9873, 10657, -146) def
+bond1 114
+atom 116 (6) (-7554, 13399, -1435) def
+info atom atomtype = sp2
+bondg 112
+atom 117 (6) (-8137, 12308, -784) def
+info atom atomtype = sp2
+bondg 114 116
+atom 118 (6) (-11916, 11697, -1474) def
+info atom atomtype = sp2
+bondg 113
+atom 119 (6) (-11499, 10792, -284) def
+bond1 115 118 37
+atom 120 (6) (-8254, 12367, 616) def
+info atom atomtype = sp2
+bondg 117
+atom 121 (6) (-9378, 11604, 974) def
+info atom atomtype = sp2
+bond1 115
+bondg 120
+atom 122 (6) (-11407, 13318, -3294) def
+info atom atomtype = sp2
+bondg 113
+atom 123 (6) (-10228, 13955, -3692) def
+info atom atomtype = sp2
+bondg 110 122
+atom 124 (6) (-10099, 12274, 1976) def
+info atom atomtype = sp2
+bondg 121
+atom 125 (6) (-7778, 13514, 1260) def
+info atom atomtype = sp2
+bondg 106 120
+atom 126 (6) (-12101, 11783, 748) def
+info atom atomtype = sp2
+bond1 119
+atom 127 (6) (-7064, 14537, -784) def
+info atom atomtype = sp2
+bondg 116
+atom 128 (6) (-11493, 12365, 1865) def
+info atom atomtype = sp2
+bondg 107 124 126
+atom 129 (6) (-7180, 14597, 607) def
+info atom atomtype = sp2
+bondg 105 125 127
+atom 130 (6) (-10136, 15347, -3789) def
+info atom atomtype = sp2
+bondg 123
+atom 131 (6) (-12516, 14123, -3015) def
+info atom atomtype = sp2
+bondg 122
+atom 132 (6) (-12945, 12613, -1177) def
+info atom atomtype = sp2
+bondg 118
+atom 133 (6) (-7950, 15237, -2739) def
+info atom atomtype = sp2
+bondg 112
+atom 134 (6) (-8993, 15985, -3296) def
+info atom atomtype = sp2
+bondg 130 133
+atom 135 (6) (-13285, 13758, -1905) def
+info atom atomtype = sp2
+bondg 131 132
+atom 136 (6) (-13062, 12668, 220) def
+info atom atomtype = sp2
+bondg 108 126 132
+atom 137 (6) (-7319, 15668, -1567) def
+info atom atomtype = sp2
+bondg 109 127 133
+atom 138 (6) (-9692, 13421, 2665) def
+info atom atomtype = sp2
+bondg 102 106 124
+atom 139 (6) (-9783, 17347, 1869) def
+info atom atomtype = sp2
+atom 140 (6) (-11175, 17433, 1755) def
+info atom atomtype = sp2
+bondg 139
+atom 141 (6) (-8965, 17671, 780) def
+info atom atomtype = sp2
+bondg 104 139
+atom 142 (6) (-11744, 16373, 2468) def
+info atom atomtype = sp2
+bondg 140
+atom 143 (6) (-11752, 17844, 548) def
+info atom atomtype = sp2
+bondg 140
+atom 144 (6) (-12897, 17217, 43) def
+info atom atomtype = sp2
+bondg 143
+atom 145 (6) (-9543, 18080, -425) def
+info atom atomtype = sp2
+bondg 141
+atom 146 (6) (-10935, 18165, -539) def
+info atom atomtype = sp2
+bondg 143 145
+atom 147 (6) (-12876, 15728, 1962) def
+info atom atomtype = sp2
+bondg 103 142
+atom 148 (6) (-13451, 16151, 760) def
+info atom atomtype = sp2
+bondg 144 147
+atom 149 (6) (-11567, 17747, -1714) def
+info atom atomtype = sp2
+bondg 146
+atom 150 (6) (-12782, 17159, -1347) def
+info atom atomtype = sp2
+bondg 144 149
+atom 151 (6) (-10690, 15629, 3011) def
+info atom atomtype = sp2
+bondg 102 142
+atom 152 (6) (-9479, 16232, 2655) def
+info atom atomtype = sp2
+bondg 101 139 151
+atom 153 (6) (-13219, 16033, -2053) def
+info atom atomtype = sp2
+bondg 150
+atom 154 (6) (-10805, 17244, -2773) def
+info atom atomtype = sp2
+bondg 149
+atom 155 (6) (-13852, 15010, 57) def
+info atom atomtype = sp2
+bondg 108 148
+atom 156 (6) (-8781, 17576, -1484) def
+info atom atomtype = sp2
+bondg 109 145
+atom 157 (6) (-13737, 14952, -1333) def
+info atom atomtype = sp2
+bondg 135 153 155
+atom 158 (6) (-12459, 15517, -3109) def
+info atom atomtype = sp2
+bondg 131 153
+atom 159 (6) (-9414, 17156, -2659) def
+info atom atomtype = sp2
+bondg 134 154 156
+atom 160 (6) (-11257, 16125, -3482) def
+info atom atomtype = sp2
+bondg 130 154 158
+atom 161 (1) (-9468, 9655, -62) def
+bond1 115
+mol (Wheel-2) def
+atom 162 (6) (-6804, -18169, 201) def
+info atom atomtype = sp2
+atom 163 (6) (-7875, -17019, -2093) def
+info atom atomtype = sp2
+atom 164 (6) (-10053, -17192, -3059) def
+info atom atomtype = sp2
+atom 165 (6) (-7850, -19631, 1835) def
+info atom atomtype = sp2
+atom 166 (6) (-7096, -18493, 1529) def
+info atom atomtype = sp2
+bondg 162 165
+atom 167 (6) (-6921, -16779, 83) def
+info atom atomtype = sp2
+bondg 162
+atom 168 (6) (-9008, -16379, -2606) def
+info atom atomtype = sp2
+bondg 163 164
+atom 169 (6) (-11345, -16759, -2744) def
+info atom atomtype = sp2
+bondg 164
+atom 170 (6) (-8841, -19584, 2820) def
+info atom atomtype = sp2
+bondg 165
+atom 171 (6) (-11573, -15986, 3035) def
+info atom atomtype = sp2
+atom 172 (6) (-11400, -14905, 2166) def
+info atom atomtype = sp2
+bondg 171
+atom 173 (6) (-10467, -16616, 3614) def
+info atom atomtype = sp2
+bondg 171
+atom 174 (6) (-12386, -15043, 1181) def
+info atom atomtype = sp2
+bondg 172
+atom 175 (6) (-10185, -14293, 1823) def
+info atom atomtype = sp2
+bondg 172
+atom 176 (6) (-9804, -13447, 577) def
+bond1 175
+atom 177 (6) (-9212, -16139, 3221) def
+info atom atomtype = sp2
+bondg 173
+atom 178 (6) (-9123, -15056, 2340) def
+info atom atomtype = sp2
+bondg 175 177
+atom 179 (6) (-12106, -14565, -103) def
+info atom atomtype = sp2
+bondg 174
+atom 180 (6) (-10956, -13633, -572) def
+bond1 176 179 35
+atom 181 (6) (-8128, -15104, 1348) def
+info atom atomtype = sp2
+bondg 178
+atom 182 (6) (-8602, -14368, 246) def
+info atom atomtype = sp2
+bond1 176
+bondg 181
+atom 183 (6) (-13120, -16195, 1484) def
+info atom atomtype = sp2
+bondg 174
+atom 184 (6) (-12644, -16801, 2652) def
+info atom atomtype = sp2
+bondg 171 183
+atom 185 (6) (-8283, -15049, -938) def
+info atom atomtype = sp2
+bondg 182
+atom 186 (6) (-7297, -16229, 1313) def
+info atom atomtype = sp2
+bondg 167 181
+atom 187 (6) (-10527, -14633, -1679) def
+info atom atomtype = sp2
+bond1 180
+atom 188 (6) (-8370, -17255, 3192) def
+info atom atomtype = sp2
+bondg 177
+atom 189 (6) (-9265, -15184, -1927) def
+info atom atomtype = sp2
+bondg 168 185 187
+atom 190 (6) (-7379, -17302, 2206) def
+info atom atomtype = sp2
+bondg 166 186 188
+atom 191 (6) (-12620, -18191, 2806) def
+info atom atomtype = sp2
+bondg 184
+atom 192 (6) (-13601, -17031, 472) def
+info atom atomtype = sp2
+bondg 183
+atom 193 (6) (-12518, -15511, -1065) def
+info atom atomtype = sp2
+bondg 179
+atom 194 (6) (-10412, -18003, 3792) def
+info atom atomtype = sp2
+bondg 173
+atom 195 (6) (-11488, -18790, 3370) def
+info atom atomtype = sp2
+bondg 191 194
+atom 196 (6) (-13260, -16674, -836) def
+info atom atomtype = sp2
+bondg 192 193
+atom 197 (6) (-11524, -15555, -2057) def
+info atom atomtype = sp2
+bondg 169 187 193
+atom 198 (6) (-9098, -18403, 3522) def
+info atom atomtype = sp2
+bondg 170 188 194
+atom 199 (6) (-7463, -16177, -1055) def
+info atom atomtype = sp2
+bondg 163 167 185
+atom 200 (6) (-8018, -20116, -550) def
+info atom atomtype = sp2
+atom 201 (6) (-9001, -20244, -1536) def
+info atom atomtype = sp2
+bondg 200
+atom 202 (6) (-8312, -20427, 782) def
+info atom atomtype = sp2
+bondg 165 200
+atom 203 (6) (-8853, -19194, -2447) def
+info atom atomtype = sp2
+bondg 201
+atom 204 (6) (-10283, -20686, -1190) def
+info atom atomtype = sp2
+bondg 201
+atom 205 (6) (-11425, -20099, -1747) def
+info atom atomtype = sp2
+bondg 204
+atom 206 (6) (-9594, -20866, 1127) def
+info atom atomtype = sp2
+bondg 202
+atom 207 (6) (-10577, -20996, 140) def
+info atom atomtype = sp2
+bondg 204 206
+atom 208 (6) (-9989, -18587, -2993) def
+info atom atomtype = sp2
+bondg 164 203
+atom 209 (6) (-11266, -19041, -2647) def
+info atom atomtype = sp2
+bondg 205 208
+atom 210 (6) (-11894, -20610, 411) def
+info atom atomtype = sp2
+bondg 207
+atom 211 (6) (-12416, -20055, -759) def
+info atom atomtype = sp2
+bondg 205 210
+atom 212 (6) (-7781, -18412, -2005) def
+info atom atomtype = sp2
+bondg 163 203
+atom 213 (6) (-7252, -18983, -843) def
+info atom atomtype = sp2
+bondg 162 200 212
+atom 214 (6) (-13267, -18951, -655) def
+info atom atomtype = sp2
+bondg 211
+atom 215 (6) (-12225, -20096, 1669) def
+info atom atomtype = sp2
+bondg 210
+atom 216 (6) (-12092, -17919, -2517) def
+info atom atomtype = sp2
+bondg 169 209
+atom 217 (6) (-9925, -20352, 2385) def
+info atom atomtype = sp2
+bondg 170 206
+atom 218 (6) (-13082, -17875, -1529) def
+info atom atomtype = sp2
+bondg 196 214 216
+atom 219 (6) (-13597, -18424, 597) def
+info atom atomtype = sp2
+bondg 192 214
+atom 220 (6) (-11242, -19967, 2654) def
+info atom atomtype = sp2
+bondg 195 215 217
+atom 221 (6) (-13088, -19000, 1766) def
+info atom atomtype = sp2
+bondg 191 215 219
+atom 222 (1) (-9509, -12431, 812) def
+bond1 176
+mol (Wheel-3) def
+atom 223 (6) (12289, 18276, 2329) def
+info atom atomtype = sp2
+atom 224 (6) (9878, 17063, 3010) def
+info atom atomtype = sp2
+atom 225 (6) (7728, 17162, 1970) def
+info atom atomtype = sp2
+atom 226 (6) (12817, 19732, 457) def
+info atom atomtype = sp2
+atom 227 (6) (13106, 18612, 1243) def
+info atom atomtype = sp2
+bondg 223 226
+atom 228 (6) (12164, 16883, 2333) def
+info atom atomtype = sp2
+bondg 223
+atom 229 (6) (8772, 16386, 2485) def
+info atom atomtype = sp2
+bondg 224 225
+atom 230 (6) (7146, 16698, 784) def
+info atom atomtype = sp2
+bondg 225
+atom 231 (6) (12932, 19673, -934) def
+info atom atomtype = sp2
+bondg 226
+atom 232 (6) (11437, 16007, -3118) def
+info atom atomtype = sp2
+atom 233 (6) (10915, 14919, -2410) def
+info atom atomtype = sp2
+bondg 232
+atom 234 (6) (12575, 16674, -2654) def
+info atom atomtype = sp2
+bondg 232
+atom 235 (6) (9522, 15014, -2527) def
+info atom atomtype = sp2
+bondg 233
+atom 236 (6) (11457, 14337, -1254) def
+info atom atomtype = sp2
+bondg 233
+atom 237 (6) (10777, 13486, -149) def
+bond1 236
+atom 238 (6) (13100, 16227, -1437) def
+info atom atomtype = sp2
+bondg 234
+atom 239 (6) (12515, 15135, -787) def
+info atom atomtype = sp2
+bondg 236 238
+atom 240 (6) (8736, 14527, -1476) def
+info atom atomtype = sp2
+bondg 235
+atom 241 (6) (9152, 13622, -287) def
+bond1 237 240 99
+atom 242 (6) (12399, 15195, 613) def
+info atom atomtype = sp2
+bondg 239
+atom 243 (6) (11273, 14434, 972) def
+info atom atomtype = sp2
+bond1 237
+bondg 242
+atom 244 (6) (9247, 16148, -3297) def
+info atom atomtype = sp2
+bondg 235
+atom 245 (6) (10427, 16784, -3695) def
+info atom atomtype = sp2
+bondg 232 244
+atom 246 (6) (10553, 15103, 1973) def
+info atom atomtype = sp2
+bondg 243
+atom 247 (6) (12876, 16341, 1256) def
+info atom atomtype = sp2
+bondg 228 242
+atom 248 (6) (8551, 14614, 745) def
+info atom atomtype = sp2
+bond1 241
+atom 249 (6) (13590, 17365, -787) def
+info atom atomtype = sp2
+bondg 238
+atom 250 (6) (9160, 15194, 1863) def
+info atom atomtype = sp2
+bondg 229 246 248
+atom 251 (6) (13475, 17424, 604) def
+info atom atomtype = sp2
+bondg 227 247 249
+atom 252 (6) (10520, 18176, -3792) def
+info atom atomtype = sp2
+bondg 245
+atom 253 (6) (8138, 16955, -3018) def
+info atom atomtype = sp2
+bondg 244
+atom 254 (6) (7708, 15444, -1180) def
+info atom atomtype = sp2
+bondg 240
+atom 255 (6) (12706, 18064, -2742) def
+info atom atomtype = sp2
+bondg 234
+atom 256 (6) (11664, 18813, -3299) def
+info atom atomtype = sp2
+bondg 252 255
+atom 257 (6) (7369, 16589, -1909) def
+info atom atomtype = sp2
+bondg 253 254
+atom 258 (6) (7590, 15500, 215) def
+info atom atomtype = sp2
+bondg 230 248 254
+atom 259 (6) (13337, 18496, -1571) def
+info atom atomtype = sp2
+bondg 231 249 255
+atom 260 (6) (10962, 16250, 2662) def
+info atom atomtype = sp2
+bondg 224 228 246
+atom 261 (6) (10874, 20176, 1866) def
+info atom atomtype = sp2
+atom 262 (6) (9482, 20262, 1751) def
+info atom atomtype = sp2
+bondg 261
+atom 263 (6) (11692, 20499, 778) def
+info atom atomtype = sp2
+bondg 226 261
+atom 264 (6) (8912, 19203, 2466) def
+info atom atomtype = sp2
+bondg 262
+atom 265 (6) (8905, 20673, 546) def
+info atom atomtype = sp2
+bondg 262
+atom 266 (6) (7760, 20048, 40) def
+info atom atomtype = sp2
+bondg 265
+atom 267 (6) (11114, 20909, -428) def
+info atom atomtype = sp2
+bondg 263
+atom 268 (6) (9722, 20996, -542) def
+info atom atomtype = sp2
+bondg 265 267
+atom 269 (6) (7779, 18558, 1959) def
+info atom atomtype = sp2
+bondg 225 264
+atom 270 (6) (7205, 18982, 754) def
+info atom atomtype = sp2
+bondg 266 269
+atom 271 (6) (9090, 20578, -1717) def
+info atom atomtype = sp2
+bondg 268
+atom 272 (6) (7875, 19990, -1351) def
+info atom atomtype = sp2
+bondg 266 271
+atom 273 (6) (9965, 18459, 3008) def
+info atom atomtype = sp2
+bondg 224 264
+atom 274 (6) (11177, 19060, 2653) def
+info atom atomtype = sp2
+bondg 223 261 273
+atom 275 (6) (7437, 18865, -2057) def
+info atom atomtype = sp2
+bondg 272
+atom 276 (6) (9852, 20073, -2776) def
+info atom atomtype = sp2
+bondg 271
+atom 277 (6) (6803, 17842, 54) def
+info atom atomtype = sp2
+bondg 230 270
+atom 278 (6) (11876, 20404, -1487) def
+info atom atomtype = sp2
+bondg 231 267
+atom 279 (6) (6918, 17784, -1337) def
+info atom atomtype = sp2
+bondg 257 275 277
+atom 280 (6) (8196, 18348, -3112) def
+info atom atomtype = sp2
+bondg 253 275
+atom 281 (6) (11243, 19985, -2662) def
+info atom atomtype = sp2
+bondg 256 276 278
+atom 282 (6) (9400, 18955, -3485) def
+info atom atomtype = sp2
+bondg 252 276 280
+atom 283 (1) (11177, 12484, -64) def
+bond1 237
+mol (Wheel-4) def
+atom 284 (6) (13852, -15336, 199) def
+info atom atomtype = sp2
+atom 285 (6) (12780, -14186, -2097) def
+info atom atomtype = sp2
+atom 286 (6) (10602, -14359, -3064) def
+info atom atomtype = sp2
+atom 287 (6) (12805, -16797, 1833) def
+info atom atomtype = sp2
+atom 288 (6) (13560, -15660, 1529) def
+info atom atomtype = sp2
+bondg 284 287
+atom 289 (6) (13735, -13947, 80) def
+info atom atomtype = sp2
+bondg 284
+atom 290 (6) (11647, -13548, -2610) def
+info atom atomtype = sp2
+bondg 285 286
+atom 291 (6) (9309, -13927, -2749) def
+info atom atomtype = sp2
+bondg 286
+atom 292 (6) (11815, -16750, 2820) def
+info atom atomtype = sp2
+bondg 287
+atom 293 (6) (9081, -13156, 3036) def
+info atom atomtype = sp2
+atom 294 (6) (9254, -12075, 2164) def
+info atom atomtype = sp2
+bondg 293
+atom 295 (6) (10188, -13784, 3614) def
+info atom atomtype = sp2
+bondg 293
+atom 296 (6) (8268, -12212, 1179) def
+info atom atomtype = sp2
+bondg 294
+atom 297 (6) (10470, -11464, 1822) def
+info atom atomtype = sp2
+bondg 294
+atom 298 (6) (10851, -10620, 575) def
+bond1 297
+atom 299 (6) (11443, -13308, 3222) def
+info atom atomtype = sp2
+bondg 295
+atom 300 (6) (11532, -12226, 2339) def
+info atom atomtype = sp2
+bondg 297 299
+atom 301 (6) (8548, -11736, -105) def
+info atom atomtype = sp2
+bondg 296
+atom 302 (6) (9699, -10804, -573) def
+bond1 298 301 97
+atom 303 (6) (12527, -12273, 1346) def
+info atom atomtype = sp2
+bondg 300
+atom 304 (6) (12054, -11540, 244) def
+info atom atomtype = sp2
+bond1 298
+bondg 303
+atom 305 (6) (7534, -13363, 1483) def
+info atom atomtype = sp2
+bondg 296
+atom 306 (6) (8010, -13968, 2651) def
+info atom atomtype = sp2
+bondg 293 305
+atom 307 (6) (12371, -12219, -942) def
+info atom atomtype = sp2
+bondg 304
+atom 308 (6) (13359, -13397, 1311) def
+info atom atomtype = sp2
+bondg 289 303
+atom 309 (6) (10127, -11802, -1682) def
+info atom atomtype = sp2
+bond1 302
+atom 310 (6) (12287, -14423, 3192) def
+info atom atomtype = sp2
+bondg 299
+atom 311 (6) (11389, -12352, -1931) def
+info atom atomtype = sp2
+bondg 290 307 309
+atom 312 (6) (13277, -14469, 2206) def
+info atom atomtype = sp2
+bondg 288 308 310
+atom 313 (6) (8035, -15358, 2805) def
+info atom atomtype = sp2
+bondg 306
+atom 314 (6) (7053, -14198, 470) def
+info atom atomtype = sp2
+bondg 305
+atom 315 (6) (8135, -12680, -1068) def
+info atom atomtype = sp2
+bondg 301
+atom 316 (6) (10244, -15170, 3791) def
+info atom atomtype = sp2
+bondg 295
+atom 317 (6) (9167, -15956, 3368) def
+info atom atomtype = sp2
+bondg 313 316
+atom 318 (6) (7393, -13843, -839) def
+info atom atomtype = sp2
+bondg 314 315
+atom 319 (6) (9130, -12723, -2060) def
+info atom atomtype = sp2
+bondg 291 309 315
+atom 320 (6) (11557, -15569, 3522) def
+info atom atomtype = sp2
+bondg 292 310 316
+atom 321 (6) (13193, -13346, -1057) def
+info atom atomtype = sp2
+bondg 285 289 307
+atom 322 (6) (12637, -17281, -552) def
+info atom atomtype = sp2
+atom 323 (6) (11654, -17410, -1537) def
+info atom atomtype = sp2
+bondg 322
+atom 324 (6) (12344, -17593, 778) def
+info atom atomtype = sp2
+bondg 287 322
+atom 325 (6) (11802, -16360, -2449) def
+info atom atomtype = sp2
+bondg 323
+atom 326 (6) (10372, -17852, -1193) def
+info atom atomtype = sp2
+bondg 323
+atom 327 (6) (9230, -17267, -1750) def
+info atom atomtype = sp2
+bondg 326
+atom 328 (6) (11062, -18033, 1124) def
+info atom atomtype = sp2
+bondg 324
+atom 329 (6) (10078, -18162, 138) def
+info atom atomtype = sp2
+bondg 326 328
+atom 330 (6) (10666, -15754, -2996) def
+info atom atomtype = sp2
+bondg 286 325
+atom 331 (6) (9389, -16209, -2651) def
+info atom atomtype = sp2
+bondg 327 330
+atom 332 (6) (8761, -17777, 409) def
+info atom atomtype = sp2
+bondg 329
+atom 333 (6) (8240, -17221, -763) def
+info atom atomtype = sp2
+bondg 327 332
+atom 334 (6) (12875, -15579, -2008) def
+info atom atomtype = sp2
+bondg 285 325
+atom 335 (6) (13403, -16149, -845) def
+info atom atomtype = sp2
+bondg 284 322 334
+atom 336 (6) (7387, -16116, -658) def
+info atom atomtype = sp2
+bondg 333
+atom 337 (6) (8431, -17262, 1666) def
+info atom atomtype = sp2
+bondg 332
+atom 338 (6) (8562, -15088, -2521) def
+info atom atomtype = sp2
+bondg 291 331
+atom 339 (6) (10731, -17519, 2382) def
+info atom atomtype = sp2
+bondg 292 328
+atom 340 (6) (7571, -15043, -1533) def
+info atom atomtype = sp2
+bondg 318 336 338
+atom 341 (6) (7057, -15591, 594) def
+info atom atomtype = sp2
+bondg 314 336
+atom 342 (6) (9414, -17133, 2653) def
+info atom atomtype = sp2
+bondg 317 337 339
+atom 343 (6) (7567, -16166, 1763) def
+info atom atomtype = sp2
+bondg 313 337 341
+atom 344 (1) (11147, -9606, 810) def
+bond1 298
+csys (View-1) (0.356228, 0.816395, 0.396533, -0.222175) (30.339253) (-10.526067, 0.143466, -1.133044) (1.000000)
+egroup (nanocar)
+end1
+group (Clipboard)
+info opengroup open = True
+mol (Wheel) def
+atom 345 (6) (3224, 1269, 177) def
+info atom atomtype = sp2
+atom 346 (6) (1318, 3237, -236) def
+info atom atomtype = sp2
+atom 347 (6) (-809, 3157, -1367) def
+info atom atomtype = sp2
+atom 348 (6) (3262, -1041, -484) def
+info atom atomtype = sp2
+atom 349 (6) (3427, -63, 480) def
+info atom atomtype = sp2
+bondg 345 348
+atom 350 (6) (2618, 1883, 1264) def
+info atom atomtype = sp2
+bondg 345
+atom 351 (6) (-34, 3520, -276) def
+info atom atomtype = sp2
+bondg 346 347
+atom 352 (6) (-2069, 2613, -1181) def
+info atom atomtype = sp2
+bondg 347
+atom 353 (6) (2609, -2218, -166) def
+info atom atomtype = sp2
+bondg 348
+atom 354 (6) (-1115, -2109, 2423) def
+info atom atomtype = sp2
+atom 355 (6) (-1602, -896, 2882) def
+info atom atomtype = sp2
+bondg 354
+atom 356 (6) (245, -2368, 2451) def
+info atom atomtype = sp2
+bondg 354
+atom 357 (6) (-2664, -522, 2075) def
+info atom atomtype = sp2
+bondg 355
+atom 358 (6) (-726, 62, 3366) def
+info atom atomtype = sp2
+bondg 355
+atom 359 (6) (-915, 1396, 3049) def
+bond1 358
+atom 360 (6) (1120, -1409, 2931) def
+info atom atomtype = sp2
+bondg 356
+atom 361 (6) (634, -193, 3382) def
+info atom atomtype = sp2
+bondg 358 360
+atom 362 (6) (-2869, 812, 1759) def
+info atom atomtype = sp2
+bondg 357
+atom 363 (6) (-2000, 1766, 2268) def
+bond1 359 362
+atom 364 (6) (1288, 983, 3056) def
+info atom atomtype = sp2
+bondg 361
+atom 365 (6) (335, 1966, 2852) def
+info atom atomtype = sp2
+bond1 359
+bondg 364
+atom 366 (6) (-2828, -1504, 1111) def
+info atom atomtype = sp2
+bondg 357
+atom 367 (6) (-1871, -2480, 1324) def
+info atom atomtype = sp2
+bondg 354 366
+atom 368 (6) (540, 2919, 1866) def
+info atom atomtype = sp2
+bondg 365
+atom 369 (6) (2429, 945, 2270) def
+info atom atomtype = sp2
+bondg 350 364
+atom 370 (6) (-1831, 2734, 1302) def
+info atom atomtype = sp2
+bond1 363
+atom 371 (6) (2264, -1450, 2154) def
+info atom atomtype = sp2
+bondg 360
+atom 372 (6) (-521, 3325, 1085) def
+info atom atomtype = sp2
+bondg 351 368 370
+atom 373 (6) (2915, -272, 1832) def
+info atom atomtype = sp2
+bondg 349 369 371
+atom 374 (6) (-1267, -3105, 244) def
+info atom atomtype = sp2
+bondg 367
+atom 375 (6) (-3189, -1156, -179) def
+info atom atomtype = sp2
+bondg 366
+atom 376 (6) (-3251, 1164, 470) def
+info atom atomtype = sp2
+bondg 362
+atom 377 (6) (849, -2999, 1379) def
+info atom atomtype = sp2
+bondg 356
+atom 378 (6) (89, -3367, 283) def
+info atom atomtype = sp2
+bondg 374 377
+atom 379 (6) (-3413, 174, -485) def
+info atom atomtype = sp2
+bondg 375 376
+atom 380 (6) (-2624, 2355, 146) def
+info atom atomtype = sp2
+bondg 352 370 376
+atom 381 (6) (2095, -2429, 1191) def
+info atom atomtype = sp2
+bondg 353 371 377
+atom 382 (6) (1666, 2872, 1058) def
+info atom atomtype = sp2
+bondg 346 350 368
+atom 383 (6) (2700, 655, -2082) def
+info atom atomtype = sp2
+atom 384 (6) (1633, 1031, -2881) def
+info atom atomtype = sp2
+bondg 383
+atom 385 (6) (2897, -680, -1769) def
+info atom atomtype = sp2
+bondg 348 383
+atom 386 (6) (1147, 2241, -2414) def
+info atom atomtype = sp2
+bondg 384
+atom 387 (6) (758, 71, -3365) def
+info atom atomtype = sp2
+bondg 384
+atom 388 (6) (-602, 324, -3388) def
+info atom atomtype = sp2
+bondg 387
+atom 389 (6) (2021, -1638, -2248) def
+info atom atomtype = sp2
+bondg 385
+atom 390 (6) (949, -1260, -3042) def
+info atom atomtype = sp2
+bondg 387 389
+atom 391 (6) (-213, 2508, -2441) def
+info atom atomtype = sp2
+bondg 347 386
+atom 392 (6) (-1078, 1550, -2949) def
+info atom atomtype = sp2
+bondg 388 391
+atom 393 (6) (-297, -1830, -2845) def
+info atom atomtype = sp2
+bondg 390
+atom 394 (6) (-1257, -856, -3061) def
+info atom atomtype = sp2
+bondg 388 393
+atom 395 (6) (1912, 2608, -1318) def
+info atom atomtype = sp2
+bondg 346 386
+atom 396 (6) (2867, 1628, -1112) def
+info atom atomtype = sp2
+bondg 345 383 395
+atom 397 (6) (-2404, -845, -2280) def
+info atom atomtype = sp2
+bondg 394
+atom 398 (6) (-477, -2777, -1849) def
+info atom atomtype = sp2
+bondg 393
+atom 399 (6) (-2233, 1591, -2199) def
+info atom atomtype = sp2
+bondg 352 392
+atom 400 (6) (1846, -2589, -1259) def
+info atom atomtype = sp2
+bondg 353 389
+atom 401 (6) (-2915, 358, -1844) def
+info atom atomtype = sp2
+bondg 379 397 399
+atom 402 (6) (-2577, -1772, -1263) def
+info atom atomtype = sp2
+bondg 375 397
+atom 403 (6) (599, -3156, -1068) def
+info atom atomtype = sp2
+bondg 378 398 400
+atom 404 (6) (-1611, -2746, -1050) def
+info atom atomtype = sp2
+bondg 374 398 402
+atom 405 (0) (-1237, 1758, 3649) def
+bond1 359
+atom 406 (0) (-2302, 2062, 2913) def
+bond1 363
+info chunk hotspot = 406
+mol (Rod) def
+atom 407 (6) (-16, 65, 0) def
+info atom atomtype = sp
+atom 408 (0) (-676, 65, 0) def
+bond1 407
+atom 409 (6) (1303, 65, 0) def
+info atom atomtype = sp
+bond3 407
+atom 410 (0) (2077, 65, 0) def
+bond1 409
+info chunk hotspot = 408
+mol (Connector-copy1) def
+atom 411 (6) (1218, 720, 30) def
+info atom atomtype = sp2
+atom 412 (6) (1244, -675, 22) def
+info atom atomtype = sp2
+bonda 411
+atom 413 (6) (48, -1396, -7) def
+info atom atomtype = sp2
+bonda 412
+atom 414 (6) (-1172, -720, -30) def
+info atom atomtype = sp2
+bonda 413
+atom 415 (6) (-1199, 675, -22) def
+info atom atomtype = sp2
+bonda 414
+atom 416 (6) (-3, 1396, 6) def
+info atom atomtype = sp2
+bonda 411 415
+atom 417 (0) (-1861, 1041, -34) def
+bond1 415
+atom 418 (0) (-17, 2153, 10) def
+bond1 416
+atom 419 (0) (1866, 1111, 46) def
+bond1 411
+atom 420 (0) (1907, -1041, 34) def
+bond1 412
+atom 421 (0) (63, -2153, -10) def
+bond1 413
+atom 422 (0) (-1820, -1111, -45) def
+bond1 414
+mol (rear axle) def
+atom 423 (6) (1194, 748, 28) def
+info atom atomtype = sp2
+atom 424 (6) (1220, -646, 20) def
+info atom atomtype = sp2
+bonda 423
+atom 425 (6) (25, -1367, -8) def
+info atom atomtype = sp2
+bonda 424
+atom 426 (6) (-1194, -691, -30) def
+info atom atomtype = sp2
+bonda 425
+atom 427 (6) (-1221, 703, -23) def
+info atom atomtype = sp2
+bonda 426
+atom 428 (6) (-25, 1424, 4) def
+info atom atomtype = sp2
+bonda 423 427
+atom 429 (0) (-1883, 1069, -34) def
+bond1 427
+atom 430 (0) (1883, -1012, 32) def
+bond1 424
+atom 431 (0) (-1842, -1082, -45) def
+bond1 426
+atom 432 (6) (53, -2783, -13) def
+info atom atomtype = sp
+bond1 425
+atom 433 (6) (-51, 2840, 11) def
+info atom atomtype = sp
+bond1 428
+atom 434 (6) (-75, 4159, 18) def
+info atom atomtype = sp
+bond3 433
+atom 435 (6) (80, -4159, -18) def
+info atom atomtype = sp
+bond3 432
+atom 436 (6) (749, -7774, 1022) def
+info atom atomtype = sp2
+atom 437 (6) (719, -6380, 1027) def
+info atom atomtype = sp2
+bonda 436
+atom 438 (6) (110, -5690, -24) def
+info atom atomtype = sp2
+bond1 435
+bonda 437
+atom 439 (6) (-467, -6398, -1077) def
+info atom atomtype = sp2
+bonda 438
+atom 440 (6) (-437, -7793, -1083) def
+info atom atomtype = sp2
+bonda 439
+atom 441 (6) (169, -8482, -31) def
+info atom atomtype = sp2
+bonda 436 440
+atom 442 (0) (-751, -8176, -1655) def
+bond1 440
+atom 443 (0) (1079, -8148, 1592) def
+bond1 436
+atom 444 (0) (1033, -5996, 1600) def
+bond1 437
+atom 445 (0) (-796, -6024, -1648) def
+bond1 439
+atom 446 (6) (-1126, 6366, 691) def
+info atom atomtype = sp2
+atom 447 (6) (-1152, 7761, 698) def
+info atom atomtype = sp2
+bonda 446
+atom 448 (6) (-151, 8482, 41) def
+info atom atomtype = sp2
+bonda 447
+atom 449 (6) (871, 7805, -622) def
+info atom atomtype = sp2
+bonda 448
+atom 450 (6) (898, 6410, -629) def
+info atom atomtype = sp2
+bonda 449
+atom 451 (6) (-102, 5690, 25) def
+info atom atomtype = sp2
+bond1 434
+bonda 446 450
+atom 452 (0) (1453, 6044, -989) def
+bond1 450
+atom 453 (0) (-1668, 5975, 1047) def
+bond1 446
+atom 454 (0) (-1708, 8127, 1058) def
+bond1 447
+atom 455 (0) (1414, 8196, -977) def
+bond1 449
+atom 456 (6) (198, -9898, -36) def
+info atom atomtype = sp
+bond1 441
+atom 457 (6) (226, -11217, -41) def
+info atom atomtype = sp
+bond3 456
+atom 458 (0) (243, -11991, -44) def
+bond1 457
+atom 459 (6) (-177, 9898, 51) def
+info atom atomtype = sp
+bond1 448
+atom 460 (6) (-202, 11217, 60) def
+info atom atomtype = sp
+bond3 459
+atom 461 (0) (-216, 11991, 66) def
+bond1 460
+atom 462 (0) (1914, 1101, 42) def
+bond1 423
+info chunk hotspot = 431
+egroup (Clipboard)
+end molecular machine part nanocar
-- 
cgit v1.2.3