RxDock 0.1.0
A fast, versatile, and open-source program for docking ligands to proteins and nucleic acids
Loading...
Searching...
No Matches
SetupSASF.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#ifndef _RBTSETUPSASF_H_
14#define _RBTSETUPSASF_H_
15
16#include "rxdock/BaseInterSF.h"
17
18namespace rxdock {
19
20// after Hasel, Hendrickson and Still
22 double p;
23 double r;
24};
25
26class SetupSASF : public BaseInterSF {
27 AtomList theLigandList; // ligand typing
28 AtomList theReceptorList; // receptor typing
29
30public:
31 static const std::string _CT;
32
33 SetupSASF(const std::string &strName = "setup-sa");
34 ~SetupSASF();
35
36protected:
37 virtual void SetupReceptor();
38 virtual void SetupLigand();
39 virtual void SetupScore();
40 virtual double RawScore() const;
41
42 void SetupReceptorSATypes(void);
43 void SetupLigandSATypes(void);
44
45private:
46 friend void to_json(json &j, const SetupSASF &sasf) {
47 json atomList;
48 for (const auto &cIter : sasf.theLigandList) {
49 json atom = *cIter;
50 atomList.push_back(atom);
51 }
52 json atomList2;
53 for (const auto &cIter : sasf.theReceptorList) {
54 json atom = *cIter;
55 atomList2.push_back(atom);
56 }
57
58 j = json{{"ligand-list", atomList}, {"receptor-list", atomList2}};
59 };
60
61 friend void from_json(const json &j, SetupSASF &sasf) {
62 sasf.theLigandList.clear();
63 sasf.theLigandList.reserve(j.at("atoms").size());
64 for (auto &atom : j.at("atoms")) {
65 AtomPtr spAtom = AtomPtr(new Atom(atom));
66 sasf.theLigandList.push_back(spAtom);
67 }
68
69 sasf.theReceptorList.clear();
70 sasf.theReceptorList.reserve(j.at("atoms").size());
71 for (auto &atom : j.at("atoms")) {
72 AtomPtr spAtom = AtomPtr(new Atom(atom));
73 sasf.theReceptorList.push_back(spAtom);
74 }
75 };
76};
77
78} // namespace rxdock
79
80#endif //_RBTSETUPSASF_H_
Definition Atom.h:49
Definition BaseInterSF.h:27
Definition SetupSASF.h:26
Definition SetupSASF.h:21