13#ifndef _RBTPMFGRIDSF_H_
14#define _RBTPMFGRIDSF_H_
16#include "rxdock/BaseInterSF.h"
17#include "rxdock/RealGrid.h"
19#include <nlohmann/json.hpp>
21using json = nlohmann::json;
27 AtomList theLigandList;
28 std::vector<PMFType> theTypeList;
29 std::vector<RealGridPtr> theGrids;
31 void ReadGrids(json pmfGrids);
34 static const std::string _CT;
35 static const std::string _GRID;
36 static const std::string
39 PMFGridSF(
const std::string &strName =
"pmf-grid");
43 virtual void SetupReceptor();
44 virtual void SetupLigand();
45 virtual void SetupScore() {}
46 virtual double RawScore()
const;
47 unsigned int GetCorrectedType(PMFType aType)
const;
50 friend void to_json(json &j,
const PMFGridSF &sf) {
52 for (
const auto &cIter : sf.theLigandList) {
54 atomList.push_back(atom);
57 for (
const auto &cIter : sf.theGrids) {
59 grids.push_back(grid);
62 j = json{{
"smoothed", sf.m_bSmoothed},
64 {
"pmf-types", sf.theTypeList},
67 friend void from_json(
const json &j,
PMFGridSF &sf) {
68 j.at(
"smoothed").get_to(sf.m_bSmoothed);
70 sf.theLigandList.clear();
71 sf.theLigandList.reserve(j.at(
"atoms").size());
72 for (
auto &atom : j.at(
"atoms")) {
74 sf.theLigandList.push_back(spAtom);
76 j.at(
"pmf-types").get_to(sf.theTypeList);
79 sf.theGrids.reserve(j.at(
"grids").size());
80 for (
auto &grid : j.at(
"grids")) {
82 sf.theGrids.push_back(spGrid);
Definition BaseInterSF.h:27
Definition PMFGridSF.h:25