RxDock 0.1.0
A fast, versatile, and open-source program for docking ligands to proteins and nucleic acids
Loading...
Searching...
No Matches
Chrom.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// Aggregate class for managing a vector of ChromElement objects
14// Also implements the ChromElement interface itself
15// to delegate requests to each element in the vector
16// NOTE: Chrom destructor is responsible for deleting all managed elements
17#ifndef RBTCHROM_H_
18#define RBTCHROM_H_
19
20#include "rxdock/ChromElement.h"
21#include "rxdock/Error.h"
22#include "rxdock/Model.h"
23
24namespace rxdock {
25
26class Chrom : public ChromElement {
27public:
28 // Class type string
29 static const std::string _CT;
30 // Constructor for an empty chromosome
31 RBTDLL_EXPORT Chrom();
32 // Constructor for a combined chromosome for each model
33 // in the list
34 Chrom(const ModelList &modelList);
35 virtual ~Chrom();
36
37 // pure virtual from ChromElement
38 virtual void Reset();
39 virtual void Randomise();
40 virtual void Mutate(double relStepSize);
41 virtual void SyncFromModel();
42 virtual void SyncToModel();
43 virtual ChromElement *clone() const;
44 virtual int GetLength() const;
45 virtual int GetXOverLength() const;
46 virtual void GetVector(std::vector<double> &v) const;
47 virtual void GetVector(XOverList &v) const;
48 virtual void SetVector(const std::vector<double> &v, int &i);
49 virtual void SetVector(const XOverList &v, int &i);
50 virtual void GetStepVector(std::vector<double> &v) const;
51 virtual double CompareVector(const std::vector<double> &v, int &i) const;
52 virtual void Print(std::ostream &s) const;
53
54 // Aggregate methods
55 // Appends a new chromosome element to the vector
56 // Chrom destructor is responsible for deleting the new element
57 // Null operation if pChromElement is nullptr
58 virtual void Add(ChromElement *pChromElement);
59
60protected:
61private:
62 ChromElementList m_elementList;
63 // We need to store the model list so that
64 // we can call UpdatePseudoAtoms() on each model following
65 // a SyncToModel
66 ModelList m_modelList;
67};
68
69} // namespace rxdock
70
71#endif /*RBTCHROM_H_*/
Definition ChromElement.h:36
Definition Chrom.h:26