RxDock 0.1.0
A fast, versatile, and open-source program for docking ligands to proteins and nucleic acids
Loading...
Searching...
No Matches
CavityGridSF.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// Penalty function for keeping ligand and solvent within the docking volume
14#ifndef _RBTCAVITYGRIDSF_H_
15#define _RBTCAVITYGRIDSF_H_
16
17#include "rxdock/BaseInterSF.h"
18#include "rxdock/FlexDataVisitor.h"
19#include "rxdock/RealGrid.h"
20
21#include <nlohmann/json.hpp>
22
23using json = nlohmann::json;
24
25namespace rxdock {
26
27class CavityGridSF : public BaseInterSF {
28public:
29 // FlexDataVisitor class to generate list of movable non-hydrogen atoms
30 // i.e. those atoms that have the potential to move outside of the cavity
31 class RBTDLL_EXPORT HeavyAtomFactory : public FlexDataVisitor {
32 public:
34 HeavyAtomFactory(ModelList modelList);
35 virtual void VisitReceptorFlexData(ReceptorFlexData *);
36 virtual void VisitLigandFlexData(LigandFlexData *);
37 virtual void VisitSolventFlexData(SolventFlexData *);
38 AtomRList GetAtomList() const { return m_atomList; }
39
40 friend void to_json(json &j, const HeavyAtomFactory &heavyAtomFactory);
41 friend void from_json(const json &j, HeavyAtomFactory &heavyAtomFactory);
42
43 private:
44 AtomRList m_atomList;
45 };
46
47 void to_json(json &j, const HeavyAtomFactory &heavyAtomFactory);
48 void from_json(const json &j, HeavyAtomFactory &heavyAtomFactory);
49
50 // Class type string
51 static const std::string _CT;
52 // Parameter names
53 static const std::string _RMAX;
54 static const std::string
55 _QUADRATIC; // True = quadratic penalty function; false = linear
56
57 CavityGridSF(const std::string &strName = "cavity");
58 virtual ~CavityGridSF();
59
60 friend void to_json(json &j, const CavityGridSF &cavGridSF);
61 friend void from_json(const json &j, CavityGridSF &cavGridSF);
62
63protected:
64 virtual void SetupReceptor();
65 virtual void SetupLigand();
66 virtual void SetupSolvent();
67 virtual void SetupScore();
68 virtual double RawScore() const;
69 // DM 25 Oct 2000 - track changes to parameter values in local data members
70 // ParameterUpdated is invoked by ParamHandler::SetParameter
71 void ParameterUpdated(const std::string &strName);
72
73private:
74 RealGridPtr m_spGrid;
75 double m_maxDist; // Max distance of any grid point from the cavity
76 AtomRList m_atomList; // combined list of all movable heavy atoms
77 double m_rMax;
78 bool m_bQuadratic; // synchronised with QUADRATIC named parameter
79};
80
81void to_json(json &j, const CavityGridSF &cavGridSF);
82void from_json(const json &j, CavityGridSF &cavGridSF);
83
84} // namespace rxdock
85
86#endif //_RBTCAVITYGRIDSF_H_
Definition BaseInterSF.h:27
Definition CavityGridSF.h:31
Definition CavityGridSF.h:27
Definition FlexDataVisitor.h:23
Definition LigandFlexData.h:21
Definition ReceptorFlexData.h:21
Definition SolventFlexData.h:21