Changeset b12a35 for src/joiner.cpp
- Timestamp:
- Oct 30, 2008, 4:17:23 PM (17 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:
- 05d2b2
- Parents:
- f731ae
- git-author:
- Frederik Heber <heber@…> (10/19/08 13:57:23)
- git-committer:
- Frederik Heber <heber@…> (10/30/08 16:17:23)
- File:
-
- 1 edited
-
src/joiner.cpp (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/joiner.cpp
rf731ae rb12a35 37 37 stringstream prefix; 38 38 char *dir = NULL; 39 bool Hcorrected = true;39 bool NoHCorrection = false; 40 40 bool NoHessian = false; 41 41 … … 68 68 // ------------- Parse through all Fragment subdirs -------- 69 69 if (!Energy.ParseFragmentMatrix(argv[1], dir, EnergySuffix, 0,0)) return 1; 70 Hcorrected = Hcorrection.ParseFragmentMatrix(argv[1], "", HCORRECTIONSUFFIX, 0,0); 70 if (!Hcorrection.ParseFragmentMatrix(argv[1], "", HCORRECTIONSUFFIX, 0,0)) { 71 NoHCorrection = true; 72 cout << "No HCorrection matrices found, skipping these." << endl; 73 } 71 74 if (!Force.ParseFragmentMatrix(argv[1], dir, ForcesSuffix, 0,0)) return 1; 72 75 if (!Hessian.ParseFragmentMatrix(argv[1], dir, HessianSuffix, 0,0)) { 73 76 NoHessian = true; 74 cout << "No hessian matrices found, skipping th ose.";77 cout << "No hessian matrices found, skipping these." << endl; 75 78 } 76 79 if (periode != NULL) { // also look for PAS values … … 81 84 // ---------- Parse the TE Factors into an array ----------------- 82 85 if (!Energy.InitialiseIndices()) return 1; 83 if (Hcorrected) Hcorrection.InitialiseIndices(); 86 if (!NoHCorrection) 87 Hcorrection.InitialiseIndices(); 84 88 85 89 // ---------- Parse the Force indices into an array --------------- … … 87 91 88 92 // ---------- Parse the Hessian (=force) indices into an array --------------- 89 if (!Hessian.InitialiseIndices((class MatrixContainer *)&Force)) return 1; 93 if (!NoHessian) 94 if (!Hessian.InitialiseIndices((class MatrixContainer *)&Force)) return 1; 90 95 91 96 // ---------- Parse the shielding indices into an array --------------- … … 100 105 if (!KeySet.ParseManyBodyTerms()) return 1; 101 106 if (!EnergyFragments.AllocateMatrix(Energy.Header, Energy.MatrixCounter, Energy.RowCounter, Energy.ColumnCounter)) return 1; 102 if (Hcorrected) HcorrectionFragments.AllocateMatrix(Hcorrection.Header, Hcorrection.MatrixCounter, Hcorrection.RowCounter, Hcorrection.ColumnCounter); 107 if (!NoHCorrection) 108 HcorrectionFragments.AllocateMatrix(Hcorrection.Header, Hcorrection.MatrixCounter, Hcorrection.RowCounter, Hcorrection.ColumnCounter); 103 109 if (!ForceFragments.AllocateMatrix(Force.Header, Force.MatrixCounter, Force.RowCounter, Force.ColumnCounter)) return 1; 104 110 if (!NoHessian) … … 126 132 cout << "Summing energy of order " << BondOrder+1 << " ..." << endl; 127 133 if (!EnergyFragments.SumSubManyBodyTerms(Energy, KeySet, BondOrder)) return 1; 128 if ( Hcorrected) {134 if (!NoHCorrection) { 129 135 HcorrectionFragments.SumSubManyBodyTerms(Hcorrection, KeySet, BondOrder); 130 136 if (!Energy.SumSubEnergy(EnergyFragments, &HcorrectionFragments, KeySet, BondOrder, 1.)) return 1; 131 if (Hcorrected)Hcorrection.SumSubEnergy(HcorrectionFragments, NULL, KeySet, BondOrder, 1.);137 Hcorrection.SumSubEnergy(HcorrectionFragments, NULL, KeySet, BondOrder, 1.); 132 138 } else 133 139 if (!Energy.SumSubEnergy(EnergyFragments, NULL, KeySet, BondOrder, 1.)) return 1; … … 159 165 if (!Force.WriteLastMatrix(argv[1], (prefix.str()).c_str(), ForcesSuffix)) return 1; 160 166 // hessian 161 if (!Hessian.WriteLastMatrix(argv[1], (prefix.str()).c_str(), HessianSuffix)) return 1; 167 if (!NoHessian) 168 if (!Hessian.WriteLastMatrix(argv[1], (prefix.str()).c_str(), HessianSuffix)) return 1; 162 169 // shieldings 163 170 if (periode != NULL) { // also look for PAS values … … 170 177 prefix << dir << EnergyFragmentSuffix; 171 178 if (!EnergyFragments.WriteTotalFragments(argv[1], (prefix.str()).c_str())) return 1; 172 if ( Hcorrected) {179 if (!NoHCorrection) { 173 180 prefix.str(" "); 174 181 prefix << dir << HcorrectionFragmentSuffix; … … 195 202 // write last matrices as fragments into central dir (not subdir as above), for analyzer to know index bounds 196 203 if (!Energy.WriteLastMatrix(argv[1], dir, EnergyFragmentSuffix)) return 1; 197 if ( Hcorrected) Hcorrection.WriteLastMatrix(argv[1], dir, HcorrectionFragmentSuffix);204 if (!NoHCorrection) Hcorrection.WriteLastMatrix(argv[1], dir, HcorrectionFragmentSuffix); 198 205 if (!Force.WriteLastMatrix(argv[1], dir, ForceFragmentSuffix)) return 1; 199 206 if (!NoHessian)
Note:
See TracChangeset
for help on using the changeset viewer.
