/* * BondVectors_impl.hpp * * Created on: Jun 13, 2017 * Author: heber */ #ifndef DYNAMICS_BONDVECTORS_IMPL_HPP_ #define DYNAMICS_BONDVECTORS_IMPL_HPP_ // include config.h #ifdef HAVE_CONFIG_H #include #endif #include "BondVectors.hpp" #include #include "Atom/atom.hpp" template void BondVectors::setFromAtomRange( typename T::iterator _start, typename T::iterator _end, const size_t &_step) { container.clear(); for (typename T::iterator iter = _start; iter != _end; ++iter) { const atom &walker = **iter; const BondList &ListOfBonds = walker.getListOfBondsAtStep(_step); container.insert(container.end(), ListOfBonds.begin(), ListOfBonds.end()); } // sort and make unique std::sort(container.begin(), container.end()); container.erase(std::unique(container.begin(), container.end()), container.end()); } #endif /* DYNAMICS_BONDVECTORS_IMPL_HPP_ */