RxDock 0.1.0
A fast, versatile, and open-source program for docking ligands to proteins and nucleic acids
Loading...
Searching...
No Matches
SetupPMFSF.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 _RBTSETUPPMFSF_H_
14#define _RBTSETUPPMFSF_H_
15
16#include "rxdock/BaseInterSF.h"
17
18namespace rxdock {
19
20class SetupPMFSF : public BaseInterSF {
21 AtomList theLigandList; // ligand typing
22 AtomList theReceptorList; // receptor typing
23
24public:
25 static const std::string _CT;
26
27 SetupPMFSF(const std::string &strName = "setup-pmf");
29
30protected:
31 virtual void SetupReceptor();
32 virtual void SetupLigand();
33 virtual void SetupScore();
34 virtual double RawScore() const;
35
36 void SetupReceptorPMFTypes(void);
37 void SetupLigandPMFTypes(void);
41 PMFType GetPMFfor_lC(AtomPtr); // for ligands
42 PMFType GetPMFfor_lN(AtomPtr);
43 PMFType GetPMFfor_lO(AtomPtr);
44 PMFType GetPMFfor_lS(AtomPtr);
45
46 PMFType GetPMFfor_rC(AtomPtr); // for receptor
47 PMFType GetPMFfor_rN(AtomPtr);
48 PMFType GetPMFfor_rO(AtomPtr);
49 PMFType GetPMFfor_rS(AtomPtr);
50
51 bool IsChargedNitrogen(AtomPtr); // true for guanidino or other charged
52
53private:
54 friend void to_json(json &j, const SetupPMFSF &pmfsf) {
55 json atomList;
56 for (const auto &cIter : pmfsf.theLigandList) {
57 json atom = *cIter;
58 atomList.push_back(atom);
59 }
60 json atomList2;
61 for (const auto &cIter : pmfsf.theReceptorList) {
62 json atom = *cIter;
63 atomList2.push_back(atom);
64 }
65
66 j = json{{"lig-list", atomList}, {"recep-list", atomList2}};
67 };
68 friend void from_json(const json &j, SetupPMFSF &pmfsf) {
69 pmfsf.theLigandList.clear();
70 pmfsf.theLigandList.reserve(j.at("lig-list").size());
71 for (auto &atom : j.at("lig-list")) {
72 AtomPtr spAtom = AtomPtr(new Atom(atom));
73 pmfsf.theLigandList.push_back(spAtom);
74 }
75 pmfsf.theReceptorList.clear();
76 pmfsf.theReceptorList.reserve(j.at("recep-list").size());
77 for (auto &atom : j.at("recep-list")) {
78 AtomPtr spAtom = AtomPtr(new Atom(atom));
79 pmfsf.theReceptorList.push_back(spAtom);
80 }
81 };
82};
83
84} // namespace rxdock
85
86#endif //_RBTSETUPPMFSF_H_
Definition Atom.h:49
Definition BaseInterSF.h:27
Definition SetupPMFSF.h:20
PMFType GetPMFfor_lC(AtomPtr)
Definition SetupPMFSF.cxx:219