13#ifndef _RBTINTERACTIONTEMPLATE_H_
14#define _RBTINTERACTIONTEMPLATE_H_
15#include "rxdock/BaseGrid.h"
16#include "rxdock/Config.h"
28 _RBTOBJECTCOUNTER_CONSTR_(
"InteractionNode");
33 T GetProperty()
const {
return property; }
34 void SetProperty(T aProperty) {
property = aProperty; }
55 static std::string _CT;
58 unsigned int NX,
unsigned int NY,
unsigned int NZ,
59 unsigned int NPad = 0) {
60 _CT =
"InteractionGridTemplate";
62 _RBTOBJECTCOUNTER_CONSTR_(
"InteractionGridTemplate");
67 _CT =
"InteractionGridTemplate";
69 _RBTOBJECTCOUNTER_CONSTR_(
"InteractionGridTemplate");
73 ClearInteractionLists();
74 _RBTOBJECTCOUNTER_DESTR_(
"InteractionGridTemplate");
82 _RBTOBJECTCOUNTER_COPYCONSTR_(
"InteractionGridTemplate");
88 _RBTOBJECTCOUNTER_COPYCONSTR_(
"InteractionGridTemplate");
94 ClearInteractionLists();
95 BaseGrid::Operator = (aGrid);
103 if (
this != &aGrid) {
104 ClearInteractionLists();
105 BaseGrid::Operator = (aGrid);
110 virtual void Print(std::ostream &ostr)
const {
111 BaseGrid::Print(ostr);
117 return m_intnMap[iXYZ];
125 return m_intnMap[GetIXYZ(c)];
127 LOG_F(1,
"InteractionGridTemplate::GetInteractionList: {} is off grid",
133 void SetInteractionLists(T *pIntn,
double radius) {
134 Atom *pAtom = pIntn->GetProperty().atom;
135 if (
nullptr == pAtom)
137 const Coord &c = pAtom->GetCoords();
138 std::vector<unsigned int> sphereIndices;
139 GetSphereIndices(c, radius, sphereIndices);
140 for (std::vector<unsigned int>::const_iterator sphereIter =
141 sphereIndices.begin();
142 sphereIter != sphereIndices.end(); sphereIter++) {
143 m_intnMap[*sphereIter].push_back(pIntn);
147 void ClearInteractionLists() {
149 iter != m_intnMap.end(); iter++) {
155 void OwnPrint(std::ostream &ostr)
const {
156 ostr << std::endl <<
"Class\t" << _CT << std::endl;
157 ostr <<
"No. of entries in the map: " << m_intnMap.size() << std::endl;
164 m_intnMap = aGrid.m_intnMap;
Definition InteractionTemplate.h:175
Definition InteractionTemplate.h:53
Definition InteractionTemplate.h:51
Definition InteractionTemplate.h:46
Definition InteractionTemplate.h:42
Definition InteractionTemplate.h:38
Definition InteractionTemplate.h:22
Definition SmartPointer.h:48