Changeset fe0cb8 for src/Actions
- Timestamp:
- Oct 14, 2013, 11:42:03 PM (11 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:
- adb51ab
- Parents:
- 8dbcaf
- git-author:
- Frederik Heber <heber@…> (09/25/13 08:49:20)
- git-committer:
- Frederik Heber <heber@…> (10/14/13 23:42:03)
- Location:
- src/Actions/FragmentationAction
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/FragmentationAction/FragmentationAction.cpp
r8dbcaf rfe0cb8 50 50 #include "Graph/AdjacencyList.hpp" 51 51 #include "Graph/BondGraph.hpp" 52 #include "Graph/CyclicStructureAnalysis.hpp" 52 53 #include "Graph/DepthFirstSearchAnalysis.hpp" 53 54 #include "Helpers/defs.hpp" … … 128 129 } 129 130 130 // we require the current bond graph131 DepthFirstSearchAnalysis DFS;132 133 131 // we parse in the keysets from last time if present 134 132 Graph StoredGraph; … … 162 160 { 163 161 Graph StoredLocalGraph(StoredGraph.getLocalGraph(mol)); 164 const int tempFlag = Fragmenter.FragmentMolecule(mols_atomids, params.order.get(), params.prefix.get(), DFS,StoredLocalGraph);162 const int tempFlag = Fragmenter.FragmentMolecule(mols_atomids, params.order.get(), params.prefix.get(), StoredLocalGraph); 165 163 if ((ExitFlag == 2) && (tempFlag != 2)) 166 164 ExitFlag = tempFlag; // if there is one molecule that needs further fragmentation, it overrides others … … 175 173 176 174 } 175 // add full cycles if desired 176 if (params.DoCyclesFull.get()) { 177 // get the BackEdgeStack from somewhere 178 DepthFirstSearchAnalysis DFS; 179 DFS(); 180 std::deque<bond::ptr> BackEdgeStack = DFS.getBackEdgeStack(); 181 // then we analyse the cycles and get them 182 CyclicStructureAnalysis CycleAnalysis(params.HowtoTreatHydrogen.get() ? ExcludeHydrogen : IncludeHydrogen); 183 CycleAnalysis(&BackEdgeStack); 184 CyclicStructureAnalysis::cycles_t cycles = CycleAnalysis.getAllCycles(); 185 LOG(0, "STATUS: Adding " << cycles.size() << " cycles."); 186 // Create graph and insert into TotalGraph 187 { 188 Graph CycleGraph; 189 for (CyclicStructureAnalysis::cycles_t::const_iterator iter = cycles.begin(); 190 iter != cycles.end(); ++iter) { 191 const CyclicStructureAnalysis::cycle_t ¤tcycle = *iter; 192 LOG(2, "INFO: Inserting cycle " << currentcycle << "."); 193 #ifndef NDEBUG 194 std::pair< Graph::iterator, bool > inserter = 195 #endif 196 CycleGraph.insert( std::make_pair(currentcycle, NumberValuePair(1,1.)) ); 197 ASSERT( inserter.second, 198 "FragmentationFragmentationAction::performCall() - keyset " 199 +toString(currentcycle)+" inserted twice into CycleGraph."); 200 } 201 TotalGraph.InsertGraph(CycleGraph, keysetcounter); 202 } 203 } 204 177 205 LOG(0, "STATUS: There are " << TotalGraph.size() << " fragments."); 178 206 -
src/Actions/FragmentationAction/FragmentationAction.def
r8dbcaf rfe0cb8 21 21 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 22 22 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 23 #define paramtypes (std::string)(double)(unsigned int)(bool)(bool)(std::vector<std::string>)(unsigned int)(unsigned int) 24 #define paramtokens ("fragment-molecule")("distance")("order")("DoSaturate")("ExcludeHydrogen")("output-types")("grid-level")("inter-order") 25 #define paramdescriptions ("prefix of each fragment file")("distance in space up to which fragments are combined")("order of a discretization, dissection, ...")("do saturate dangling bonds with hydrogen")("whether to exclude hydrogen in the bond graph dissection or not")("type(s) of parsers that output fragment config files")("resolution of density sampling multigrid")("up to which order distinct fragments are combined") 26 #define paramdefaults (NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(PARAM_DEFAULT(true))(PARAM_DEFAULT(true))(NOPARAM_DEFAULT)(PARAM_DEFAULT(5))(PARAM_DEFAULT(0)) 27 #define paramreferences (prefix)(distance)(order)(DoSaturation)(HowtoTreatHydrogen)(types)(level)(InterOrder) 23 #define paramtypes (std::string)(double)(unsigned int)(bool)(bool)(std::vector<std::string>)(unsigned int)(unsigned int)(bool) 24 #define paramtokens ("fragment-molecule")("distance")("order")("DoSaturate")("ExcludeHydrogen")("output-types")("grid-level")("inter-order")("DoCyclesFull") 25 #define paramdescriptions ("prefix of each fragment file")("distance in space up to which fragments are combined")("order of a discretization, dissection, ...")("do saturate dangling bonds with hydrogen")("whether to exclude hydrogen in the bond graph dissection or not")("type(s) of parsers that output fragment config files")("resolution of density sampling multigrid")("up to which order distinct fragments are combined")("always calculate (aromatic) rings fully, even beyond desired order") 26 #define paramdefaults (NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(PARAM_DEFAULT(true))(PARAM_DEFAULT(true))(NOPARAM_DEFAULT)(PARAM_DEFAULT(5))(PARAM_DEFAULT(0))(PARAM_DEFAULT(false)) 27 #define paramreferences (prefix)(distance)(order)(DoSaturation)(HowtoTreatHydrogen)(types)(level)(InterOrder)(DoCyclesFull) 28 28 #define paramvalids \ 29 29 (DummyValidator< std::string >()) \ … … 35 35 (RangeValidator< unsigned int >(1, 10)) \ 36 36 (DummyValidator< unsigned int >()) \ 37 (DummyValidator< bool >()) 37 38 38 39 #undef statetypes
Note:
See TracChangeset
for help on using the changeset viewer.