RxDock 0.1.0
A fast, versatile, and open-source program for docking ligands to proteins and nucleic acids
Loading...
Searching...
No Matches
SiteMapper.h
1/***********************************************************************
2 * The rDock program was developed from 1998 - 2006 by the software team
3 * at RiboTargets (subsequently Vernalis (R&D) Ltd).
4 * In 2006, the software was licensed to the University of York for
5 * maintenance and distribution.
6 * In 2012, Vernalis and the University of York agreed to release the
7 * program as Open Source software.
8 * This version is licensed under GNU-LGPL version 3.0 with support from
9 * the University of Barcelona.
10 * http://rdock.sourceforge.net/
11 ***********************************************************************/
12
13// Base class for docking site mapper function classes
14// Designed in a similar fashion to scoring functions, in that mapper objects
15// are attached to a workspace and can respond to changes in the defined
16// receptor and ligand models
17// Sub classes should implement operator() which returns a list of cavity smart
18// pointers
19
20#ifndef _RBTSITEMAPPER_H_
21#define _RBTSITEMAPPER_H_
22
23#include "rxdock/BaseObject.h"
24#include "rxdock/Cavity.h"
25#include "rxdock/Config.h"
26#include "rxdock/Model.h"
27
28#include <nlohmann/json.hpp>
29
30using json = nlohmann::json;
31
32namespace rxdock {
33
34class SiteMapper : public BaseObject {
35public:
36 // Class type string
37 static const std::string _CT;
38
40 // Constructors/destructors
41 virtual ~SiteMapper();
42
43 friend void to_json(json &j, const SiteMapper &siteMapper);
44 friend void from_json(const json &j, SiteMapper &siteMapper);
45
47 // Public methods
49 ModelPtr GetReceptor() const { return m_spReceptor; }
50
51 // PURE VIRTUAL - subclasses must override
52 // NB - subclasses should also override Observer::Update pure virtual
53 virtual CavityList operator()() = 0;
54
55 // Override Observer pure virtual
56 // Notify observer that subject has changed
57 virtual void Update(Subject *theChangedSubject);
58
59protected:
61 // Protected methods
63 SiteMapper(const std::string &strClass, const std::string &strName);
64
65private:
67 // Private methods
69 SiteMapper(); // default constructor disabled
70 SiteMapper(const SiteMapper &); // Copy constructor disabled by default
72 operator=(const SiteMapper &); // Copy assignment disabled by default
73
74protected:
76 // Protected data
78
79private:
81 // Private data
83 ModelPtr m_spReceptor;
84};
85
86void to_json(json &j, const SiteMapper &siteMapper);
87void from_json(const json &j, SiteMapper &siteMapper);
88
89// Useful typedefs
90typedef SmartPtr<SiteMapper> SiteMapperPtr; // Smart pointer
91
92} // namespace rxdock
93
94#endif //_RBTSITEMAPPER_H_
Definition BaseObject.h:32
Definition SiteMapper.h:34
Definition Subject.h:35