source: src/Fragmentation/Interfragmenter.hpp@ 440ac3

Action_Thermostats Add_AtomRandomPerturbation Add_RotateAroundBondAction Add_SelectAtomByNameAction Adding_Graph_to_ChangeBondActions Adding_MD_integration_tests Adding_StructOpt_integration_tests AutomationFragmentation_failures Candidate_v1.6.0 Candidate_v1.6.1 ChangeBugEmailaddress ChangingTestPorts ChemicalSpaceEvaluator Combining_Subpackages Debian_Package_split Debian_package_split_molecuildergui_only Disabling_MemDebug Docu_Python_wait EmpiricalPotential_contain_HomologyGraph_documentation Enable_parallel_make_install Enhance_userguide Enhanced_StructuralOptimization Enhanced_StructuralOptimization_continued Example_ManyWaysToTranslateAtom Exclude_Hydrogens_annealWithBondGraph FitPartialCharges_GlobalError Fix_ChronosMutex Fix_StatusMsg Fix_StepWorldTime_single_argument Fix_Verbose_Codepatterns ForceAnnealing_goodresults ForceAnnealing_oldresults ForceAnnealing_tocheck ForceAnnealing_with_BondGraph ForceAnnealing_with_BondGraph_continued ForceAnnealing_with_BondGraph_continued_betteresults ForceAnnealing_with_BondGraph_contraction-expansion GeometryObjects Gui_displays_atomic_force_velocity IndependentFragmentGrids_IntegrationTest JobMarket_RobustOnKillsSegFaults JobMarket_StableWorkerPool JobMarket_unresolvable_hostname_fix PartialCharges_OrthogonalSummation PythonUI_with_named_parameters QtGui_reactivate_TimeChanged_changes Recreated_GuiChecks RotateToPrincipalAxisSystem_UndoRedo StoppableMakroAction TremoloParser_IncreasedPrecision TremoloParser_MultipleTimesteps Ubuntu_1604_changes stable
Last change on this file since 440ac3 was d410e25, checked in by Frederik Heber <heber@…>, 9 years ago

Interfragmenter now access singleton AtomFragmentsMap.

  • i.e. we do not instantiate the map ourselves but assume that it has been filled elsewhere. We only receive a Graph ("TotalGraph") in order to add the additional fragments to it.
  • FragmentationAction fills the AtomFragmentsMap already before calling interfragmenter.
  • Property mode set to 100644
File size: 3.5 KB
Line 
1/*
2 * Interfragmenter.hpp
3 *
4 * Created on: Jul 5, 2013
5 * Author: heber
6 */
7
8#ifndef INTERFRAGMENTER_HPP_
9#define INTERFRAGMENTER_HPP_
10
11// include config.h
12#ifdef HAVE_CONFIG_H
13#include <config.h>
14#endif
15
16#include <list>
17#include <map>
18#include <vector>
19
20#include "AtomIdSet.hpp"
21#include "Fragmentation/Homology/AtomFragmentsMap.hpp"
22#include "Fragmentation/HydrogenSaturation_enum.hpp"
23
24class atom;
25class KeySet;
26class Graph;
27
28/** This functor adds the union of certain fragments to a given set of fragments
29 * (a Graph) by combining them depending on whether they are (not) bonded and
30 * how far their centers are apart and which bond order they have.
31 *
32 * This is to allow calculation of interfragment energies. As fragments are
33 * always of the same molecule, energies in between molecules so far are only
34 * attained electrostratically, whereas dynamic correlation is totally missed.
35 * Interfragments that are calculate with e.g. a sensible Post-HF method contain
36 * dynamic correlation which can then be used for later potential fitting.
37 */
38class Interfragmenter
39{
40public:
41 /** Adds interrelated fragments to TotalGraph up to \a MaxOrder and \a Rcut.
42 *
43 * \param TotalGraph filled with additional inter-fragments on return
44 * \param MaxOrder maximum order for fragments to interrelate
45 * \param Rcut maximum distance to check for interrelatable fragments
46 * \param treatment whether hydrogens are treated specially or not
47 */
48 void operator()(
49 Graph &TotalGraph,
50 const size_t MaxOrder,
51 const double Rcut,
52 const enum HydrogenTreatment treatment);
53
54 /** This finds the largest cut off distance (\a Rcut) such that when running
55 * operator() no additional inter-fragments would be produced.
56 *
57 * \param MaxOrder maximum order for fragments to interrelate
58 * \param _upperbound upper bound on \a Rcut above which we do not look
59 * \param treatment whether hydrogens are treated specially or not
60 * \return largest cutoff distance to cause no additional inter-fragments
61 */
62 double findLargestCutoff(
63 const size_t _MaxOrder,
64 const double _upperbound,
65 const enum HydrogenTreatment _treatment) const;
66
67private:
68
69 typedef AtomFragmentsMap::keysets_t keysets_t;
70 typedef AtomFragmentsMap::AtomFragmentsMap_t atomkeyset_t;
71
72 typedef std::vector<const atom *> candidates_t;
73
74 /** Helper function to get all atoms around a specific keyset not contained in
75 * the same molecule.
76 *
77 * \param _atoms all atoms of a fragment
78 * \param _Rcut desired distance cutoff
79 * \param _treatment whether hydrogens are treated special or not
80 */
81 candidates_t getNeighborsOutsideMolecule(
82 const AtomIdSet &_atoms,
83 const double _Rcut,
84 const enum HydrogenTreatment _treatment) const;
85
86 /** For a given set of candidates atoms in \a _candidates and a \a _keyset
87 * we combine each fragment from either atom and place it into internal
88 * Graph.
89 *
90 * \param _MaxOrder maximum order
91 * \param _candidates all atoms neighboring the current out outside of its molecule
92 * \param _fragmentmap all keysets related to this atom
93 * \param _keyset current keyset (used as base for creating inter-fragments)
94 * \param _InterFragments container for all created inter-fragments
95 * \param _counter counts added fragments
96 */
97 void combineFragments(
98 const size_t _MaxOrder,
99 const candidates_t &_candidates,
100 const atomkeyset_t &_fragmentmap,
101 const KeySet &_keyset,
102 Graph &_InterFragments,
103 int &_counter);
104};
105
106#endif /* INTERFRAGMENTER_HPP_ */
Note: See TracBrowser for help on using the repository browser.