/* * StretchBond.hpp * * Created on: Oct 4, 2020 * Author: heber */ #ifndef BOND_STRETCHBOND_HPP_ #define BOND_STRETCHBOND_HPP_ // include config.h #ifdef HAVE_CONFIG_H #include #endif #include #include "LinearAlgebra/Vector.hpp" #include "Graph/BoostGraphHelpers.hpp" #include "types.hpp" class atom; class bond; class Box; class molecule; /** * Helper class for stretching bonds in a molecule. */ class StretchBondUtil { public: StretchBondUtil(const std::vector< atom *> atoms); /** * Stretches the bond of two given atoms. * */ bool operator()(const double newdistance); const std::vector& getShift() const { return Shift; } double getOldDistance() const { return olddistance; } const std::vector< BoostGraphHelpers::Nodeset_t > & getBondSides() const { return bondside_sets; } const molecule & getMolecule() const { return *mol; } private: static bool addEdgePredicate( const bond &_bond, const std::vector &_atomids); const std::vector< atom *> atoms; molecule *mol; double olddistance; std::vector Shift; std::vector atomids; const Box &domain; std::vector< BoostGraphHelpers::Nodeset_t > bondside_sets; }; #endif /* BOND_STRETCHBOND_HPP_ */