Changeset f3dc4c
- Timestamp:
- Aug 18, 2008, 8:27:34 AM (16 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, 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:
- 8f019c
- Parents:
- 9e5a04d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/analyzer.cpp
r9e5a04d rf3dc4c 29 29 ForceMatrix Shielding; 30 30 ForceMatrix ShieldingPAS; 31 MatrixContainerTime;31 EnergyMatrix Time; 32 32 EnergyMatrix EnergyFragments; 33 33 EnergyMatrix HcorrectionFragments; … … 51 51 bool Hcorrected = true; 52 52 double norm; 53 int counter; 53 54 54 55 cout << "ANOVA Analyzer" << endl; … … 82 83 83 84 // ------------- Parse through all Fragment subdirs -------- 84 if (!Energy.Parse Matrix(argv[1], dir, EnergySuffix,0,0)) return 1;85 Hcorrected = Hcorrection.Parse Matrix(argv[1], "", HCORRECTIONSUFFIX,0,0);86 if (!Force.Parse Matrix(argv[1], dir, ForcesSuffix,0,0)) return 1;87 if (!Time.Parse Matrix(argv[1], dir, TimeSuffix, 10,1)) return 1;85 if (!Energy.ParseFragmentMatrix(argv[1], dir, EnergySuffix,0,0)) return 1; 86 Hcorrected = Hcorrection.ParseFragmentMatrix(argv[1], "", HCORRECTIONSUFFIX,0,0); 87 if (!Force.ParseFragmentMatrix(argv[1], dir, ForcesSuffix,0,0)) return 1; 88 if (!Time.ParseFragmentMatrix(argv[1], dir, TimeSuffix, 10,1)) return 1; 88 89 if (periode != NULL) { // also look for PAS values 89 if (!Shielding.Parse Matrix(argv[1], dir, ShieldingSuffix, 1, 0)) return 1;90 if (!ShieldingPAS.Parse Matrix(argv[1], dir, ShieldingPASSuffix, 1, 0)) return 1;90 if (!Shielding.ParseFragmentMatrix(argv[1], dir, ShieldingSuffix, 1, 0)) return 1; 91 if (!ShieldingPAS.ParseFragmentMatrix(argv[1], dir, ShieldingPASSuffix, 1, 0)) return 1; 91 92 } 92 93 … … 111 112 112 113 // ---------- Parse fragment files created by 'joiner' into an array ------------- 113 if (!EnergyFragments.Parse Matrix(argv[1], dir, EnergyFragmentSuffix,0,0)) return 1;114 if (Hcorrected) HcorrectionFragments.Parse Matrix(argv[1], dir, HcorrectionFragmentSuffix,0,0);115 if (!ForceFragments.Parse Matrix(argv[1], dir, ForceFragmentSuffix,0,0)) return 1;114 if (!EnergyFragments.ParseFragmentMatrix(argv[1], dir, EnergyFragmentSuffix,0,0)) return 1; 115 if (Hcorrected) HcorrectionFragments.ParseFragmentMatrix(argv[1], dir, HcorrectionFragmentSuffix,0,0); 116 if (!ForceFragments.ParseFragmentMatrix(argv[1], dir, ForceFragmentSuffix,0,0)) return 1; 116 117 if (periode != NULL) { // also look for PAS values 117 if (!ShieldingFragments.Parse Matrix(argv[1], dir, ShieldingSuffix, 1, 0)) return 1;118 if (!ShieldingPASFragments.Parse Matrix(argv[1], dir, ShieldingPASSuffix, 1, 0)) return 1;118 if (!ShieldingFragments.ParseFragmentMatrix(argv[1], dir, ShieldingSuffix, 1, 0)) return 1; 119 if (!ShieldingPASFragments.ParseFragmentMatrix(argv[1], dir, ShieldingPASSuffix, 1, 0)) return 1; 119 120 } 120 121 … … 160 161 161 162 output << endl << "Total Times" << endl << "===============" << endl << Time.Header << endl; 162 Time.SetLastMatrix(0., 0);163 for (int BondOrder=KeySet.Order;BondOrder--;)164 for(int i=KeySet.FragmentsPerOrder[BondOrder];i--;)165 for(int j=Time.RowCounter[Time.MatrixCounter];j--;)166 for(int k=Time.ColumnCounter;k--;) {167 Time.Matrix[ Time.MatrixCounter ][j][k] += Time.Matrix[ KeySet.OrderSet[BondOrder][i] ][j][k];168 }169 163 for(int j=0;j<Time.RowCounter[Time.MatrixCounter];j++) { 170 for(int k=0;k<Time.ColumnCounter;k++) 164 for(int k=0;k<Time.ColumnCounter;k++) { 171 165 output << scientific << Time.Matrix[ Time.MatrixCounter ][j][k] << "\t"; 166 } 172 167 output << endl; 173 168 } 174 169 output << endl; 175 170 output.close(); 171 for(int k=0;k<Time.ColumnCounter;k++) 172 Time.Matrix[ Time.MatrixCounter ][ Time.RowCounter[Time.MatrixCounter] ][k] = Time.Matrix[ Time.MatrixCounter ][Time.RowCounter[Time.MatrixCounter]-1][k]; 176 173 177 174 // +++++++++++++++ ANALYZING ++++++++++++++++++++++++++++++ … … 182 179 183 180 // +++++++++++++++++++++++++++++++++++++++ Plotting Simtime vs Bond Order 181 // +++++++++++++++++++++++++++++++++++++++ Plotting Delta Simtime vs Bond Order 184 182 if (!OpenOutputFile(output, argv[3], "SimTime-Order.dat" )) return false; 185 Time.SetLastMatrix(0., 0); 183 if (!OpenOutputFile(output2, argv[3], "DeltaSimTime-Order.dat" )) return false; 184 for(int j=Time.RowCounter[Time.MatrixCounter];j--;) 185 for(int k=Time.ColumnCounter;k--;) { 186 Time.Matrix[ Time.MatrixCounter ][j][k] = 0.; 187 } 188 counter = 0; 186 189 output << "#Order\tFrag.No.\t" << Time.Header << endl; 190 output2 << "#Order\tFrag.No.\t" << Time.Header << endl; 187 191 for (int BondOrder=0;BondOrder<KeySet.Order;BondOrder++) { 188 192 for(int i=KeySet.FragmentsPerOrder[BondOrder];i--;) … … 191 195 Time.Matrix[ Time.MatrixCounter ][j][k] += Time.Matrix[ KeySet.OrderSet[BondOrder][i] ][j][k]; 192 196 } 193 output << BondOrder+1 << "\t" << KeySet.FragmentsPerOrder[BondOrder]; 194 for(int k=0;k<Time.ColumnCounter;k++) 195 output << "\t" << scientific << Time.Matrix[ Time.MatrixCounter ][1][k]; 196 output << endl; 197 counter += KeySet.FragmentsPerOrder[BondOrder]; 198 output << BondOrder+1 << "\t" << counter; 199 output2 << BondOrder+1 << "\t" << counter; 200 for(int k=0;k<Time.ColumnCounter;k++) { 201 output << "\t" << scientific << Time.Matrix[ Time.MatrixCounter ][ Time.RowCounter[Time.MatrixCounter]-1 ][k]; 202 if (fabs(Time.Matrix[ Time.MatrixCounter ][ Time.RowCounter[Time.MatrixCounter] ][k]) > MYEPSILON) 203 output2 << "\t" << scientific << Time.Matrix[ Time.MatrixCounter ][ Time.RowCounter[Time.MatrixCounter]-1 ][k] / Time.Matrix[ Time.MatrixCounter ][ Time.RowCounter[Time.MatrixCounter] ][k]; 204 else 205 output2 << "\t" << scientific << Time.Matrix[ Time.MatrixCounter ][ Time.RowCounter[Time.MatrixCounter]-1 ][k]; 206 } 207 output << endl; 208 output2 << endl; 197 209 } 198 210 output.close(); 211 output2.close(); 212 199 213 200 214 // +++++++++++++++++++++++++++++++++++++++ Plotting deviation in energy to full QM
Note:
See TracChangeset
for help on using the changeset viewer.