Index: src/Parser/unittests/Makefile.am
===================================================================
--- src/Parser/unittests/Makefile.am	(revision 1ee3b8d85bc3b82115508a188e0b73f52d7404db)
+++ src/Parser/unittests/Makefile.am	(revision 9e4fd1ddec881550116572abf3d4c0dedb07b1b8)
@@ -8,6 +8,9 @@
 
 TESTS = \
-  ParserCommonUnitTest \
-  ParserTremoloUnitTest
+  ParserMpqcUnitTest \
+  ParserPcpUnitTest \
+  ParserPdbUnitTest \
+  ParserTremoloUnitTest \
+  ParserXyzUnitTest
 
 
@@ -34,8 +37,18 @@
 UILIBS = ../../UIElements/libMolecuilderUI.la  
 
-ParserCommonUnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \
-	ParserCommonUnitTest.cpp \
-	ParserCommonUnitTest.hpp
-ParserCommonUnitTest_LDADD = ${ALLLIBS}
+ParserMpqcUnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \
+	ParserMpqcUnitTest.cpp \
+	ParserMpqcUnitTest.hpp
+ParserMpqcUnitTest_LDADD = ${ALLLIBS}
+
+ParserPcpUnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \
+	ParserPcpUnitTest.cpp \
+	ParserPcpUnitTest.hpp
+ParserPcpUnitTest_LDADD = ${ALLLIBS}
+
+ParserPdbUnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \
+	ParserPdbUnitTest.cpp \
+	ParserPdbUnitTest.hpp
+ParserPdbUnitTest_LDADD = ${ALLLIBS}
 
 ParserTremoloUnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \
@@ -44,4 +57,9 @@
 ParserTremoloUnitTest_LDADD = ${ALLLIBS}
 
+ParserXyzUnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \
+	ParserXyzUnitTest.cpp \
+	ParserXyzUnitTest.hpp
+ParserXyzUnitTest_LDADD = ${ALLLIBS}
+
 
 #AUTOMAKE_OPTIONS = parallel-tests
