Index: src/Parser/unittests/ParserPsi3UnitTest.cpp
===================================================================
--- src/Parser/unittests/ParserPsi3UnitTest.cpp	(revision 120a864188be57481b4c722362c9ea2925039878)
+++ src/Parser/unittests/ParserPsi3UnitTest.cpp	(revision d640ea4f513e93f75000fdadbe0789cf1671a383)
@@ -53,10 +53,10 @@
 \tbasis = \"cc-pVTZ\"\n\
 \tfreeze_core = no\n\
-\tunits = bohr\n\
+\tunits = angstrom\n\
 \tgeometry = (\n\
-\t\t( H     0.0000      0.0000  0.0 )\n\
-\t\t( H     0.0000      0.0000  0.74 )\n\
+\t( H\t0\t0\t-0.37 )\n\
+\t( H\t0\t0\t0.37 )\n\
 \t)\n\
-\torigin = (0.0 0.0 0.0)\n\
+\torigin = (0.0\t0.0\t0.0)\n\
 )\n"; // tested with ???
 
@@ -70,10 +70,10 @@
 \tbasis = \"cc-pVTZ\"\n\
 \tfreeze_core = no\n\
-\tunits = bohr\n\
+\tunits = angstrom\n\
 \tgeometry = (\n\
-\t\t( H     0.0000      0.0000  0.0 )\n\
-\t\t( H     0.0000      0.0000  0.74 )\n\
+\t( H\t0\t0\t-0.37 )\n\
+\t( H\t0\t0\t0.37 )\n\
 \t)\n\
-\torigin = (0.0 0.0 0.0)\n\
+\torigin = (0.0\t0.0\t0.0)\n\
 )\n"; // tested with ???
 
@@ -87,12 +87,12 @@
 \tbasis = \"cc-pVTZ\"\n\
 \tmultp = 2\n\
-\t%charge = 2\n\
+\tcharge = 2\n\
 \tfreeze_core = no\n\
-\tunits = bohr\n\
+\tunits = angstrom\n\
 \tgeometry = (\n\
-\t\t( H     0.0000      0.0000  0.0 )\n\
-\t\t( H     0.0000      0.0000  0.74 )\n\
+\t( H\t0\t0\t-0.37 )\n\
+\t( H\t0\t0\t0.37 )\n\
 \t)\n\
-\torigin = (0.0 0.0 0.0)\n\
+\torigin = (0.0\t0.0\t0.0)\n\
 )\n"; // tested with ???
 
@@ -103,17 +103,19 @@
 \twfn = scf\n\
 \tmaxiter = 80\n\
-\treference = TWOCON\n\
+\treference = twocon\n\
 \tbasis = \"cc-pVTZ\"\n\
 \tmultp = 1\n\
-\t%charge = 2\n\
-\tsocc = ( 1 1 0 0 0 0 0 0)\n\
-\tdocc = (0     0     0     0     0     0     0     0)\n\
+\tcharge = 2\n\
+\tsocc = ( 1 1 0 0 0 0 0 0 )\n\
+\tdocc = ( 0 0 0 0 0 0 0 0 )\n\
+\tsubgroup = c2v\n\
+\tunique_axis = x\n\
 \tfreeze_core = no\n\
-\tunits = bohr\n\
+\tunits = angstrom\n\
 \tgeometry = (\n\
-\t\t( H     0.0000      0.0000  0.0 )\n\
-\t\t( H     0.0000      0.0000  0.74 )\n\
+\t( H\t0\t0\t-0.37 )\n\
+\t( H\t0\t0\t0.37 )\n\
 \t)\n\
-\torigin = (0.0 0.0 0.0)\n\
+\torigin = (0.0\t0.0\t0.0)\n\
 )\n"; // tested with ???
 
@@ -286,78 +288,123 @@
       ++iter)
     PositionSum += (*iter)->getPosition();
