Changeset d45ed9
- Timestamp:
- May 18, 2016, 10:02:06 PM (9 years ago)
- Branches:
- Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, 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_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, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, 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:
- bd6e5c
- Parents:
- b0bc13
- git-author:
- Frederik Heber <heber@…> (03/07/16 13:03:23)
- git-committer:
- Frederik Heber <heber@…> (05/18/16 22:02:06)
- Location:
- src/Fragmentation
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Fragmentation/Interfragmenter.cpp
rb0bc13 rd45ed9 49 49 #include "LinkedCell/types.hpp" 50 50 #include "World.hpp" 51 52 53 Interfragmenter::atomkeyset_t Interfragmenter::getAtomKeySetMap(54 size_t _MaxOrder55 ) const56 {57 /// create a map of atom to keyset (below equal MaxOrder)58 atomkeyset_t atomkeyset;59 LOG(1, "INFO: Placing all atoms and their keysets into a map.");60 for (Graph::const_iterator keysetiter = TotalGraph.begin();61 keysetiter != TotalGraph.end(); ++keysetiter) {62 const KeySet &keyset = keysetiter->first;63 LOG(2, "DEBUG: Current keyset is " << keyset);64 const AtomIdSet atoms(keyset);65 const size_t atoms_size = atoms.getAtomIds().size();66 if ((atoms_size > _MaxOrder) || (atoms_size == 0))67 continue;68 for (AtomIdSet::const_iterator atomiter = atoms.begin();69 atomiter != atoms.end(); ++atomiter) {70 // either create new list ...71 std::pair<atomkeyset_t::iterator, bool> inserter =72 atomkeyset.insert( std::make_pair(*atomiter, keysets_t(1, &keyset) ));73 // ... or push to end74 if (inserter.second) {75 LOG(3, "DEBUG: Created new entry in map.");76 } else {77 LOG(3, "DEBUG: Added keyset to present entry.");78 inserter.first->second.push_back(&keyset);79 }80 }81 }82 LOG(2, "DEBUG: There are " << atomkeyset.size() << " entries in lookup.");83 84 return atomkeyset;85 }86 51 87 52 static Vector getAtomIdSetCenter( … … 204 169 const enum HydrogenTreatment treatment) 205 170 { 206 atomkeyset_t atomkeyset = getAtomKeySetMap(MaxOrder); 171 AtomFragmentsMap AtomFragments(TotalGraph, MaxOrder); 172 const atomkeyset_t &atomkeyset = AtomFragments.getMap(); 207 173 208 174 Graph InterFragments; … … 245 211 // place all atoms into LC grid with some upper bound 246 212 const LinkedCell::LinkedCell_View view = World::getInstance().getLinkedCell(_upperbound); 247 248 atomkeyset_t atomkeyset = getAtomKeySetMap(_MaxOrder);249 213 250 214 // go through each atom and find closest atom not in the same keyset -
src/Fragmentation/Interfragmenter.hpp
rb0bc13 rd45ed9 19 19 20 20 #include "AtomIdSet.hpp" 21 #include "Fragmentation/AtomFragmentsMap.hpp" 21 22 #include "Fragmentation/HydrogenSaturation_enum.hpp" 22 23 … … 71 72 72 73 private: 73 /** Helper to translate a keyset into a set of atoms.74 *75 * \param keyset76 * \return vector of atom refs77 */78 std::vector<atom *> getAtomsFromKeySet(const KeySet &keyset) const;79 74 80 typedef std::list<const KeySet *> keysets_t; 81 typedef std::map<const atom *, keysets_t > atomkeyset_t; 82 83 /** Helper function to create a map of atoms and their fragments/keysets. 84 * 85 * \param _MaxOrder maximum order 86 * \return map with atoms as a keys and fragments as values 87 */ 88 atomkeyset_t getAtomKeySetMap(size_t _MaxOrder) const; 75 typedef AtomFragmentsMap::keysets_t keysets_t; 76 typedef AtomFragmentsMap::AtomFragmentsMap_t atomkeyset_t; 89 77 90 78 typedef std::vector<const atom *> candidates_t; -
src/Fragmentation/Makefile.am
rb0bc13 rd45ed9 17 17 Fragmentation/Homology/HomologyGraph.cpp \ 18 18 Fragmentation/AdaptivityMap.cpp \ 19 Fragmentation/AtomFragmentsMap.cpp \ 19 20 Fragmentation/BondsPerShortestPath.cpp \ 20 21 Fragmentation/EnergyMatrix.cpp \ … … 46 47 Fragmentation/Homology/HomologyGraph.hpp \ 47 48 Fragmentation/AdaptivityMap.hpp \ 49 Fragmentation/AtomFragmentsMap.hpp \ 48 50 Fragmentation/AtomMask.hpp \ 49 51 Fragmentation/BondsPerShortestPath.hpp \
Note:
See TracChangeset
for help on using the changeset viewer.