Index: src/Parser/unittests/ParserCommonUnitTest.cpp
===================================================================
--- src/Parser/unittests/ParserCommonUnitTest.cpp	(revision 1ee3b8d85bc3b82115508a188e0b73f52d7404db)
+++ 	(revision )
@@ -1,292 +1,0 @@
-/*
- * Project: MoleCuilder
- * Description: creates and alters molecular systems
- * Copyright (C)  2010 University of Bonn. All rights reserved.
- * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
- */
-
-/*
- * ParserCommonUnitTest.cpp
- *
- *  Created on: Mar 3, 2010
- *      Author: metzler
- */
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "ParserCommonUnitTest.hpp"
-
-#include <cppunit/CompilerOutputter.h>
-#include <cppunit/extensions/TestFactoryRegistry.h>
-#include <cppunit/ui/text/TestRunner.h>
-
-#include "Parser/MpqcParser.hpp"
-#include "Parser/PdbParser.hpp"
-#include "Parser/PcpParser.hpp"
-#include "Parser/TremoloParser.hpp"
-#include "Parser/XyzParser.hpp"
-#include "World.hpp"
-#include "atom.hpp"
-#include "element.hpp"
-#include "periodentafel.hpp"
-#include "Descriptors/AtomTypeDescriptor.hpp"
-
-#ifdef HAVE_TESTRUNNER
-#include "UnitTestMain.hpp"
-#endif /*HAVE_TESTRUNNER*/
-
-using namespace std;
-
-// Registers the fixture into the 'registry'
-CPPUNIT_TEST_SUITE_REGISTRATION( ParserCommonUnitTest );
-
-static string waterPcp = "# ParallelCarParinello - main configuration file - created with molecuilder\n\
-\n\
-mainname\tpcp\t# programm name (for runtime files)\n\
-defaultpath\not specified\t# where to put files during runtime\n\
-pseudopotpath\not specified\t# where to find pseudopotentials\n\
-\n\
-ProcPEGamma\t8\t# for parallel computing: share constants\n\
-ProcPEPsi\t1\t# for parallel computing: share wave functions\n\
-DoOutVis\t0\t# Output data for OpenDX\n\
-DoOutMes\t1\t# Output data for measurements\n\
-DoOutOrbitals\t0\t# Output all Orbitals\n\
-DoOutCurr\t0\t# Ouput current density for OpenDx\n\
-DoOutNICS\t0\t# Output Nucleus independent current shieldings\n\
-DoPerturbation\t0\t# Do perturbation calculate and determine susceptibility and shielding\n\
-DoFullCurrent\t0\t# Do full perturbation\n\
-DoConstrainedMD\t0\t# Do perform a constrained (>0, relating to current MD step) instead of unconstrained (0) MD\n\
-Thermostat\tBerendsen\t2.5\t# Which Thermostat and its parameters to use in MD case.\n\
-CommonWannier\t0\t# Put virtual centers at indivual orbits, all common, merged by variance, to grid point, to cell center\n\
-SawtoothStart\t0.01\t# Absolute value for smooth transition at cell border \n\
-VectorPlane\t0\t# Cut plane axis (x, y or z: 0,1,2) for two-dim current vector plot\n\
-VectorCut\t0\t# Cut plane axis value\n\
-AddGramSch\t1\t# Additional GramSchmidtOrtogonalization to be safe\n\
-Seed\t1\t# initial value for random seed for Psi coefficients\n\
-\n\
-MaxOuterStep\t0\t# number of MolecularDynamics/Structure optimization steps\n\
-Deltat\t0.01\t# time per MD step\n\
-OutVisStep\t10\t# Output visual data every ...th step\n\
-OutSrcStep\t5\t# Output \"restart\" data every ..th step\n\
-TargetTemp\t0.000950045\t# Target temperature\n\
-MaxPsiStep\t3\t# number of Minimisation steps per state (0 - default)\n\
-EpsWannier\t1e-07\t# tolerance value for spread minimisation of orbitals\n\
-# Values specifying when to stop\n\
-MaxMinStep\t100\t# Maximum number of steps\n\
-RelEpsTotalE\t1e-07\t# relative change in total energy\n\
-RelEpsKineticE\t1e-05\t# relative change in kinetic energy\n\
-MaxMinStopStep\t2\t# check every ..th steps\n\
-MaxMinGapStopStep\t1\t# check every ..th steps\n\
-\n\
-# Values specifying when to stop for INIT, otherwise same as above\n\
-MaxInitMinStep\t100\t# Maximum number of steps\n\
-InitRelEpsTotalE\t1e-05\t# relative change in total energy\n\
-InitRelEpsKineticE\t0.0001\t# relative change in kinetic energy\n\
-InitMaxMinStopStep\t2\t# check every ..th steps\n\
-InitMaxMinGapStopStep\t1\t# check every ..th steps\n\
-\n\
-BoxLength\t# (Length of a unit cell)\n\
-20\n\
-0\t20\n\
-0\t0\t20\n\
-\n\
-ECut\t128\t# energy cutoff for discretization in Hartrees\n\
-MaxLevel\t5\t# number of different levels in the code, >=2\n\
-Level0Factor\t2\t# factor by which node number increases from S to 0 level\n\
-RiemannTensor\t0\t# (Use metric)\n\
-PsiType\t0\t# 0 - doubly occupied, 1 - SpinUp,SpinDown\n\
-MaxPsiDouble\t2\t# here: specifying both maximum number of SpinUp- and -Down-states\n\
-PsiMaxNoUp\t2\t# here: specifying maximum number of SpinUp-states\n\
-PsiMaxNoDown\t2\t# here: specifying maximum number of SpinDown-states\n\
-AddPsis\t0\t# Additional unoccupied Psis for bandgap determination\n\
-\n\
-RCut\t20\t# R-cut for the ewald summation\n\
-StructOpt\t0\t# Do structure optimization beforehand\n\
-IsAngstroem\t1\t# 0 - Bohr, 1 - Angstroem\n\
-RelativeCoord\t0\t# whether ion coordinates are relative (1) or absolute (0)\n\
-MaxTypes\t2\t# maximum number of different ion types\n\
-\n\
-# Ion type data (PP = PseudoPotential, Z = atomic number)\n\
-#Ion_TypeNr.\tAmount\tZ\tRGauss\tL_Max(PP)L_Loc(PP)IonMass\t# chemical name, symbol\n\
-Ion_Type1\t2\t1\t1.0\t3\t3\t1.008\tHydrogen\tH\n\
-Ion_Type2\t1\t8\t1.0\t3\t3\t15.999\tOxygen\tO\n\
-#Ion_TypeNr._Nr.R[0]\tR[1]\tR[2]\tMoveType (0 MoveIon, 1 FixedIon)\n\
-Ion_Type2_1\t0.000000000\t0.000000000\t0.000000000\t0 # molecule nr 0\n\
-Ion_Type1_1\t0.758602\t0.000000000\t0.504284\t0 # molecule nr 1\n\
-Ion_Type1_2\t0.758602\t0.000000000\t-0.504284\t0 # molecule nr 2\n";
-//----|----*|---||--*||---|***|-------|-------|-------|-----|---------------|-|-
-//000000011111111112222222222333333333344444444445555555555666666666677777777778
-//345678901234567890123456789012345678901234567890123456789012345678901234567890
-static string waterPdb = "\
-REMARK  This is a test water molecule as written by TREMOLO.\n\
-ATOM      1  OT  GMT-    0       1.583   1.785   1.480  1.00178.02           O-2\n\
-ATOM      2  HT  GMT-    0       1.186   1.643   2.213  1.00103.58           H+1\n\
-ATOM      3  HT  GMT-    0       2.642   1.896   1.730  1.00126.00           H+1\n\
-ATOM      4  OT  GMT-    1       3.583   1.785   1.480  1.00178.02           O-2\n\
-ATOM      5  HT  GMT-    1       3.186   1.643   2.213  1.00103.58           H+1\n\
-ATOM      6  HT  GMT-    1       4.642   1.896   1.730  1.00126.00           H+1\n\
-CONECT    1    2    3\n\
-CONECT    2    1\n\
-CONECT    3    1\n\
-CONECT    4    5    6\n\
-CONECT    5    4\n\
-CONECT    6    4\n\
-END";
-static string waterMpqc ="% Created by MoleCuilder\n\
-mpqc: (\n\
-\tsavestate = no\n\
-\tdo_gradient = yes\n\
-\tmole<MBPT2>: (\n\
-\t\tmaxiter = 200\n\
-\t\tbasis = $:basis\n\
-\t\tmolecule = $:molecule\n\
-\t\treference<CLHF>: (\n\
-\t\t\tbasis = $:basis\n\
-\t\t\tmolecule = $:molecule\n\
-\t\t)\n\
-\t)\n\
-)\n\
-molecule<Molecule>: (\n\
-\tunit = angstrom\n\
-\t{ atoms geometry } = {\n\
-\t\tO [ -0.505735\t0\t0 ]\n\
-\t\tH [ 0.252867\t0\t0.504284 ]\n\
-\t\tH [ 0.252867\t0\t-0.504284 ]\n\
-\t}\n\
-)\n\
-basis<GaussianBasisSet>: (\n\
-\tname = \"3-21G\"\n\
-\tmolecule = $:molecule\n\
-)\n";
-static string waterXyz = "3\n\tH2O: water molecule\nO\t0\t0\t0\nH\t0.758602\t0\t0.504284\nH\t0.758602\t0\t-0.504284\n";
-
-void ParserCommonUnitTest::setUp() {
-  World::getInstance();
-
-  setVerbosity(2);
-
-  // we need hydrogens and oxygens in the following tests
-  CPPUNIT_ASSERT(World::getInstance().getPeriode()->FindElement(1) != NULL);
-  CPPUNIT_ASSERT(World::getInstance().getPeriode()->FindElement(8) != NULL);
-}
-
-void ParserCommonUnitTest::tearDown() {
-  ChangeTracker::purgeInstance();
-  World::purgeInstance();
-}
-
-/************************************ tests ***********************************/
-
-void ParserCommonUnitTest::rewriteAnXyzTest() {
-  cout << "Testing the XYZ parser." << endl;
-  XyzParser* testParser = new XyzParser();
-  stringstream input;
-  input << waterXyz;
-  testParser->load(&input);
-  input.clear();
-
-  CPPUNIT_ASSERT_EQUAL(3, World::getInstance().numAtoms());
-
-  // store and parse in again
-  {
-    stringstream output;
-    std::vector<atom *> atoms = World::getInstance().getAllAtoms();
-    testParser->save(&output, atoms);
-    input << output.str();
-    testParser->load(&input);
-  }
-
-  // now twice as many
-  CPPUNIT_ASSERT_EQUAL(6, World::getInstance().numAtoms());
-
-  // check every atom
-  std::vector<atom *> atoms = World::getInstance().getAllAtoms();
-  std::vector<atom *>::const_iterator firstiter = atoms.begin();
-  std::vector<atom *>::const_iterator seconditer = atoms.begin();
-  for (size_t i=0;i<3;i++)
-    ++seconditer;
-  for (;
-      seconditer != atoms.end();
-      ++firstiter,++seconditer) {
-    // check position and type (only stuff xyz stores)
-    CPPUNIT_ASSERT_EQUAL((*firstiter)->getPosition(),(*seconditer)->getPosition());
-    CPPUNIT_ASSERT_EQUAL((*firstiter)->getType(),(*seconditer)->getType());
-  }
-}
-
-void ParserCommonUnitTest::readwritePcpTest() {
-  stringstream input(waterPcp);
-  PcpParser* testParser = new PcpParser();
-  testParser->load(&input);
-  input.clear();
-
-  CPPUNIT_ASSERT_EQUAL(3, World::getInstance().numAtoms());
-
-  // check that equality function is ok
-  CPPUNIT_ASSERT(*testParser == *testParser);
-
-  stringstream output;
-  std::vector<atom *> atoms = World::getInstance().getAllAtoms();
-  testParser->save(&output, atoms);
-
-  input << output.str();
-  PcpParser* testParser2 = new PcpParser();
-  testParser2->load(&input);
-
-  CPPUNIT_ASSERT_EQUAL(6, World::getInstance().numAtoms());
-
-  CPPUNIT_ASSERT(*testParser == *testParser2);
-}
-
-void ParserCommonUnitTest::readwritePdbTest() {
-  stringstream input;
-  input << waterPdb;
-  PdbParser* testParser = new PdbParser();
-  testParser->load(&input);
-  input.clear();
-
-  CPPUNIT_ASSERT_EQUAL(6, World::getInstance().numAtoms());
-
-  stringstream output;
-  std::vector<atom *> atoms = World::getInstance().getAllAtoms();
-  testParser->save(&output, atoms);
-
-//  std::cout << "Save PDB is:" << std::endl;
-//  std::cout << output.str() << std::endl;
-
-  input << output.str();
-  PdbParser* testParser2 = new PdbParser();
-  testParser2->load(&input);
-
-  CPPUNIT_ASSERT_EQUAL(12, World::getInstance().numAtoms());
-}
-
-void ParserCommonUnitTest::writeMpqcTest() {
-  // build up water molecule
-  atom *Walker = NULL;
-  Walker = World::getInstance().createAtom();
-  Walker->setType(8);
-  Walker->setPosition(Vector(0,0,0));
-  Walker = World::getInstance().createAtom();
-  Walker->setType(1);
-  Walker->setPosition(Vector(0.758602,0,0.504284));
-  Walker = World::getInstance().createAtom();
-  Walker->setType(1);
-  Walker->setPosition(Vector(0.758602,0,-0.504284));
-  CPPUNIT_ASSERT_EQUAL(3, World::getInstance().numAtoms());
-
-  // create two stringstreams, one stored, one created
-  stringstream input(waterMpqc);
-  MpqcParser* testParser = new MpqcParser();
-  stringstream output;
-  std::vector<atom *> atoms = World::getInstance().getAllAtoms();
-  testParser->save(&output, atoms);
-
-  // compare both configs
-  string first = input.str();
-  string second = output.str();
-  CPPUNIT_ASSERT(first == second);
-}
Index: src/Parser/unittests/ParserCommonUnitTest.hpp
===================================================================
--- src/Parser/unittests/ParserCommonUnitTest.hpp	(revision 1ee3b8d85bc3b82115508a188e0b73f52d7404db)
+++ 	(revision )
@@ -1,38 +1,0 @@
-/*
- * ParserCommonUnitTest.hpp
- *
- *  Created on: Mar 3, 2010
- *      Author: metzler
- */
-#ifndef PARSERCOMMONUNITTEST_HPP_
-#define PARSERCOMMONUNITTEST_HPP_
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-
-#include <cppunit/extensions/HelperMacros.h>
-#include <string>
-
-class ParserCommonUnitTest :  public CppUnit::TestFixture
-{
-  CPPUNIT_TEST_SUITE( ParserCommonUnitTest ) ;
-  CPPUNIT_TEST ( rewriteAnXyzTest );
-  CPPUNIT_TEST ( readwritePdbTest );
-  CPPUNIT_TEST ( readwritePcpTest );
-  CPPUNIT_TEST ( writeMpqcTest );
-  CPPUNIT_TEST_SUITE_END();
-
-public:
-  void setUp();
-  void tearDown();
-
-  void rewriteAnXyzTest();
-  void readwritePdbTest();
-  void readwritePcpTest();
-  void writeMpqcTest();
-};
-
-#endif /* PARSERCOMMONUNITTEST_HPP_ */
Index: src/Parser/unittests/ParserMpqcUnitTest.cpp
===================================================================
--- src/Parser/unittests/ParserMpqcUnitTest.cpp	(revision 9e4fd1ddec881550116572abf3d4c0dedb07b1b8)
+++ src/Parser/unittests/ParserMpqcUnitTest.cpp	(revision 9e4fd1ddec881550116572abf3d4c0dedb07b1b8)
@@ -0,0 +1,111 @@
+/*
+ * Project: MoleCuilder
+ * Description: creates and alters molecular systems
+ * Copyright (C)  2010 University of Bonn. All rights reserved.
+ * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
+ */
+
+/*
+ * ParserMpqcUnitTest.cpp
+ *
+ *  Created on: Mar 3, 2010
+ *      Author: metzler
+ */
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "ParserMpqcUnitTest.hpp"
+
+#include <cppunit/CompilerOutputter.h>
+#include <cppunit/extensions/TestFactoryRegistry.h>
+#include <cppunit/ui/text/TestRunner.h>
+
+#include "Parser/MpqcParser.hpp"
+#include "World.hpp"
+#include "atom.hpp"
+#include "element.hpp"
+#include "periodentafel.hpp"
+#include "Descriptors/AtomTypeDescriptor.hpp"
+
+#ifdef HAVE_TESTRUNNER
+#include "UnitTestMain.hpp"
+#endif /*HAVE_TESTRUNNER*/
+
+using namespace std;
+
+// Registers the fixture into the 'registry'
+CPPUNIT_TEST_SUITE_REGISTRATION( ParserMpqcUnitTest );
+
+static string waterMpqc ="% Created by MoleCuilder\n\
+mpqc: (\n\
+\tsavestate = no\n\
+\tdo_gradient = yes\n\
+\tmole<MBPT2>: (\n\
+\t\tmaxiter = 200\n\
+\t\tbasis = $:basis\n\
+\t\tmolecule = $:molecule\n\
+\t\treference<CLHF>: (\n\
+\t\t\tbasis = $:basis\n\
+\t\t\tmolecule = $:molecule\n\
+\t\t)\n\
+\t)\n\
+)\n\
+molecule<Molecule>: (\n\
+\tunit = angstrom\n\
+\t{ atoms geometry } = {\n\
+\t\tO [ -0.505735\t0\t0 ]\n\
+\t\tH [ 0.252867\t0\t0.504284 ]\n\
+\t\tH [ 0.252867\t0\t-0.504284 ]\n\
+\t}\n\
+)\n\
+basis<GaussianBasisSet>: (\n\
+\tname = \"3-21G\"\n\
+\tmolecule = $:molecule\n\
+)\n";
+
+void ParserMpqcUnitTest::setUp() {
+  World::getInstance();
+
+  setVerbosity(2);
+
+  // we need hydrogens and oxygens in the following tests
+  CPPUNIT_ASSERT(World::getInstance().getPeriode()->FindElement(1) != NULL);
+  CPPUNIT_ASSERT(World::getInstance().getPeriode()->FindElement(8) != NULL);
+}
+
+void ParserMpqcUnitTest::tearDown() {
+  ChangeTracker::purgeInstance();
+  World::purgeInstance();
+}
+
+/************************************ tests ***********************************/
+
+void ParserMpqcUnitTest::writeMpqcTest() {
+  // build up water molecule
+  atom *Walker = NULL;
+  Walker = World::getInstance().createAtom();
+  Walker->setType(8);
+  Walker->setPosition(Vector(0,0,0));
+  Walker = World::getInstance().createAtom();
+  Walker->setType(1);
+  Walker->setPosition(Vector(0.758602,0,0.504284));
+  Walker = World::getInstance().createAtom();
+  Walker->setType(1);
+  Walker->setPosition(Vector(0.758602,0,-0.504284));
+  CPPUNIT_ASSERT_EQUAL(3, World::getInstance().numAtoms());
+
+  // create two stringstreams, one stored, one created
+  stringstream input(waterMpqc);
+  MpqcParser* testParser = new MpqcParser();
+  stringstream output;
+  std::vector<atom *> atoms = World::getInstance().getAllAtoms();
+  testParser->save(&output, atoms);
+
+  // compare both configs
+  string first = input.str();
+  string second = output.str();
+  CPPUNIT_ASSERT(first == second);
+}
Index: src/Parser/unittests/ParserMpqcUnitTest.hpp
===================================================================
--- src/Parser/unittests/ParserMpqcUnitTest.hpp	(revision 9e4fd1ddec881550116572abf3d4c0dedb07b1b8)
+++ src/Parser/unittests/ParserMpqcUnitTest.hpp	(revision 9e4fd1ddec881550116572abf3d4c0dedb07b1b8)
@@ -0,0 +1,32 @@
+/*
+ * ParserMpqcUnitTest.hpp
+ *
+ *  Created on: Mar 3, 2010
+ *      Author: metzler
+ */
+#ifndef PARSERMPQCUNITTEST_HPP_
+#define PARSERMPQCUNITTEST_HPP_
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+
+#include <cppunit/extensions/HelperMacros.h>
+#include <string>
+
+class ParserMpqcUnitTest :  public CppUnit::TestFixture
+{
+  CPPUNIT_TEST_SUITE( ParserMpqcUnitTest ) ;
+  CPPUNIT_TEST ( writeMpqcTest );
+  CPPUNIT_TEST_SUITE_END();
+
+public:
+  void setUp();
+  void tearDown();
+
+  void writeMpqcTest();
+};
+
+#endif /* PARSERMPQCUNITTEST_HPP_ */
Index: src/Parser/unittests/ParserPcpUnitTest.cpp
===================================================================
--- src/Parser/unittests/ParserPcpUnitTest.cpp	(revision 9e4fd1ddec881550116572abf3d4c0dedb07b1b8)
+++ src/Parser/unittests/ParserPcpUnitTest.cpp	(revision 9e4fd1ddec881550116572abf3d4c0dedb07b1b8)
@@ -0,0 +1,156 @@
+/*
+ * Project: MoleCuilder
+ * Description: creates and alters molecular systems
+ * Copyright (C)  2010 University of Bonn. All rights reserved.
+ * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
+ */
+
+/*
+ * ParserPcpUnitTest.cpp
+ *
+ *  Created on: Mar 3, 2010
+ *      Author: metzler
+ */
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "ParserPcpUnitTest.hpp"
+
+#include <cppunit/CompilerOutputter.h>
+#include <cppunit/extensions/TestFactoryRegistry.h>
+#include <cppunit/ui/text/TestRunner.h>
+
+#include "Parser/PcpParser.hpp"
+#include "World.hpp"
+#include "atom.hpp"
+#include "element.hpp"
+#include "periodentafel.hpp"
+#include "Descriptors/AtomTypeDescriptor.hpp"
+
+#ifdef HAVE_TESTRUNNER
+#include "UnitTestMain.hpp"
+#endif /*HAVE_TESTRUNNER*/
+
+using namespace std;
+
+// Registers the fixture into the 'registry'
+CPPUNIT_TEST_SUITE_REGISTRATION( ParserPcpUnitTest );
+
+static string waterPcp = "# ParallelCarParinello - main configuration file - created with molecuilder\n\
+\n\
+mainname\tpcp\t# programm name (for runtime files)\n\
+defaultpath\not specified\t# where to put files during runtime\n\
+pseudopotpath\not specified\t# where to find pseudopotentials\n\
+\n\
+ProcPEGamma\t8\t# for parallel computing: share constants\n\
+ProcPEPsi\t1\t# for parallel computing: share wave functions\n\
+DoOutVis\t0\t# Output data for OpenDX\n\
+DoOutMes\t1\t# Output data for measurements\n\
+DoOutOrbitals\t0\t# Output all Orbitals\n\
+DoOutCurr\t0\t# Ouput current density for OpenDx\n\
+DoOutNICS\t0\t# Output Nucleus independent current shieldings\n\
+DoPerturbation\t0\t# Do perturbation calculate and determine susceptibility and shielding\n\
+DoFullCurrent\t0\t# Do full perturbation\n\
+DoConstrainedMD\t0\t# Do perform a constrained (>0, relating to current MD step) instead of unconstrained (0) MD\n\
+Thermostat\tBerendsen\t2.5\t# Which Thermostat and its parameters to use in MD case.\n\
+PcpWannier\t0\t# Put virtual centers at indivual orbits, all common, merged by variance, to grid point, to cell center\n\
+SawtoothStart\t0.01\t# Absolute value for smooth transition at cell border \n\
+VectorPlane\t0\t# Cut plane axis (x, y or z: 0,1,2) for two-dim current vector plot\n\
+VectorCut\t0\t# Cut plane axis value\n\
+AddGramSch\t1\t# Additional GramSchmidtOrtogonalization to be safe\n\
+Seed\t1\t# initial value for random seed for Psi coefficients\n\
+\n\
+MaxOuterStep\t0\t# number of MolecularDynamics/Structure optimization steps\n\
+Deltat\t0.01\t# time per MD step\n\
+OutVisStep\t10\t# Output visual data every ...th step\n\
+OutSrcStep\t5\t# Output \"restart\" data every ..th step\n\
+TargetTemp\t0.000950045\t# Target temperature\n\
+MaxPsiStep\t3\t# number of Minimisation steps per state (0 - default)\n\
+EpsWannier\t1e-07\t# tolerance value for spread minimisation of orbitals\n\
+# Values specifying when to stop\n\
+MaxMinStep\t100\t# Maximum number of steps\n\
+RelEpsTotalE\t1e-07\t# relative change in total energy\n\
+RelEpsKineticE\t1e-05\t# relative change in kinetic energy\n\
+MaxMinStopStep\t2\t# check every ..th steps\n\
+MaxMinGapStopStep\t1\t# check every ..th steps\n\
+\n\
+# Values specifying when to stop for INIT, otherwise same as above\n\
+MaxInitMinStep\t100\t# Maximum number of steps\n\
+InitRelEpsTotalE\t1e-05\t# relative change in total energy\n\
+InitRelEpsKineticE\t0.0001\t# relative change in kinetic energy\n\
+InitMaxMinStopStep\t2\t# check every ..th steps\n\
+InitMaxMinGapStopStep\t1\t# check every ..th steps\n\
+\n\
+BoxLength\t# (Length of a unit cell)\n\
+20\n\
+0\t20\n\
+0\t0\t20\n\
+\n\
+ECut\t128\t# energy cutoff for discretization in Hartrees\n\
+MaxLevel\t5\t# number of different levels in the code, >=2\n\
+Level0Factor\t2\t# factor by which node number increases from S to 0 level\n\
+RiemannTensor\t0\t# (Use metric)\n\
+PsiType\t0\t# 0 - doubly occupied, 1 - SpinUp,SpinDown\n\
+MaxPsiDouble\t2\t# here: specifying both maximum number of SpinUp- and -Down-states\n\
+PsiMaxNoUp\t2\t# here: specifying maximum number of SpinUp-states\n\
+PsiMaxNoDown\t2\t# here: specifying maximum number of SpinDown-states\n\
+AddPsis\t0\t# Additional unoccupied Psis for bandgap determination\n\
+\n\
+RCut\t20\t# R-cut for the ewald summation\n\
+StructOpt\t0\t# Do structure optimization beforehand\n\
+IsAngstroem\t1\t# 0 - Bohr, 1 - Angstroem\n\
+RelativeCoord\t0\t# whether ion coordinates are relative (1) or absolute (0)\n\
+MaxTypes\t2\t# maximum number of different ion types\n\
+\n\
+# Ion type data (PP = PseudoPotential, Z = atomic number)\n\
+#Ion_TypeNr.\tAmount\tZ\tRGauss\tL_Max(PP)L_Loc(PP)IonMass\t# chemical name, symbol\n\
+Ion_Type1\t2\t1\t1.0\t3\t3\t1.008\tHydrogen\tH\n\
+Ion_Type2\t1\t8\t1.0\t3\t3\t15.999\tOxygen\tO\n\
+#Ion_TypeNr._Nr.R[0]\tR[1]\tR[2]\tMoveType (0 MoveIon, 1 FixedIon)\n\
+Ion_Type2_1\t0.000000000\t0.000000000\t0.000000000\t0 # molecule nr 0\n\
+Ion_Type1_1\t0.758602\t0.000000000\t0.504284\t0 # molecule nr 1\n\
+Ion_Type1_2\t0.758602\t0.000000000\t-0.504284\t0 # molecule nr 2\n";
+
+void ParserPcpUnitTest::setUp() {
+  World::getInstance();
+
+  setVerbosity(2);
+
+  // we need hydrogens and oxygens in the following tests
+  CPPUNIT_ASSERT(World::getInstance().getPeriode()->FindElement(1) != NULL);
+  CPPUNIT_ASSERT(World::getInstance().getPeriode()->FindElement(8) != NULL);
+}
+
+void ParserPcpUnitTest::tearDown() {
+  ChangeTracker::purgeInstance();
+  World::purgeInstance();
+}
+
+/************************************ tests ***********************************/
+
+void ParserPcpUnitTest::readwritePcpTest() {
+  stringstream input(waterPcp);
+  PcpParser* testParser = new PcpParser();
+  testParser->load(&input);
+  input.clear();
+
+  CPPUNIT_ASSERT_EQUAL(3, World::getInstance().numAtoms());
+
+  // check that equality function is ok
+  CPPUNIT_ASSERT(*testParser == *testParser);
+
+  stringstream output;
+  std::vector<atom *> atoms = World::getInstance().getAllAtoms();
+  testParser->save(&output, atoms);
+
+  input << output.str();
+  PcpParser* testParser2 = new PcpParser();
+  testParser2->load(&input);
+
+  CPPUNIT_ASSERT_EQUAL(6, World::getInstance().numAtoms());
+
+  CPPUNIT_ASSERT(*testParser == *testParser2);
+}
Index: src/Parser/unittests/ParserPcpUnitTest.hpp
===================================================================
--- src/Parser/unittests/ParserPcpUnitTest.hpp	(revision 9e4fd1ddec881550116572abf3d4c0dedb07b1b8)
+++ src/Parser/unittests/ParserPcpUnitTest.hpp	(revision 9e4fd1ddec881550116572abf3d4c0dedb07b1b8)
@@ -0,0 +1,32 @@
+/*
+ * ParserPcpUnitTest.hpp
+ *
+ *  Created on: Mar 3, 2010
+ *      Author: metzler
+ */
+#ifndef PARSERPCPUNITTEST_HPP_
+#define PARSERPCPUNITTEST_HPP_
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+
+#include <cppunit/extensions/HelperMacros.h>
+#include <string>
+
+class ParserPcpUnitTest :  public CppUnit::TestFixture
+{
+  CPPUNIT_TEST_SUITE( ParserPcpUnitTest ) ;
+  CPPUNIT_TEST ( readwritePcpTest );
+  CPPUNIT_TEST_SUITE_END();
+
+public:
+  void setUp();
+  void tearDown();
+
+  void readwritePcpTest();
+};
+
+#endif /* PARSERPCPUNITTEST_HPP_ */
Index: src/Parser/unittests/ParserPdbUnitTest.cpp
===================================================================
--- src/Parser/unittests/ParserPdbUnitTest.cpp	(revision 9e4fd1ddec881550116572abf3d4c0dedb07b1b8)
+++ src/Parser/unittests/ParserPdbUnitTest.cpp	(revision 9e4fd1ddec881550116572abf3d4c0dedb07b1b8)
@@ -0,0 +1,99 @@
+/*
+ * Project: MoleCuilder
+ * Description: creates and alters molecular systems
+ * Copyright (C)  2010 University of Bonn. All rights reserved.
+ * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
+ */
+
+/*
+ * ParserPdbUnitTest.cpp
+ *
+ *  Created on: Mar 3, 2010
+ *      Author: metzler
+ */
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "ParserPdbUnitTest.hpp"
+
+#include <cppunit/CompilerOutputter.h>
+#include <cppunit/extensions/TestFactoryRegistry.h>
+#include <cppunit/ui/text/TestRunner.h>
+
+#include "Parser/PdbParser.hpp"
+#include "World.hpp"
+#include "atom.hpp"
+#include "element.hpp"
+#include "periodentafel.hpp"
+#include "Descriptors/AtomTypeDescriptor.hpp"
+
+#ifdef HAVE_TESTRUNNER
+#include "UnitTestMain.hpp"
+#endif /*HAVE_TESTRUNNER*/
+
+using namespace std;
+
+// Registers the fixture into the 'registry'
+CPPUNIT_TEST_SUITE_REGISTRATION( ParserPdbUnitTest );
+
+//----|----*|---||--*||---|***|-------|-------|-------|-----|---------------|-|-
+//000000011111111112222222222333333333344444444445555555555666666666677777777778
+//345678901234567890123456789012345678901234567890123456789012345678901234567890
+static string waterPdb = "\
+REMARK  This is a test water molecule as written by TREMOLO.\n\
+ATOM      1  OT  GMT-    0       1.583   1.785   1.480  1.00178.02           O-2\n\
+ATOM      2  HT  GMT-    0       1.186   1.643   2.213  1.00103.58           H+1\n\
+ATOM      3  HT  GMT-    0       2.642   1.896   1.730  1.00126.00           H+1\n\
+ATOM      4  OT  GMT-    1       3.583   1.785   1.480  1.00178.02           O-2\n\
+ATOM      5  HT  GMT-    1       3.186   1.643   2.213  1.00103.58           H+1\n\
+ATOM      6  HT  GMT-    1       4.642   1.896   1.730  1.00126.00           H+1\n\
+CONECT    1    2    3\n\
+CONECT    2    1\n\
+CONECT    3    1\n\
+CONECT    4    5    6\n\
+CONECT    5    4\n\
+CONECT    6    4\n\
+END";
+
+void ParserPdbUnitTest::setUp() {
+  World::getInstance();
+
+  setVerbosity(2);
+
+  // we need hydrogens and oxygens in the following tests
+  CPPUNIT_ASSERT(World::getInstance().getPeriode()->FindElement(1) != NULL);
+  CPPUNIT_ASSERT(World::getInstance().getPeriode()->FindElement(8) != NULL);
+}
+
+void ParserPdbUnitTest::tearDown() {
+  ChangeTracker::purgeInstance();
+  World::purgeInstance();
+}
+
+/************************************ tests ***********************************/
+
+void ParserPdbUnitTest::readwritePdbTest() {
+  stringstream input;
+  input << waterPdb;
+  PdbParser* testParser = new PdbParser();
+  testParser->load(&input);
+  input.clear();
+
+  CPPUNIT_ASSERT_EQUAL(6, World::getInstance().numAtoms());
+
+  stringstream output;
+  std::vector<atom *> atoms = World::getInstance().getAllAtoms();
+  testParser->save(&output, atoms);
+
+//  std::cout << "Save PDB is:" << std::endl;
+//  std::cout << output.str() << std::endl;
+
+  input << output.str();
+  PdbParser* testParser2 = new PdbParser();
+  testParser2->load(&input);
+
+  CPPUNIT_ASSERT_EQUAL(12, World::getInstance().numAtoms());
+}
Index: src/Parser/unittests/ParserPdbUnitTest.hpp
===================================================================
--- src/Parser/unittests/ParserPdbUnitTest.hpp	(revision 9e4fd1ddec881550116572abf3d4c0dedb07b1b8)
+++ src/Parser/unittests/ParserPdbUnitTest.hpp	(revision 9e4fd1ddec881550116572abf3d4c0dedb07b1b8)
@@ -0,0 +1,32 @@
+/*
+ * ParserPdbUnitTest.hpp
+ *
+ *  Created on: Mar 3, 2010
+ *      Author: metzler
+ */
+#ifndef PARSERPDBUNITTEST_HPP_
+#define PARSERPDBUNITTEST_HPP_
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+
+#include <cppunit/extensions/HelperMacros.h>
+#include <string>
+
+class ParserPdbUnitTest :  public CppUnit::TestFixture
+{
+  CPPUNIT_TEST_SUITE( ParserPdbUnitTest ) ;
+  CPPUNIT_TEST ( readwritePdbTest );
+  CPPUNIT_TEST_SUITE_END();
+
+public:
+  void setUp();
+  void tearDown();
+
+  void readwritePdbTest();
+};
+
+#endif /* PARSERPDBUNITTEST_HPP_ */
Index: src/Parser/unittests/ParserXyzUnitTest.cpp
===================================================================
--- src/Parser/unittests/ParserXyzUnitTest.cpp	(revision 9e4fd1ddec881550116572abf3d4c0dedb07b1b8)
+++ src/Parser/unittests/ParserXyzUnitTest.cpp	(revision 9e4fd1ddec881550116572abf3d4c0dedb07b1b8)
@@ -0,0 +1,96 @@
+/*
+ * Project: MoleCuilder
+ * Description: creates and alters molecular systems
+ * Copyright (C)  2010 University of Bonn. All rights reserved.
+ * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
+ */
+
+/*
+ * ParserXyzUnitTest.cpp
+ *
+ *  Created on: Mar 3, 2010
+ *      Author: metzler
+ */
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "ParserXyzUnitTest.hpp"
+
+#include <cppunit/CompilerOutputter.h>
+#include <cppunit/extensions/TestFactoryRegistry.h>
+#include <cppunit/ui/text/TestRunner.h>
+
+#include "Parser/XyzParser.hpp"
+#include "World.hpp"
+#include "atom.hpp"
+#include "element.hpp"
+#include "periodentafel.hpp"
+#include "Descriptors/AtomTypeDescriptor.hpp"
+
+#ifdef HAVE_TESTRUNNER
+#include "UnitTestMain.hpp"
+#endif /*HAVE_TESTRUNNER*/
+
+using namespace std;
+
+// Registers the fixture into the 'registry'
+CPPUNIT_TEST_SUITE_REGISTRATION( ParserXyzUnitTest );
+
+static string waterXyz = "3\n\tH2O: water molecule\nO\t0\t0\t0\nH\t0.758602\t0\t0.504284\nH\t0.758602\t0\t-0.504284\n";
+
+void ParserXyzUnitTest::setUp() {
+  World::getInstance();
+
+  setVerbosity(2);
+
+  // we need hydrogens and oxygens in the following tests
+  CPPUNIT_ASSERT(World::getInstance().getPeriode()->FindElement(1) != NULL);
+  CPPUNIT_ASSERT(World::getInstance().getPeriode()->FindElement(8) != NULL);
+}
+
+void ParserXyzUnitTest::tearDown() {
+  ChangeTracker::purgeInstance();
+  World::purgeInstance();
+}
+
+/************************************ tests ***********************************/
+
+void ParserXyzUnitTest::rewriteAnXyzTest() {
+  cout << "Testing the XYZ parser." << endl;
+  XyzParser* testParser = new XyzParser();
+  stringstream input;
+  input << waterXyz;
+  testParser->load(&input);
+  input.clear();
+
+  CPPUNIT_ASSERT_EQUAL(3, World::getInstance().numAtoms());
+
+  // store and parse in again
+  {
+    stringstream output;
+    std::vector<atom *> atoms = World::getInstance().getAllAtoms();
+    testParser->save(&output, atoms);
+    input << output.str();
+    testParser->load(&input);
+  }
+
+  // now twice as many
+  CPPUNIT_ASSERT_EQUAL(6, World::getInstance().numAtoms());
+
+  // check every atom
+  std::vector<atom *> atoms = World::getInstance().getAllAtoms();
+  std::vector<atom *>::const_iterator firstiter = atoms.begin();
+  std::vector<atom *>::const_iterator seconditer = atoms.begin();
+  for (size_t i=0;i<3;i++)
+    ++seconditer;
+  for (;
+      seconditer != atoms.end();
+      ++firstiter,++seconditer) {
+    // check position and type (only stuff xyz stores)
+    CPPUNIT_ASSERT_EQUAL((*firstiter)->getPosition(),(*seconditer)->getPosition());
+    CPPUNIT_ASSERT_EQUAL((*firstiter)->getType(),(*seconditer)->getType());
+  }
+}
Index: src/Parser/unittests/ParserXyzUnitTest.hpp
===================================================================
--- src/Parser/unittests/ParserXyzUnitTest.hpp	(revision 9e4fd1ddec881550116572abf3d4c0dedb07b1b8)
+++ src/Parser/unittests/ParserXyzUnitTest.hpp	(revision 9e4fd1ddec881550116572abf3d4c0dedb07b1b8)
@@ -0,0 +1,32 @@
+/*
+ * ParserXyzUnitTest.hpp
+ *
+ *  Created on: Mar 3, 2010
+ *      Author: metzler
+ */
+#ifndef PARSERXYZUNITTEST_HPP_
+#define PARSERXYZUNITTEST_HPP_
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+
+#include <cppunit/extensions/HelperMacros.h>
+#include <string>
+
+class ParserXyzUnitTest :  public CppUnit::TestFixture
+{
+  CPPUNIT_TEST_SUITE( ParserXyzUnitTest ) ;
+  CPPUNIT_TEST ( rewriteAnXyzTest );
+  CPPUNIT_TEST_SUITE_END();
+
+public:
+  void setUp();
+  void tearDown();
+
+  void rewriteAnXyzTest();
+};
+
+#endif /* PARSERXYZUNITTEST_HPP_ */
