RxDock 0.1.0
A fast, versatile, and open-source program for docking ligands to proteins and nucleic acids
Loading...
Searching...
No Matches
ChromPositionElement.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// Chromosome element for model centre of mass and orientation
14#ifndef RBTCHROMPOSITIONELEMENT_H_
15#define RBTCHROMPOSITIONELEMENT_H_
16
17#include "rxdock/ChromElement.h"
18#include "rxdock/ChromPositionRefData.h"
19#include "rxdock/Rand.h"
20
21namespace rxdock {
22
24public:
25 // Class type string
26 static const std::string _CT;
27
28 RBTDLL_EXPORT
29 ChromPositionElement(const Model *pModel, const DockingSite *pDockSite,
30 double transStepSize, // Angstroms
31 double rotStepSize, // Radians
32 ChromElement::eMode transMode = ChromElement::FREE,
33 ChromElement::eMode rotMode = ChromElement::FREE,
34 double maxTrans = 0.0, // Angstroms
35 double maxRot = 0.0); // radians
36 virtual ~ChromPositionElement();
37 virtual void Reset();
38 virtual void Randomise();
39 virtual void Mutate(double relStepSize);
40 virtual void SyncFromModel();
41 virtual void SyncToModel();
42 virtual ChromElement *clone() const;
43 virtual int GetLength() const { return m_spRefData->GetLength(); }
44 virtual int GetXOverLength() const { return m_spRefData->GetXOverLength(); }
45 virtual void GetVector(std::vector<double> &v) const;
46 virtual void GetVector(XOverList &v) const;
47 virtual void SetVector(const std::vector<double> &v, int &i);
48 virtual void SetVector(const XOverList &v, int &i);
49 virtual void GetStepVector(std::vector<double> &v) const;
50 virtual double CompareVector(const std::vector<double> &v, int &i) const;
51 virtual void Print(std::ostream &s) const;
52
53 // Returns a standardised rotation angle in the range [-M_PI, +M_PI}
54 // This function operates in radians
55 static double StandardisedValue(double rotationAngle);
56
57protected:
58 // For use by clone()
60 const Euler &orientation);
62 void RandomiseCOM();
63 void RandomiseOrientation();
64 void MutateCOM(double relStepSize);
65 void MutateOrientation(double relStepSize);
66 void CorrectTetheredCOM();
67 void CorrectTetheredOrientation();
68
69private:
70 ChromPositionRefDataPtr m_spRefData; // Fixed reference data
71 Coord m_com; // Centre of mass genotype value
72 Euler m_orientation; // Euler angle orientation genotype value
73};
74
75} // namespace rxdock
76
77#endif /*RBTCHROMPOSITIONELEMENT_H_*/
Definition ChromElement.h:36
Definition ChromPositionElement.h:23
Definition Coord.h:45
Definition DockingSite.h:30
Definition Euler.h:48
Definition Model.h:34