Changeset 85d278 for src/joiner.cpp
- Timestamp:
- Oct 18, 2008, 2:06:51 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:
- f731ae
- Parents:
- 450d63
- File:
-
- 1 edited
-
src/joiner.cpp (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/joiner.cpp
r450d63 r85d278 19 19 periodentafel *periode = NULL; // and a period table of all elements 20 20 EnergyMatrix Energy; 21 EnergyMatrix EnergyFragments; 22 21 23 EnergyMatrix Hcorrection; 24 EnergyMatrix HcorrectionFragments; 25 22 26 ForceMatrix Force; 23 EnergyMatrix EnergyFragments;24 EnergyMatrix HcorrectionFragments;25 27 ForceMatrix ForceFragments; 28 29 HessianMatrix Hessian; 30 HessianMatrix HessianFragments; 31 26 32 ForceMatrix Shielding; 27 33 ForceMatrix ShieldingPAS; … … 32 38 char *dir = NULL; 33 39 bool Hcorrected = true; 40 bool NoHessian = false; 34 41 35 42 cout << "Joiner" << endl; … … 63 70 Hcorrected = Hcorrection.ParseFragmentMatrix(argv[1], "", HCORRECTIONSUFFIX, 0,0); 64 71 if (!Force.ParseFragmentMatrix(argv[1], dir, ForcesSuffix, 0,0)) return 1; 72 if (!Hessian.ParseFragmentMatrix(argv[1], dir, HessianSuffix, 0,0)) { 73 NoHessian = true; 74 cout << "No hessian matrices found, skipping those."; 75 } 65 76 if (periode != NULL) { // also look for PAS values 66 77 if (!Shielding.ParseFragmentMatrix(argv[1], dir, ShieldingSuffix, 1, 0)) return 1; … … 74 85 // ---------- Parse the Force indices into an array --------------- 75 86 if (!Force.ParseIndices(argv[1])) return 1; 87 88 // ---------- Parse the Hessian (=force) indices into an array --------------- 89 if (!Hessian.ParseIndices(argv[1])) return 1; 76 90 77 91 // ---------- Parse the shielding indices into an array --------------- … … 88 102 if (Hcorrected) HcorrectionFragments.AllocateMatrix(Hcorrection.Header, Hcorrection.MatrixCounter, Hcorrection.RowCounter, Hcorrection.ColumnCounter); 89 103 if (!ForceFragments.AllocateMatrix(Force.Header, Force.MatrixCounter, Force.RowCounter, Force.ColumnCounter)) return 1; 104 if (!NoHessian) 105 if (!HessianFragments.AllocateMatrix(Hessian.Header, Hessian.MatrixCounter, Hessian.RowCounter, Hessian.ColumnCounter)) return 1; 90 106 if (periode != NULL) { // also look for PAS values 91 107 if (!ShieldingFragments.AllocateMatrix(Shielding.Header, Shielding.MatrixCounter, Shielding.RowCounter, Shielding.ColumnCounter)) return 1; … … 96 112 if(!Energy.SetLastMatrix(0., 0)) return 1; 97 113 if(!Force.SetLastMatrix(0., 2)) return 1; 114 if (!NoHessian) 115 if (!Hessian.SetLastMatrix(0., 0)) return 1; 98 116 if (periode != NULL) { // also look for PAS values 99 117 if(!Shielding.SetLastMatrix(0., 2)) return 1; … … 118 136 if (!ForceFragments.SumSubManyBodyTerms(Force, KeySet, BondOrder)) return 1; 119 137 if (!Force.SumSubForces(ForceFragments, KeySet, BondOrder, 1.)) return 1; 138 // --------- sum up Hessian -------------------- 139 if (!NoHessian) { 140 cout << "Summing Hessian of order " << BondOrder+1 << " ..." << endl; 141 if (!HessianFragments.SumSubManyBodyTerms(Hessian, KeySet, BondOrder)) return 1; 142 if (!Hessian.SumSubHessians(HessianFragments, KeySet, BondOrder, 1.)) return 1; 143 } 120 144 if (periode != NULL) { // also look for PAS values 121 145 cout << "Summing shieldings of order " << BondOrder+1 << " ..." << endl; … … 134 158 // forces 135 159 if (!Force.WriteLastMatrix(argv[1], (prefix.str()).c_str(), ForcesSuffix)) return 1; 160 // hessian 161 if (!Hessian.WriteLastMatrix(argv[1], (prefix.str()).c_str(), HessianSuffix)) return 1; 136 162 // shieldings 137 163 if (periode != NULL) { // also look for PAS values … … 153 179 if (!ForceFragments.WriteTotalFragments(argv[1], (prefix.str()).c_str())) return 1; 154 180 if (!CreateDataFragment(EnergyFragments, KeySet, argv[1], FRAGMENTPREFIX ENERGYPERFRAGMENT, "fragment energy versus the Fragment No", "today", CreateEnergy)) return 1; 181 if (!NoHessian) { 182 prefix.str(" "); 183 prefix << dir << HessianFragmentSuffix; 184 if (!HessianFragments.WriteTotalFragments(argv[1], (prefix.str()).c_str())) return 1; 185 } 155 186 if (periode != NULL) { // also look for PAS values 156 187 prefix.str(" "); … … 166 197 if (Hcorrected) Hcorrection.WriteLastMatrix(argv[1], dir, HcorrectionFragmentSuffix); 167 198 if (!Force.WriteLastMatrix(argv[1], dir, ForceFragmentSuffix)) return 1; 199 if (!NoHessian) 200 if (!Hessian.WriteLastMatrix(argv[1], dir, HessianFragmentSuffix)) return 1; 168 201 if (periode != NULL) { // also look for PAS values 169 202 if (!Shielding.WriteLastMatrix(argv[1], dir, ShieldingFragmentSuffix)) return 1;
Note:
See TracChangeset
for help on using the changeset viewer.
