Changeset 766767
- Timestamp:
- Dec 14, 2012, 5:39:41 PM (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:
- 17c03f
- Parents:
- 372c912
- git-author:
- Frederik Heber <heber@…> (09/27/12 16:26:02)
- git-committer:
- Frederik Heber <heber@…> (12/14/12 17:39:41)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/FragmentationAction/FragmentationAutomationAction.cpp
r372c912 r766767 64 64 #include "Fragmentation/ForceMatrix.hpp" 65 65 #include "Fragmentation/Fragmentation.hpp" 66 #include "Fragmentation/HydrogenSaturation_enum.hpp" 66 67 #include "Fragmentation/Homology/HomologyContainer.hpp" 67 68 #include "Fragmentation/Homology/HomologyGraph.hpp" 69 #include "Fragmentation/KeySet.hpp" 70 #include "Fragmentation/KeySetsContainer.hpp" 68 71 #include "Fragmentation/SetValues/Fragment.hpp" 69 72 #include "Fragmentation/SetValues/Histogram.hpp" 70 73 #include "Fragmentation/SetValues/IndexedVectors.hpp" 71 #include "Fragmentation/HydrogenSaturation_enum.hpp" 72 #include "Fragmentation/KeySet.hpp" 73 #include "Fragmentation/KeySetsContainer.hpp" 74 #include "Fragmentation/Summation/IndexSetContainer.hpp" 74 75 #include "Fragmentation/Summation/writeTable.hpp" 75 76 #include "Graph/DepthFirstSearchAnalysis.hpp" … … 388 389 } 389 390 390 bool appendToHomologyFile(const boost::filesystem::path &homology_file) 391 bool appendToHomologyFile( 392 const boost::filesystem::path &homology_file, 393 const FragmentationResults &results, 394 const std::string &KeySetFilename) 391 395 { 392 396 // read homology container (if present) … … 408 412 // append all fragments to a HomologyContainer 409 413 HomologyContainer::container_t values; 410 // TODO: prepare HomologyGraphs ... 414 KeySetsContainer ForceKeySet; 415 { 416 // forces need keysets including hydrogens 417 std::stringstream filename; 418 filename << FRAGMENTPREFIX << FORCESFILE; 419 #ifndef NDEBUG 420 bool status = 421 #endif 422 ForceKeySet.ParseKeySets(KeySetFilename, filename.str(), results.Result_perIndexSet_Energy.size()); 423 ASSERT( status, 424 "FragmentationResults::FragmentationResults() - ParseKeySets() of " 425 +toString(FORCESFILE)+" failed."); 426 } 427 // convert KeySetContainer to IndexSetContainer 428 IndexSetContainer::ptr container(new IndexSetContainer(ForceKeySet)); 429 for (IndexSetContainer::Container_t::const_iterator iter = container->getContainer().begin(); 430 iter != container->getContainer().end(); ++iter) // go through each IndexSet 431 { 432 const IndexSet::ptr &index = *iter; 433 HomologyGraph graph(*index); 434 HomologyContainer::value_t value; 435 std::map<IndexSet::ptr, MPQCDataFragmentMap_t>::const_iterator fragmentiter 436 = results.Result_perIndexSet_Fragment.find(index); 437 ASSERT( fragmentiter != results.Result_perIndexSet_Fragment.end(), 438 "appendToHomologyFile() - cannot find index "+toString(*index) 439 +" in FragmentResults."); 440 value.first = boost::fusion::at_key<MPQCDataFused::fragment>(fragmentiter->second); 441 std::map<IndexSet::ptr, MPQCDataEnergyMap_t>::const_iterator energyiter 442 = results.Result_perIndexSet_Energy.find(index); 443 ASSERT( energyiter != results.Result_perIndexSet_Energy.end(), 444 "appendToHomologyFile() - cannot find index "+toString(*index) 445 +" in FragmentResults."); 446 value.second = boost::fusion::at_key<MPQCDataFused::energy_total>(energyiter->second); 447 values.insert( std::make_pair( graph, value) ); 448 } 411 449 homology_container.insert(values); 412 450 … … 531 569 if (homology_file.string() != "") { 532 570 LOG(1, "INFO: Appending HomologyGraphs to file " << homology_file.string() << "."); 533 if (!appendToHomologyFile(homology_file ))571 if (!appendToHomologyFile(homology_file, results, params.path.get())) 534 572 Exitflag = 1; 535 573 }
Note:
See TracChangeset
for help on using the changeset viewer.