/* * Interfragmenter.hpp * * Created on: Jul 5, 2013 * Author: heber */ #ifndef INTERFRAGMENTER_HPP_ #define INTERFRAGMENTER_HPP_ // include config.h #ifdef HAVE_CONFIG_H #include #endif #include #include "Fragmentation/HydrogenSaturation_enum.hpp" class atom; class KeySet; class Graph; /** This functor adds the union of certain fragments to a given set of fragments * (a Graph) by combining them depending on whether they are (not) bonded and * how far their centers are apart and which bond order they have. * * This is to allow calculation of interfragment energies. As fragments are * always of the same molecule, energies in between molecules so far are only * attained electrostratically, whereas dynamic correlation is totally missed. * Interfragments that are calculate with e.g. a sensible Post-HF method contain * dynamic correlation which can then be used for later potential fitting. */ class Interfragmenter { public: /** Constructor for class Interfragmenter. * * \param _TotalGraph Graph with all fragments to interrelate */ Interfragmenter(Graph &_TotalGraph) : TotalGraph(_TotalGraph) {} /** Adds interrelated fragments to TotalGraph up to \a MaxOrder and \a Rcut. * * \param MaxOrder maximum order for fragments to interrelate * \param Rcut maximum distance to check for interrelatable fragments * \param treatment whether hydrogens are treated specially or not */ void operator()( size_t MaxOrder, double Rcut, const enum HydrogenTreatment treatment); private: /** Helper to translate a keyset into a set of atoms. * * \param keyset * \return vector of atom refs */ std::vector getAtomsFromKeySet(const KeySet &keyset) const; private: Graph &TotalGraph; }; #endif /* INTERFRAGMENTER_HPP_ */