Index: src/Parser/MpqcParser.cpp
===================================================================
--- src/Parser/MpqcParser.cpp	(revision f7c19ef45479bcaff60cc9fdb2998767b71aefb3)
+++ src/Parser/MpqcParser.cpp	(revision c1db05903a75be5fb69205e949bced95e69b4a1c)
@@ -25,4 +25,5 @@
 
 #include "MpqcParser.hpp"
+#include "MpqcParser_Parameters.hpp"
 
 #include "atom.hpp"
@@ -42,5 +43,7 @@
  */
 MpqcParser::MpqcParser()
-{}
+{
+  parameters = new MpqcParser_Parameters();
+}
 
 /** Destructor of MpqcParser.
@@ -48,5 +51,7 @@
  */
 MpqcParser::~MpqcParser()
-{}
+{
+  delete parameters;
+}
 
 /** Load an MPQC config file into the World.
@@ -123,5 +128,5 @@
         std::string value(*tok_iter);
         std::stringstream linestream("theory = "+value);
-        linestream >> params;
+        linestream >> getParams();
       } else if (linestring.find("integrals<") != string::npos) { // get theory
         tokenizer tokens(linestring, angularsep);
@@ -132,5 +137,5 @@
         std::string value(*tok_iter);
         std::stringstream linestream("integration = "+value);
-        linestream >> params;
+        linestream >> getParams();
       } else if ((linestring.find("molecule") == string::npos) && (linestring.find("basis") == string::npos)){
         // molecule and basis must not be parsed in this section
@@ -142,7 +147,7 @@
         std::string key;
         whitespacefilter >> ws >> key;
-        if (params.haveParam(key)) {
+        if (getParams().haveParam(key)) {
           std::stringstream linestream(linestring);
-          linestream >> params;
+          linestream >> getParams();
         } else { // unknown keys are simply ignored as long as parser is incomplete
           DoLog(2) && (Log() << Verbose(2) << "INFO: '"+key+"' is unknown and ignored." << std::endl);
@@ -165,5 +170,5 @@
       if (key == "name") {
         std::stringstream linestream("basis = "+value);
-        linestream >> params;
+        linestream >> getParams();
       }
     }
@@ -183,5 +188,5 @@
       if (key == "name") {
         std::stringstream linestream("aux_basis = "+value);
-        linestream >> params;
+        linestream >> getParams();
       }
     }
@@ -227,57 +232,57 @@
     *file << "% Created by MoleCuilder" << endl;
     *file << "mpqc: (" << endl;
-    *file << "\tsavestate = " << params.getString(MpqcParser_Parameters::savestateParam) << endl;
-    *file << "\tdo_gradient = " << params.getString(MpqcParser_Parameters::do_gradientParam) << endl;
-    if (params.getBool(MpqcParser_Parameters::hessianParam)) {
+    *file << "\tsavestate = " << getParams().getString(MpqcParser_Parameters::savestateParam) << endl;
+    *file << "\tdo_gradient = " << getParams().getString(MpqcParser_Parameters::do_gradientParam) << endl;
+    if (getParams().getBool(MpqcParser_Parameters::hessianParam)) {
       *file << "\tfreq<MolecularFrequencies>: (" << endl;
       *file << "\t\tmolecule=$:molecule" << endl;
       *file << "\t)" << endl;
     }
-    switch (params.getTheory()) {
+    switch (getParams().getTheory()) {
       case MpqcParser_Parameters::CLHF:
-        *file << "\tmole<" << params.getString(MpqcParser_Parameters::theoryParam) << ">: (" << endl;
+        *file << "\tmole<" << getParams().getString(MpqcParser_Parameters::theoryParam) << ">: (" << endl;
         *file << "\t\tmolecule = $:molecule" << endl;
         *file << "\t\tbasis = $:basis" << endl;
-        *file << "\t\tmaxiter = " << toString(params.getInt(MpqcParser_Parameters::maxiterParam))<< endl;
-        *file << "\t\tmemory = " << toString(params.getInt(MpqcParser_Parameters::memoryParam)) << endl;
+        *file << "\t\tmaxiter = " << toString(getParams().getInt(MpqcParser_Parameters::maxiterParam))<< endl;
+        *file << "\t\tmemory = " << toString(getParams().getInt(MpqcParser_Parameters::memoryParam)) << endl;
         *file << "\t)" << endl;
         break;
       case MpqcParser_Parameters::CLKS:
-        *file << "\tmole<" << params.getString(MpqcParser_Parameters::theoryParam) << ">: (" << endl;
+        *file << "\tmole<" << getParams().getString(MpqcParser_Parameters::theoryParam) << ">: (" << endl;
         *file << "\t\tfunctional<StdDenFunctional>:(name=B3LYP)" << endl;
         *file << "\t\tmolecule = $:molecule" << endl;
         *file << "\t\tbasis = $:basis" << endl;
-        *file << "\t\tmaxiter = " << toString(params.getInt(MpqcParser_Parameters::maxiterParam))<< endl;
-        *file << "\t\tmemory = " << toString(params.getInt(MpqcParser_Parameters::memoryParam)) << endl;
+        *file << "\t\tmaxiter = " << toString(getParams().getInt(MpqcParser_Parameters::maxiterParam))<< endl;
+        *file << "\t\tmemory = " << toString(getParams().getInt(MpqcParser_Parameters::memoryParam)) << endl;
         *file << "\t)" << endl;
         break;
       case MpqcParser_Parameters::MBPT2:
-        *file << "\tmole<" << params.getString(MpqcParser_Parameters::theoryParam) << ">: (" << endl;
+        *file << "\tmole<" << getParams().getString(MpqcParser_Parameters::theoryParam) << ">: (" << endl;
         *file << "\t\tbasis = $:basis" << endl;
         *file << "\t\tmolecule = $:molecule" << endl;
-        *file << "\t\tmemory = " << toString(params.getInt(MpqcParser_Parameters::memoryParam)) << endl;
+        *file << "\t\tmemory = " << toString(getParams().getInt(MpqcParser_Parameters::memoryParam)) << endl;
         *file << "\t\treference<CLHF>: (" << endl;
-        *file << "\t\t\tmaxiter = " << toString(params.getInt(MpqcParser_Parameters::maxiterParam))<< endl;
+        *file << "\t\t\tmaxiter = " << toString(getParams().getInt(MpqcParser_Parameters::maxiterParam))<< endl;
         *file << "\t\t\tbasis = $:basis" << endl;
         *file << "\t\t\tmolecule = $:molecule" << endl;
-        *file << "\t\t\tmemory = " << toString(params.getInt(MpqcParser_Parameters::memoryParam)) << endl;
+        *file << "\t\t\tmemory = " << toString(getParams().getInt(MpqcParser_Parameters::memoryParam)) << endl;
         *file << "\t\t)" << endl;
         *file << "\t)" << endl;
         break;
       case MpqcParser_Parameters::MBPT2_R12:
-        *file << "\tmole<" << params.getString(MpqcParser_Parameters::theoryParam) << ">: (" << endl;
+        *file << "\tmole<" << getParams().getString(MpqcParser_Parameters::theoryParam) << ">: (" << endl;
         *file << "\t\tmolecule = $:molecule" << endl;
         *file << "\t\tbasis = $:basis" << endl;
         *file << "\t\taux_basis = $:abasis" << endl;
-        *file << "\t\tstdapprox = \"" << params.getString(MpqcParser_Parameters::stdapproxParam) << "\"" << endl;
-        *file << "\t\tnfzc = " << toString(params.getInt(MpqcParser_Parameters::nfzcParam)) << endl;
-        *file << "\t\tmemory = " << toString(params.getInt(MpqcParser_Parameters::memoryParam)) << endl;
+        *file << "\t\tstdapprox = \"" << getParams().getString(MpqcParser_Parameters::stdapproxParam) << "\"" << endl;
+        *file << "\t\tnfzc = " << toString(getParams().getInt(MpqcParser_Parameters::nfzcParam)) << endl;
+        *file << "\t\tmemory = " << toString(getParams().getInt(MpqcParser_Parameters::memoryParam)) << endl;
         *file << "\t\tintegrals<IntegralCints>:()" << endl;
         *file << "\t\treference<CLHF>: (" << endl;
         *file << "\t\t\tmolecule = $:molecule" << endl;
         *file << "\t\t\tbasis = $:basis" << endl;
-        *file << "\t\t\tmaxiter = " << toString(params.getInt(MpqcParser_Parameters::maxiterParam)) << endl;
-        *file << "\t\t\tmemory = " << toString(params.getInt(MpqcParser_Parameters::memoryParam)) << endl;
-        *file << "\t\t\tintegrals<" << params.getString(MpqcParser_Parameters::integrationParam) << ">:()" << endl;
+        *file << "\t\t\tmaxiter = " << toString(getParams().getInt(MpqcParser_Parameters::maxiterParam)) << endl;
+        *file << "\t\t\tmemory = " << toString(getParams().getInt(MpqcParser_Parameters::memoryParam)) << endl;
+        *file << "\t\t\tintegrals<" << getParams().getString(MpqcParser_Parameters::integrationParam) << ">:()" << endl;
         *file << "\t\t)" << endl;
         *file << "\t)" << endl;
@@ -299,11 +304,11 @@
     *file << ")" << endl;
     *file << "basis<GaussianBasisSet>: (" << endl;
-    *file << "\tname = \"" << params.getString(MpqcParser_Parameters::basisParam) << "\"" << endl;
+    *file << "\tname = \"" << getParams().getString(MpqcParser_Parameters::basisParam) << "\"" << endl;
     *file << "\tmolecule = $:molecule" << endl;
     *file << ")" << endl;
-    if (params.getTheory() == MpqcParser_Parameters::MBPT2_R12) {
+    if (getParams().getTheory() == MpqcParser_Parameters::MBPT2_R12) {
       *file << "% auxiliary basis set specification" << endl;
       *file << "\tabasis<GaussianBasisSet>: (" << endl;
-      *file << "\tname = \"" << params.getString(MpqcParser_Parameters::aux_basisParam) << "\"" << endl;
+      *file << "\tname = \"" << getParams().getString(MpqcParser_Parameters::aux_basisParam) << "\"" << endl;
       *file << "\tmolecule = $:molecule" << endl;
       *file << ")" << endl;
@@ -312,7 +317,3 @@
 }
 
-MpqcParser_Parameters & MpqcParser::getParams()
-{
-  return params;
-}
-
+