-  CPPUNIT_ASSERT_EQUAL( PositionSum, Vector(0,0,0.74) );
+  CPPUNIT_ASSERT_EQUAL( PositionSum, Vector(0.,0.,0.) );
 }
 
 void ParserPsi3UnitTest::writePsi3Test() {
-//  // build up water molecule
-//  string first;
-//  string second;
-//  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
-//
-//  std::vector<atom *> atoms = World::getInstance().getAllAtoms();
-//  {
-//    // compare both configs for CLHF
-//    stringstream output;
-//    params->setParameter(
-//        Psi3Parser_Parameters::theoryParam,
-//        params->getTheoryName(Psi3Parser_Parameters::CLHF)
-//            );
-//    parser->save(&output, atoms);
-//    stringstream input(waterPsi3_CLHF);
-//    for (; std::getline(input, first) && std::getline(output, second); ) {
-//      //std::cout << "Comparing '" << first << "' to '" << second << "'" << std::endl;
-//      CPPUNIT_ASSERT(first == second);
-//    }
-//  }
-//  {
-//    // compare both configs for CLKS
-//    stringstream output;
-//    params->setParameter(
-//        Psi3Parser_Parameters::theoryParam,
-//        params->getTheoryName(Psi3Parser_Parameters::CLKS)
-//            );
-//    stringstream input(waterPsi3_CLKS);
-//    for (; std::getline(input, first) && std::getline(output, second); ) {
-//      //std::cout << "Comparing '" << first << "' to '" << second << "'" << std::endl;
-//      CPPUNIT_ASSERT(first == second);
-//    }
-//  }
-//  {
-//    // compare both configs for MBPT2
-//    stringstream output;
-//    params->setParameter(
-//        Psi3Parser_Parameters::theoryParam,
-//        params->getTheoryName(Psi3Parser_Parameters::MBPT2)
-//            );
-//    stringstream input(waterPsi3_MBPT2);
-//    for (; std::getline(input, first) && std::getline(output, second); ) {
-//      //std::cout << "Comparing '" << first << "' to '" << second << "'" << std::endl;
-//      CPPUNIT_ASSERT(first == second);
-//    }
-//  }
-//  {
-//    // compare both configs for MBPT2_R12
-//    stringstream output;
-//    params->setParameter(
-//        Psi3Parser_Parameters::theoryParam,
-//        params->getTheoryName(Psi3Parser_Parameters::MBPT2_R12)
-//            );
-//    stringstream input(waterPsi3_MBPT2_R12);
-//    for (; std::getline(input, first) && std::getline(output, second); ) {
-//      //std::cout << "Comparing '" << first << "' to '" << second << "'" << std::endl;
-//      CPPUNIT_ASSERT(first == second);
-//    }
-//  }
-}
+  // build up hydrogen molecule
+  string first;
+  string second;
+  atom *Walker = NULL;
+  Walker = World::getInstance().createAtom();
+  Walker->setType(1);
+  Walker->setPosition(Vector(0.,0.,0.));
+  Walker = World::getInstance().createAtom();
+  Walker->setType(1);
+  Walker->setPosition(Vector(0.,0,0.74));
+  CPPUNIT_ASSERT_EQUAL(2, World::getInstance().numAtoms());
+
+  // set general parameters: label and freeze_core
+  params->setParameter(
+      Psi3Parser_Parameters::labelParam,
+      "cc-pVTZ SCF H2"
+          );
+  params->setParameter(
+      Psi3Parser_Parameters::freeze_coreParam,
+      params->ValidFreezeCore[Psi3Parser_Parameters::NO]
+          );
+  params->setParameter(
+      Psi3Parser_Parameters::unitsParam,
+      params->ValidUnits[Psi3Parser_Parameters::angstrom]
+          );
+
+  // create two stringstreams, one stored, one created
+  std::vector<atom *> atoms = World::getInstance().getAllAtoms();
+  {
+    // compare both configs for RHF
+    stringstream output;
+    params->setParameter(
+        Psi3Parser_Parameters::referenceParam,
+        params->ValidReference[Psi3Parser_Parameters::RHF]
+            );
+    parser->save(&output, atoms);
+    stringstream input(hydrogenPsi3_RHF);
+    // check for non-empty streams
+    input.peek();
+    output.peek();
+    CPPUNIT_ASSERT(input.good() && output.good());
+    // check equality of streams per line (for debugging)
+    for (; std::getline(input, first) && std::getline(output, second); ) {
+      //std::cout << "Comparing '" << first << "' to '" << second << "'" << std::endl;
+      CPPUNIT_ASSERT(first == second);
+    }
+  }
+  {
+    // compare both configs for ROHF
+    stringstream output;
+    params->setParameter(
+        Psi3Parser_Parameters::referenceParam,
+        params->ValidReference[Psi3Parser_Parameters::ROHF]
+            );
+    parser->save(&output, atoms);
+    stringstream input(hydrogenPsi3_ROHF);
+    // check for non-empty streams
+    input.peek();
+    output.peek();
+    CPPUNIT_ASSERT(input.good() && output.good());
+    // check equality of streams per line (for debugging)
+    for (; std::getline(input, first) && std::getline(output, second); ) {
+      //std::cout << "Comparing '" << first << "' to '" << second << "'" << std::endl;
+      CPPUNIT_ASSERT(first == second);
+    }
+  }
+  {
+    params->setParameter(Psi3Parser_Parameters::multiplicityParam, "2");
+    params->setParameter(Psi3Parser_Parameters::chargeParam, "2");
+    // compare both configs for UHF
+    stringstream output;
+    params->setParameter(
+        Psi3Parser_Parameters::referenceParam,
+        params->ValidReference[Psi3Parser_Parameters::UHF]
+            );
+    parser->save(&output, atoms);
+    params->setParameter(Psi3Parser_Parameters::chargeParam, "0");
+    params->setParameter(Psi3Parser_Parameters::multiplicityParam, "1");
+    stringstream input(hydrogenPsi3_UHF);
+    // check for non-empty streams
+    input.peek();
+    output.peek();
+    CPPUNIT_ASSERT(input.good() && output.good());
+    // check equality of streams per line (for debugging)
+    for (; std::getline(input, first) && std::getline(output, second); ) {
+      //std::cout << "Comparing '" << first << "' to '" << second << "'" << std::endl;
+      CPPUNIT_ASSERT(first == second);
+    }
+  }
+  {
+    params->setParameter(Psi3Parser_Parameters::multiplicityParam, "1");
+    params->setParameter(Psi3Parser_Parameters::chargeParam, "2");
+    params->setParameter(Psi3Parser_Parameters::soccParam, "( 1 1 0 0 0 0 0 0 )");
+    params->setParameter(Psi3Parser_Parameters::doccParam, "( 0 0 0 0 0 0 0 0 )");
+    params->setParameter(Psi3Parser_Parameters::subgroupParam, "c2v");
+    params->setParameter(Psi3Parser_Parameters::unique_axisParam, "x");
+    // compare both configs for TWOCON
+    stringstream output;
+    params->setParameter(
+        Psi3Parser_Parameters::referenceParam,
+        params->ValidReference[Psi3Parser_Parameters::TWOCON]
+            );
+    parser->save(&output, atoms);
+    params->setParameter(Psi3Parser_Parameters::multiplicityParam, "1");
+    params->setParameter(Psi3Parser_Parameters::chargeParam, "0");
+    stringstream input(hydrogenPsi3_TWOCON);
+    // check for non-empty streams
+    input.peek();
+    output.peek();
+    CPPUNIT_ASSERT(input.good() && output.good());
+    // check equality of streams per line (for debugging)
+    for (; std::getline(input, first) && std::getline(output, second); ) {
+      //std::cout << "Comparing '" << first << "' to '" << second << "'" << std::endl;
+      CPPUNIT_ASSERT(first == second);
+    }
+  }
+}
