RxDock 0.1.0
A fast, versatile, and open-source program for docking ligands to proteins and nucleic acids
Loading...
Searching...
No Matches
PharmaSF.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// Pharmacophore distance restraint scoring function
14
15#ifndef _RBTPHARMASF_H_
16#define _RBTPHARMASF_H_
17
18#include "rxdock/BaseInterSF.h"
19#include "rxdock/BaseMolecularFileSink.h"
20#include "rxdock/Constraint.h"
21
22#include <nlohmann/json.hpp>
23
24using json = nlohmann::json;
25
26namespace rxdock {
27
28class PharmaSF : public BaseInterSF {
29public:
30 // Class type string
31 static const std::string _CT;
32 // Parameter names
33 static const std::string _CONSTRAINTS_FILE;
34 static const std::string _OPTIONAL_FILE;
35 static const std::string _NOPT;
36 static const std::string _WRITE_ERRORS;
37
38 PharmaSF(const std::string &strName = "pharma");
39 virtual ~PharmaSF();
40
41 friend void to_json(json &j, const PharmaSF &pharmaSF);
42 friend void from_json(const json &j, PharmaSF &pharmaSF);
43
44 // Override BaseSF::ScoreMap to provide additional raw descriptors
45 virtual void ScoreMap(StringVariantMap &scoreMap) const;
46
47protected:
48 virtual void SetupReceptor();
49 virtual void SetupLigand();
50 virtual void SetupScore();
51 virtual double RawScore() const;
52 // DM 25 Oct 2000 - track changes to parameter values in local data members
53 // ParameterUpdated is invoked by ParamHandler::SetParameter
54 void ParameterUpdated(const std::string &strName);
55
56private:
57 ConstraintList m_constrList;
58 ConstraintList m_optList;
59 int m_nopt;
60 MolecularFileSinkPtr m_spErrorFile;
61 bool m_bWriteErrors;
62 // Keep track of individual constraint scores for ScoreMap
63 mutable std::vector<double> m_conScores; // Mandatory constraint scores
64 mutable std::vector<double> m_optScores; // Optional constraint scores
65};
66
67void to_json(json &j, const PharmaSF &pharmaSF);
68void from_json(const json &j, PharmaSF &pharmaSF);
69
70} // namespace rxdock
71
72#endif //_RBTPHARMASF_H_
Definition BaseInterSF.h:27
Definition PharmaSF.h:28