RxDock 0.1.0
A fast, versatile, and open-source program for docking ligands to proteins and nucleic acids
Loading...
Searching...
No Matches
ChromPositionRefData.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// Manages the fixed reference data for a position chromosome element
14// Also provides methods to map the genotype (COM and Euler angles) onto the
15// phenotype (model coords)
16// A single instance is designed to be shared between all clones of a given
17// element
18#ifndef RBTCHROMPOSITIONREFDATA_H_
19#define RBTCHROMPOSITIONREFDATA_H_
20
21#include "rxdock/ChromElement.h"
22#include "rxdock/DockingSite.h"
23#include "rxdock/Euler.h"
24#include "rxdock/Model.h"
25
26#include <nlohmann/json.hpp>
27
28using json = nlohmann::json;
29
30namespace rxdock {
31
33public:
34 // Class type string
35 static const std::string _CT;
36 // Reference Cartesian axes
37 static const PrincipalAxes CARTESIAN_AXES;
38 ChromPositionRefData(const Model *pModel, const DockingSite *pDockSite,
39 double transStepSize, // Angstroms
40 double rotStepSize, // radians
41 ChromElement::eMode transMode = ChromElement::FREE,
42 ChromElement::eMode rotMode = ChromElement::FREE,
43 double maxTrans = 0.0, // Angstroms
44 double maxRot = 0.0); // radians
45 virtual ~ChromPositionRefData();
46
47 int GetNumStartCoords() const { return m_startCoords.size(); }
48 const Coord &GetStartCoord(int iCoord) const { return m_startCoords[iCoord]; }
49 double GetTransStepSize() const { return m_transStepSize; }
50 double GetRotStepSize() const { return m_rotStepSize; }
51 ChromElement::eMode GetTransMode() const { return m_transMode; }
52 ChromElement::eMode GetRotMode() const { return m_rotMode; }
53 // Chromosome length, excluding FIXED modes (0, 3 or 6)
54 int GetLength() const { return m_length; }
55 // Chromosome length for crossover, excluding FIXED modes (0, 1 or 2)
56 int GetXOverLength() const { return m_xOverLength; }
57 bool IsTransFixed() const { return m_transMode == ChromElement::FIXED; }
58 bool IsRotFixed() const { return m_rotMode == ChromElement::FIXED; }
59 double GetMaxTrans() const { return m_maxTrans; }
60 double GetMaxRot() const { return m_maxRot; }
61 const Coord &GetInitialCOM() const { return m_initialCom; }
62 const Euler &GetInitialOrientation() const { return m_initialOrientation; }
63 const Quat &GetInitialQuat() const { return m_initialQuat; }
64
65 void GetModelValue(Coord &com, Euler &orientation) const;
66 void SetModelValue(const Coord &com, const Euler &orientation);
67
68 friend void to_json(json &j, const ChromPositionRefData &chrposrdata);
69 friend void from_json(const json &j, ChromPositionRefData &chrposrdata);
70
71private:
72 AtomList m_refAtoms;
73 AtomRList m_movableAtoms;
74 CoordList m_startCoords;
75 double m_transStepSize;
76 double m_rotStepSize;
77 Coord m_initialCom;
78 Euler m_initialOrientation;
79 Quat m_initialQuat;
80 ChromElement::eMode m_transMode;
81 ChromElement::eMode m_rotMode;
82 int m_length;
83 int m_xOverLength;
84 // Max distance allowed from starting coord
85 // Only used if m_transMode == TETHERED
86 double m_maxTrans;
87 // Max rot allowed from starting orientation
88 // Only used if m_rotMode == TETHERED
89 double m_maxRot;
90};
91
92void to_json(json &j, const ChromPositionRefData &chrposrdata);
93void from_json(const json &j, ChromPositionRefData &chrposrdata);
94
96
97} // namespace rxdock
98
99#endif /*RBTCHROMPOSITIONREFDATA_H_*/
Definition ChromPositionRefData.h:32
Definition Coord.h:45
Definition DockingSite.h:30
Definition Euler.h:48
Definition Model.h:34
Definition PrincipalAxes.h:29
Definition Quat.h:24
Definition SmartPointer.h:48