RxDock 0.1.0
A fast, versatile, and open-source program for docking ligands to proteins and nucleic acids
Loading...
Searching...
No Matches
ChromDihedralElement.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 a single dihedral angle
14#ifndef RBTCHROMDIHEDRALELEMENT_H_
15#define RBTCHROMDIHEDRALELEMENT_H_
16
17#include "rxdock/ChromDihedralRefData.h"
18#include "rxdock/ChromElement.h"
19#include "rxdock/Rand.h"
20
21namespace rxdock {
22
24public:
25 // Class type string
26 static const std::string _CT;
27 // Sole constructor
28 // If the tetheredAtoms list is empty, then
29 // the end of the bond with the fewest pendant atoms is rotated (other half
30 // remains fixed)
31 // else if the tetheredAtoms list is not empty, then
32 // the end of the bond with the fewest tethered atoms is rotated (other half
33 // remains fixed)
34 RBTDLL_EXPORT ChromDihedralElement(
35 BondPtr spBond, // Rotatable bond
36 AtomList tetheredAtoms, // Tethered atom list
37 double stepSize, // maximum mutation step size (degrees)
38 ChromElement::eMode mode = ChromElement::FREE, // sampling mode
39 double maxDihedral =
40 0.0); // max deviation from reference (tethered mode only)
41
42 virtual ~ChromDihedralElement();
43 virtual void Reset();
44 virtual void Randomise();
45 virtual void Mutate(double relStepSize);
46 virtual void SyncFromModel();
47 virtual void SyncToModel();
48 virtual ChromElement *clone() const;
49 virtual int GetLength() const { return 1; }
50 virtual int GetXOverLength() const { return 1; }
51 virtual void GetVector(std::vector<double> &v) const;
52 virtual void GetVector(XOverList &v) const;
53 virtual void SetVector(const std::vector<double> &v, int &i);
54 virtual void SetVector(const XOverList &v, int &i);
55 virtual void GetStepVector(std::vector<double> &v) const;
56 virtual double CompareVector(const std::vector<double> &v, int &i) const;
57 virtual void Print(std::ostream &s) const;
58
59 // Returns a standardised dihedral angle in the range [-180, +180}
60 // This function operates in degrees
61 static double StandardisedValue(double dihedralAngle);
62
63protected:
64 // For use by clone()
65 ChromDihedralElement(ChromDihedralRefDataPtr spRefData, double value);
67 void CorrectTetheredDihedral();
68
69private:
70 ChromDihedralRefDataPtr m_spRefData; // Fixed reference data
71 double m_value; // The genotype value
72};
73
74} // namespace rxdock
75
76#endif /*RBTCHROMDIHEDRALELEMENT_H_*/
Definition ChromDihedralElement.h:23
Definition ChromElement.h:36