Changeset 61d69a4 for src/Parser/MpqcParser.cpp
- Timestamp:
- Feb 7, 2011, 10:43:35 AM (15 years ago)
- Branches:
- Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, Candidate_v1.7.0, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
- Children:
- 44fce5
- Parents:
- 9cff8b
- git-author:
- Frederik Heber <heber@…> (02/03/11 11:56:26)
- git-committer:
- Frederik Heber <heber@…> (02/07/11 10:43:35)
- File:
-
- 1 edited
-
src/Parser/MpqcParser.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/MpqcParser.cpp
r9cff8b r61d69a4 41 41 * 42 42 */ 43 MpqcParser::MpqcParser() : 44 HessianPresent(false), 45 theory(MBPT2) 43 MpqcParser::MpqcParser() 46 44 {} 47 45 … … 115 113 for (vector<atom *>::iterator runner = allatoms.begin();runner != allatoms.end(); ++runner) 116 114 center += (*runner)->getPosition(); 117 center.Scale(1./ allatoms.size());115 center.Scale(1./(double)allatoms.size()); 118 116 119 117 // first without hessian … … 123 121 *file << "% Created by MoleCuilder" << endl; 124 122 *file << "mpqc: (" << endl; 125 *file << "\tsavestate = no"<< endl;126 *file << "\tdo_gradient = yes"<< endl;127 if ( HessianPresent) {123 *file << "\tsavestate = " << params.getString(MpqcParser_Parameters::savestateParam) << endl; 124 *file << "\tdo_gradient = " << params.getString(MpqcParser_Parameters::do_gradientParam) << endl; 125 if (params.getBool(MpqcParser_Parameters::HessianParam)) { 128 126 *file << "\tfreq<MolecularFrequencies>: (" << endl; 129 127 *file << "\t\tmolecule=$:molecule" << endl; 130 128 *file << "\t)" << endl; 131 129 } 132 switch (theory) { 133 case CLHF: 134 *file << "\tmole<CLHF>: (" << endl; 135 *file << "\t\tmolecule = $:molecule" << endl; 136 *file << "\t\tbasis = $:basis" << endl; 137 *file << "\t\tmemory = 16000000" << endl; 138 *file << "\t)" << endl; 139 break; 140 case CLKS: 141 *file << "\tmole<CLKS>: (" << endl; 130 switch (params.getTheory()) { 131 case MpqcParser_Parameters::CLHF: 132 *file << "\tmole<" << params.getString(MpqcParser_Parameters::theoryParam) << ">: (" << endl; 133 *file << "\t\tmolecule = $:molecule" << endl; 134 *file << "\t\tbasis = $:basis" << endl; 135 *file << "\t\tmaxiter = " << toString(params.getInt(MpqcParser_Parameters::maxiterParam))<< endl; 136 *file << "\t\tmemory = " << toString(params.getInt(MpqcParser_Parameters::memoryParam)) << endl; 137 *file << "\t)" << endl; 138 break; 139 case MpqcParser_Parameters::CLKS: 140 *file << "\tmole<" << params.getString(MpqcParser_Parameters::theoryParam) << ">: (" << endl; 142 141 *file << "\t\tfunctional<StdDenFunctional>:(name=B3LYP)" << endl; 143 142 *file << "\t\tmolecule = $:molecule" << endl; 144 143 *file << "\t\tbasis = $:basis" << endl; 145 *file << "\t\tmemory = 16000000" << endl; 146 *file << "\t)" << endl; 147 break; 148 case MBPT2: 149 *file << "\tmole<MBPT2>: (" << endl; 150 *file << "\t\tbasis = $:basis" << endl; 151 *file << "\t\tmolecule = $:molecule" << endl; 144 *file << "\t\tmaxiter = " << toString(params.getInt(MpqcParser_Parameters::maxiterParam))<< endl; 145 *file << "\t\tmemory = " << toString(params.getInt(MpqcParser_Parameters::memoryParam)) << endl; 146 *file << "\t)" << endl; 147 break; 148 case MpqcParser_Parameters::MBPT2: 149 *file << "\tmole<" << params.getString(MpqcParser_Parameters::theoryParam) << ">: (" << endl; 150 *file << "\t\tbasis = $:basis" << endl; 151 *file << "\t\tmolecule = $:molecule" << endl; 152 *file << "\t\tmemory = " << toString(params.getInt(MpqcParser_Parameters::memoryParam)) << endl; 152 153 *file << "\t\treference<CLHF>: (" << endl; 153 *file << "\t\t\tmaxiter = 1000"<< endl;154 *file << "\t\t\tmaxiter = " << toString(params.getInt(MpqcParser_Parameters::maxiterParam))<< endl; 154 155 *file << "\t\t\tbasis = $:basis" << endl; 155 156 *file << "\t\t\tmolecule = $:molecule" << endl; 157 *file << "\t\t\tmemory = " << toString(params.getInt(MpqcParser_Parameters::memoryParam)) << endl; 156 158 *file << "\t\t)" << endl; 157 159 *file << "\t)" << endl; 158 160 break; 159 case M BPT2_R12:160 *file << "\tmole< MBPT2_R12>: (" << endl;161 case MpqcParser_Parameters::MBPT2_R12: 162 *file << "\tmole<" << params.getString(MpqcParser_Parameters::theoryParam) << ">: (" << endl; 161 163 *file << "\t\tmolecule = $:molecule" << endl; 162 164 *file << "\t\tbasis = $:basis" << endl; 163 165 *file << "\t\taux_basis = $:abasis" << endl; 164 *file << "\t\tstdapprox = \" A'\"" << endl;165 *file << "\t\tnfzc = 1"<< endl;166 *file << "\t\tmemory = 16000000"<< endl;166 *file << "\t\tstdapprox = \"" << params.getString(MpqcParser_Parameters::stdapproxParam) << "\"" << endl; 167 *file << "\t\tnfzc = " << toString(params.getInt(MpqcParser_Parameters::nfzcParam)) << endl; 168 *file << "\t\tmemory = " << toString(params.getInt(MpqcParser_Parameters::memoryParam)) << endl; 167 169 *file << "\t\tintegrals<IntegralCints>:()" << endl; 168 170 *file << "\t\treference<CLHF>: (" << endl; 169 171 *file << "\t\t\tmolecule = $:molecule" << endl; 170 172 *file << "\t\t\tbasis = $:basis" << endl; 171 *file << "\t\t\tmaxiter = 1000"<< endl;172 *file << "\t\t\tmemory = 16000000"<< endl;173 *file << "\t\t\tintegrals< IntegralCints>:()" << endl;173 *file << "\t\t\tmaxiter = " << toString(params.getInt(MpqcParser_Parameters::maxiterParam)) << endl; 174 *file << "\t\t\tmemory = " << toString(params.getInt(MpqcParser_Parameters::memoryParam)) << endl; 175 *file << "\t\t\tintegrals<" << params.getString(MpqcParser_Parameters::integrationParam) << ">:()" << endl; 174 176 *file << "\t\t)" << endl; 175 177 *file << "\t)" << endl; … … 191 193 *file << ")" << endl; 192 194 *file << "basis<GaussianBasisSet>: (" << endl; 193 *file << "\tname = \"" << World::getInstance().getConfig()->basis<< "\"" << endl;195 *file << "\tname = \"" << params.getString(MpqcParser_Parameters::basisParam) << "\"" << endl; 194 196 *file << "\tmolecule = $:molecule" << endl; 195 197 *file << ")" << endl; 196 if ( theory ==MBPT2_R12) {198 if (params.getTheory() == MpqcParser_Parameters::MBPT2_R12) { 197 199 *file << "% auxiliary basis set specification" << endl; 198 200 *file << "\tabasis<GaussianBasisSet>: (" << endl; 199 *file << "\tname = \" aug-cc-pVDZ\"" << endl;201 *file << "\tname = \"" << params.getString(MpqcParser_Parameters::aux_basisParam) << "\"" << endl; 200 202 *file << "\tmolecule = $:molecule" << endl; 201 203 *file << ")" << endl; … … 204 206 } 205 207 206 /** Sets whether hessian is desired or not207 * \param hessian statement208 */209 void MpqcParser::setHessian(bool hessian)210 {211 HessianPresent = hessian;212 }213 214 /** Sets the desired level of solving theory to use215 * \param _theory shorthand of the theory216 */217 void MpqcParser::setTheory(enum Theory _theory)218 {219 theory = _theory;220 }
Note:
See TracChangeset
for help on using the changeset viewer.
