RxDock 0.1.0
A fast, versatile, and open-source program for docking ligands to proteins and nucleic acids
Loading...
Searching...
No Matches
GPFFSpike.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// GPFFSpike Class. GPFFSpike represents a fitness function
14// valid for the CGP. It is used to train with the Spike set.
15
16#ifndef _RBT_GPFFSPIKE_H_
17#define _RBT_GPFFSPIKE_H_
18
19#include "rxdock/Context.h"
20#include "rxdock/Rand.h"
21#include "rxdock/geneticprogram/GPFitnessFunction.h"
22#include "rxdock/geneticprogram/GPGenome.h"
23#include "rxdock/geneticprogram/GPTypes.h"
24// #include <cmath>
25
26namespace rxdock {
27
28namespace geneticprogram {
29
31public:
32 static const std::string _CT;
33 GPFFSpike(ContextPtr c) : contextp(c) { _RBTOBJECTCOUNTER_CONSTR_(_CT); }
34 virtual ~GPFFSpike() { _RBTOBJECTCOUNTER_DESTR_(_CT); }
35
36 void ReadTables(std::istream &, ReturnTypeArray &, ReturnTypeArray &);
37 double CalculateFitness(GPGenomePtr, ReturnTypeArray &, ReturnTypeArray &,
38 double, bool);
39 double CalculateFitness(GPGenomePtr, ReturnTypeArray &, ReturnTypeArray &,
40 bool);
41
42private:
43 void CreateRandomCtes(int);
44 std::vector<double> ctes;
45 CellContextPtr contextp;
46 GPFFSpike(); // default constructor disabled
47};
48
49// Useful typedefs
50typedef SmartPtr<GPFFSpike> GPFFSpikePtr; // Smart pointer
51typedef std::vector<GPFFSpikePtr> GPFFSpikeList; // Vector of smart pointers
52typedef GPFFSpikeList::iterator GPFFSpikeListIter;
53typedef GPFFSpikeList::const_iterator GPFFSpikeListConstIter;
54
55} // namespace geneticprogram
56
57} // namespace rxdock
58
59#endif //_GPFFSpike
Definition GPFFSpike.h:30
Definition GPFitnessFunction.h:29