[bcf653] | 1 | /*
|
---|
| 2 | * Project: MoleCuilder
|
---|
| 3 | * Description: creates and alters molecular systems
|
---|
[0aa122] | 4 | * Copyright (C) 2010-2012 University of Bonn. All rights reserved.
|
---|
[bcf653] | 5 | * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
|
---|
| 6 | */
|
---|
| 7 |
|
---|
[43dad6] | 8 | /*
|
---|
| 9 | * MpqcParser.cpp
|
---|
| 10 | *
|
---|
| 11 | * Created on: 12.06.2010
|
---|
| 12 | * Author: heber
|
---|
| 13 | */
|
---|
| 14 |
|
---|
[bf3817] | 15 | // include config.h
|
---|
| 16 | #ifdef HAVE_CONFIG_H
|
---|
| 17 | #include <config.h>
|
---|
| 18 | #endif
|
---|
| 19 |
|
---|
[52cac0] | 20 | #include <iomanip>
|
---|
[aa8ef2] | 21 | #include <iostream>
|
---|
[03a589] | 22 | #include <boost/foreach.hpp>
|
---|
[aa8ef2] | 23 | #include <boost/tokenizer.hpp>
|
---|
[52cac0] | 24 | #include <sstream>
|
---|
[aa8ef2] | 25 | #include <string>
|
---|
| 26 |
|
---|
[ad011c] | 27 | #include "CodePatterns/MemDebug.hpp"
|
---|
[bbbad5] | 28 |
|
---|
[1b2d30] | 29 | #include "MpqcParser.hpp"
|
---|
[c1db05] | 30 | #include "MpqcParser_Parameters.hpp"
|
---|
[1b2d30] | 31 |
|
---|
[6f0841] | 32 | #include "Atom/atom.hpp"
|
---|
[41a467] | 33 | #include "CodePatterns/Log.hpp"
|
---|
| 34 | #include "CodePatterns/toString.hpp"
|
---|
[1b2d30] | 35 | #include "config.hpp"
|
---|
[3bdb6d] | 36 | #include "Element/element.hpp"
|
---|
[41a467] | 37 | #include "Element/periodentafel.hpp"
|
---|
| 38 | #include "LinearAlgebra/Vector.hpp"
|
---|
[aa8ef2] | 39 | #include "molecule.hpp"
|
---|
[42127c] | 40 | #include "MoleculeListClass.hpp"
|
---|
[1b2d30] | 41 | #include "World.hpp"
|
---|
| 42 |
|
---|
[765f16] | 43 | // declare specialized static variables
|
---|
| 44 | const std::string FormatParserTrait<mpqc>::name = "mpqc";
|
---|
| 45 | const std::string FormatParserTrait<mpqc>::suffix = "in";
|
---|
| 46 | const ParserTypes FormatParserTrait<mpqc>::type = mpqc;
|
---|
[1b2d30] | 47 |
|
---|
[ee50c1] | 48 | // a converter we often need
|
---|
| 49 | ConvertTo<bool> FormatParser<mpqc>::Converter;
|
---|
[1b2d30] | 50 |
|
---|
| 51 | /** Constructor of MpqcParser.
|
---|
| 52 | *
|
---|
| 53 | */
|
---|
[765f16] | 54 | FormatParser< mpqc >::FormatParser() :
|
---|
| 55 | FormatParser_common(new MpqcParser_Parameters())
|
---|
| 56 | {}
|
---|
[1b2d30] | 57 |
|
---|
| 58 | /** Destructor of MpqcParser.
|
---|
| 59 | *
|
---|
| 60 | */
|
---|
[765f16] | 61 | FormatParser< mpqc >::~FormatParser()
|
---|
| 62 | {}
|
---|
[1b2d30] | 63 |
|
---|
| 64 | /** Load an MPQC config file into the World.
|
---|
| 65 | * \param *file input stream
|
---|
| 66 | */
|
---|
[765f16] | 67 | void FormatParser< mpqc >::load(istream *file)
|
---|
[1b2d30] | 68 | {
|
---|
[4cbca0] | 69 | bool MpqcSection = false;
|
---|
| 70 | bool MoleculeSection = false;
|
---|
| 71 | bool GeometrySection = false;
|
---|
| 72 | bool BasisSection = false;
|
---|
| 73 | bool AuxBasisSection = false;
|
---|
[aa8ef2] | 74 | char line[MAXSTRINGSIZE];
|
---|
| 75 | typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
|
---|
| 76 | boost::char_separator<char> sep("[]");
|
---|
[4cbca0] | 77 | boost::char_separator<char> angularsep("<>");
|
---|
[311da7b] | 78 | boost::char_separator<char> equalitysep(" =");
|
---|
[aa8ef2] | 79 | boost::char_separator<char> whitesep(" \t");
|
---|
| 80 | ConvertTo<double> toDouble;
|
---|
| 81 |
|
---|
| 82 | molecule *newmol = World::getInstance().createMolecule();
|
---|
| 83 | newmol->ActiveFlag = true;
|
---|
[4cbca0] | 84 | // TODO: Remove the insertion into molecule when saving does not depend on them anymore. Also, remove molecule.hpp include
|
---|
| 85 | World::getInstance().getMolecules()->insert(newmol);
|
---|
[aa8ef2] | 86 | while (file->good()) {
|
---|
| 87 | file->getline(line, MAXSTRINGSIZE-1);
|
---|
| 88 | std::string linestring(line);
|
---|
| 89 | if ((linestring.find("atoms geometry") == string::npos) && (linestring.find("}") != string::npos)) {
|
---|
[4cbca0] | 90 | GeometrySection = false;
|
---|
[aa8ef2] | 91 | }
|
---|
[4cbca0] | 92 | if ((linestring.find(")") != string::npos)) { // ends a section which do not overlap
|
---|
| 93 | MpqcSection = false;
|
---|
| 94 | MoleculeSection = false;
|
---|
| 95 | BasisSection = false;
|
---|
| 96 | AuxBasisSection = false;
|
---|
| 97 | }
|
---|
| 98 | if (MoleculeSection) {
|
---|
| 99 | if (GeometrySection) { // we have an atom
|
---|
| 100 | tokenizer tokens(linestring, sep);
|
---|
| 101 | // if (tokens.size() != 2)
|
---|
| 102 | // throw MpqcParseException;
|
---|
| 103 | tokenizer::iterator tok_iter = tokens.begin();
|
---|
[311da7b] | 104 | ASSERT(tok_iter != tokens.end(),
|
---|
[765f16] | 105 | "FormatParser< mpqc >::load() - missing token for MoleculeSection in line "+linestring+"!");
|
---|
[4cbca0] | 106 | std::stringstream whitespacefilter(*tok_iter++);
|
---|
| 107 | std::string element;
|
---|
[311da7b] | 108 | whitespacefilter >> ws >> element;
|
---|
| 109 | ASSERT(tok_iter != tokens.end(),
|
---|
[765f16] | 110 | "FormatParser< mpqc >::load() - missing token for MoleculeSection in line "+linestring+"!");
|
---|
[4cbca0] | 111 | std::string vector = *tok_iter;
|
---|
| 112 | tokenizer vectorcomponents(vector, whitesep);
|
---|
| 113 | Vector X;
|
---|
| 114 | // if (vectorcomponents.size() != NDIM)
|
---|
| 115 | // throw MpqcParseException;
|
---|
| 116 | tok_iter = vectorcomponents.begin();
|
---|
| 117 | for (int i=0; i<NDIM; ++i) {
|
---|
| 118 | X[i] = toDouble(*tok_iter++);
|
---|
| 119 | }
|
---|
| 120 | // create atom
|
---|
| 121 | atom *newAtom = World::getInstance().createAtom();
|
---|
| 122 | newAtom->setType(World::getInstance().getPeriode()->FindElement(element));
|
---|
| 123 | newAtom->setPosition(X);
|
---|
| 124 | newmol->AddAtom(newAtom);
|
---|
[47d041] | 125 | LOG(1, "Adding atom " << *newAtom);
|
---|
[4cbca0] | 126 | }
|
---|
| 127 | }
|
---|
| 128 | if (MpqcSection) {
|
---|
[311da7b] | 129 | if (linestring.find("mole<") != string::npos) { // get theory
|
---|
[4cbca0] | 130 | tokenizer tokens(linestring, angularsep);
|
---|
| 131 | tokenizer::iterator tok_iter = tokens.begin();
|
---|
[311da7b] | 132 | ++tok_iter;
|
---|
| 133 | ASSERT(tok_iter != tokens.end(),
|
---|
[765f16] | 134 | "FormatParser< mpqc >::load() - missing token in brackets<> for mole< in line "+linestring+"!");
|
---|
[311da7b] | 135 | std::string value(*tok_iter);
|
---|
[4cbca0] | 136 | std::stringstream linestream("theory = "+value);
|
---|
[c1db05] | 137 | linestream >> getParams();
|
---|
[4cbca0] | 138 | } else if (linestring.find("integrals<") != string::npos) { // get theory
|
---|
| 139 | tokenizer tokens(linestring, angularsep);
|
---|
| 140 | tokenizer::iterator tok_iter = tokens.begin();
|
---|
[311da7b] | 141 | ++tok_iter;
|
---|
| 142 | ASSERT(tok_iter != tokens.end(),
|
---|
[765f16] | 143 | "FormatParser< mpqc >::load() - missing token in brackets<> for integrals< in line "+linestring+"!");
|
---|
[311da7b] | 144 | std::string value(*tok_iter);
|
---|
[4cbca0] | 145 | std::stringstream linestream("integration = "+value);
|
---|
[c1db05] | 146 | linestream >> getParams();
|
---|
[311da7b] | 147 | } else if ((linestring.find("molecule") == string::npos) && (linestring.find("basis") == string::npos)){
|
---|
| 148 | // molecule and basis must not be parsed in this section
|
---|
| 149 | tokenizer tokens(linestring, equalitysep);
|
---|
| 150 | tokenizer::iterator tok_iter = tokens.begin();
|
---|
| 151 | ASSERT(tok_iter != tokens.end(),
|
---|
[765f16] | 152 | "FormatParser< mpqc >::load() - missing token before '=' for MpqcSection in line "+linestring+"!");
|
---|
[311da7b] | 153 | std::stringstream whitespacefilter(*tok_iter);
|
---|
| 154 | std::string key;
|
---|
| 155 | whitespacefilter >> ws >> key;
|
---|
[ee50c1] | 156 | if (getParams().haveParameter(key)) {
|
---|
[311da7b] | 157 | std::stringstream linestream(linestring);
|
---|
[c1db05] | 158 | linestream >> getParams();
|
---|
[311da7b] | 159 | } else { // unknown keys are simply ignored as long as parser is incomplete
|
---|
[47d041] | 160 | LOG(2, "INFO: '"+key+"' is unknown and ignored.");
|
---|
[311da7b] | 161 | }
|
---|
[4cbca0] | 162 | }
|
---|
| 163 | }
|
---|
| 164 | if (BasisSection) {
|
---|
| 165 | tokenizer tokens(linestring, equalitysep);
|
---|
| 166 | tokenizer::iterator tok_iter = tokens.begin();
|
---|
[311da7b] | 167 | ASSERT(tok_iter != tokens.end(),
|
---|
[765f16] | 168 | "FormatParser< mpqc >::load() - missing token for BasisSection in line "+linestring+"!");
|
---|
[4cbca0] | 169 | std::string key(*tok_iter++);
|
---|
[311da7b] | 170 | ASSERT(tok_iter != tokens.end(),
|
---|
[765f16] | 171 | "FormatParser< mpqc >::load() - missing value for BasisSection after key "+key+" in line "+linestring+"!");
|
---|
[4cbca0] | 172 | std::string value(*tok_iter);
|
---|
[311da7b] | 173 | tok_iter++;
|
---|
[4cbca0] | 174 | // TODO: use exception instead of ASSERT
|
---|
| 175 | ASSERT(tok_iter == tokens.end(),
|
---|
[765f16] | 176 | "FormatParser< mpqc >::load() - more than (key = value) on line "+linestring+".");
|
---|
[4cbca0] | 177 | if (key == "name") {
|
---|
| 178 | std::stringstream linestream("basis = "+value);
|
---|
[c1db05] | 179 | linestream >> getParams();
|
---|
[4cbca0] | 180 | }
|
---|
| 181 | }
|
---|
| 182 | if (AuxBasisSection) {
|
---|
| 183 | tokenizer tokens(linestring, equalitysep);
|
---|
| 184 | tokenizer::iterator tok_iter = tokens.begin();
|
---|
[311da7b] | 185 | ASSERT(tok_iter != tokens.end(),
|
---|
[765f16] | 186 | "FormatParser< mpqc >::load() - missing token for AuxBasisSection in line "+linestring+"!");
|
---|
[4cbca0] | 187 | std::string key(*tok_iter++);
|
---|
[311da7b] | 188 | ASSERT(tok_iter != tokens.end(),
|
---|
[765f16] | 189 | "FormatParser< mpqc >::load() - missing value for BasisSection after key "+key+" in line "+linestring+"!");
|
---|
[4cbca0] | 190 | std::string value(*tok_iter);
|
---|
[311da7b] | 191 | tok_iter++;
|
---|
[4cbca0] | 192 | // TODO: use exception instead of ASSERT
|
---|
| 193 | ASSERT(tok_iter == tokens.end(),
|
---|
[765f16] | 194 | "FormatParser< mpqc >::load() - more than (key = value) on line "+linestring+".");
|
---|
[4cbca0] | 195 | if (key == "name") {
|
---|
| 196 | std::stringstream linestream("aux_basis = "+value);
|
---|
[c1db05] | 197 | linestream >> getParams();
|
---|
[aa8ef2] | 198 | }
|
---|
| 199 | }
|
---|
| 200 | // set some scan flags
|
---|
[4cbca0] | 201 | if (linestring.find("mpqc:") != string::npos) {
|
---|
| 202 | MpqcSection = true;
|
---|
| 203 | }
|
---|
| 204 | if (linestring.find("molecule<Molecule>:") != string::npos) {
|
---|
| 205 | MoleculeSection = true;
|
---|
| 206 | }
|
---|
[aa8ef2] | 207 | if (linestring.find("atoms geometry") != string::npos) {
|
---|
[4cbca0] | 208 | GeometrySection = true;
|
---|
| 209 | }
|
---|
| 210 | if ((linestring.find("basis<GaussianBasisSet>:") != string::npos) && ((linestring.find("abasis<") == string::npos))) {
|
---|
| 211 | BasisSection = true;
|
---|
| 212 | }
|
---|
| 213 | if (linestring.find("abasis<") != string::npos) {
|
---|
| 214 | AuxBasisSection = true;
|
---|
[aa8ef2] | 215 | }
|
---|
| 216 | }
|
---|
[4afa46] | 217 | // refresh atom::nr and atom::name
|
---|
| 218 | newmol->getAtomCount();
|
---|
[1b2d30] | 219 | }
|
---|
| 220 |
|
---|
[03a589] | 221 | void FormatParser< mpqc >::OutputMPQCLine(ostream * const out, const atom &_atom, const Vector *center) const
|
---|
| 222 | {
|
---|
| 223 | Vector recentered(_atom.getPosition());
|
---|
| 224 | recentered -= *center;
|
---|
[52cac0] | 225 | *out << "\t\t" << _atom.getType()->getSymbol() << " [ ";
|
---|
| 226 | {
|
---|
| 227 | std::stringstream posstream;
|
---|
| 228 | posstream << std::setprecision(12) << recentered[0] << "\t" << recentered[1] << "\t" << recentered[2];
|
---|
| 229 | *out << posstream.str();
|
---|
| 230 | }
|
---|
| 231 | *out << " ]" << std::endl;
|
---|
[03a589] | 232 | };
|
---|
| 233 |
|
---|
| 234 |
|
---|
[f31edc] | 235 | /** Saves all atoms and data into a MPQC config file.
|
---|
[1b2d30] | 236 | * \param *file output stream
|
---|
[73916f] | 237 | * \param atoms atoms to store
|
---|
[1b2d30] | 238 | */
|
---|
[765f16] | 239 | void FormatParser< mpqc >::save(ostream *file, const std::vector<atom *> &atoms)
|
---|
[1b2d30] | 240 | {
|
---|
| 241 | Vector center;
|
---|
[f7c19e] | 242 | // vector<atom *> allatoms = World::getInstance().getAllAtoms();
|
---|
[1b2d30] | 243 |
|
---|
[d6b8e1] | 244 | // calculate center
|
---|
[e9dc19] | 245 | // for (std::vector<atom *>::const_iterator runner = atoms.begin();runner != atoms.end(); ++runner)
|
---|
| 246 | // center += (*runner)->getPosition();
|
---|
| 247 | // center.Scale(1./(double)atoms.size());
|
---|
| 248 | center.Zero();
|
---|
[d6b8e1] | 249 |
|
---|
[1b2d30] | 250 | // first without hessian
|
---|
| 251 | if (file->fail()) {
|
---|
[47d041] | 252 | ELOG(1, "Cannot open mpqc output file.");
|
---|
[1b2d30] | 253 | } else {
|
---|
| 254 | *file << "% Created by MoleCuilder" << endl;
|
---|
| 255 | *file << "mpqc: (" << endl;
|
---|
[ee50c1] | 256 | *file << "\tsavestate = " << getParams().getParameter(MpqcParser_Parameters::savestateParam) << endl;
|
---|
| 257 | *file << "\tdo_gradient = " << getParams().getParameter(MpqcParser_Parameters::do_gradientParam) << endl;
|
---|
| 258 | if (Converter(getParams().getParameter(MpqcParser_Parameters::hessianParam))) {
|
---|
[f31edc] | 259 | *file << "\tfreq<MolecularFrequencies>: (" << endl;
|
---|
| 260 | *file << "\t\tmolecule=$:molecule" << endl;
|
---|
| 261 | *file << "\t)" << endl;
|
---|
| 262 | }
|
---|
[ee50c1] | 263 | const std::string theory = getParams().getParameter(MpqcParser_Parameters::theoryParam);
|
---|
| 264 | if (theory == getParams().getTheoryName(MpqcParser_Parameters::CLHF)) {
|
---|
| 265 | *file << "\tmole<" << getParams().getParameter(MpqcParser_Parameters::theoryParam) << ">: (" << endl;
|
---|
| 266 | *file << "\t\tmolecule = $:molecule" << endl;
|
---|
| 267 | *file << "\t\t" << getParams().getParameterName(MpqcParser_Parameters::basisParam) << " = $:basis" << endl;
|
---|
| 268 | *file << "\t\t" << getParams().getParameterName(MpqcParser_Parameters::maxiterParam)
|
---|
| 269 | << " = " << getParams().getParameter(MpqcParser_Parameters::maxiterParam)<< endl;
|
---|
| 270 | *file << "\t\t" << getParams().getParameterName(MpqcParser_Parameters::memoryParam)
|
---|
| 271 | << " = " << getParams().getParameter(MpqcParser_Parameters::memoryParam) << endl;
|
---|
| 272 | *file << "\t)" << endl;
|
---|
| 273 | } else if (theory == getParams().getTheoryName(MpqcParser_Parameters::CLKS)) {
|
---|
| 274 | *file << "\tmole<" << getParams().getParameter(MpqcParser_Parameters::theoryParam) << ">: (" << endl;
|
---|
| 275 | *file << "\t\tfunctional<StdDenFunctional>:(name=B3LYP)" << endl;
|
---|
| 276 | *file << "\t\tmolecule = $:molecule" << endl;
|
---|
| 277 | *file << "\t\t" << getParams().getParameterName(MpqcParser_Parameters::basisParam) << " = $:basis" << endl;
|
---|
| 278 | *file << "\t\t" << getParams().getParameterName(MpqcParser_Parameters::maxiterParam)
|
---|
| 279 | << " = " << getParams().getParameter(MpqcParser_Parameters::maxiterParam)<< endl;
|
---|
| 280 | *file << "\t\t" << getParams().getParameterName(MpqcParser_Parameters::memoryParam)
|
---|
| 281 | << " = " << getParams().getParameter(MpqcParser_Parameters::memoryParam) << endl;
|
---|
| 282 | *file << "\t)" << endl;
|
---|
| 283 | } else if (theory == getParams().getTheoryName(MpqcParser_Parameters::MBPT2)) {
|
---|
| 284 | *file << "\tmole<" << getParams().getParameter(MpqcParser_Parameters::theoryParam) << ">: (" << endl;
|
---|
| 285 | *file << "\t\t" << getParams().getParameterName(MpqcParser_Parameters::basisParam) << " = $:basis" << endl;
|
---|
| 286 | *file << "\t\tmolecule = $:molecule" << endl;
|
---|
| 287 | *file << "\t\t" << getParams().getParameterName(MpqcParser_Parameters::memoryParam)
|
---|
| 288 | << " = " << getParams().getParameter(MpqcParser_Parameters::memoryParam) << endl;
|
---|
| 289 | *file << "\t\treference<CLHF>: (" << endl;
|
---|
| 290 | *file << "\t\t\t" << getParams().getParameterName(MpqcParser_Parameters::maxiterParam)
|
---|
| 291 | << " = " << getParams().getParameter(MpqcParser_Parameters::maxiterParam)<< endl;
|
---|
| 292 | *file << "\t\t\t" << getParams().getParameterName(MpqcParser_Parameters::basisParam) << " = $:basis" << endl;
|
---|
| 293 | *file << "\t\t\tmolecule = $:molecule" << endl;
|
---|
| 294 | *file << "\t\t\t" << getParams().getParameterName(MpqcParser_Parameters::memoryParam)
|
---|
| 295 | << " = " << getParams().getParameter(MpqcParser_Parameters::memoryParam) << endl;
|
---|
| 296 | *file << "\t\t)" << endl;
|
---|
| 297 | *file << "\t)" << endl;
|
---|
| 298 | } else if (theory == getParams().getTheoryName(MpqcParser_Parameters::MBPT2_R12)) {
|
---|
| 299 | *file << "\tmole<" << getParams().getParameter(MpqcParser_Parameters::theoryParam) << ">: (" << endl;
|
---|
| 300 | *file << "\t\tmolecule = $:molecule" << endl;
|
---|
| 301 | *file << "\t\t" << getParams().getParameterName(MpqcParser_Parameters::basisParam) << " = $:basis" << endl;
|
---|
| 302 | *file << "\t\t" << getParams().getParameterName(MpqcParser_Parameters::aux_basisParam) << " = $:abasis" << endl;
|
---|
| 303 | *file << "\t\t" << getParams().getParameterName(MpqcParser_Parameters::stdapproxParam)
|
---|
| 304 | << " = \"" << getParams().getParameter(MpqcParser_Parameters::stdapproxParam) << "\"" << endl;
|
---|
| 305 | *file << "\t\t" << getParams().getParameterName(MpqcParser_Parameters::nfzcParam)
|
---|
| 306 | << " = " << getParams().getParameter(MpqcParser_Parameters::nfzcParam) << endl;
|
---|
| 307 | *file << "\t\t" << getParams().getParameterName(MpqcParser_Parameters::memoryParam)
|
---|
| 308 | << " = " << getParams().getParameter(MpqcParser_Parameters::memoryParam) << endl;
|
---|
| 309 | *file << "\t\tintegrals<IntegralCints>:()" << endl;
|
---|
| 310 | *file << "\t\treference<CLHF>: (" << endl;
|
---|
| 311 | *file << "\t\t\tmolecule = $:molecule" << endl;
|
---|
| 312 | *file << "\t\t\t" << getParams().getParameterName(MpqcParser_Parameters::basisParam) << " = $:basis" << endl;
|
---|
| 313 | *file << "\t\t\tmaxiter = " << getParams().getParameter(MpqcParser_Parameters::maxiterParam) << endl;
|
---|
| 314 | *file << "\t\t\tmemory = " << getParams().getParameter(MpqcParser_Parameters::memoryParam) << endl;
|
---|
| 315 | *file << "\t\t\tintegrals<" << getParams().getParameter(MpqcParser_Parameters::integrationParam) << ">:()" << endl;
|
---|
| 316 | *file << "\t\t)" << endl;
|
---|
| 317 | *file << "\t)" << endl;
|
---|
| 318 | } else {
|
---|
[47d041] | 319 | ELOG(0, "Unknown level of theory requested for MPQC output file.");
|
---|
[1b2d30] | 320 | }
|
---|
| 321 | *file << ")" << endl;
|
---|
| 322 | *file << "molecule<Molecule>: (" << endl;
|
---|
| 323 | *file << "\tunit = " << (World::getInstance().getConfig()->GetIsAngstroem() ? "angstrom" : "bohr" ) << endl;
|
---|
| 324 | *file << "\t{ atoms geometry } = {" << endl;
|
---|
| 325 | // output of atoms
|
---|
[03a589] | 326 | BOOST_FOREACH(const atom *_atom, atoms) {
|
---|
| 327 | OutputMPQCLine(file, *_atom, ¢er);
|
---|
[1b2d30] | 328 | }
|
---|
| 329 | *file << "\t}" << endl;
|
---|
| 330 | *file << ")" << endl;
|
---|
| 331 | *file << "basis<GaussianBasisSet>: (" << endl;
|
---|
[ee50c1] | 332 | *file << "\tname = \"" << getParams().getParameter(MpqcParser_Parameters::basisParam) << "\"" << endl;
|
---|
[1b2d30] | 333 | *file << "\tmolecule = $:molecule" << endl;
|
---|
| 334 | *file << ")" << endl;
|
---|
[ee50c1] | 335 | if (theory == getParams().getTheoryName(MpqcParser_Parameters::MBPT2_R12)) {
|
---|
[f31edc] | 336 | *file << "% auxiliary basis set specification" << endl;
|
---|
| 337 | *file << "\tabasis<GaussianBasisSet>: (" << endl;
|
---|
[ee50c1] | 338 | *file << "\tname = \"" << getParams().getParameter(MpqcParser_Parameters::aux_basisParam) << "\"" << endl;
|
---|
[f31edc] | 339 | *file << "\tmolecule = $:molecule" << endl;
|
---|
| 340 | *file << ")" << endl;
|
---|
| 341 | }
|
---|
[1b2d30] | 342 | }
|
---|
| 343 | }
|
---|
| 344 |
|
---|
[963321a] | 345 |
|
---|