-
Notifications
You must be signed in to change notification settings - Fork 1
/
FingerprintingMethod.h
71 lines (60 loc) · 2.14 KB
/
FingerprintingMethod.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#ifndef FINGERPRINTINGMETHOD_H
#define FINGERPRINTINGMETHOD_H
#include <string>
#include "MethodsList.h"
#include "Structure.h"
namespace cfp_internal
{
class FingerprintingMethod
{
public:
FingerprintingMethod(const char* aName) : mName(aName), mCutoff(10.0F), mBinSize(0.05F), mPeakSize(0.02F), mIsNanocluster(false)
{
// mName = aName;
// mCutoff = 10.0F;
// mBinSize = 0.05F;
// mPeakSize = 0.02F;
// mIsNanocluster = false;
};
const std::string& getName(void) const { return mName; }
virtual ~FingerprintingMethod() {};
virtual void computeFingerprint(Structure& aStructure, const unsigned int* aExpansion) =0;
void setCutoffDistance(float aCutoff) {mCutoff = aCutoff;}
void setNanoclusterStructureType(void) {mIsNanocluster = true;}
void setDiffrBinSize(float aBinSize) {mBinSize = aBinSize;}
void setDiffrPeakSize(float aPeakSize) {mPeakSize = aPeakSize;}
virtual bool isDiffractionLike(void) const {return false;}
protected:
std::string mName;
float mCutoff;
float mBinSize;
float mPeakSize;
bool mIsNanocluster;
};
//class NormalizedDiffractionHistogram : public FingerprintingMethod
//{
//public:
// NormalizedDiffractionHistogram() : FingerprintingMethod("Normalized diffraction") {}
// virtual void computeFingerprint(Structure& aStructure, const unsigned int* aExpansion);
// virtual bool isDiffractionLike(void) const {return true;}
//};
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class PerElementRdfHistogram : public FingerprintingMethod
{
public:
PerElementRdfHistogram() : FingerprintingMethod("Per element diffraction") {}
virtual void computeFingerprint(Structure& aStructure, const unsigned int* aExpansion);
virtual bool isDiffractionLike(void) const {return true;}
};
class FingerprintingMethodsList : public MethodsList<FingerprintingMethod>
{
public:
FingerprintingMethodsList()
{
//mMethodsList.push_back(new NormalizedDiffractionHistogram);
mMethodsList.push_back(new PerElementRdfHistogram);
}
~FingerprintingMethodsList() {clear();}
};
}
#endif