- Timestamp:
- Dec 10, 2012, 10:10:58 AM (12 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:
- 27594e
- Parents:
- 376a3b
- git-author:
- Frederik Heber <heber@…> (09/04/12 08:10:03)
- git-committer:
- Frederik Heber <heber@…> (12/10/12 10:10:58)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/FragmentationAction/FragmentationAutomationAction.cpp
r376a3b r86cfac5 80 80 #include "World.hpp" 81 81 82 #include <fstream> 82 83 #include <iostream> 83 84 #include <string> … … 359 360 } 360 361 362 void writeToFile(const std::string &filename, const std::string contents) 363 { 364 std::ofstream tablefile(filename.c_str()); 365 tablefile << contents; 366 tablefile.close(); 367 } 368 361 369 /** Print MPQCData from received results. 362 370 * … … 367 375 { 368 376 // print tables (without eigenvalues, they go extra) 369 typedef boost::mpl::remove<MPQCDataEnergyVector_t, MPQCDataFused::energy_eigenvalues>::type 370 MPQCDataEnergyVector_noeigenvalues_t; 371 const std::string energyresult = 372 writeTable<MPQCDataEnergyMap_t, MPQCDataEnergyVector_noeigenvalues_t >()( 373 results.Result_Energy_fused, results.getMaxLevel()); 374 LOG(0, "Energy table is \n" << energyresult); 375 376 const std::string gridresult = 377 writeTable<VMGDataLongRangeMap_t, VMGDataLongRangeVector_t >()( 378 results.Result_LongRangeIntegrated_fused, results.getMaxLevel()); 379 LOG(0, "LongRange table is \n" << gridresult); 380 381 const std::string eigenvalueresult; 382 LOG(0, "Eigenvalue table is \n" << eigenvalueresult); 383 384 const std::string forceresult = 385 writeTable<MPQCDataForceMap_t, MPQCDataForceVector_t>()( 386 results.Result_Force_fused, results.getMaxLevel()); 387 LOG(0, "Force table is \n" << forceresult); 377 { 378 typedef boost::mpl::remove<MPQCDataEnergyVector_t, MPQCDataFused::energy_eigenvalues>::type 379 MPQCDataEnergyVector_noeigenvalues_t; 380 const std::string energyresult = 381 writeTable<MPQCDataEnergyMap_t, MPQCDataEnergyVector_noeigenvalues_t >()( 382 results.Result_Energy_fused, results.getMaxLevel()); 383 LOG(0, "Energy table is \n" << energyresult); 384 std::string filename; 385 filename += FRAGMENTPREFIX + std::string("_Energy.dat"); 386 writeToFile(filename, energyresult); 387 } 388 389 { 390 const std::string gridresult = 391 writeTable<VMGDataLongRangeMap_t, VMGDataLongRangeVector_t >()( 392 results.Result_LongRangeIntegrated_fused, results.getMaxLevel()); 393 LOG(0, "LongRange table is \n" << gridresult); 394 std::string filename; 395 filename += FRAGMENTPREFIX + std::string("_LongRangeEnergy.dat"); 396 writeToFile(filename, gridresult); 397 } 398 399 { 400 const std::string eigenvalueresult; 401 LOG(0, "Eigenvalue table is \n" << eigenvalueresult); 402 std::string filename; 403 filename += FRAGMENTPREFIX + std::string("_Eigenvalues.dat"); 404 writeToFile(filename, eigenvalueresult); 405 } 406 407 { 408 const std::string forceresult = 409 writeTable<MPQCDataForceMap_t, MPQCDataForceVector_t>()( 410 results.Result_Force_fused, results.getMaxLevel()); 411 LOG(0, "Force table is \n" << forceresult); 412 std::string filename; 413 filename += FRAGMENTPREFIX + std::string("_Forces.dat"); 414 writeToFile(filename, forceresult); 415 } 388 416 // we don't want to print grid to a table 389 // print times (without flops for now) 390 typedef boost::mpl::remove< 391 boost::mpl::remove<MPQCDataTimeVector_t, MPQCDataFused::times_total_flops>::type, 392 MPQCDataFused::times_gather_flops>::type 393 MPQCDataTimeVector_noflops_t; 394 const std::string timesresult = 395 writeTable<MPQCDataTimeMap_t, MPQCDataTimeVector_noflops_t >()( 396 results.Result_Time_fused, results.getMaxLevel()); 397 LOG(0, "Times table is \n" << timesresult); 417 { 418 // print times (without flops for now) 419 typedef boost::mpl::remove< 420 boost::mpl::remove<MPQCDataTimeVector_t, MPQCDataFused::times_total_flops>::type, 421 MPQCDataFused::times_gather_flops>::type 422 MPQCDataTimeVector_noflops_t; 423 const std::string timesresult = 424 writeTable<MPQCDataTimeMap_t, MPQCDataTimeVector_noflops_t >()( 425 results.Result_Time_fused, results.getMaxLevel()); 426 LOG(0, "Times table is \n" << timesresult); 427 std::string filename; 428 filename += FRAGMENTPREFIX + std::string("_Times.dat"); 429 writeToFile(filename, timesresult); 430 } 398 431 } 399 432
Note:
See TracChangeset
for help on using the changeset viewer.